summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorReid Yaro <reidyaro@gmail.com>2013-05-26 03:06:36 +0100
committerReid Yaro <reidyaro@gmail.com>2013-05-26 03:06:36 +0100
commitd56440eeff13d44f0f2495ade0bfde4bc8b7cd72 (patch)
treeee2eae49f1e2589961d6990c9faad97a0eb9d511
parent444cd3c4f2ce43ec32d3eef52113c47fc5c39648 (diff)
downloadserverdata-d56440eeff13d44f0f2495ade0bfde4bc8b7cd72.tar.gz
serverdata-d56440eeff13d44f0f2495ade0bfde4bc8b7cd72.tar.bz2
serverdata-d56440eeff13d44f0f2495ade0bfde4bc8b7cd72.tar.xz
serverdata-d56440eeff13d44f0f2495ade0bfde4bc8b7cd72.zip
Add arguments on usePoison function.
-rw-r--r--db/item_db.txt8
-rw-r--r--npc/items/poison.txt14
2 files changed, 11 insertions, 11 deletions
diff --git a/db/item_db.txt b/db/item_db.txt
index 2dcb35a3..73d16a6b 100644
--- a/db/item_db.txt
+++ b/db/item_db.txt
@@ -7,15 +7,15 @@
505, PiouLegs, Piou Legs, 0, 0, 12, 3, 4, , , , , , 2, , , 0, , 0, {itemheal 10, 0;}, {} {}
506, LettuceLeaf, Lettuce Leaf, 0, 0, 48, 12, 1, , , , , , 2, , , 0, , 0, {itemheal 15, 0;}, {} {}
507, Piberries, Piberries, 0, 0, 8, 2, 2, , , , , , 2, , , 0, , 0, {itemheal 20, 0;}, {} {}
-508, SeaDrops, Sea Drops, 0, 0, 4, 1, 4, , , , , , 2, , , 0, , 0, {set @r, 4; set @h, 15; callfunc "usePoison", @r, @h;}, {} {}
+508, SeaDrops, Sea Drops, 0, 0, 4, 1, 4, , , , , , 2, , , 0, , 0, {callfunc "usePoison", 4, 15;}, {} {}
509, Aquada, Aquada, 0, 0, 96, 24, 16, , , , , , 2, , , 0, , 0, {itemheal 60, 0;}, {} {}
-510, PinkBlobime, Pink Blobime, 0, 0, 52, 13, 10, , , , , , 2, , , 0, , 0, {set @r, 3; set @h, 4; callfunc "usePoison", @r, @h;}, {} {}
-// 511,PurpleBlobime, Purple Blobime, 0, 0, 108, 27, 10, , , , , , 2, , , 0, , 0, {set @r, 2; set @h, 6; callfunc "usePoison", @r, @h;}, {} {}
+510, PinkBlobime, Pink Blobime, 0, 0, 52, 13, 10, , , , , , 2, , , 0, , 0, {callfunc "usePoison", 3, 4;}, {} {}
+// 511,PurpleBlobime, Purple Blobime, 0, 0, 108, 27, 10, , , , , , 2, , , 0, , 0, {callfunc "usePoison", 2, 6;}, {} {}
512, HalfCroconut, Half Croconut, 0, 0, 112, 28, 55, , , , , , 2, , , 0, , 0, {itemheal 40, 0;}, {} {}
513, Croconut, Croconut, 0, 0, 30, 8, 100, , , , , , 2, , , 0, , 0, {doevent "Croconut::OnUse";}, {} {}
514, OldBook, Old Book, 0, 2, 300, 75, 25, , , , , , 2, , , 0, , 0, {doevent "OldBook::OnUse";}, {} {}
515, Plushroom, Plushroom, 0, 0, 20, 4, 8, , , , , , 2, , , 0, , 0, {itemheal 25, 0;}, {} {}
-516, PumpkinSeeds, Pumpkin Seeds, 0, 0, 8, 2, 1, , , , , , 2, , , 0, , 0, {set @r, 4; set @h, 1; callfunc "usePoison", @r, @h;}, {} {}
+516, PumpkinSeeds, Pumpkin Seeds, 0, 0, 8, 2, 1, , , , , , 2, , , 0, , 0, {callfunc "usePoison", 4, 1;}, {} {}
517, DeliciousCookie, Delicious Cookie, 0, 0, 1, 1000, 2, , , , , , 2, , , 0, , 0, {itemheal 50, 0;}, {} {}
700, SmallTentacles, Small Tentacles, 0, 3, 80, 20, 5, , , , , , , , , , , 0, {}, {} {}
701, PiouFeathers, Piou Feathers, 0, 3, 32, 8, 1, , , , , , , , , , , 0, {}, {} {}
diff --git a/npc/items/poison.txt b/npc/items/poison.txt
index a6691070..c940ac26 100644
--- a/npc/items/poison.txt
+++ b/npc/items/poison.txt
@@ -5,17 +5,17 @@
// Reid
// Vasily_Makarov
// Description:
-// Poison effect of some items with parameters:
-// @r randomness of bad luck to be poisoned,
-// @h heal value,
-// @p poison value (not implemented yet).
+// Poison effect of some items with arguments:
+// getarg(0) randomness of bad luck to be poisoned,
+// getarg(1) heal value,
+// getarg(2) poison value (not implemented yet).
function script usePoison {
- set @temp, rand(@r);
+ set @temp, rand(getarg(0));
if (@temp == 0) sc_start sc_poison, 1, 50;
set @temp, 0;
set @r, 0;
- itemheal @h, 0;
+ itemheal getarg(1), 0;
set @h, 0;
return;
-} \ No newline at end of file
+}