diff options
author | Jesusaves <cpntb1@ymail.com> | 2021-07-07 20:36:00 -0300 |
---|---|---|
committer | Jesusaves <cpntb1@ymail.com> | 2021-07-07 20:36:00 -0300 |
commit | 6967b9e0b63d19141d4f59b7933a960ac81916d0 (patch) | |
tree | 8ecd9cd2461f3598cb7faece71eb77162aa4ef2a /npc/items/scented_candle.txt | |
parent | 9877fd4ad81120af8e63e96d5d429092014dc017 (diff) | |
parent | 046c659193e1ca8bd13478678d1277df8bf9395c (diff) | |
download | serverdata-6967b9e0b63d19141d4f59b7933a960ac81916d0.tar.gz serverdata-6967b9e0b63d19141d4f59b7933a960ac81916d0.tar.bz2 serverdata-6967b9e0b63d19141d4f59b7933a960ac81916d0.tar.xz serverdata-6967b9e0b63d19141d4f59b7933a960ac81916d0.zip |
Merge branch 'master' into legacy
Override all files with 'master' version.
This version is meant to preserve git history as requested by bjorn.
Diffstat (limited to 'npc/items/scented_candle.txt')
-rw-r--r-- | npc/items/scented_candle.txt | 36 |
1 files changed, 36 insertions, 0 deletions
diff --git a/npc/items/scented_candle.txt b/npc/items/scented_candle.txt new file mode 100644 index 00000000..62ed706d --- /dev/null +++ b/npc/items/scented_candle.txt @@ -0,0 +1,36 @@ +- script ScentedCandle NPC32767,{ + end; + +OnEquip: + if (@scented_candle == 1) end; + goto L_Check; + +OnCheck: + if (getequipid(equip_head) != 5229) goto L_Removed; + goto L_Check; + +L_Check: + @scented_candle = 1; + getmapxy(.@m$, .@x, .@y, 0); + .@r = 12; + + .@c=getunits(BL_MOB, .@mbs, false, .@m$, .@x-.@r, .@y-.@r, .@x+.@r, .@y+.@r); + for (.@i = 0; .@i < .@c; .@i++) { + @target_id=.@mbs[.@i]; + //if (target(BL_ID, @target_id, 0x20) != 0x20) end; // line of sight + if (getunitdata(@target_id, UDT_CLASS) != 1131 && // mana bug + getunitdata(@target_id, UDT_CLASS) != 1055 && // butterfly + getunitdata(@target_id, UDT_CLASS) != 1049 && // bee + getunitdata(@target_id, UDT_CLASS) != 1088) end; // hyvern + aggravate @target_id; + } + addtimer rand(2000), strnpcinfo(0) + "::OnCheck"; + end; + +OnMob: + end; + +L_Removed: + @scented_candle = 0; + end; +} |