diff options
author | gumi <git@gumi.ca> | 2018-08-17 12:49:51 -0400 |
---|---|---|
committer | gumi <git@gumi.ca> | 2018-08-17 12:49:51 -0400 |
commit | 8f6121f9cd38bbd7647f457a6ca26efe3ba9f41e (patch) | |
tree | 783b187ea6d2b59b89e708e85ce221f12e3e5c62 /world/map/npc/items/scentedcandle.txt | |
parent | 283b686c54e50419530bed90b65f5d455cf9cc57 (diff) | |
download | serverdata-8f6121f9cd38bbd7647f457a6ca26efe3ba9f41e.tar.gz serverdata-8f6121f9cd38bbd7647f457a6ca26efe3ba9f41e.tar.bz2 serverdata-8f6121f9cd38bbd7647f457a6ca26efe3ba9f41e.tar.xz serverdata-8f6121f9cd38bbd7647f457a6ca26efe3ba9f41e.zip |
add Scented Candle Helmet
Diffstat (limited to 'world/map/npc/items/scentedcandle.txt')
-rw-r--r-- | world/map/npc/items/scentedcandle.txt | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/world/map/npc/items/scentedcandle.txt b/world/map/npc/items/scentedcandle.txt new file mode 100644 index 00000000..ba29f3cf --- /dev/null +++ b/world/map/npc/items/scentedcandle.txt @@ -0,0 +1,31 @@ +-|script|ScentedCandle|32767 +{ + end; + +OnEquip: + if (@scented_candle == 1) end; + goto L_Check; + +OnCheck: + if (getequipid(equip_head) != 5229) goto L_Removed; + goto L_Check; + +L_Check: + set @scented_candle, 1; + foreach 2, getmap(), (POS_X - 12), (POS_Y - 12), (POS_X + 12), (POS_Y + 12), strnpcinfo(0) + "::OnMob"; + addtimer rand(2000), strnpcinfo(0) + "::OnCheck"; + end; + +OnMob: + if (target(BL_ID, @target_id, 0x20) != 0x20) end; // line of sight + if (get(Class, @target_id) != 1131 && // mana bug + get(Class, @target_id) != 1055 && // butterfly + get(Class, @target_id) != 1049 && // bee + get(Class, @target_id) != 1088) end; // hyvern + aggravate @target_id; + end; + +L_Removed: + set @scented_candle, 0; + end; +} |