diff options
author | Reid Yaro <reidyaro@gmail.com> | 2013-05-23 19:29:34 +0100 |
---|---|---|
committer | Reid Yaro <reidyaro@gmail.com> | 2013-05-24 17:29:08 +0100 |
commit | 444cd3c4f2ce43ec32d3eef52113c47fc5c39648 (patch) | |
tree | 05fdf15433560b8dca29ecf38b8ec4c3025343f2 /npc | |
parent | f9209fc04e421bee4d002989270c04fb8ebd5a86 (diff) | |
download | serverdata-444cd3c4f2ce43ec32d3eef52113c47fc5c39648.tar.gz serverdata-444cd3c4f2ce43ec32d3eef52113c47fc5c39648.tar.bz2 serverdata-444cd3c4f2ce43ec32d3eef52113c47fc5c39648.tar.xz serverdata-444cd3c4f2ce43ec32d3eef52113c47fc5c39648.zip |
Add new poison function with random and heal parameters,
it replaces old individual functions.
Corrected possible bugs in old functions.
Change character space for UseScripts from 33chars to 60chars.
Diffstat (limited to 'npc')
-rw-r--r-- | npc/items/poison.txt | 33 |
1 files changed, 11 insertions, 22 deletions
diff --git a/npc/items/poison.txt b/npc/items/poison.txt index a1e5120b..a6691070 100644 --- a/npc/items/poison.txt +++ b/npc/items/poison.txt @@ -5,28 +5,17 @@ // Reid // Vasily_Makarov // Description: -// Poison effect of some items. +// Poison effect of some items with parameters: +// @r randomness of bad luck to be poisoned, +// @h heal value, +// @p poison value (not implemented yet). -function script usePoisonedWater { - set @temp, rand(4); - if (!@temp) sc_start sc_poison, 1, 50; - if (@temp) itemheal 15, 0; +function script usePoison { + set @temp, rand(@r); + if (@temp == 0) sc_start sc_poison, 1, 50; set @temp, 0; + set @r, 0; + itemheal @h, 0; + set @h, 0; return; -} - -function script usePoisonedBlobime { - set @temp, rand(2); - if (!@temp) sc_start sc_poison, 1, 50; - if (@temp) itemheal 4, 0; - set @temp, 0; - return; -} - -function script usePoisonedSeeds { - set @temp, rand(4); - if (!@temp) itemheal 1, 0; - if (@temp) sc_start sc_poison, 1, 50; - set @temp, 0; - return; -} +}
\ No newline at end of file |