From a99e879e1ee923190be21d8599d32dc003cd45eb Mon Sep 17 00:00:00 2001 From: Reid Date: Fri, 2 Dec 2011 21:38:46 +0100 Subject: Add script.conf file, Add PoisonedWater script for item_db.txt, Changed map name on area script, Corrected usable items script on item_db.txt. --- db/item_db.txt | 16 ++++++++-------- npc/000-0/area.txt | 2 +- npc/items/PoisonedWater.txt | 15 +++++++++++++++ npc/scripts.conf | 7 +++++++ 4 files changed, 31 insertions(+), 9 deletions(-) create mode 100644 npc/items/PoisonedWater.txt create mode 100644 npc/scripts.conf diff --git a/db/item_db.txt b/db/item_db.txt index bbef7454..dc0450c1 100644 --- a/db/item_db.txt +++ b/db/item_db.txt @@ -1,13 +1,13 @@ #ID, Name, Label, Attr, Type, Price, Sell, Weight, ATK, DEF, Range, Mbonus, Slot, Gender, Loc, wLV, eLV, View, LifeTime, {UseScript}, {EquipScript} {UnEquipScript} 0, DEFAULT, Default, 0, 0, 0, 0, 10, , , , , , 2, , , , , 0, {}, {} , -501, Acorn, Acorn, 0, 0, 10, 2, 2, , , , , , 2, , , 0, , 0, { itemheal 15, 0; }, 0;}, , -502, Bread, Bread, 0, 0, 15, 8, 5, , , , , , 2, , , 0, , 0, { itemheal 30, 0; }, 0;}, , -503, Carrot, Carrot, 0, 0, 20, 10, 6, , , , , , 2, , , 0, , 0, { itemheal 25, 0; }, 0;}, , -504, Cheese, Cheese, 0, 0, 40, 18, 6, , , , , , 2, , , 0, , 0, { itemheal 50, 0; }, 0;}, , -505, Piouslegs, Pious legs, 0, 0, 50, 35, 8, , , , , , 2, , , 0, , 0, { itemheal 40, 0; }, 0;}, , -506, Lettuce, Lettuce, 0, 0, 25, 12, 5, , , , , , 2, , , 0, , 0, { itemheal 15, 0; }, 0;}, , -507, Piberries, Piberries, 0, 0, 40, 20, 3, , , , , , 2, , , 0, , 0, { itemheal 20, 0; }, 0;}, , -508, Seadrop, Sea drop, 0, 0, 5, 1, 2, , , , , , 2, , , 0, , 0, { itemheal 15, 0; }, 0;}, , +501, Acorn, Acorn, 0, 0, 10, 2, 2, , , , , , 2, , , 0, , 0, { itemheal 15, 0; }, {}, , +502, Bread, Bread, 0, 0, 15, 8, 5, , , , , , 2, , , 0, , 0, { itemheal 30, 0; }, {}, , +503, Carrot, Carrot, 0, 0, 20, 10, 6, , , , , , 2, , , 0, , 0, { itemheal 25, 0; }, {}, , +504, Cheese, Cheese, 0, 0, 40, 18, 6, , , , , , 2, , , 0, , 0, { itemheal 50, 0; }, {}, , +505, Piouslegs, Pious legs, 0, 0, 50, 35, 8, , , , , , 2, , , 0, , 0, { itemheal 40, 0; }, {}, , +506, Lettuce, Lettuce, 0, 0, 25, 12, 5, , , , , , 2, , , 0, , 0, { itemheal 15, 0; }, {}, , +507, Piberries, Piberries, 0, 0, 40, 20, 3, , , , , , 2, , , 0, , 0, { itemheal 20, 0; }, {}, , +508, Seadrop, Sea drop, 0, 0, 5, 1, 2, , , , , , 2, , , 0, , 0, { callfunc "usePoisonedWater"; }, {}, , 700, Three-leafclover, Three-leaf clover, 0, 3, 10, 3, 5, , , , , , , , , , , 0, {}, {}, , 701, Piousfeathers, Pious feathers, 0, 3, 60, 35, 1, , , , , , , , , , , 0, {}, {}, , 702, Tortugasshellfragment, Tortugas shell fragment,0, 3, 40, 15, 15, , , , , , , , , , , 0, {}, {}, , diff --git a/npc/000-0/area.txt b/npc/000-0/area.txt index caed50cc..0d62cff5 100644 --- a/npc/000-0/area.txt +++ b/npc/000-0/area.txt @@ -31,6 +31,6 @@ mesq l("The sailors take you aboard their ship to help you."); //italic next; - warp 002-0-x.gat,0,0; + warp 000-2-x.gat,0,0; } diff --git a/npc/items/PoisonedWater.txt b/npc/items/PoisonedWater.txt new file mode 100644 index 00000000..40e93093 --- /dev/null +++ b/npc/items/PoisonedWater.txt @@ -0,0 +1,15 @@ +// Evol scripts. +// Authors: +// Alastrim, Vasily_Makarov, Reid +// Description: +// Heal of 25hp and add 1/4 bad luck to be poisoned. + +function|script|usePoisonedWater|{ + set @temp, rand(4); + if (!@temp) sc_start sc_poison, 1, 50; + if (!@temp) message strcharinfo(0), "Debug: Poisoned"; + if (@temp) itemheal 15, 0; + if (@temp) message strcharinfo(0), "Debug: Healed"; + set @temp, 0; + return; +} diff --git a/npc/scripts.conf b/npc/scripts.conf new file mode 100644 index 00000000..2bfd0bdd --- /dev/null +++ b/npc/scripts.conf @@ -0,0 +1,7 @@ +// This is the main script import file + +// NPC Functions +// npc: npc/functions/.txt + +// maps +import: npc/_import.txt -- cgit v1.2.3-60-g2f50