diff options
author | Jesusaves <cpntb1@ymail.com> | 2021-04-11 14:54:09 -0300 |
---|---|---|
committer | Jesusaves <cpntb1@ymail.com> | 2021-04-11 14:54:09 -0300 |
commit | 4432d9c535e827ce47e4e06e2afa1dcbc6d6daa6 (patch) | |
tree | 6e71af3a6e77a3835e01657004552d882404a8fa | |
parent | 1fc2808ea0320c193701d09f00dddcadd8a2fe69 (diff) | |
download | serverdata-4432d9c535e827ce47e4e06e2afa1dcbc6d6daa6.tar.gz serverdata-4432d9c535e827ce47e4e06e2afa1dcbc6d6daa6.tar.bz2 serverdata-4432d9c535e827ce47e4e06e2afa1dcbc6d6daa6.tar.xz serverdata-4432d9c535e827ce47e4e06e2afa1dcbc6d6daa6.zip |
Add Scented Candle Helmet again
-rw-r--r-- | npc/items/scented_candle.txt | 36 | ||||
-rw-r--r-- | npc/scripts.conf | 1 |
2 files changed, 37 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; +} diff --git a/npc/scripts.conf b/npc/scripts.conf index 0c06fc83..4d409088 100644 --- a/npc/scripts.conf +++ b/npc/scripts.conf @@ -49,6 +49,7 @@ // Items "npc/items/purification_potion.txt", "npc/items/scissors.txt", +"npc/items/scented_candle.txt", "npc/items/pickled_beets.txt", "npc/items/shock_sweet.txt", "npc/items/unreleased_item.txt", |