From 108258ababf3f86bff8479535968dfe709679f2a Mon Sep 17 00:00:00 2001 From: Jesusaves Date: Mon, 14 Nov 2022 01:02:42 -0300 Subject: Sweet Tooth basic sketch (functional) --- world/map/db/const-aegis.txt | 2 ++ world/map/db/item_db.conf | 5 +++++ world/map/db/item_db_weapon.txt | 1 + world/map/db/mob_db_40_59.txt | 2 +- world/map/npc/functions/global_event_handler.txt | 2 ++ world/map/npc/items/check_wand.txt | 21 ++++++++++++++++++++- world/map/npc/magic/level0-wand.txt | 6 +++--- 7 files changed, 34 insertions(+), 5 deletions(-) diff --git a/world/map/db/const-aegis.txt b/world/map/db/const-aegis.txt index d354815b..3a053cb8 100644 --- a/world/map/db/const-aegis.txt +++ b/world/map/db/const-aegis.txt @@ -983,6 +983,8 @@ Naftalin 5288 ArmorBreaker 5289 SilverArrow 5290 ThornArrow 5291 +SilverOre 5292 +SweetTooth 1170 FireGoblin 1011 Bat 1017 ManaBug 1131 diff --git a/world/map/db/item_db.conf b/world/map/db/item_db.conf index c7d4b797..2b3e7565 100644 --- a/world/map/db/item_db.conf +++ b/world/map/db/item_db.conf @@ -15178,5 +15178,10 @@ item_db: ( AegisName: "SilverOre" Name: "Silver Ore" }, +{ + Id: 1170 + AegisName: "SweetTooth" + Name: "Sweet Tooth" +}, ) diff --git a/world/map/db/item_db_weapon.txt b/world/map/db/item_db_weapon.txt index 98e56330..983d8927 100644 --- a/world/map/db/item_db_weapon.txt +++ b/world/map/db/item_db_weapon.txt @@ -49,6 +49,7 @@ 623, Scythe, 4, 100, 50, 1200, 75, 0, 1, 0, 0, 2, 34, 1, 1, 3, {}, {} 758, WoodenStaff, 4, 4000, 2000, 1000, 50, 0, 1, 10, 0, 2, 34, 1, 1, 10, {}, {set @bStat, Int;set @minbStatVal, 60;callfunc "RequireStat";} //ID, Name___________________, Type, Price, Sell, Weight, ATK, DEF, Range, Mbonus, Slot, Gender, Loc, wLV, eLV, View, {UseScript}, {EquipScript} +1170, SweetTooth, 4, 4000, 2000, 1000, 50, 0, 1, 15, 0, 2, 34, 1, 1, 10, {}, {set @bStat, Int;set @minbStatVal, 60;callfunc "RequireStat";} 1171, Wand, 4, 400, 200, 100, 1, 0, 1, 5, 0, 2, 2, 1, 1, 1, {}, {set @bStat, Int;set @minbStatVal, 5;callfunc "RequireStat";} 762, TerraniteArrow, 10, 80, 20, 1, 50, 0, 0, 0, 0, 2, 32768, 0, 0, 0, {}, {bonus bCritical, 20;set @AmmoType, AMMO_BOW; callfunc "CheckAmmo";} 867, IceGladius, 4, 2000, 1000, 1000, 110, 0, 1, 0, 0, 2, 2, 1, 1, 1, {}, {bonus bLuk, 1;} diff --git a/world/map/db/mob_db_40_59.txt b/world/map/db/mob_db_40_59.txt index dcde423b..e2092c44 100644 --- a/world/map/db/mob_db_40_59.txt +++ b/world/map/db/mob_db_40_59.txt @@ -11,7 +11,7 @@ 1088, Hyvern, Hyvern, 40, 2250, 0, 990, 346, 1, 50, 125, 0, 10, 10, 45, 5, 0, 35, 35, 9, 10, 1, 0, 42, 133, 250, 800, 672, 480, 835, 2000, 518, 1000, 657, 600, 529, 3000, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 30 1090, Wolvern, Wolvern, 40, 900, 0, 280, 86, 1, 50, 80, 5, 5, 15, 10, 5, 0, 20, 10, 9, 10, 1, 3, 10, 133, 425, 770, 500, 200, 858, 1000, 859, 400, 4023, 200, 676, 1300, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 40 1091, BlueSlime, BlueSlime, 40, 2000, 0, 760, 77, 1, 100, 150, 20, 40, 40, 30, 50, 10, 50, 40, 9, 10, 1, 0, 31, 131, 1200, 1872, 672, 480, 4026, 200, 4005, 20, 501, 500, 862, 700, 863, 100, 864, 500, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 20 -1098, CopperSlime, CopperSlime, 40, 600, 0, 200, 18, 1, 60, 90, 20, 30, 20, 30, 10, 10, 30, 30, 9, 10, 1, 0, 11, 131, 1200, 1872, 672, 480, 640, 1500, 537, 1000, 4001, 300, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 20 +1098, CopperSlime, CopperSlime, 40, 600, 0, 200, 18, 1, 60, 90, 20, 30, 20, 30, 10, 10, 30, 30, 9, 10, 1, 0, 11, 131, 1200, 1872, 672, 480, 640, 1500, 537, 1000, 4001, 300, 5292, 25, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 20 1111, CandiedSlime, CandiedSlime, 50, 800, 0, 800, 66, 3, 50, 50, 20, 30, 20, 30, 10, 10, 30, 30, 9, 10, 1, 0, 11, 175, 1200, 1872, 672, 480, 510, 1000, 509, 1000, 515, 200, 516, 200, 538, 200, 512, 200, 508, 500, 514, 750, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 20 1112, Santaboo, Santaboo, 50, 2200, 0, 1040, 59, 2, 80, 125, 50, 10, 25, 10, 25, 0, 60, 30, 2, 10, 1, 3, 10, 129, 600, 1872, 672, 480, 512, 1000, 736, 1200, 737, 1200, 738, 1200, 739, 1200, 511, 50, 4042, 10, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 30 1164, ChristmasTree, ChristmasTree, 40, 12000, 0, 3647, 392, 2, 40, 40, 20, 40, 30, 30, 30, 30, 30, 30, 9, 10, 1, 0, 10, 128, 190, 1500, 800, 800, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 diff --git a/world/map/npc/functions/global_event_handler.txt b/world/map/npc/functions/global_event_handler.txt index 690b0566..f7156539 100644 --- a/world/map/npc/functions/global_event_handler.txt +++ b/world/map/npc/functions/global_event_handler.txt @@ -24,10 +24,12 @@ OnPCLoginEvent: OnPCKillEvent: callfunc "elanore_decrease_exp"; // decrease heal exp for doing bad things + callfunc "SweetTooth"; end; OnMobKillEvent: callfunc "MobPoints"; + callfunc "SweetTooth"; end; OnPCDieEvent: diff --git a/world/map/npc/items/check_wand.txt b/world/map/npc/items/check_wand.txt index 93993c53..5284b3ac 100644 --- a/world/map/npc/items/check_wand.txt +++ b/world/map/npc/items/check_wand.txt @@ -1,2 +1,21 @@ // Wands -// Author: Wushin +// Author: Jesusalva + +function|script|SweetTooth +{ + if (getequipid(equip_hand1) != SweetTooth) goto L_Return; + set Sp, min(MaxSp, Sp + MaxSp / 20); // Restore up to 5% MP + if (strcharinfo(1) == "follow the white rabbit") + goto L_Cake; + return; + +L_Cake: + if (@sweetooth > gettimetick(2)) goto L_Return; + message strcharinfo(0), "The @@1170|@@ gave you cake. It was delicious! Your mana was restored."; + set @sweetooth, gettimetick(2) + 160; + return; + +L_Return: + return; +} + diff --git a/world/map/npc/magic/level0-wand.txt b/world/map/npc/magic/level0-wand.txt index b1dfb686..81864df5 100644 --- a/world/map/npc/magic/level0-wand.txt +++ b/world/map/npc/magic/level0-wand.txt @@ -73,9 +73,9 @@ L_Failed: end; OnInit: - setarray .Wands[0], 0, 758, 1171, 906; - setarray .WandsPwr[0], 0, 2, 1, 1; - setarray .WandsAnim[0], 0, OVERRIDE_WAND_STAFF, OVERRIDE_WAND_WAND, OVERRIDE_BLADE; + setarray .Wands[0], 0, 758, 1170, 1171, 906; + setarray .WandsPwr[0], 0, 2, 2, 1, 1; + setarray .WandsAnim[0], 0, OVERRIDE_WAND_STAFF, OVERRIDE_WAND_STAFF, OVERRIDE_WAND_WAND, OVERRIDE_BLADE; set .school, SKILL_MAGIC; set .invocation$, chr(MAGIC_SYMBOL) + "confringo"; // used in npcs that refer to this spell void call("magic_register"); -- cgit v1.2.3-70-g09d2