diff options
author | Jesusaves <cpntb1@ymail.com> | 2024-05-21 20:46:02 -0300 |
---|---|---|
committer | Jesusaves <cpntb1@ymail.com> | 2024-05-21 20:46:02 -0300 |
commit | e5a23db6bdeac6cdbe578579d44916ea05a18293 (patch) | |
tree | c61e44fd919277ff8603757d3348695e708e859b /npc/010-4-1 | |
parent | c829616eef67ec98418c9cd5817a1e4b55871c30 (diff) | |
download | serverdata-e5a23db6bdeac6cdbe578579d44916ea05a18293.tar.gz serverdata-e5a23db6bdeac6cdbe578579d44916ea05a18293.tar.bz2 serverdata-e5a23db6bdeac6cdbe578579d44916ea05a18293.tar.xz serverdata-e5a23db6bdeac6cdbe578579d44916ea05a18293.zip |
Katze the Cat + minor bugfixes. Cat Ears removed - no reward whatsoever.
Diffstat (limited to 'npc/010-4-1')
-rw-r--r-- | npc/010-4-1/katze.txt | 148 |
1 files changed, 147 insertions, 1 deletions
diff --git a/npc/010-4-1/katze.txt b/npc/010-4-1/katze.txt index 39761105f..b093ce769 100644 --- a/npc/010-4-1/katze.txt +++ b/npc/010-4-1/katze.txt @@ -3,13 +3,159 @@ // Jesusalva // Description: // THIS IS A PLACEHOLDER +// Variables: +// $KATZE_DONATION = int +// CaveQuest_Katze ( state, today_contribution, date ) 010-4-1,44,30,0 script Katze NPC_KATZE,{ - npctalk3 l("Meow."); + mesn; + mesq l("Meow."); + next; + mesn strcharinfo(0); + mesq l("What is a cat doing in the middle of the desert?"); + next; + mesn; + mesq l("Why, I'm waiting for donors, of course. Don't you see the pot there?"); + next; + mesn strcharinfo(0); + mesq l("Do I gain anything by donating?"); + next; + mesn; + mesq l("My gratitude and the knowledge you helped to make this cave a nicer place to live?"); + compareandsetq CaveQuest_Katze, 0, 1; + npctalk3 l("Did you knew that %s's generosity is legendary?", rand_sponsor()); + close; + // ... + // Then you can donate Katze some items, + // "why, thank you!" she'll say whenever you drop anything on the pot + // via closeclientdialog + npctalk + // + // No Cat Ears regardless of whatever you donate, no "lets play" like TMW Classic + // Inspector Quest: You can ask her, she'll signal the pot, and THEN you start + // giving Katze the items for the cat ears. + // She'll, however, reward you with the information you're looking for. + // After instructing her on how to trade, she'll reward you a Golden Apple + // You can come back to Inspector to begin the second part. end; + OnInit: .distance=5; .sex = G_OTHER; + +OnLoadMobilia: + if ($KATZE_DONATION >= 5000) + setcells "010-4-1", 44, 31, 44, 31, 2, "Katze_Books1"; + if ($KATZE_DONATION >= 10000) + setcells "010-4-1", 43, 29, 43, 29, 2, "Katze_Hat1"; + if ($KATZE_DONATION >= 25000) + setcells "010-4-1", 44, 22, 44, 22, 2, "Katze_Paint1"; + if ($KATZE_DONATION >= 60000) + setcells "010-4-1", 46, 29, 46, 29, 2, "Katze_Flower1"; + if ($KATZE_DONATION >= 120000) + setcells "010-4-1", 40, 33, 40, 33, 2, "Katze_Paint2"; + if ($KATZE_DONATION >= 250000) + setcells "010-4-1", 40, 28, 40, 28, 2, "Katze_Books2"; + if ($KATZE_DONATION >= 500000) + setcells "010-4-1", 46, 35, 46, 35, 2, "Katze_Flower2"; + if ($KATZE_DONATION >= 1000000) + setcells "010-4-1", 46, 22, 46, 22, 2, "Katze_Paint3"; + if ($KATZE_DONATION >= 1500000) + setcells "010-4-1", 41, 22, 41, 22, 2, "Katze_Cooks1"; + if ($KATZE_DONATION >= 2500000) + setcells "010-4-1", 47, 30, 47, 30, 2, "Katze_Cooks2"; + if ($KATZE_DONATION >= 3000000) + setcells "010-4-1", 42, 29, 42, 29, 2, "Katze_Cryst1"; + if ($KATZE_DONATION >= 3500000) + setcells "010-4-1", 45, 31, 45, 31, 2, "Katze_Candle"; + if ($KATZE_DONATION >= 4000000) + setcells "010-4-1", 46, 33, 46, 33, 2, "Katze_Paint4"; + if ($KATZE_DONATION >= 4500000) + setcells "010-4-1", 47, 29, 47, 29, 2, "Katze_Desks1"; + if ($KATZE_DONATION >= 5000000) + setcells "010-4-1", 48, 29, 48, 29, 2, "Katze_Cooks3"; + if ($KATZE_DONATION >= 6000000) + setcells "010-4-1", 41, 28, 41, 28, 2, "Katze_Books3"; + if ($KATZE_DONATION >= 7000000) + setcells "010-4-1", 45, 22, 45, 22, 2, "Katze_Paint5"; + if ($KATZE_DONATION >= 8000000) + setcells "010-4-1", 37, 28, 37, 28, 2, "Katze_Flower3"; + if ($KATZE_DONATION >= 9000000) + setcells "010-4-1", 43, 22, 43, 22, 2, "Katze_Cooks4"; + if ($KATZE_DONATION >= 1000000) + setcells "010-4-1", 39, 33, 39, 33, 2, "Katze_Clock1"; + if ($KATZE_DONATION >= 1250000) + setcells "010-4-1", 53, 24, 53, 24, 2, "Katze_Notes1"; + if ($KATZE_DONATION >= 1500000) + setcells "010-4-1", 56, 25, 56, 25, 2, "Katze_Gifts1"; + if ($KATZE_DONATION >= 1750000) + setcells "010-4-1", 40, 22, 40, 22, 2, "Katze_Cooks5"; + if ($KATZE_DONATION >= 2000000) + setcells "010-4-1", 53, 26, 53, 26, 2, "Katze_Anvil1"; + if ($KATZE_DONATION >= 2500000) + setcells "010-4-1", 35, 20, 35, 21, 2, "Katze_Statue1"; + end; +} + +010-4-1,46,30,0 script Pot#Katze NPC_NO_SPRITE,{ + .@q = getq(CaveQuest_Katze); + .@q3 = getq3(CaveQuest_Katze); + // Quest not started + if (!.@q) end; + // Daily limit reset + if (.@q3 != gettimeparam(GETTIME_DAYOFMONTH)) + setq CaveQuest_Katze, .@q, 0, gettimeparam(GETTIME_DAYOFMONTH); + // Main loop + mes "##B" + l("Drag and drop an item from your inventory.") + "##b"; + + .@id = requestitem(); + + // Check for donation restrictions + if (.@id < 1) { + mesc l("You give up."); + close; + } else if (checkbound(.@id)) { + mesc l("You cannot donate bound items!"); + close; + } else if ((getiteminfo(.@id, ITEMINFO_TRADE) & ITR_NOSELLTONPC)) { + mesc l("This item cannot be given to NPCs!"); + close; + } else if (!getiteminfo(.@id, ITEMINFO_MAXCHANCE)) { + mesc l("This item is too precious, you cannot part with it!"); + close; + } else if (getiteminfo(.@id, ITEMINFO_TYPE) != IT_HEALING && + getiteminfo(.@id, ITEMINFO_TYPE) != IT_USABLE && + getiteminfo(.@id, ITEMINFO_TYPE) != IT_ETC) { + mesc l("You can only donate generic items to Katze."); + close; + } + + // Limit checks + .@q2 = getq2(CaveQuest_Katze); + .@gp = getiteminfo(.@id, ITEMINFO_SELLPRICE); + if ((.@q2 + .@gp) > .limit) { + mesc l("You cannot donate this item, as Katze is no beggar and she'll not allow you to impoverish yourself for her sake."); + mesc l("Daily limit: %s / %s GP", fnum(.@q2 + .@gp), fnum(.limit)), 1; + close; + } + + // Everything went fine, so confirm & complete the donation + mesc l("Are you sure you want to donate a %s to Katze?", getitemlink(.@id)), 1; + if (askyesno() == ASK_YES) { + delitem .@id, 1; + setq2 CaveQuest_Katze, .@q2 + .@gp; + $KATZE_DONATION += .@gp; + npctalk l("Why %s, thank you!", strcharinfo(0)), "Katze"; + if ($@GM_OVERRIDE) + debugmes sprintf("Katze Donations: %s", fnum($KATZE_DONATION)); + donpcevent "Katze::OnLoadMobilia"; + } + closeclientdialog; + close; + +OnInit: + .distance=2; + .sex = G_OTHER; + .limit = 10000; // Max worth you can donate at once end; } |