Jump to content

Nebraskka

Members
  • Content Count

    44
  • Joined

  • Last visited

Posts posted by Nebraskka


  1. Try to do this in src/map/skill.c:

     

    int skill_attack(int attack_type, struct block_list* src, struct block_list *dsrc, struct block_list *bl, uint16 skill_id, uint16 skill_lv, int64 tick, int flag) {...	nullpo_ret(src);	// Source is the master behind the attack (player/mob/pet)	nullpo_ret(dsrc); // dsrc is the actual originator of the damage, can be the same as src, or a skill casted by src.	nullpo_ret(bl); //Target to be attacked.	if (src != dsrc) {		//When caster is not the src of attack, this is a ground skill, and as such, do the relevant target checking. [Skotlex]		if (!status->check_skilluse(battle_config.skill_caster_check?src:NULL, bl, skill_id, 2))			return 0;		if( skill_id == PR_MAGNUS && !check_distance_bl(src,dsrc,battle_config.area_size) ) //If distance between "damage source" ME and "source" aka player exceeds view range, it has no effect.			return 0;	}...}

    Add the 2nd check, the one with if( skill_id == PR_MAGNUS ...)

    Not tested, sorry.

     

    Success! What an elegant solution.

    Thanks for your time! :lv:


  2. Happy holidays!

     

    Does there any existing mechanism that allows to implement this behavior?

    End ME damage and it's unitcells immediatly after caster leaving it's view range.

     

    Trying to prevent ME/wing spam gameplay, that currently allowing to flood all map with ME and gaing lot's of experience without being touched.

     

    Any directions would be appreciated <3


  3. In

    that case, you can insert the piece of code where the goto is; In other

    more complicated cases you could callsub that, which is basically a

    goto with the possibility of adding parameters and (to my understanding

    the reason of avoiding using goto) the ability of returning the control

    to where it was called when the subprogram execution has been finished.

     

    Hey, callsub would perfectly solve my case!

    Thanks for explanation! :lv:

     

     

    	switch(select("Yes.:No."))	{		case 1:			mes "[Woman]";			mes "What a nice guy you are!";			close;		case 2:			mes "[Woman]";			mes "Ugh... Bye then.";			close;	}
     

     

    easy thing xD I came here expecting something complex :P

     

    Oh c'mon, that was an abstract example! :meow:

    There probably could be not just 1 dialog, and I wondered about ways of avoiding duplication of code.

     

    Anyway, thanks for contributing!


  4. Heya!

     

    While legacy commands like goto being deprecated,

    is there any other way to achieve this?

     

    prontera,149,266,5    script    Woman    650,{    if(@we_dont_like_her) {        mes "[Woman]";        mes "How about now?";        mes "Do you like me?";        next;        if(select("Yes.:No.")==1)            goto L_NiceGuy;        mes "[Woman]";        mes "Ugh... Bye then.";        close;    }    mes "[Woman]";    mes "Heya!";    next;    switch( select("Hi!:How are you?") ) {        case 1:            mes "[Woman]";            mes "Hello!";            close;        case 2:            mes "[Woman]";            mes "Fine, thanks!";            next;            if ( select("Nice! Bye!:I don't really like you.") == 2 ) {                set @we_dont_like_her;                mes "[Woman]";                mes "Oh. Fine then.";                close;            }L_NiceGuy:            mes "[Woman]";            mes "What a nice guy you are!";            close;    }}                                                                

     


  5. How about transfer them to another repo?

    Most of them are quite useful as example for development, but in most cases not needed in production folder.

    If somebody wants, they could Pull Request this repo with their fixes.

     

    I'm also not sure about need in maintaining basic ones (Healer, Bank etc).

    Current versions being modified on most popular servers anyway, because they are not enough technically advanced, and direction of this improvement being determined by server's policy (which couldn't be unified for everyone).

     

    If beginner would need some NPCs from customs, he could find appropriate topic at Scripts board (matching all his needs), or to develop himself on the codebase of customs-repo.


  6. Welcome back!

     

    Hope you find some interesting information with us,

    and wish you would contribute your knowledge as well. :no1:


  7. I have been thinking this for a few months, and i am ready to quit the ro scene.

    It has been an awesome time, gained alot of friends, learned alot of things, and dedicated several years of my life to *athena.

     

    i hope i have made a difference or even inspired some people in some way.

    Thank you for being an awesome community.

     

    Yommy <3

    /sadface

     

    Wish you best in your personal life! =3

    Do you think Hercules would make it without your dedication?

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.