diff options
author | mekolat <mekolat@users.noreply.github.com> | 2016-03-30 19:52:24 -0400 |
---|---|---|
committer | mekolat <mekolat@users.noreply.github.com> | 2016-04-07 06:58:14 -0400 |
commit | 40add9a2181ef5cb2d8804eeb01c0a190d6c8ee5 (patch) | |
tree | b2fb2774a570950cb6db582da8a25361e8d70249 /world/map/npc/magic/_procedures.txt | |
parent | c22162b0a8cd9cceab579548bbc1b68ff67ba4dd (diff) | |
download | serverdata-40add9a2181ef5cb2d8804eeb01c0a190d6c8ee5.tar.gz serverdata-40add9a2181ef5cb2d8804eeb01c0a190d6c8ee5.tar.bz2 serverdata-40add9a2181ef5cb2d8804eeb01c0a190d6c8ee5.tar.xz serverdata-40add9a2181ef5cb2d8804eeb01c0a190d6c8ee5.zip |
slowly getting things done
explain the debug spell is deprecated
upmarmu typo
cooldown fix
make maps with updated converter, make nodes
update permissions
Diffstat (limited to 'world/map/npc/magic/_procedures.txt')
-rw-r--r-- | world/map/npc/magic/_procedures.txt | 19 |
1 files changed, 14 insertions, 5 deletions
diff --git a/world/map/npc/magic/_procedures.txt b/world/map/npc/magic/_procedures.txt index 57a83fa9..df750f73 100644 --- a/world/map/npc/magic/_procedures.txt +++ b/world/map/npc/magic/_procedures.txt @@ -1,6 +1,6 @@ function|script|magic_register { - debugmes ">> Register " + .invocation$ + " @ " + strnpcinfo(0); + //debugmes ">> Register " + .invocation$ + " @ " + strnpcinfo(0); set .@ext$, if_then_else(getarg(0,"") != "", "::"+getarg(0), ""); registercmd .invocation$, strnpcinfo(0) + .@ext$; // register the spell set .index, $@magic_index; @@ -8,12 +8,21 @@ function|script|magic_register return; } +// this can only be done with a npc so... +-|script|Magic Timer|32767 +{ + end; +OnClear: + set @_M_BLOCK, 0; + end; +} + // this function is call()-only function|script|magic_checks { set .@r, 0; if(getpvpflag(1)) set .@r, 1; // FIXME: make HIDDEN into a param - if((gettimetick(2) - MAGIC_CAST_TICK) < 0) set .@r, 2; // check if last debuff ended + if(@_M_BLOCK) set .@r, 2; // check if last debuff ended if(Hp < 1) set .@r, 3; // can not cast when dead return .@r; } @@ -22,10 +31,10 @@ function|script|elt_damage { // args are damage, dmgplus(mutation), bonus_elt, malus_elt, effect set .@dmg, getarg(0) + rand(getarg(1)); - if(elttype(@target_id) == getarg(3)) // malus + if(get(ELTTYPE, @target_id) == getarg(3)) // malus set .@dmg, .@dmg / 3; - if(elttype(@target_id) == getarg(2)) // bonus - set .@dmg, ((eltlvl(@target_id) + 4) * .@dmg) / 4; + if(get(ELTTYPE, @target_id) == getarg(2)) // bonus + set .@dmg, ((get(ELTLVL, @target_id) + 4) * .@dmg) / 4; set .@source, .caster; if (!.@source) set .@source, getcharid(3); |