diff options
author | Jesusaves <cpntb1@ymail.com> | 2022-10-23 21:44:22 -0300 |
---|---|---|
committer | Jesusaves <cpntb1@ymail.com> | 2022-10-23 21:44:22 -0300 |
commit | a7c45a192268da2601cef47a4cdba987ae2327ca (patch) | |
tree | c5fb5b97db109fe7106496dd96498c475881046b /npc/005-4 | |
download | serverdata-a7c45a192268da2601cef47a4cdba987ae2327ca.tar.gz serverdata-a7c45a192268da2601cef47a4cdba987ae2327ca.tar.bz2 serverdata-a7c45a192268da2601cef47a4cdba987ae2327ca.tar.xz serverdata-a7c45a192268da2601cef47a4cdba987ae2327ca.zip |
Initial commit (Moubootaur Legends fork)
Diffstat (limited to 'npc/005-4')
-rw-r--r-- | npc/005-4/_import.txt | 6 | ||||
-rw-r--r-- | npc/005-4/_warps.txt | 3 | ||||
-rw-r--r-- | npc/005-4/rosen.txt | 221 | ||||
-rw-r--r-- | npc/005-4/shop.txt | 48 | ||||
-rw-r--r-- | npc/005-4/tolchi.txt | 407 |
5 files changed, 685 insertions, 0 deletions
diff --git a/npc/005-4/_import.txt b/npc/005-4/_import.txt new file mode 100644 index 0000000..e93dfbb --- /dev/null +++ b/npc/005-4/_import.txt @@ -0,0 +1,6 @@ +// Map 005-4: Armor Shop +// This file is generated automatically. All manually added changes will be removed when running the Converter. +"npc/005-4/_warps.txt", +"npc/005-4/rosen.txt", +"npc/005-4/shop.txt", +"npc/005-4/tolchi.txt", diff --git a/npc/005-4/_warps.txt b/npc/005-4/_warps.txt new file mode 100644 index 0000000..21addc1 --- /dev/null +++ b/npc/005-4/_warps.txt @@ -0,0 +1,3 @@ +// This file is generated automatically. All manually added changes will be removed when running the Converter. +// Map 005-4: Armor Shop warps +005-4,25,43,0 warp #005-4_25_43 0,0,005-1,55,81 diff --git a/npc/005-4/rosen.txt b/npc/005-4/rosen.txt new file mode 100644 index 0000000..3c67021 --- /dev/null +++ b/npc/005-4/rosen.txt @@ -0,0 +1,221 @@ +// TMW2 scripts. +// Author: +// Saulc +// Description: +// Candor Armor&Weapon shop keeper. +// Variables: +// CandorQuest_Rosen +// Suggestion: Deliver a letter to Zegas, giving player background about +// Candor Island and Saxso. Requires level 5. Reward: 150 GP. +// Could have an additional step related to Bifs. Even a daily quest asking +// for (day % 8) ore, with suitable prices. +// +// 0 - Not assigned +// 1 - Quest Accepted +// 2 - Quest Complete +// 3 - Reward Taken +// 4 - Second Quest Accepted +// 5 - Second Quest Complete + +005-4,29,36,0 script Rosen NPC_GUARD1,{ + function explain_ironingot { + speech S_FIRST_BLANK_LINE | S_LAST_NEXT, + l("Did you see Jhedia the blacksmith in Tulimshar? She might know how you could get this."), + l("Nevertheless, you probably need some base materials from Bifs. Who knows what it will drop if you are lucky?"); + + return; + } + + speech S_LAST_NEXT, + l("Welcome to Tolchi and Rosen Shop."), + l("What would you like today?"); + + do + { + select + menuaction(l("Trade")), + l("How can I get iron ingot?"), + l("I want to improve my equipment."), + menuaction(l("Quit")); + + switch (@menu) + { + case 1: + if (!getq(General_Narrator) && TUTORIAL) { + mesn; + mesc l("Please spend responsibly. You still need to pay Nard for a ship travel and there's only so much money you can find on a small island like Candor."), 1; + mesc l("And some of the shop items can be found as drops or in quests!"); + next; + } + closedialog; + shop "Shop#Candor"; + close; + case 2: + explain_ironingot; + break; + case 3: + goto L_Gloves; + break; + case 4: + closedialog; + goodbye; + close; + } + } while (1); + + +L_Gloves: + .@q=getq(CandorQuest_Rosen); + .@b=getq(ShipQuests_ChefGado); + mes ""; + if (BaseLevel < 4) goto L_NoLevel; + if (.@b < 2) goto L_NoGloves; + if (.@q >= 3) goto L_Complete; + .@k=getq2(CandorQuest_Rosen); // Get number of kills (via getq2) + + mesn; + if (.@q == 0) { + mesq l("Ah, I see you have some used gloves. I'm not sure if you can even mine with it..."); + next; + mesn; + mesq l("Uhm, maybe I could teach you something, too. Go mine 5 @@. You should find some at northeast of the Island.", getmonsterlink(DiamondBif)); + tutmes l("Bif is a monster shaped like weird rocks. Diamond Bif is a Bif with higher chances to drop Diamonds."); + next; + mesn; + mesq l("These monsters are a great source of raw crafting materials."); + setq CandorQuest_Rosen, 1, 0; + } else if (.@q == 1) { + mesq l("You didn't mine enough @@. The perfect spot is at northeast of this island. It takes a while to them respawn, so don't hurry.", getmonsterlink(DiamondBif)); + } else if (.@q == 2) { + mesq l("Wow! Those pitiable gloves sure weren't made for mining. They're almost ruined!"); + mesq l("Here, take this @@. It will be better suited!", getitemlink(CandorGloves)); + inventoryplace CandorGloves, 1; + getexp 30, 5; + getitem CandorGloves, 1; + setq CandorQuest_Rosen, 3, 0; + } + close; + +L_NoLevel: + mesn; + mesq l("You aren't strong enough."); + next; + mesn; + mesq l("Go see someone else for now. Yes, you need level to take most tasks available on the world!"); + close; + +L_NoGloves: + mesn; + mesq l("You should have some decent gloves, dude. These offer defense, as it's easier to handle your weapon and parry attacks."); + next; + mesn; + mesq l("For sure the chef of Nard's ship could spare you a pair of gloves."); + close; + +L_Complete: + if (BaseLevel > 5 && .@q < 5 && countitem(TolchiArrow)) + goto L_Task; + mesn; + mesq l("Ah, uhm, I'm not sure. We at Candor don't need much."); + next; + mesn; + mesq l("You could try to get new equipment by doing more quests. You need level to use them, though."); + next; + mesn; + mesq l("Alternatively, I think someone at the Land Of Fire Village is able to refine some items. Why don't you try it sometime?"); + close; + +L_Task: + if (.@q != 4) { + mesn; + mesq l("Actually, I see you have some @@. Ever tried a bow before?", getitemlink(TolchiArrow)); + next; + mesn; + mesq l("Bows give you a good attack range, in exchange of all your evasion."); + mesq l("Meaning that once you equip a bow, you likely won't be able to dodge attacks."); + next; + mesn; + mesq l("Well, if you are good, you can just not get hit. If you're not so good, then bows will be a pain."); + setq CandorQuest_Rosen, 4; + } + mesq l("I was thinking, maybe I could make a @@ for you. But I want a few items:", getitemlink(TrainingBow)); + mesc l("@@/@@ @@", countitem(CactusDrink), 1, getitemlink(CactusDrink)); // Less than 1% drop + mesc l("@@/@@ @@", countitem(Piberries), 1, getitemlink(Piberries)); // Can be bought, or 6% drop from Mana Bug + next; + mesq l("Do you have that with you?"); + if (askyesno() == ASK_YES) { + mes ""; + if (!countitem(CactusDrink) || + !countitem(Piberries)) { + mesn; + mesq l("Now, listen closely. Jesusalva desgined most of the quests. And he hates cheaters and liars."); + next; + mesn; + mesq l("Actually, he's just too lazy to add proper checks everywhere. If you try to cheat, you'll suffer some penalty."); + next; + mesn; + mesq l("In this case, haven't I counted, I would have deleted only part of the items, then I would go silent. No refunds."); + mesq l("That's how this world inhabitants deal with cheaters... So don't be one, my friend. You have been warned!"); + close; + } + inventoryplace TrainingBow, 1; + delitem CactusDrink, 1; + delitem Piberries, 1; + setq CandorQuest_Rosen, 5; + getitem TrainingBow, 1; + mesn; + mesq l("Here you go, my friend. Uhm, good luck with archery."); + } + close; + + function rosen_add_kills + { + .@qp=getq(CandorQuest_Rosen); + .@kp=getq2(CandorQuest_Rosen); // Get number of kills (via getq2) + setq CandorQuest_Rosen, .@qp, .@kp+1; + //message strcharinfo(0), l("Set status @@ with @@ kills", .@qp, .@kp); + } + + function rosen_max_kills + { + .@qp=getq(CandorQuest_Rosen); + setq CandorQuest_Rosen, .@qp+1, 0; + //message strcharinfo(0), l("End status @@", .@qp); + } + +OnKillMBif: + .@q=getq(CandorQuest_Rosen); + .@k=getq2(CandorQuest_Rosen); // Get number of kills (via getq2) + if (.@q == 1) { + if (.@k+1 >= 5) { + rosen_max_kills(); + message strcharinfo(0), l("Go back to Rosen!"); + } else { + rosen_add_kills(); + message strcharinfo(0), l("@@/5 @@", .@k+1, getmonsterlink(DiamondBif)); + } + } + fix_mobkill(DiamondBif); + end; + + +OnTimer1000: + domovestep; + +OnInit: + initpath "move", 28, 36, + "dir", DOWN, 0, + "wait", 31, 0, + "move", 31, 36, + "dir", DOWN, 0, + "wait", 31, 0, + "move", 25, 35, + "dir", UP, 0, + "wait", 2, 0, + "move", 29, 36, + "dir", DOWN, 0, + "wait", 31, 0; + initialmove; + initnpctimer; + .distance = 5; +} diff --git a/npc/005-4/shop.txt b/npc/005-4/shop.txt new file mode 100644 index 0000000..67e1d5e --- /dev/null +++ b/npc/005-4/shop.txt @@ -0,0 +1,48 @@ +// TMW2 scripts. +// Author: +// Saulc +// Description: +// Rosen sells basic armor on Candor. Logic by Reid. + +005-4,30,37,0 trader Shop#Candor NPC_NO_SPRITE,{ + +OnInit: + sleep(SHOPWAIT); + tradertype(NST_MARKET); + + sellitem RoundLeatherShield, -1, 2; + sellitem Knife, -1, 5; + sellitem TolchiArrow, -1, 30000; + sellitem TolchiAmmoBox, -1, 4; + sellitem LousyMoccasins, -1, 4; + sellitem TrainingBow, -1, 3; + + .sex = G_OTHER; + .distance = 3; + end; + +OnClock0602: +OnClock1206: +OnClock1811: +OnClock0004: + restoreshopitem RoundLeatherShield, -1, 2; + restoreshopitem Knife, -1, 5; + restoreshopitem TolchiArrow, -1, 30000; + restoreshopitem TolchiAmmoBox, -1, 4; + restoreshopitem LousyMoccasins, -1, 4; + restoreshopitem TrainingBow, -1, 3; + end; + + +// Pay your taxes! +OnBuyItem: + debugmes("Purchase confirmed"); + PurchaseTaxes(); + end; + +OnSellItem: + debugmes("Sale confirmed"); + SaleTaxes(); + end; +} + diff --git a/npc/005-4/tolchi.txt b/npc/005-4/tolchi.txt new file mode 100644 index 0000000..05096b9 --- /dev/null +++ b/npc/005-4/tolchi.txt @@ -0,0 +1,407 @@ +// TMW2 scripts. +// Author: +// Saulc +// Jesusalva +// Variables: +// CandorQuest_Tolchi +// Description: +// Tolchi crafts weapons at Rosen & Tolchi shop +// Values: +// 0 BlackSmith quest ask for 1 iron oore +// 1 BlackSmith quest ask for 3 coal +// 2 BlackSmith quest ask for 1 iron ingot +// 3 Quest is Complete + + +005-4,42,37,0 script Tolchi NPC_RAIJIN_FEMALE_LEGION_ARTIS,{ + function quest_close; + function quest_giveitem; + function quest_first; + function quest_second; + function quest_third; + function tolchi_arrows; + function tolchi_tweaks; + + ///////////////////////////////////////////////////////////////////////////// + @q = getq(CandorQuest_Tolchi); + + if (@q == 3) { + mesn; + mesq l("Hey! How are you today? Thanks again for your help."); + } else if (BaseLevel < 5 || BaseLevel < 10 && @q == 1 || BaseLevel < 15 && @q == 2) { + mesn; + mesq l("I need help, but you aren't strong enough. Please come back later."); + next; + } else { + mesn; + mesq l("Hello! You seem strong enough, could take a request from me? Of course, not for free."); + next; + } + + do + { + select + l("I'm interested in your arrows, they're too expensive with Rosen."), + rif(@q == 0 && BaseLevel >= 5, l("Yes. What do you need help with?")), + rif(@q == 1 && BaseLevel >= 10, l("Yes. What do you need help with?")), + rif(@q == 2 && BaseLevel >= 15, l("Yes. What do you need help with?")), + l("Do you accept special requests?"), + l("I have other things to do at the moment."); + mes ""; + switch (@menu) + { + case 1: + tolchi_arrows(); + break; + case 2: + quest_first(); + break; + case 3: + quest_second(); + break; + case 4: + quest_third(); + break; + case 5: + tolchi_tweaks(); + break; + default: + quest_close(); + break; + } + } while (@menu != 6); + + closedialog; + goodbye; + close; + +// Close and talk about quest +function quest_close { + if (@q < 3) { + mesn; + mesq l("Maybe next time, then."); + next; + } + return; +} + +// Item delivery core +function quest_giveitem { +@q = getq(CandorQuest_Tolchi); + if (@q == 2) + { + if (countitem(IronIngot) == 0) + { + mesn; + mesq l("You don't have the Iron Ingot."); + next; + return; + } + delitem IronIngot, 1; + Zeny = Zeny + 8000; // Real worth: 2820 GP + 2400 (ship fee) = 5220 gp poll (the plus is net profit) + getexp 1575,0; + setq CandorQuest_Tolchi, 3; + speech S_FIRST_BLANK_LINE, + l("Thanks mate, that is everything I need! Have a good day!"); + } + if (@q == 1) + { + if (countitem(Coal) < 3) + { + mesn; + mesq l("You don't have the three Coal lumps."); + next; + return; + } + delitem Coal, 3; + Zeny = Zeny + 825; + getexp 105,0; + setq CandorQuest_Tolchi, 2; + } + if (@q == 0) + { + if (countitem("Iron Ore") == 0) + { + mesn; + mesq l("You don't have the Iron Ore."); + next; + return; + } + delitem IronOre, 1; + Zeny = Zeny + 225; + getexp 52,0; + setq CandorQuest_Tolchi, 1; + } + close; +} + +// First quest description +function quest_first { + speech S_FIRST_BLANK_LINE | S_LAST_NEXT, + l("Well, it is terrible! How can I make armours if I ran out of Iron? Shall the citizens of Candor Island perish in a monster attack?!"), // NOTE: I really prefer EN_US (eg. armor vs armour) + l("They shouldn't. Could you perhaps, kindly bring me 1 @@?", getitemlink(IronOre)); + do + { + //l("Do not worry, I'll seek and bring it to you."), + select + l("Do not worry, I have them right here."), + l("I am not a citizen of Candor."); + + switch (@menu) + { + case 1: + quest_giveitem(); + break; + case 2: + quest_close(); + break; + } + } while (@menu != 2); + return; +} + +// Second quest description +function quest_second { + speech S_FIRST_BLANK_LINE | S_LAST_NEXT, + l("Thanks for helping my shop earlier. I forge weapons, but unfortunately, I need more than just iron to forge them."), + l("Can you bring me 3 @@? Of course, you'll be rewarded.", getitemlink(Coal)); + do + { + // l("Hey, I like rewards. Wait me, I'll be back!"), + select + l("You better have it ready, because I have the Coal with me!"), + l("Eh, that seems too problematic. Sorry."); + + switch (@menu) + { + case 1: + quest_giveitem(); + break; + case 2: + quest_close(); + break; + } + } while (@menu != 2); + return; +} + +// Third quest description +function quest_third { + speech S_FIRST_BLANK_LINE | S_LAST_NEXT, + l("Ok, this will be my last request. The Trainer asked me for a fine weapon, to protect our village."), + l("Problem is, I do not have the knowledge to make it without @@. If you bring me one, I'll reward you with one quarter of my commission.", getitemlink(IronIngot)); + do + { + // l("Do not worry, I'll be back in a jiffy."), + select + l("No problem is too big for me. I have them right here!"), + l("Sorry, I am busy..."); + + switch (@menu) + { + case 1: + quest_giveitem(); + break; + case 2: + quest_close(); + break; + } + } while (@menu != 2); + return; +} + +// Make Tolchi Arrows (not cost-effective) +function tolchi_arrows { + // Price: 120~200, with 25 GP discount per task done (max. 3 tasks atm) + .@price=max(120, 200-(@q*25)); + mesn; + mesq l("Well, I can sell you a random box with almost 100 @@ for just @@ GP.", getitemlink(TolchiArrow), .@price); + next; + if (Zeny < .@price || askyesno() == ASK_NO) { + mesc l("Come back when you are willing to spend money."); + next; + } else { + mes ""; + inventoryplace TolchiArrow, 110; + Zeny=Zeny-.@price; + getitem TolchiArrow, rand2(102,106); + mesn; + mesq l("Here you go. Uhm, I really prefer if you buy with Rosen, though."); // I just don't want to add loops or inputs + next; + } + return; +} + +// Supreme Tweaking +function tolchi_tweaks { + // Price: the sky is the limit + .@price=max(120, 200-(@q*25)); + mesn; + mes l("Hmm, no, not really. However, I can try my hand at tweaking an item options :3"); + next; + mesn; + mesq l("Options are %s. Any craftsman can make them. Adventurers tend to be the best craftsman in the world.", b(l("item dependant bonuses"))); + next; + mesn; + mesq l("Usually you can only tweak if the item already have another option, but I am Tolchi. So, which item you want to tweak?"); + next; + + // Request and confirm + .@id=requestitemindex(); + if (!csys_Confirm(.@id)) + return false; + + // Find numeric ID + delinventorylist(); + getinventorylist(); + .@handle=@inventorylist_id[.@id]; + + // Invalid (absolutely should never happen) + if (.@handle < 1) { + mesn; + mesq l("...What? Which item? Sorry, too much smoke around here."); + next; + return; + } + // Multiple + if (countitem(.@handle) != 1) { + mesn; + mesq l("Sorry, but you have multiple %s.", getitemlink(.@handle)); + next; + return; + } + // Permission NG: (Not Granted) + if (array_find(.disallow_equip, .@handle) >= 0) { + mesn; + mesq l("Sorry, but I won't dare touch a %s.", getitemlink(.@handle)); + next; + mesn; + mesq l("Depending on the case, Nicholas, in Hurnscald, can do a better job than me."); + next; + return; + } + // Aleady slotted + if (getitemoptionidbyindex(.@id, 0) > 0) { + mesn; + mesq l("I'm not going to try to improve this masterpiece. Look its options!"); + next; + return; + } + + // Calculate price + .@lv=getiteminfo(.@handle, ITEMINFO_ELV); + .@price=.@lv**3; // Cubic function to determine price. + // Lv 1: 3 GP | Lv 10: 1kGP | Lv 20: 8kGP | Lv 40: 64kGP | Lv 60: 216kGP + // Lv 80: 512k GP | Lv 100: 1 Million GP! + if (isequipped(.@handle)) { + mesn; + mesq l("Please unequip your %s first.", getitemlink(.@handle)); + close; + } + mesn; + mesc l("Tweaking: %s", getitemlink(.@handle));//getinvindexlink(.@id)); + mesq l("That will be %s GP. Are you sure?", col(format_number(.@price), 1)); + next; + + if (Zeny < .@price || askyesno() == ASK_NO) { + mesc l("Come back when you are willing to spend money."); + next; + } else { + mes ""; + // Okay, time to force a tweaking + Zeny=Zeny-.@price; + + // Options which Tolchi knows + deletearray(@csys_attr); + setarray @csys_attr, 0, + IOPT_RICHNESS, 5, + IOPT_EXPGAIN, 9, + VAR_HPACCELERATION, 37, + VAR_MAXHPAMOUNT, 49; + + // Armor fix + if (getiteminfo(.@handle, ITEMINFO_TYPE) == IT_ARMOR) { + csys_ArmorFix(.@handle); + .@lv=max(1, .@lv/4); + } else { + csys_WeaponFix(.@handle); + } + + // Select a bonus and purge it + .@vartp=relative_array_random(@csys_attr); + + // Safety check + if (.@vartp < 1) + .@vartp=relative_array_random(@csys_attr); + + // First time player bonus + if (!#FIRST_TIME) { + .@vartp=IOPT_RICHNESS; + } + + // Apply the bonus + .@bonus=csys_Multiplier(.@lv); + .@bonus=limit(1, .@bonus, 25); + if (.@bonus > 5) + .@bonus=rand2(5, .@bonus); + if (.@vartp == VAR_MAXHPAMOUNT) + .@bonus+=rand2(5, 30); + setitemoptionbyindex(.@id, 0, .@vartp, .@bonus); + + // First time item bonus + if (!#FIRST_TIME) { + if (TOP3AVERAGELVL() > 50) { + .@vartp=IOPT_EXPGAIN; + //.@bonus=csys_Multiplier(.@lv); + .@bonus=limit(10, (TOP3AVERAGELVL()/2)-20, 30); + setitemoptionbyindex(.@id, 1, .@vartp, .@bonus); + } + #FIRST_TIME=true; + } + + .@mylevel=BaseLevel*(REBIRTH+1) + max(1, .@lv); + if (.@mylevel > 30) + setitemoptionbyindex(.@id, 3, IOPT_WALKSPEED, rand2(-10, -5)); + mesn; + mesc l("Well, here you are. I hope you enjoy ^^", 3); + next; + } + return; +} + +OnTimer1000: + domovestep; + +OnInit: + initpath "move", 44, 35, + "dir", UP, 0, + "wait", 30, 0, + "move", 43, 40, + "dir", UP, 0, + "wait", 30, 0, + "move", 40, 35, + "dir", UP, 0, + "wait", 30, 0, + "dir", LEFT, 0, + "wait", 30, 0, + "move", 42, 37, + "dir", DOWN, 0, + "dir", UP, 0, + "wait", 30, 0, + "move", 45, 37, + "dir", DOWN, 0, + "wait", 30, 0, + "move", 33, 37, + "dir", LEFT, 0, + "wait", 30, 0, + "move", 33, 37, + "dir", RIGHT, 0, + "wait", 30, 0; + + initialmove; + initnpctimer; + .distance = 5; + + setarray .disallow_equip, 0, SponsorNecklace, DiscordNecklace, Event1HSword, Event2HSword, EventBow, EventWand, Lightbringer, DemureAxe, Tyranny, Runestaff, AegisShield, BlacksmithAxe, Dustynator, SaviorShield, SaviorArmor, SaviorPants, SaviorBoots, Skypiercer, CreasedShirt, CreasedShorts; + end; +} |