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/003-1 | |
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/003-1')
42 files changed, 5327 insertions, 0 deletions
diff --git a/npc/003-1/_import.txt b/npc/003-1/_import.txt new file mode 100644 index 0000000..b55813a --- /dev/null +++ b/npc/003-1/_import.txt @@ -0,0 +1,43 @@ +// Map 003-1: Tulimshar +// This file is generated automatically. All manually added changes will be removed when running the Converter. +"npc/003-1/_mobs.txt", +"npc/003-1/_warps.txt", +"npc/003-1/aahna.txt", +"npc/003-1/aidan.txt", +"npc/003-1/ched.txt", +"npc/003-1/constableperry.txt", +"npc/003-1/eomie.txt", +"npc/003-1/eugene.txt", +"npc/003-1/events.txt", +"npc/003-1/gladys.txt", +"npc/003-1/hasan.txt", +"npc/003-1/inac.txt", +"npc/003-1/inar.txt", +"npc/003-1/ishi.txt", +"npc/003-1/itka.txt", +"npc/003-1/jakod.txt", +"npc/003-1/jerican.txt", +"npc/003-1/lieutenantdausen.txt", +"npc/003-1/magic.txt", +"npc/003-1/mahoud.txt", +"npc/003-1/malivox.txt", +"npc/003-1/mapflags.txt", +"npc/003-1/mariusthebard.txt", +"npc/003-1/michel.txt", +"npc/003-1/neko.txt", +"npc/003-1/ninathetraveler.txt", +"npc/003-1/oldwell.txt", +"npc/003-1/quirino.txt", +"npc/003-1/sailors.txt", +"npc/003-1/sarah.txt", +"npc/003-1/sewer.txt", +"npc/003-1/ship.txt", +"npc/003-1/shop.txt", +"npc/003-1/silvia.txt", +"npc/003-1/soul-menhir.txt", +"npc/003-1/swezanne.txt", +"npc/003-1/taree.txt", +"npc/003-1/tinris.txt", +"npc/003-1/town.txt", +"npc/003-1/wateranimation.txt", +"npc/003-1/well.txt", diff --git a/npc/003-1/_mobs.txt b/npc/003-1/_mobs.txt new file mode 100644 index 0000000..e31299d --- /dev/null +++ b/npc/003-1/_mobs.txt @@ -0,0 +1,20 @@ +// This file is generated automatically. All manually added changes will be removed when running the Converter. +// Map 003-1: Tulimshar mobs +003-1,0,0,0,0 monster Maggot 1030,65,35000,450000 +003-1,81,103,2,3 monster Croc 1006,1,35000,90000 +003-1,72,70,7,4 monster Piou 1002,2,20000,20000 +003-1,85,136,8,11 monster Duck 1029,2,30000,20000 +003-1,110,145,7,4 monster Giant Maggot 1031,1,30000,20000 +003-1,67,121,2,3 monster Croc 1006,1,35000,90000 +003-1,39,101,8,11 monster Blub 1008,2,35000,150000 +003-1,25,73,8,25 monster Little Blub 1007,7,35000,150000 +003-1,37,70,3,13 monster Toppy Blub 1009,2,35000,150000 +003-1,64,58,4,1 monster Croc 1006,1,35000,90000 +003-1,109,24,9,4 monster Piou 1002,3,30000,20000 +003-1,82,116,9,11 monster Duck 1029,4,30000,20000 +003-1,109,45,12,13 monster Duck 1029,4,30000,20000 +003-1,110,42,4,1 monster Croc 1006,1,35000,90000 +003-1,70,106,6,3 monster Crocotree 1010,2,5000,150000 +003-1,63,76,3,4 monster Croc 1006,1,35000,120000 +003-1,99,75,2,7 monster Croc 1006,1,35000,120000 +003-1,67,27,3,4 monster Four Leaf 1028,1,30000,20000 diff --git a/npc/003-1/_warps.txt b/npc/003-1/_warps.txt new file mode 100644 index 0000000..a724dd2 --- /dev/null +++ b/npc/003-1/_warps.txt @@ -0,0 +1,26 @@ +// This file is generated automatically. All manually added changes will be removed when running the Converter. +// Map 003-1: Tulimshar warps +003-1,60,157,0 warp #003-1_60_157 4,0,004-1,69,57 +003-1,54,137,0 warp #003-1_54_137 0,0,003-4,39,38 +003-1,70,137,0 warp #003-1_70_137 0,0,003-9,62,135 +003-1,64,130,0 warp #003-1_64_130 0,0,003-9,36,56 +003-1,51,120,0 warp #003-1_51_120 0,0,003-1-2,19,35 +003-1,56,99,0 warp #003-1_56_99 0,0,003-3,39,40 +003-1,46,72,0 warp #003-1_46_72 0,0,003-2,32,40 +003-1,49,72,0 warp #003-1_49_72 0,0,003-2,35,40 +003-1,52,72,0 warp #003-1_52_72 0,0,003-2,38,40 +003-1,51,65,0 warp #003-1_51_65 0,0,003-2,42,34 +003-1,25,45,0 warp #003-1_25_45 0,0,003-1-3,37,85 +003-1,58,54,0 warp #003-1_58_54 0,0,003-1-3,82,82 +003-1,52,35,0 warp #003-1_52_35 1,0,003-0-1,48,51 +003-1,49,23,0 warp #003-1_49_23 0,0,003-0-1,22,25 +003-1,54,23,0 warp #003-1_54_23 0,0,003-0-1,69,24 +003-1,115,88,0 warp #003-1_115_88 0,0,003-8,41,28 +003-1,110,100,0 warp #003-1_110_100 0,0,003-8,31,43 +003-1,116,120,0 warp #003-1_116_120 0,0,003-1-2,48,35 +003-1,81,120,0 warp #003-1_81_120 0,0,003-1-2,33,35 +003-1,111,136,0 warp #003-1_111_136 0,0,003-7,39,40 +003-1,107,132,0 warp #003-1_107_132 0,0,003-7,29,31 +003-1,96,143,0 warp #003-1_96_143 0,0,003-5,38,40 +003-1,106,146,0 warp #003-1_106_146 0,0,003-6,32,38 +003-1,112,146,0 warp #003-1_112_146 0,0,003-6,40,38 diff --git a/npc/003-1/aahna.txt b/npc/003-1/aahna.txt new file mode 100644 index 0000000..8d88923 --- /dev/null +++ b/npc/003-1/aahna.txt @@ -0,0 +1,44 @@ +// TMW-2 Script +// Author: +// Jesusalva +// Pookie +// Description: +// This NPC serves no purpose currently. She is here to make Tulimshar more crowded. +// Now a believer to announce Halinarzo and Alvasus Quest. +// TODO: During rainy days, she could ask for an Umbrella + +003-1,53,128,0 script Aahna NPC_ELVEN_FEMALE,{ + mesn; + mesq l("Hello, What a lovely day for a stroll."); + next; + mesn; + mesq l("I heard every Sunday there's a party at Halinarzo Church, but to get there you need to pass through the Desert Canyon."); + next; + mesn; + mesq l("I hope one day, they decide build a church here. It's a pain to travel there every time..."); + close; + +OnInit: + .sex = G_FEMALE; + .distance = 5; + end; + +// Server Happy Hour +// Used to be Sunday 18:00~20:00 +// Then it is Sunday 16:00~20:00 +// Currently it is the whole weekend +OnSat0000: + if (debug) end; + $@EXP_EVENT=10; + $@EXP_EVENT_TIME=48; + donpcevent "@exprate::OnPlayerCall"; + end; + +OnSun0000: + disablenpc .name$; + end; + +OnMon0000: + enablenpc .name$; + end; +} diff --git a/npc/003-1/aidan.txt b/npc/003-1/aidan.txt new file mode 100644 index 0000000..400529d8 --- /dev/null +++ b/npc/003-1/aidan.txt @@ -0,0 +1,128 @@ +// TMW-2 Script +// Author: Crazyfefe, Jesusalva +// Desc: Originally a Tmw script + +003-1,95,97,0 script Aidan NPC_PLAYER_TONORI,{ + + function Register + { + mesn l("Aidan, the Monster Guide"); + mesq l("Oh my, you don't seem to be registered as a Monster Hunting Quest Participant. Would you like to register?"); + next; + mesn l("Aidan, the Monster Guide"); + mesq l("The register fee is 2000 GP."); + + do + { + select + rif(Zeny >= 2000, l("Register")), + rif(Zeny < 2000, l("Where do I get so much money?!")), + l("Not at the moment"), + l("Information"); + + switch (@menu) { + case 1: + mes ""; + Zeny=Zeny-2000; + MPQUEST=1; + mesn l("Aidan, the Monster Guide"); + mesq l("Give me a second to look over your paperwork."); + next; + mesn l("Aidan, the Monster Guide"); + mes l("\"Well, looks like you qualify!"); + mes l("Welcome to the questing world!\""); + close; + break; + case 2: + mes ""; + mesn l("Aidan, the Monster Guide"); + mesq l("Sell old equipment and items you won't use. For example, what should you do with a @@ or an @@? Sell it!", getitemlink(Ruby), getitemlink(ScorpionStinger)); + close; + break; + case 3: + mes ""; + mesn l("Aidan, the Monster Guide"); + mesq l("Very well, you don't know what you're missing."); + close; + break; + case 4: + mes ""; + mesn l("Aidan, the Monster Guide"); + mesq l("You see, because the Monster King, monsters have been running rampant. If they grow too much in numbers, cities may be overrun."); + next; + mesn l("Aidan, the Monster Guide"); + mesq l("Therefore, the Alliance created a system so when you kill a monster, depending on its strength, you'll get Monster Points."); + next; + mesn l("Aidan, the Monster Guide"); + mesq l("To prevent abuse, a registering fee is charged. Nothing major."); + next; + mesn l("Aidan, the Monster Guide"); + mesq l("So whaddaya say, sign up won't you?"); + next; + mes ""; + Register; + break; + } + } while (@menu != 4); + } + + if (BaseLevel < 10) goto L_Weak; + + if (MPQUEST == 0) + Register; + + mesn l("Aidan, the Monster Guide"); + mesq l("You currently have @@ Monster Points. These points are acquired while killing monsters.", Mobpt); + if (getq(General_Hunter) == 0 && !GHQUEST) goto L_Register; + if (getq(General_Hunter) == 0) goto L_Assign; + mes ""; + goto L_Assign; + close; // Will never be reached. + +L_Weak: + mesn; + mesq l("How did you even get here? Go back to Candor, where you belong!"); + percentheal -20, 0; + close; + +L_Register: + next; + mesn; + mesq l("The alliance also have a special program, called ##BGrand Hunter Quest##b, where you kill 10,000 of a monster and get great rewards."); + next; + mesn; + mesq l("You can gain rare treasures, even. Come register for this special program. It's free!"); + if (askyesno() == ASK_YES) { + GHQUEST=1; + setarray GHMEMO, 0, 0, 0; + mesn; + mesq l("Registered, welcome to the Grand Hunter Quest!"); + next; + goto L_Assign; + } else { + mes ""; + mesn; + mesq l("A pity..."); + close; + } + +L_Assign: + GHQ_Assign(Maggot, "Tulimshar"); + end; + + +OnInit: + .@npcId = getnpcid(.name$); + setunitdata(.@npcId, UDT_HEADTOP, NPCEyesT); + setunitdata(.@npcId, UDT_HEADMIDDLE, CopperArmor); + setunitdata(.@npcId, UDT_HEADBOTTOM, CottonTrousers); + setunitdata(.@npcId, UDT_WEAPON, DeepBlackBoots); // Boots + setunitdata(.@npcId, UDT_HAIRSTYLE, 3); + setunitdata(.@npcId, UDT_HAIRCOLOR, 3); + + .sex = G_MALE; + .distance = 5; + end; +} + + diff --git a/npc/003-1/ched.txt b/npc/003-1/ched.txt new file mode 100644 index 0000000..5fb4602 --- /dev/null +++ b/npc/003-1/ched.txt @@ -0,0 +1,202 @@ +// TMW2 scripts. +// Author: +// Saulc +// Jesusalva +// Description: +// Ched is from a quest. +// But as he is now unused, he'll become someone else on summer. + +003-1,62,48,0 script Ched NPC_PLAYER_TONORI,{ + function ValidSSC { + return countitem(CactusCocktail)+countitem(CherryCocktail)+countitem(AppleCocktail); + } + function ScoreSSC { + mesc l("All leaderboards are refreshed hourly."), 1; + mesc l("Your current score: @@", getq2(SQuest_Ched)), 3; + mes ""; + mes b(l("Top 10 - Summer Ched's Event")); + mes("1."+$@ched_name$[0]+" ("+$@ched_value[0]+")"); + mes("2."+$@ched_name$[1]+" ("+$@ched_value[1]+")"); + mes("3."+$@ched_name$[2]+" ("+$@ched_value[2]+")"); + mes("4."+$@ched_name$[3]+" ("+$@ched_value[3]+")"); + mes("5."+$@ched_name$[4]+" ("+$@ched_value[4]+")"); + mes("6."+$@ched_name$[5]+" ("+$@ched_value[5]+")"); + mes("7."+$@ched_name$[6]+" ("+$@ched_value[6]+")"); + mes("8."+$@ched_name$[7]+" ("+$@ched_value[7]+")"); + mes("9."+$@ched_name$[8]+" ("+$@ched_value[8]+")"); + mes("10."+$@ched_name$[9]+" ("+$@ched_value[9]+")"); + next; + } + function InfoSSC { + mesc l("@@ - @@ point(s)", getitemlink(CactusCocktail), "1"); + mesc l("@@ - @@ point(s)", getitemlink(CherryCocktail), "3"); + mesc l("@@ - @@ point(s)", getitemlink(AppleCocktail), "5"); + next; + mes ".:: " + l("Prizes") + " ::."; + mes getitemlink(MasterBola); + mesc l("Min. Position: ")+l("top 1"), 3; + mesc l("Min. Score: "+1000); + mes ""; + mes getitemlink(PiouBola); + mesc l("Min. Position: ")+l("top 3"), 3; + mesc l("Min. Score: "+1000); + mes ""; + mes getitemlink(SnakeBola); + mesc l("Min. Position: ")+l("top 5"), 3; + mesc l("Min. Score: "+700); + mes ""; + mes getitemlink(TulimsharBola); + mesc l("Min. Position: ")+l("top 7"), 3; + mesc l("Min. Score: "+400); + mes ""; + mes getitemlink(PurpleBola); + mesc l("Min. Position: ")+l("top 10"), 3; + mesc l("Min. Score: "+200); + mes ""; + mes getitemlink(CandorBola); + mesc l("Min. Position: ")+l("any"), 3; + mesc l("Min. Score: "+100); + mes ""; + mes getitemlink(KidBola); + mesc l("Min. Position: ")+l("any"), 3; + mesc l("Min. Score: "+25); + next; + } + function DepositSSC { + .@pts=.@pts+countitem(CactusCocktail)*1; + .@pts=.@pts+countitem(CherryCocktail)*3; + .@pts=.@pts+countitem(AppleCocktail)*5; + + delitem CactusCocktail, countitem(CactusCocktail); + delitem CherryCocktail, countitem(CherryCocktail); + delitem AppleCocktail, countitem(AppleCocktail); + + getexp rand2(.@pts-1, .@pts*11/10), rand2(0,.@pts/25); + + setq2 SQuest_Ched, @ched+.@pts; + @ched=getq2(SQuest_Ched); + mesc l("Gained @@ points.", .@pts), 3; + next; + mesc l("Your Score: @@", @ched), 1; + mes ""; + ScoreSSC; + closedialog; + goodbye; + close; + } + + // Begin: Ched + .@year=getq(SQuest_Ched); + if (.@year != (gettime(GETTIME_YEAR)-2000)) + setq SQuest_Ched, (gettime(GETTIME_YEAR)-2000), 0, 0; + + @ched=getq2(SQuest_Ched); + .@claimed=getq3(SQuest_Ched); // Required to prevent rewriting scoreboards + + if (season() == SUMMER && !$@GM_OVERRIDE) goto L_Summer; + if ((season() == AUTUMN && !.@claimed)) goto L_Autumn; + if (rand(0,10) == 6) + npctalk3("I wanted to go to the beach, but I can't find the cave entrance. They told me to look around here... What am I doing wrong?"); + else + hello; + end; + +// Summer Event +L_Summer: + if (BaseLevel < 25) { + mesn; + if (rand2(0,10) == 6) + mesq l("I wanted to go to the beach, but I can't find the cave entrance. They told me to look around here... What am I doing wrong?"); + else + mesq l("Get Rekt Noob."); + close; + } + + // Main Core + do + { + mesn; + mesc l("Current score: @@", @ched), 1; + mesc l("Thus far you have collected @@ @@, @@ @@ and @@ @@.", countitem(CactusCocktail), getitemlink(CactusCocktail), countitem(AppleCocktail), getitemlink(AppleCocktail), countitem(CherryCocktail), getitemlink(CherryCocktail)), 2; + mesc l("You can convert these items in event points and claim rewards at autumn."), 2; + next; + select + l("Scoreboards"), + l("Information"), + rif(ValidSSC(), l("Deposit all")), + l("Abort"); + mes ""; + if (@menu == 1) + ScoreSSC; + if (@menu == 2) + InfoSSC; + if (@menu == 3) + DepositSSC; + + } while (@menu < 3); + close; + +// Summer Quest Claim Rewards Time +L_Autumn: + mesc l("Your Score: @@", @ched), 1; + mes ""; + ScoreSSC; + + // Ensure you have free space on your inv. + inventoryplace NPCEyes, 1; + + // Are you entitled for a Boia? + if (@ched >= 25) { + mesc l("Boias, unlike common shields, does not have any penalty!"); + mesc l("They are filled with a strange gas which makes they deflect attacks. They are done from a material which cannot be cut easily."); + mesc l("They can be a bit lacking in defensive power, however."); + mes ""; + } + + .@pos=array_find($@ched_name$, strcharinfo(0)); + .@pos=(.@pos >= 0 ? .@pos+1 : 0); + + // Give you the due boia + if (.@pos <= 1 && @ched > 1000) + getitem MasterBola, 1; + else if (.@pos <= 3 && @ched >= 1000) + getitem PiouBola, 1; + else if (.@pos <= 5 && @ched >= 700) + getitem SnakeBola, 1; + else if (.@pos <= 7 && @ched >= 400) + getitem TulimsharBola, 1; + else if (.@pos <= 10 && @ched >= 200) + getitem PurpleBola, 1; + else if (@ched >= 100) + getitem CandorBola, 1; + else if (@ched >= 25) + getitem KidBola, 1; + + // Give extra on GP and EXP rewards on 2018 Summer due extensive amount of bugs + if (gettime(7) == 2018) + @ched=@ched*12/10; + + // Give you experience and money reward. + // Each cocktail is worth 15~30 gp, so we'll give 10 GP per point + Zeny+=@ched*10; + getexp BaseLevel*@ched, @ched; + + // The quest is complete for the year. + setq3 SQuest_Ched, 1; + closedialog; + goodbye; + close; + +OnInit: + .@npcId = getnpcid(.name$); + setunitdata(.@npcId, UDT_HEADTOP, SamuraiHelmet); + setunitdata(.@npcId, UDT_HEADMIDDLE, SilkRobe); + setunitdata(.@npcId, UDT_HEADBOTTOM, NPCEyesT); + setunitdata(.@npcId, UDT_WEAPON, CandorBoots); // Boots + setunitdata(.@npcId, UDT_HAIRSTYLE, 7); + setunitdata(.@npcId, UDT_HAIRCOLOR, 17); + + .sex = G_MALE; + .distance = 5; + end; +} diff --git a/npc/003-1/constableperry.txt b/npc/003-1/constableperry.txt new file mode 100644 index 0000000..6108095 --- /dev/null +++ b/npc/003-1/constableperry.txt @@ -0,0 +1,111 @@ +// TMW2 Scripts. +// Author: +// Saulc +// Jesusalva +// Description: +// Constable Perry invites players to the TMW2 Project +// Part of the THIEF/MERCHANT branches + +003-1,47,75,0 script Constable Perry NPC_MOUBOO,{ + if (getequipid(EQI_HEAD_TOP) == AFKCap) goto L_Quest; + +L_Intro: + mesn; + mesq l("Hello there! I am a constable. I keep law and order here."); + next; + mesq l("Yes, I am a mouboo. Why? Can't a mouboo be a law and order enforcer?!"); + next; + mesq l("Have you ever felt stuck? Lost? Didn't know about a quest, or an item is troubling you?"); + mesq l("Have no idea where in the world you are? Or what a certain foe drops, or if you should even dare to challenge it?"); + next; + mesn; + mesq l("Fear not! You can check our [@@https://wiki.moubootaurlegends.org|Wiki@@] to find that and other awesome stuff!"); + mesc l("(To see the rules, use ##B@rules##b.)"); + next; + mesq l("You can even join the project there. Contributors are greatly appreciated! %%N"); + close; + +L_Quest: + // Quest Requirement of 48 hours or idle before speaking for 60 min + if (AFKING < 57600 && checkidle() < 3600) { + npctalkonce l("What's that? They seem to be AFK but are not?"); + if (.@touchevent) + end; + else + goto L_Intro; + } + // No warning given + if (!@afkbotwarned) { + mesn; + mesq l("Stop right there, miscreant. I can see you're AFK, it is written on your hat!"); + next; + mesn; + mesq l("Moving while AFK is botting! I'll send you to a %s if you move while AFK! ##BYOU HAVE BEEN WARNED!##b", b(l("cold, bleak and isolated cell"))); + @afkbotwarned=true; + close; + } + // Now you've done it! + if (@afkbotwarned) + goto L_NowYouHaveDoneIt; + close; + +L_NowYouHaveDoneIt: + mesn; + mesq l("##BNOW YOU HAVE DONE IT!##b By the powers to me vested as a Constable and Game Master, I sentence you to HALF AN HOUR IN A %s!", b(strtoupper(l("cold, bleak and isolated cell")))); + next; + mesn; + mesq l("Do you have any last wishes before being JAILED for your CRIMES?!"); + next; + select + l("Please tell my mom I love her!"), + l("Pinkies forever! Oh yeah!"), + l("I did nothing wrong! I am not AFK!"), + l("Can I have a Blanket, at least?"), + l("Please tell everyone I am a rogue person who likes to break rules!"), + l("I am a thief! I want to repent for my sins!"), + l("No, sir."); + mes ""; + mesn; + switch (@menu) { + case 2: + mesq l("Hmph, you are the second activist I see today! TO THE BRIG!"); + break; + case 3: + mesq l("Every bot says that."); + break; + case 4: + .@q=getq(FrostiaQuest_AFKCap); + if (.@q == 2) { + mesq l("Uh, sure. We mouboos are not cruel. But it might not be your size."); + getitem Blanket, 1; + setq1 FrostiaQuest_AFKCap, 3; + } else { + mesq l("This is not the first time you've been arrested for AFK botting, so, ##BNO!##b"); + } + break; + case 5: + mesq l("Hmph, that would only incite bad behavior! No way!"); + break; + case 6: + mesq l("You have no proof that you have robbed vaults or sided with Ben Parkison, the Thieves Guild Master."); + break; + default: + mesq l("..."); + break; + } + atcommand("@jailfor 30mn "+strcharinfo(0)); + dispbottom l("Use %s to see how long you need to wait.", b("@jailtime")); + close; + +OnTouch: + .@touchevent=true; + if (getequipid(EQI_HEAD_TOP) == AFKCap) + goto L_Quest; + end; + +OnInit: + .sex = G_MALE; + .distance = 5; + end; +} + diff --git a/npc/003-1/eomie.txt b/npc/003-1/eomie.txt new file mode 100644 index 0000000..8cf7f68 --- /dev/null +++ b/npc/003-1/eomie.txt @@ -0,0 +1,97 @@ +// TMW2 Script +// Author: +// Saulc +// Jesusalva +// Description: +// Part of Anwar Field quest +// Notes: Eomie did the bug bomb at Candor + +003-1,68,24,0 script Eomie NPC_ELF_F,{ + .@q=getq(TulimsharQuest_AnwarField); + if (.@q == 10) goto L_Gift; + if (.@q == 7) goto L_FirstAid; + if (.@q == 1) goto L_NotMe; + + hello; + end; + +L_NotMe: + mesn strcharinfo(0); + mesq l("Hello Ms. Eomie, kind sir Anwar sent me to fetch some fertilizers to save Tulimshar from famine, if you may?"); + next; + mesn; + mesq lg("Sorry kind lady @@, but no.", "Sorry kind sir @@, but no.", strcharinfo(0)); + next; + mesn; + mesq l("Or rather, I can't. I would love to help you, just like everybody else, but I don't know how to make fertilizers."); + next; + mesn; + mesq l("Tinris probably could do that, he is young but very talented. He is a greedy elf, but if you help him, he'll likely help you back."); + setq TulimsharQuest_AnwarField, 2; + close; + +L_FirstAid: + mesn; + mesq l("The crops are under attack? That's terrible!"); + next; + mesn; + mesq l("I can do a bug bomb right away, but I still need a few things for it!"); + next; + mesn; + mesq l("Do you, perchance, have 2 @@ and 3 @@?", getitemlink(ScorpionClaw), getitemlink(Moss)); + if (askyesno() != ASK_YES) + close; + mes ""; + + if (countitem(ScorpionClaw) < 2 || + countitem(Moss) < 3) { + mesn; + mesq l("The situation is too serious to you be lying... Please, go fetch the items..."); + close; + } + + delitem ScorpionClaw, 2; + delitem Moss, 3; + setq TulimsharQuest_AnwarField, 8; + + mesn; + mesq l("Quick, deliver this to Anwar!"); + close; + + +L_Gift: + .@q2=getq2(TulimsharQuest_AnwarField); + if (.@q2 & 2) { + mesn; + mesq l("Thanks for the nice gift!"); + close; + } + // Tip. WHAT DID YOU DID WITH THE BOUND ITEM? IT SHOULD BE HARD TO GET RID OF IT... + if (countitem(TortugaShell) < 1) { + mesn; + mesq l("Ah, I wish I got something for helping people out..."); + close; + } + mesn strcharinfo(0); + mesq l("Anwar sent you this, erm, hum... @@.", getitemlink(TortugaShell)); + next; + setq2 TulimsharQuest_AnwarField, .@q2+2; + delitem TortugaShell, 1; + getexp 75, 10; + mesn; + mesq l("WOW, THIS IS AWESOME! Many, many thanks!!"); + close; + +OnInit: + .@npcId = getnpcid(.name$); + //setunitdata(.@npcId, UDT_HEADTOP, PinkieHat); + setunitdata(.@npcId, UDT_HEADMIDDLE, ValentineDress); + setunitdata(.@npcId, UDT_HEADBOTTOM, CottonTrousers); + //setunitdata(.@npcId, UDT_WEAPON, DeepBlackBoots); // Boots + setunitdata(.@npcId, UDT_HAIRSTYLE, 10); + setunitdata(.@npcId, UDT_HAIRCOLOR, 12); + + .sex = G_FEMALE; + .distance = 5; + end; +} diff --git a/npc/003-1/eugene.txt b/npc/003-1/eugene.txt new file mode 100644 index 0000000..4891dc0 --- /dev/null +++ b/npc/003-1/eugene.txt @@ -0,0 +1,173 @@ +// TMW2 scripts. +// Authors: +// Reid +// Travolta +// Saulc +// Description: +// Fishman NPC +// Quest variable: +// TulimsharQuests_Fishman +// Quest stages: +// 0 - not started +// 1 - Eugene asked for items +// 2 - completed + +003-1,80,127,0 script Eugene NPC_EUGENE,{ + + narrator S_LAST_NEXT, + l("You see a raijin boy, sitting on the edge of the dock."), + l("He's holding a fishing rod, while gazing out at the sea."); + + .@q = getq(TulimsharQuests_Fishman); + if (.@q == 1) goto L_CheckItems; + if (.@q == 2) goto L_QuestDone; + + speech S_LAST_BLANK_LINE, + l("Ahoi."), + l("Hey, check out my brand new fishing rod. I bought it just today."), + l("I was so excited, I wanted to try it as soon as possible."), + l("So in a hurry, I forgot to take enough bait for fishing."), + lg("Be a friend and bring me @@ @@.", "Be a friend and bring me @@ @@.", .BaitCount, getitemlink(.BaitID)); + + switch (select(l("I'll be back in no time."), + l("Sorry, I'm doing other things at the moment."))) + { + case 1: + setq TulimsharQuests_Fishman, 1; + speech S_FIRST_BLANK_LINE, + l("Thank you. I'll wait here."); + next; + mesc l("Protip: @@ are dropped by @@. That monster helps each other, so don't attack when they are in packs.", getitemlink(.BaitID), getmonsterlink(LittleBlub)); + close; + case 2: + speech S_FIRST_BLANK_LINE, + l("But I'm almost out of @@...", getitemlink(.BaitID)); + close; + } + +L_CheckItems: + if (countitem(.BaitID) < .BaitCount) + { + speech + l("Sorry, but you don't have what I need."), + l("I need @@ @@.", .BaitCount, getitemlink(.BaitID)); + close; + } + + speech + l("That's exactly what I needed!"), + l("To thank you, accept my old fishing rod."), + l("It's not as good as my new one, but still very useful."), + l("Just look at that water! There's a whole bunch of fish down there."), + l("Oh, and you will need this book too, it will help you learn the basics of fishing."), + lg("You might even get lucky, and get a @@.", + "You might even get lucky, and get a @@.", getitemlink(GrassCarp)), + l("Have a good time fishing!"); + + delitem .BaitID, .BaitCount; + getitem FishingRod, 1; + getitem FishingGuideVolI, 1; + getexp 62, 5; + setq TulimsharQuests_Fishman, 2, 99, gettimeparam(GETTIME_DAYOFMONTH); + close; + +L_QuestDone: + // Time check/fix + .@q3=getq3(TulimsharQuests_Fishman); + if (.@q3 < gettimeparam(GETTIME_DAYOFMONTH)) + setq TulimsharQuests_Fishman, 2, 0, gettimeparam(GETTIME_DAYOFMONTH); + + .@maxcarps=1+(BaseLevel/8); + .@q2=getq2(TulimsharQuests_Fishman); + // Idea for future: Eugene telling fishman jokes. + speech + l("Ahoy, @@!", strcharinfo(0)), + l("Are the fish biting today?"); + + select + l("Yes, everything is going great, thank you!"), + l("Actually, I have bad luck. Could you sell me a box full of fresh fish?"); + + switch (@menu) { + case 1: + if (.@q2 < .@maxcarps) + goto L_Sidequest; + speech S_FIRST_BLANK_LINE, + l("Glad to hear. I swear, the fish I picked before you arrive was THAT big!"); + close; + case 2: + speech S_FIRST_BLANK_LINE, + l("Earlier I hadn't any, but now that I have the baits, I will be glad to sell some to you!"); + npcshopattach(.name$); + openshop; + closedialog; + } + close; + +L_Sidequest2: + mesn; + mesc l("Eugene bows politely, but he thinks he can use more."); + goto L_SidequestSub; + +L_Sidequest: + mesn; + mesq l("Maybe I'm using a too low quality bait, I can't fish %s.", getitemlink(GrassCarp)); + next; + +L_SidequestSub: + mesn; + mesq l("I offer you %d GP for one. What do you say?", .SuperPrice); + if (!countitem(GrassCarp)) + close; + if (askyesno() == ASK_NO) + close; + delitem GrassCarp, 1; + Zeny+=.SuperPrice; + setq2 TulimsharQuests_Fishman, .@q2+1; + .@q2=getq2(TulimsharQuests_Fishman); + + // Maybe you can repeat, if so, do this immediately + if (.@q2 < .@maxcarps) + goto L_Sidequest2; + + // Maxed for the day, give you a hint + mesn; + mesq l("Thanks. Maybe I should stop using Maggot Slime as a bait."); + close; + +OnInit: + .BaitID = SmallTentacles; + .BaitCount = 10; + // 600% profit (normal is 500%, but fishing is harder) + .SuperPrice = getiteminfo(GrassCarp, ITEMINFO_SELLPRICE)*6; + + tradertype(NST_MARKET); + sellitem SmallFishingNet, -1, 1; + sellitem FishBox, -1, 5; + sellitem CommonCarp, -1, 3; + + .sex = G_MALE; + .distance = 6; + end; + +OnClock0611: +OnClock1200: +OnClock1801: +OnClock0003: + restoreshopitem SmallFishingNet, 1; + restoreshopitem FishBox, 5; + restoreshopitem CommonCarp, 3; + end; + +// Pay your taxes! +OnBuyItem: + debugmes("Purchase confirmed"); + PurchaseTaxes(); + end; + +OnSellItem: + debugmes("Sale confirmed"); + SaleTaxes(); + end; +} + diff --git a/npc/003-1/events.txt b/npc/003-1/events.txt new file mode 100644 index 0000000..d6843d1 --- /dev/null +++ b/npc/003-1/events.txt @@ -0,0 +1,499 @@ +// TMW2 scripts. +// Author: +// Jesusalva +// Description: +// Controls events, part of Aurora Event System +// +// See also: functions/aurora.txt, functions/seasons.txt, command/event.txt, +// event.txt, functions/soulmenhir.txt and, of course, the event maps (if any). +// +// Script Variables: +// Q_AuroraEvent +// Quest Variable: FYEVENT_CYCLE, Score, ClaimedControl +// +// TODO: Use duplicate() command to make it available in other towns as well + +// Easter +003-1,47,53,0 script Aurora NPC_FEMALE,{ + function handleEaster; + function handleValentine; + function handleStPatrick; + + // Aurora Event functions + function auroraRankings; + function auroraCurrentRankings; + function auroraSubmit; + function auroraListRewards; + + // Handle annuals + //.@v_stday = getvariableofnpc(.valentine_stday, "#EventCore"); + //.@v_stmon = getvariableofnpc(.valentine_stmon, "#EventCore"); + .@v_endday = getvariableofnpc(.valentine_endday, "#EventCore"); + .@v_endmon = getvariableofnpc(.valentine_endmon, "#EventCore"); + + //.@e_stday = getvariableofnpc(.easter_stday, "#EventCore"); + //.@e_stmon = getvariableofnpc(.easter_stmon, "#EventCore"); + .@e_endday = getvariableofnpc(.easter_endday, "#EventCore"); + .@e_endmon = getvariableofnpc(.easter_endmon, "#EventCore"); + + .@dy=gettime(GETTIME_DAYOFMONTH); + .@mo=gettime(GETTIME_MONTH); + + // Debug Overrides + if ($@DEBUG_OD) + .@dy=$@DEBUG_OD; + if ($@DEBUG_OM) + .@mo=$@DEBUG_OM; + + // Annual rewards can only be claimed until the month ends + if ($EVENT$ == "Patrick") + handleStPatrick(); + else if (.@mo == .@v_endmon && .@dy > .@v_endday) + handleValentine(); + else if (.@mo == .@e_endmon && .@dy > .@e_endday) + handleEaster(); + + // Another event is going on, smoothly handle it + if ($EVENT$ != "") + goto L_Aurora; + else + mesc l("Currently, there is no event going on."), 1; + close; + + +// OnRestore causes OnInit to start again +OnRestore: + setnpcdisplay .name$, "Aurora", NPC_FEMALE; +OnInit: + .@npcId = getnpcid(.name$); + setunitdata(.@npcId, UDT_HEADTOP, MiniSkirt); + setunitdata(.@npcId, UDT_HEADMIDDLE, RedStockings); + //setunitdata(.@npcId, UDT_HEADBOTTOM, BlueRoseHat); + setunitdata(.@npcId, UDT_WEAPON, UglyChristmasSweater); // (Blue) Bathrobe? + setunitdata(.@npcId, UDT_HAIRSTYLE, any(8, 8, 8, 20, 20, 11)); + setunitdata(.@npcId, UDT_HAIRCOLOR, 7); + .sex = G_FEMALE; + .distance = 5; + end; + +// Override for Valentine Day - There should be no Aurora +OnValentine: + .@npcId = getnpcid(.name$); + setnpcdisplay .name$, "Demure#ValentineFinal", NPC_FEMALE; + //.@npcId = getnpcid(.name$); + setunitdata(.@npcId, UDT_HEADTOP, Cap); + setunitdata(.@npcId, UDT_HEADMIDDLE, RedStockings); + setunitdata(.@npcId, UDT_HEADBOTTOM, BunnyEars); + setunitdata(.@npcId, UDT_WEAPON, GMRobe); + setunitdata(.@npcId, UDT_HAIRSTYLE, 14); + setunitdata(.@npcId, UDT_HAIRCOLOR, 18); + end; + + + + + + + + + + + + + + + + + + + + + + + + +///////////////////////////////////////////////////////////////////////////////// +function handleEaster { + // Handle rewards before anything else + if (EASTER_YEAR != gettime(GETTIME_YEAR)) { + EASTER_YEAR=gettime(GETTIME_YEAR); + if (strcharinfo(0) == $@easter_name$[0]) { + makepet BhopFluffy; + mesn; + mesc l("For the first place in Easter, you gained a Bhopper Fluffy."), 3; + mesc l("Remember to give it a balanced diet of Aquadas to make it happy."), 3; + next; + } else { + .@pos=array_find($@easter_name$, strcharinfo(0)); + // 0 (aka top 1) is not an appliable winner + if (.@pos > 0) { + // Reverse it so top 10 value is 2, and top 2 value is 10. + .@pos=11-.@pos; + getitem StrangeCoin, .@pos*10; + } + } + } + mesn; + mesq l("Easter is over! I am the last chance to get rid of eggs!!"); + mesc l("Note: Golden and Silver Eggs are deleted after the next event end."), 1; + // Heartbeat + select + l("Trade Silver Eggs"), + l("Trade Golden Eggs"), + l("View LeaderBoard"), + l("Thanks Lilica."); + mes ""; + switch (@menu) { + case 1: + openshop "#eastershop1"; + closedialog; + break; + case 2: + openshop "#eastershop2"; + closedialog; + break; + case 3: + mesn l("Easter @@", gettime(GETTIME_YEAR)); + mes("1."+$@easter_name$[0]+" ("+$@easter_value[0]+")"); + mes("2."+$@easter_name$[1]+" ("+$@easter_value[1]+")"); + mes("3."+$@easter_name$[2]+" ("+$@easter_value[2]+")"); + mes("4."+$@easter_name$[3]+" ("+$@easter_value[3]+")"); + mes("5."+$@easter_name$[4]+" ("+$@easter_value[4]+")"); + mes("6."+$@easter_name$[5]+" ("+$@easter_value[5]+")"); + mes("7."+$@easter_name$[6]+" ("+$@easter_value[6]+")"); + mes("8."+$@easter_name$[7]+" ("+$@easter_value[7]+")"); + mes("9."+$@easter_name$[8]+" ("+$@easter_value[8]+")"); + mes("10."+$@easter_name$[9]+" ("+$@easter_value[9]+")"); + break; + } + return; +} + + + + + + + + + + + + + + + + + + + + + + + + +///////////////////////////////////////////////////////////////////////////////// +function handleValentine { + mesn; + mesq l("Valentine Day is over!"); + next; + mes "##B"+l("Top 10 - Valentine Day")+"##b"; + mes("1." +$@valentine_name$[0]+" ("+$@valentine_value[0]+")"); + mes("2." +$@valentine_name$[1]+" ("+$@valentine_value[1]+")"); + mes("3." +$@valentine_name$[2]+" ("+$@valentine_value[2]+")"); + mes("4." +$@valentine_name$[3]+" ("+$@valentine_value[3]+")"); + mes("5." +$@valentine_name$[4]+" ("+$@valentine_value[4]+")"); + mes("6." +$@valentine_name$[5]+" ("+$@valentine_value[5]+")"); + mes("7." +$@valentine_name$[6]+" ("+$@valentine_value[6]+")"); + mes("8." +$@valentine_name$[7]+" ("+$@valentine_value[7]+")"); + mes("9." +$@valentine_name$[8]+" ("+$@valentine_value[8]+")"); + mes("10."+$@valentine_name$[9]+" ("+$@valentine_value[9]+")"); + + if (#VALENTINE_SENT+#VALENTINE_OPENED <= 0) + return; + next; + + // Handle rewards + #VALENTINE_SENT=0; + #VALENTINE_OPENED=0; + #VALENTINE_RECEIVED=0; + copyarray(.@name$[0], $@valentine_name$[0], 10); + if (strcharinfo(0) == .@name$[0]) { + makepet DoggyDog; + getitem PrismGift, 1; + getitem StrangeCoin, 10; + } else if (strcharinfo(0) == .@name$[1] || strcharinfo(0) == .@name$[2]) { + getitem PrismGift, 1; + getitem GoldenGift, 1; + getitem StrangeCoin, 10; + } else if (strcharinfo(0) == .@name$[3] || strcharinfo(0) == .@name$[4]) { + getitem GoldenGift, 1; + getitem SilverGift, 1; + getitem StrangeCoin, 10; + } else if (strcharinfo(0) == .@name$[5] || strcharinfo(0) == .@name$[6]) { + getitem SilverGift, 1; + getitem BronzeGift, 1; + getitem StrangeCoin, 10; + } else if (strcharinfo(0) == .@name$[7] || strcharinfo(0) == .@name$[8] || strcharinfo(0) == .@name$[9]) { + getitem BronzeGift, 1; + getitem StrangeCoin, 10; + } else { + getitem StrangeCoin, 5; + } + + getexp #VALENTINE_SENT+#VALENTINE_RECEIVED, #VALENTINE_SENT; + Zeny=Zeny+#VALENTINE_OPENED; + + if (strcharinfo(0) == .@name$[0]) + mesc l("You gained a @@ for the #1 place on the event. Remember to feed it @@, or it may run away from you.", getitemlink(DoggyDog), getitemlink(AnimalBones)); + return; +} + + + + + + + + + + + + + + + + + + + + + + + + +///////////////////////////////////////////////////////////////////////////////// +function handleStPatrick { + // Check if St. Patrick day is over D: + if ($EVENT$ != "Patrick") + goto OnRestore; + // Okay, it is still St. Patrick :3 + mesn; + mesc l("It's St. Patrick Event!"), 3; + mes l("At 00:00, 06:00, 12:00, 15:00, 18:00 and 21:00 server time"); + mes l("Several special clovers will show up at forests."); + next; + mes l("They have 10x more chance to drop a @@, so it is a great deal!", getitemlink(FourLeafClover)); + mes l("Also, hidden in a forest which is not hot nor cold, is the Gold Pot Cauldron..."); + mes l("You can get daily something from it, but unless you're green like me, you will have no luck..."); + next; + return; +} + + + + + + + + + + + + + + + + + + + + + + + + +///////////////////////////////////////////////////////////////////////////////// +L_Aurora: + // Define script variables + .@WHAT$=l("event"); + + // Fill them with specific details, if available + if ($EVENT$ == "Expo") { + .@WHAT$=l("world expo"); + } else if ($EVENT$ == "Fishing") { + .@WHAT$=l("golden fish hunt"); + } else if ($EVENT$ == "Kamelot") { + .@WHAT$=l("kamelot raid"); + } else if ($EVENT$ == "Regnum") { + .@WHAT$=l("regnum's blessing"); + } else if ($EVENT$ == "Mining") { + .@WHAT$=l("miners union request"); + } else if ($EVENT$ == "Candor") { + .@WHAT$=l("candor battle season"); + } else if ($EVENT$ == "Celestia") { + .@WHAT$=l("yeti king hunt season"); + } else if ($EVENT$ == "Gemini") { + .@WHAT$=l("gemini season"); + } else if ($EVENT$ == "Rebirth") { + .@WHAT$=l("rebirth season"); + } else if ($EVENT$ == "Tower") { + .@WHAT$=l("dream tower apparition"); + } else if ($EVENT$ == "Raid") { + .@WHAT$=l("boss raid"); + } else if ($EVENT$ == "Olympics") { + .@WHAT$=l("magic olympics"); + } + + mesn; + mesq l("Hello! I am Aurora, and I oversee the %s!", .@WHAT$); + next; + mesn; + mesq l("So, how can I help you today?"); + do + { + next; + select + l("Event Details"), + l("Event Ranking Rewards"), + rif(FYEventUsesRanking(), l("Current Rankings")), + rif(FYEventUsesRanking(), l("List & Claim rewards")), + l("That's all, thanks!"); + mes ""; + switch (@menu) { + case 1: + EventHelp(); + if (FYEventUsesRanking()) { + mesc l("You must claim all rewards and use any event item BEFORE it ends."), 1; + mesc l("Left-overs will be deleted shortly after."), 1; + mesc l("Any eventual ranking reward will be sent by the banker's mail."), 1; + } else { + mesn; + mesq l("Have fun!"); + } + break; + + case 2: + auroraRankings(); + break; + + case 3: + auroraCurrentRankings(); + break; + + case 4: + auroraSubmit(); + auroraListRewards(); + break; + + default: + close; + } + // The code block is done + } while (true); +close; + + + + + + + + + + + + + + + + + + + + + + + + +///////////////////////////////////////////////////////////////////////////////// +function auroraRankings { + setnpcdialogtitle l("Aurora Events")+" - "+$EVENT$; + setskin "aurora_"+$EVENT$; + mes "There is no ranking information available for this event."; + select("Ok"); + setskin ""; + clear; + auroraCurrentRankings(); // More to silence a bug than whatelse + return; +} + + +function auroraCurrentRankings { + if (FYEventUsesRanking()) { + HallOfAurora(); + } else { + mesn; + mesq l("Personally, I like unranked events more than ranked ones..."); + } + return; +} + + +function auroraListRewards { + .@s=getq2(Q_AuroraEvent); + .@r=getq3(Q_AuroraEvent); + mesn; + freeloop(true); + for (.@i=0; .@i < getarraysize($FYREWARD_PT); .@i++) { + mes l("%s %d pts - %d %s", + (.@r > .@i ? "%%A" : (.@r == .@i ? "%%E" : "%%B")), // Status Indicator + $FYREWARD_PT[.@i], $FYREWARD_AM[.@i], getitemlink($FYREWARD_ID[.@i])); + // You're at this milestone? Hmm + if (.@r == .@i) { + // Your score is enough: rank you up + if (.@s >= $FYREWARD_PT[.@i]) { + inventoryplace $FYREWARD_ID[.@i], $FYREWARD_AM[.@i]; + getitem $FYREWARD_ID[.@i], $FYREWARD_AM[.@i]; + .@r+=1; + setq3 Q_AuroraEvent, .@r; + } + } + } + freeloop(false); + return; +} + + +function auroraSubmit { + .@q2=getq2(Q_AuroraEvent); + FYE_Submit(); + mesc l("Event score: %d -> %d", .@q2, getq2(Q_AuroraEvent)); + return; +} + + + + + + + + + + + + + + + + + + + + + + + +// DO NOT REMOVE +} + diff --git a/npc/003-1/gladys.txt b/npc/003-1/gladys.txt new file mode 100644 index 0000000..2262b92 --- /dev/null +++ b/npc/003-1/gladys.txt @@ -0,0 +1,99 @@ +// Author: +// Jesusalva + +003-1,63,105,0 script Gladys NPC_FEMALE_TONORI,{ + + mesn; + mesq l("Hello darling. The Alliance sucks, but don't tell anyone I told you that."); + mes ""; + menu + l("What is the Alliance?"), L_What, + l("Why does it suck?"), L_Why, + l("Well, too bad!"), L_Close; + +L_What: + mes ""; + mesn; + mesq l("What Alliance? The Alliance which rules over the World Of Mana!"); + next; + +L_AllianceMenu: + mes ""; + menu + l("Who composes the Alliance?"), L_Members, + l("What are the tasks of the Alliance?"), L_Tasks, + l("Do you think I could join the Alliance?"), L_Join, + l("I have to go. See you later."), L_Close; + +L_Why: + mes ""; + mesn; + mesq l("Because they control everything! They even determine taxes!"); + next; + mesq l("They also hold control over the Mana Stones, but this is not the problem."); + next; + mesq l("In the end, they decide the defensive measures, and they even set curfews!"); + next; + mesq l("They also determine rules, and enforce them. We live under a disguised dictatorship."); + next; + mesq l("But what I really hate is that they forbid gossiping."); + next; + goto L_AllianceMenu; + +L_Members: + mes ""; + mesn; + mesq l("Oh, every settlement is part of it. Candor, Tulimshar, Hurnscald, Frostia, Halinarzo, Artis, Nivalis..."); + next; + mesq l("Each settlement names a representative, which forms the Alliance Council. There is also the High Council, and the Magic Council."); + next; + mesq l("The Magic Council can be found at this city. They are the most powerful mages. If you have an impressive magical affinity, they may entitle you to have access to a Mana Stone."); + next; + mesq l("The Alliance Council rarely meets. It's thanks to them that the cities are well protected, if you want my opinion."); + next; + mesq l("The High Council acts in the Alliance stead, as it is not possible to reunite every city leader for all minor matters."); + next; + mesq l("Saulc, Crazyfefe and Jesus Saves are the three High Councillors. Don't do anything illegal while they're watching!"); + next; + goto L_AllianceMenu; + +L_Tasks: + mes ""; + mesn; + mesq l("Their main tasks are ensuring fair trading, protecting the cities from monster invasions, and guarding the Mana Stones."); + next; + mesq l("They also recently took over some city affairs. It's good they're protecting us, but I'm afraid of them creeping into our lives!"); + next; + goto L_AllianceMenu; + +L_Join: + mes ""; + mesn; + mesq l("Unless you are an exceptionally talented mage or an influentical politician, it is unlikely."); + next; + mesq l("The High Council's have some subordinates, but those are hand-picked by them."); + next; + mesq l("You could try getting into a city administration. If you can get a citizenship, you can try to elect for an office."); + next; + mesq l("Otherwise, you could ask the Constable. They act in the Alliance stead to enforce law and order, and may have... special arrangements for you."); + next; + goto L_AllianceMenu; + +L_Close: + mes ""; + mesq l("Good bye, darling!"); + close; + +OnInit: + .@npcId = getnpcid("Gladys"); + setunitdata(.@npcId, UDT_HEADTOP, TrapperHat); // Whaaaaaaaaat + setunitdata(.@npcId, UDT_HEADMIDDLE, ValentineDress); + setunitdata(.@npcId, UDT_HEADBOTTOM, CottonTrousers); + setunitdata(.@npcId, UDT_WEAPON, DeepBlackBoots); // Boots + setunitdata(.@npcId, UDT_HAIRSTYLE, 20); + setunitdata(.@npcId, UDT_HAIRCOLOR, 20); + + .sex = G_FEMALE; + .distance = 5; + end; +} diff --git a/npc/003-1/hasan.txt b/npc/003-1/hasan.txt new file mode 100644 index 0000000..658e4d3 --- /dev/null +++ b/npc/003-1/hasan.txt @@ -0,0 +1,224 @@ +// TMW-2 Script +// Author: +// Jesusalva +// Description: +// Hasan is the city bully and steals from the player. He lost his father to a Murderer +// Scorpion. Will respect player if they kill one. His mother is Sorfina, who +// explains this and cries that he never touched a Soul Menhir. Allows the player +// to kill the scorpion on Mahoud's Basement. +// +// Player must report theft first to Dausen, who will tell the player that's +// normal and nobody messes with Hasan, and giving player a pointer that they should +// tell his mother, Sorfina. +// +// Reward: Cotton Short, Hasan won't steal from you anymore. +// +// GETQ1 Variable Value; +// 0 - Hasan has never stolen from the player +// 1 - Hasan already stole from the player +// 2 - Dausen pointed player to Sorfina +// 3 - Sorfina unlocked Mahoud's Basement +// 4 - Player killed Murderer Scorpion +// 5 - Quest is complete +// +// $HASAN_ST +// Number of Scorpions killed during Autumn +// $HASAN_GP +// Total money Hasan collected for Autumn event +// $HASAN_LT +// Previous collected money, for rewards calc +// +// PS. $@GM_OVERRIDE will disable Season restrictions, but values from 20/09 and 21/12 +// must be set manually. + +// Temporary sprite +003-1,62,148,0 script Hasan NPC_ELVEN_MAN_RED,2,2,{ + if (getq(TulimsharQuest_Hasan) == 0) goto L_Safe; + if (getq(TulimsharQuest_Hasan) == 4) goto L_Finish; + if (getq(TulimsharQuest_Hasan) >= 5) goto L_Complete; + mesn strcharinfo(0); + mesq l("Give me back what you stole, thief!"); + next; + mesn; + mesq l("I stole nothing from you. Do you have any proof?"); + next; + menu + l("I have a print screen!"), L_Print, + l("No..."), L_Close; + close; + +L_Away: + mesn; + mesq l("Hey... Go bother someone else."); + close; + +L_Print: + mes ""; + mesn; + mesq l("Let me analyze that."); + mesc l("Hasan takes your print screen and analyzes it."); + next; + mesn; + mesq l("Photoshopped. Definitely. Good luck convincing somebody with that! %%a"); + next; + mesn; + mesq l("If you go to Lieutenant Dausen, he'll say that you used GIMP. Just give up."); + close; + +// TODO +L_Finish: + mesn; + // The scorpion and not a scorpion because of dramatic buildup. + mesq l("Is that... Wait... Wow. You... Killed the murderer scorpion."); + next; + mesn; + mesq l("I promise I'll never steal from you again. Here, take these shorts."); + mesq l("Good job, man!"); + setq TulimsharQuest_Hasan, 5; + getitem CottonShorts, 1; + getexp 99, 55; + close; + +L_Complete: + mesn; + mesq l("Thanks for avenging my father."); + next; + mesn; + mesq l("I am collecting money for the Yearly Autumn Scorpion Hunter quest."); + mesq l("You're, of course, invited. Thus far, the total prize money I've collected is @@ GP.", $HASAN_GP); + if (season() == AUTUMN || $@GM_OVERRIDE || is_staff()) { + mesq l("You've killed @@ scorpions, and a total of @@ were killed this season.", fnum(getq2(SQuest_Autumn)), fnum($HASAN_ST)); + mesq l("If the event ended now, you would get @@ GP.", getq2(SQuest_Autumn)*$HASAN_GP/$HASAN_ST); + mes ""; + mesc l("Note: Poll may increase more than total money donated depending on current date."); + menuint + l("Thanks."), 0, + rif(Zeny >= 5, l("Donate 5 GP for prize")), 5, + rif(Zeny >= 15, l("Donate 15 GP for prize")), 15, + rif(Zeny >= 50, l("Donate 50 GP for prize")), 50, + rif(Zeny >= 100, l("Donate 100 GP for prize")), 100, + rif(Zeny >= 1000, l("Donate 1k GP for prize")), 1000, + rif(Zeny >= 10000, l("Donate 10k GP for prize")), 10000, + rif(Zeny >= 25000, l("Donate 25k GP for prize")), 25000, + rif(Zeny >= 100000, l("Donate 100k GP for prize")), 100000, + rif(Zeny >= 250000, l("Donate 250k GP for prize")), 250000; + if (@menuret > 0) { + Zeny=Zeny-@menuret; + .@poll=@menuret; + .@bonus=10000; + .@bonus+=rand(gettime(GETTIME_MONTH) == DECEMBER ? 2000 : 4000); + .@bonus+=(gettime(GETTIME_MONTH) == DECEMBER ? 0 : 1000); + .@poll=.@poll*.@bonus/10000; + $HASAN_GP=$HASAN_GP+.@poll; + } + } + + .@q=getq(SQuest_Autumn); + if (season() == WINTER && (.@q == gettime(GETTIME_YEAR) || (.@q == gettime(GETTIME_YEAR)-1 && gettime(GETTIME_MONTH) <= MARCH))) { + .@p=getq2(SQuest_Autumn)*$HASAN_LT/$HASAN_ST; + mesn l("Summary"); + mes l("Scorpions killed: @@/@@ scorpions", getq2(SQuest_Autumn), $HASAN_ST); + mes l("Total money collected: @@ GP", $HASAN_LT); + mesc l("Your prize: %s GP", fnum(.@p)), 2; + if (getq2(SQuest_Autumn) > 20) + getexp (getq2(SQuest_Autumn)/20), 0; + if (.@p >= 1) + Zeny+=.@p; + + // Top 5 reward + if (strcharinfo(0) == $@hasn_name$[0]) + getitem SupremeGift, 1; + if (strcharinfo(0) == $@hasn_name$[1]) + getitem PrismGift, 1; + if (strcharinfo(0) == $@hasn_name$[2]) + getitem GoldenGift, 1; + if (strcharinfo(0) == $@hasn_name$[3]) + getitem SilverGift, 1; + if (strcharinfo(0) == $@hasn_name$[4]) + getitem BronzeGift, 1; + + // Quest is closed + setq1 SQuest_Autumn, 1970; + next; + mes ".:: Scoreboards ::."; + mesf("1. %s (%d)", $@hasn_name$[0], $@hasn_value[0]); + mesf("2. %s (%d)", $@hasn_name$[1], $@hasn_value[1]); + mesf("3. %s (%d)", $@hasn_name$[2], $@hasn_value[2]); + mesf("4. %s (%d)", $@hasn_name$[3], $@hasn_value[3]); + mesf("5. %s (%d)", $@hasn_name$[4], $@hasn_value[4]); + } + close; + +L_TouchComplete: + if (@hasan_antiflood < gettimetick(2)) { + npctalkonce l("Hey there, @@! Good luck killing monsters!", strcharinfo(0)), 3; + @hasan_antiflood=gettimetick(2)+600; + } + end; + +L_Close: + close; + +OnTouch: + if (getq(TulimsharQuest_Hasan) >= 5) goto L_TouchComplete; + if (Zeny > 15) goto L_Steal; + end; + +L_Steal: + npctalkonce(l("*whistles*")); + if (getq(TulimsharQuest_Hasan) == 0) goto L_DoSteal; + if (getq(TulimsharQuest_Hasan) <= 4 && rand(0,100) < 20) goto L_DoSteal; + end; + +L_DoSteal: + .@s=rand(3,12); + $HASAN_GP=$HASAN_GP+.@s; + Zeny=Zeny-.@s; + if (getq(TulimsharQuest_Hasan) == 0) + setq TulimsharQuest_Hasan, 1; + dispbottom l("##BYou were robbed##b by an evil NPC."); + end; + +OnInit: + .sex = G_MALE; + .distance = 5; + + //npcspeed(150); + //npcwalkto(<x>, <y>); + end; + +// Restart hasan status on 20/09 (double-sure) +OnDay0920: + $HASAN_ST=0; + end; + +// Once autumn is over (21/12) restart GP poll and send value to backup +OnDay1221: + $HASAN_LT=0+$HASAN_GP; + $HASAN_GP=2000+(TOP3AVERAGELVL()*100); + end; +} + +function script SQuest_Hasan { + if (season() != AUTUMN && !$@GM_OVERRIDE) + return; + if (getq(SQuest_Autumn) != gettime(GETTIME_YEAR)) + setq SQuest_Autumn, gettime(GETTIME_YEAR), 0; + + // All scorpions are counting for Hasan Autumn Quest + if ( + killedrid == Scorpion || + killedrid == RedScorpion || + killedrid == BlackScorpion || + killedrid == CandorScorpion || + killedrid == AngryScorpion || + killedrid == AngryRedScorpion || + killedrid == NightScorpion || + killedrid == GoldenScorpion || + killedrid == MurdererScorpion) { + setq2 SQuest_Autumn, getq2(SQuest_Autumn)+1; + $HASAN_ST=$HASAN_ST+1; + } + return; +} + diff --git a/npc/003-1/inac.txt b/npc/003-1/inac.txt new file mode 100644 index 0000000..45cc335 --- /dev/null +++ b/npc/003-1/inac.txt @@ -0,0 +1,142 @@ +// TMW2 scripts. +// Author: +// Saulc +// Jesusalva +// Inac Give a sharp knife for 20 Piou Feathers to player over level 12, +// before Tycoon give it but only bafter level 18 that was too high ! + +003-1,55,82,0 script Inac NPC_PLAYER_TONORI,{ + + .@Inac = getq(TulimsharQuest_Inac); + if (BaseLevel < 12) goto L_TooWeak; + if (.@Inac == 1) goto L_Check; + if (.@Inac == 2) goto L_Complete; + +L_GiveTask: + mesn; + mesq lg("Hello, wanderer! Welcome to Tulimshar."); + next; + mesq l("Was it Nard who brought you here?"); + next; + + menu + l("Yeah, Nard's sailors saved my life and brought me here!"), L_Quest, + l("I need to go."), L_Quit; + +L_Quest: + mes ""; + mesn; + mesq l("Quite benevolent, they are. Nard likes to help anyone who works hard. Anyway, there was something important I needed to say."); + next; + mesn; + .@g$=lg("girl", "boy"); + mesq l("Tulimshar is surrounded by strong monsters. If you go out with your poor equipment, you're going to be dead in no time, @@.", .@g$); + tutmes l("You can use \"@monsterinfo <monster name>\" to gauge a monster strength."), l("Protip"), false; + next; + mesn; + mesq l("I probably can give you my Sharp Knife, though! If you want to help me, that is."); + next; + + menu + l("Really? That would be great!"), L_Start, + l("I better do this some other time..."), L_Quit; + + +L_Start: + setq TulimsharQuest_Inac, 1; + mes ""; + mesn; + mesq l("Well, if you come from Candor, you probably will have some fluffy's yellow feathers. I use them to make pillows."); + goto L_List; + +L_Quit: + mes ""; + mesn; + mesq l("Have a good day, then."); + close; + +L_List: + mes ""; + mesn; + mes l("I can give you my knife if you bring me this:"); + mes l("@@/20 @@", countitem(PiouFeathers), getitemlink(PiouFeathers)); + close; + +L_Check: + mesn; + mesq l("Did you brought me the feathers?"); + next; + menu + l("Yes! Here you are."), L_Give, + l("I forgot what you need!"), L_List, + l("Later."), L_Quit; + +L_Give: + if ( + countitem(PiouFeathers) < 20 + ) goto L_Lying; + + inventoryplace SharpKnife, 1; + + delitem(PiouFeathers, 20); + + getitem(SharpKnife, 1); + getexp(200, 5); + setq(TulimsharQuest_Inac, 2); + + mes ""; + mesn; + mesq l("Enjoy this new weapon, I hope you're successful."); + close; + +L_Complete: + mesn; + mesq l("Many stories are told about this city sewers."); + next; + mesn; + mesq l("One of them is really crazy, though: They say that there is a legendary monster down there."); + next; + mesn; + mesq l("That's just nonsense though, I've been there thousands of times and saw no such thing."); + if (getq(TulimsharQuest_Sewers) > 0) + close; + next; + mesn; + mesq l("Anyway, there's a barrier to prevent monsters from attacking the city from below."); + next; + mesn; + mesq l("To enter on them, you need to be level 25 and use the following chant: \"Blame Saulc\". I don't know why, but that open doors!"); + setq TulimsharQuest_Sewers, 1; + close; + +L_Lying: + mesn; + mesq l("No no no, that's wrong."); + next; + mesc l("I need more feathers for a fair deal."); + next; + goto L_List; + +L_TooWeak: + mesn; + mesq l("Hello little kid. Watch out, there's a maggot behind you %%a !"); + tutmes l("You need at least level %s to do this quest.", b(12)), l("WARNING"), false; + close; + +OnShout: + npctalk3 l("Ahoy! Hey, you, new person! Could you come here?!"); + end; + +OnInit: + .@npcId = getnpcid(.name$); + setunitdata(.@npcId, UDT_HEADTOP, Bandana); + setunitdata(.@npcId, UDT_HEADMIDDLE, VneckJumper); + setunitdata(.@npcId, UDT_HEADBOTTOM, CottonTrousers); + setunitdata(.@npcId, UDT_WEAPON, LousyMoccasins); // Boots + setunitdata(.@npcId, UDT_HAIRSTYLE, 7); + setunitdata(.@npcId, UDT_HAIRCOLOR, 17); + + .sex = G_MALE; + .distance = 4; + end; +} diff --git a/npc/003-1/inar.txt b/npc/003-1/inar.txt new file mode 100644 index 0000000..79c7753 --- /dev/null +++ b/npc/003-1/inar.txt @@ -0,0 +1,46 @@ +// TMW2 Script +// Author: +// Saulc + +003-1,109,109,0 script Inar NPC_PLAYER_TONORI,{ + + mesn; + mesq l("Only finest wares!"); + mes ""; + menu + l("Trade"), -, + l("Leave"), L_Close; + + closedialog; + shop2 "Shop#bazar1"; + close; + +L_Close: + closedialog; + goodbye; + close; + +OnInit: + .@npcId = getnpcid(.name$); + setunitdata(.@npcId, UDT_HEADTOP, NPCEyesT); + setunitdata(.@npcId, UDT_HEADMIDDLE, SilkRobe); + //setunitdata(.@npcId, UDT_HEADBOTTOM, LeatherTrousers); // TODO + setunitdata(.@npcId, UDT_WEAPON, LousyMoccasins); // Boots + setunitdata(.@npcId, UDT_HAIRSTYLE, 4); + setunitdata(.@npcId, UDT_HAIRCOLOR, 1); + + .sex = G_MALE; + .distance = 5; + end; + +// Pay your taxes! +OnBuyItem: + debugmes("Purchase confirmed"); + PurchaseTaxes(); + end; + +OnSellItem: + debugmes("Sale confirmed"); + SaleTaxes(); + end; +} diff --git a/npc/003-1/ishi.txt b/npc/003-1/ishi.txt new file mode 100644 index 0000000..ed16ed3 --- /dev/null +++ b/npc/003-1/ishi.txt @@ -0,0 +1,232 @@ +// TMW-2 Script +// Author: +// Crazyfefe +// Jesusalva +// +// Do not add void items to the array. +// note: the rare item system sucks. + +003-1,97,97,0 script Ishi NPC_PLAYER_ARGAES,{ + + if (MPQUEST == 0) { + mesn l("Ishi, the Rewards Master"); + mesq l("Hey, it seems like you didn't register as a Monster Hunting Quest participant yet! You can sign up with Aidan."); + close; + } + if (BaseLevel < 10) { + // TODO: make jail stuff a function and replace this with the new function + dispbottom l("##1You abused a bug and will be jailed. If this was done in error, you have found a bug. Contact the nearest developer if this is the case."); + atcommand "@jailfor 5mn "+strcharinfo(0); + end; + } + + if (BaseLevel < 37) { + @mpq_cost=((BaseLevel*2/3) ** 2); + } else if (BaseLevel <= 50) { + // From level 37 onwards, we will notice a small drop on price increase factor (until level 50) + @mpq_cost=((BaseLevel*2/3) ** 2)-(BaseLevel*2); + } else { + // After level 50, the formula changes. We don't have exponential anymore. + // Previous increase reached 67 and will stop at this value. + @mpq_cost=((50*2/3) ** 2)-(50*2); + @mpq_cost+=(BaseLevel-50)*67; + // Of course... We still need to act as if exponent was still there... + // So we raise it a bit each 3 levels + @mpq_cost+=(BaseLevel/3)*3; + } + + if (Mobpt < @mpq_cost) + { + mesn l("Ishi, the Rewards Master"); + mesq l("Welcome! I see you have %d Monster Points. But that isn't enough to get items at your current level, sorry!", Mobpt); + mesc l("I need at minimum %d Monster Points to get items at current level.",@mpq_cost); + close; + } + + if (BaseLevel < 25) { + setarray @Items, Bread, + Candy,Orange,BugLeg, + CobaltHerb,GambogeHerb, + MauveHerb,MaggotSlime,ScorpionStinger,SilkCocoon, + RustyKnife,Coral,PiouLegs,Cheese,RoastedMaggot,RawLog; + } else { + setarray @Items, Bread, Croconut,Plushroom, + RedApple,Beer,Candy,Orange,ChocolateBar,BugLeg,CoinBag, + Coal,SnakeSkin,CottonCloth,GrassSeeds,HardSpike,CobaltHerb,GambogeHerb, + MauveHerb,CopperOre,MaggotSlime,RawLog,ScorpionStinger,SilkCocoon,TreasureKey, + WhiteFur,EmptyBottle,RustyKnife,Coral,PiouLegs,Cheese,SnakeEgg,RoastedMaggot,BlueDye; + } + setarray @Rares, BrimmedHat, 5, IronIngot, 10, BronzeGift, 10, ScrollSMaggot, 15, MercBoxB, 15; + + // Push blueprints based on your Job Level + array_push(@Rares, AlchemyBlueprintA); + array_push(@Rares, (JobLevel/3)); + array_push(@Rares, EquipmentBlueprintA); + array_push(@Rares, (JobLevel/3)); + + // Additional Loot for level 45+ + if (BaseLevel >= 45) { + array_push(@Items, IronOre); + array_push(@Items, SilverOre); + array_push(@Items, TinOre); + array_push(@Items, ChocolateMouboo); + array_push(@Items, MoubooSteak); + array_push(@Items, Milk); + array_push(@Items, TolchiAmmoBox); + array_push(@Items, ShadowHerb); + + array_push(@Rares, AlchemyBlueprintB); + array_push(@Rares, (JobLevel/6)); + array_push(@Rares, EquipmentBlueprintB); + array_push(@Rares, (JobLevel/6)); + } + + // Additional Loot for level 75+ + if (BaseLevel >= 75) { + array_push(@Items, LeadOre); + array_push(@Items, TitaniumOre); + array_push(@Items, IridiumOre); + array_push(@Items, GoldOre); + array_push(@Items, IronAmmoBox); + + array_push(@Rares, TulimWarpCrystal); + array_push(@Rares, 40); + array_push(@Rares, MercBoxA); + array_push(@Rares, 40); + array_push(@Rares, AlchemyBlueprintC); + array_push(@Rares, (JobLevel/9)); + array_push(@Rares, EquipmentBlueprintC); + array_push(@Rares, (JobLevel/9)); + } + + mesn l("Ishi, the Rewards Master"); + // Highlight the amount of monster points in bold for better visibility since players will probably exchange monster points a lot + mesq l("Welcome! I see you have ##B%d Monster Points##b. Would you like to exchange some of those for items?", Mobpt); + next; + if (@mpq_cost > 0) + mesc l("You can get up to %d items.", (Mobpt/@mpq_cost)); + + menuint + rif(Mobpt >= @mpq_cost, "1"), 1, + rif(Mobpt >= (@mpq_cost)*2, "2"), 2, + rif(Mobpt >= (@mpq_cost)*3, "3"), 3, + rif(Mobpt >= (@mpq_cost)*4, "4"), 4, + rif(Mobpt >= (@mpq_cost)*5, "5"), 5, + rif(Mobpt >= (@mpq_cost)*6, "6"), 6, + rif(Mobpt >= (@mpq_cost)*7, "7"), 7, + rif(Mobpt >= (@mpq_cost)*8, "8"), 8, + rif(Mobpt >= (@mpq_cost)*9, "9"), 9, + rif(Mobpt >= (@mpq_cost)*10,"10"), 10, + rif(Mobpt >= (@mpq_cost)*11,l("Gimme as many as I deserve!")), -1, + l("Sorry, I have to go now."), 0; + + .@var=@menuret; + + // Special cases + if (!.@var) + goto L_Close; + if (.@var < 0) + goto L_Give_all; + + goto L_Items; + +L_Close: + .@var=0; + closedialog; + goodbye; + close; + +L_Items: + //debugmes "Reaching item loop"; + freeloop(true); + for (.@i = 0; .@i < .@var; .@i ++) + { + //debugmes "Items: "+str(.@var); + .@lucked=0; + .@reward=0; + + if (BaseLevel > 25) { + //debugmes "Testing rares"; + @lucky = rand(10000) + 1; + for (.@b = 0; .@b < getarraysize(@Rares); .@b=.@b+2) { + //debugmes "Checking "+@Rares[.@b]+" - b is now "+.@b; + //debugmes l("Check @@ <= @@", @lucky, @Rares[.@b+1]); + if (.@b == 0) + @control = 0; + if(@lucky >= (@control + 1) && @lucky <= @control + (@Rares[.@b+1])) + { + .@lucked=1; + .@reward = @Rares[.@b]; + } + @control = @control + (@Rares[.@b+1]); + } + } + + //debugmes "Setting reward"; // could be if (!.@lucked) but for sanity... + if (!.@reward) + .@reward=any_of(@Items); + + //debugmes "Check weight"; + inventoryplace .@reward, 1; + + //debugmes "Processing..."; + Mobpt = Mobpt - @mpq_cost; + getitem .@reward,1; + + //debugmes "Printing..."; + if (.@lucked) { + mes ""; + mes l("Wow!"); + mes l("I can't believe it."); + mes l("You got lucky and got a(n) %s!", getitemlink(.@reward)); + mes ""; + } else { + mesq l("You received one %s!", getitemlink(.@reward)); + } + + } + freeloop(false); + close; + +L_Continue: + mesq l("You still have ##B%d Monster Points##b! Do you want more items?", Mobpt); + select + l("Yes"), + l("No"); + + switch (@menu) + { + case 1: + goto L_Give_all; + break; + case 2: + goto L_Close; + break; + } + close; + +L_Give_all: + .@var = Mobpt / @mpq_cost; + if (.@var > 50) { // limit to avoid lag server. Probably a bad idea. + .@var = 50; + mes l("You have too many points. I can't allow you to take all at once right now. I'll try to give you 50, and you can come back later!"); + next; + } + + goto L_Items; + close; + +OnInit: + .@npcId = getnpcid(.name$); + //setunitdata(.@npcId, UDT_HEADTOP, NPCEyes); + setunitdata(.@npcId, UDT_HEADMIDDLE, CopperArmor); + setunitdata(.@npcId, UDT_HEADBOTTOM, CottonTrousers); + setunitdata(.@npcId, UDT_WEAPON, DeepBlackBoots); // Boots + setunitdata(.@npcId, UDT_HAIRSTYLE, 4); + setunitdata(.@npcId, UDT_HAIRCOLOR, 13); + + .sex = G_MALE; + .distance = 5; + end; +} + diff --git a/npc/003-1/itka.txt b/npc/003-1/itka.txt new file mode 100644 index 0000000..e6ac006 --- /dev/null +++ b/npc/003-1/itka.txt @@ -0,0 +1,51 @@ +// TMW2 Script. +// Author: +// Jesusalva + +003-1,63,141,0 script Itka NPC_F_SHOPKEEPER,{ + + mesn; + mesq lg("Hello, madam!", "Hello, sir!"); + next; + mesq l("Did you knew the casino on the inn up here was one of the most expensive on the whole world?"); + next; + mesq l("Anyway, I am selling Cherry Cakes to sponsor my studies. Please buy as many as you want!"); + tutmes l("Ducks and Giant Maggots also drops Cherry Cakes."), l("Protip"), false; + next; + npcshopattach(.name$); + openshop; + closedialog; + close; + +OnInit: + .@npcId = getnpcid(.name$); + setunitdata(.@npcId, UDT_HEADTOP, NPCEyes); + setunitdata(.@npcId, UDT_HEADMIDDLE, VneckSweater); + setunitdata(.@npcId, UDT_HEADBOTTOM, RaidTrousers); + setunitdata(.@npcId, UDT_WEAPON, LousyMoccasins); // I prefer 1801 but the short doesn't match + setunitdata(.@npcId, UDT_HAIRSTYLE, 17); + setunitdata(.@npcId, UDT_HAIRCOLOR, 19); + + // NOTE: To limit selling items must change trader type to NST_MARKET + tradertype(NST_MARKET); + sellitem CherryCake, 200, 50; // 50 cakes for 200 GP each + + .sex = G_FEMALE; + .distance = 5; + end; + +OnMinute16: + restoreshopitem CherryCake, 200, 50; + end; + +// Pay your taxes! +OnBuyItem: + debugmes("Purchase confirmed"); + PurchaseTaxes(); + end; + +OnSellItem: + debugmes("Sale confirmed"); + SaleTaxes(); + end; +} diff --git a/npc/003-1/jakod.txt b/npc/003-1/jakod.txt new file mode 100644 index 0000000..bc3d703 --- /dev/null +++ b/npc/003-1/jakod.txt @@ -0,0 +1,77 @@ +// TMW2 script. +// Author: +// Saulc +// Jesusalva +// Description: +// Jakod replaces Luca. As there are no focus skills, Jakod teaches player about +// magic and is their tutor on the matters of the Mana Stone. + +003-1,109,129,0 script Jakod NPC_PLAYER_TONORI,{ + mesn; + if (BaseLevel < $MANA_BLVL) mesq l("Hello there. I am looking for strong people, but you are not strong enough."); + if (BaseLevel < $MANA_BLVL) close; + + if ($EVENT$ == "Rebirth") { + mesc l("Are you looking for Rebirth? Limited time only!"), 1; + if (askyesno() == ASK_YES) { + doevent "Phoenix Rebirth::OnMain"; + closeclientdialog; + end; + } + clear; + } + + mes l("\"Ah, hello there, @@. You've grown quite skilled lately.", strcharinfo(0)); + if (MAGIC_LVL) { + mes l("I also see you have a level @@ magic skill!\"", MAGIC_LVL); + next; + mes l("Did you got an @@ yet? That book have great insight on several details concerning mana and its usages!", getitemlink(JesusalvaGrimorium)); + next; + mes l("Anyway, you can see how skilled using Mana Magic with @@. Mana Magic is the one which requires concentration, to bring things into existence, for example.", b("@abizit")); + next; + mes l("Well, if you ever need help, do not hesit reading the wiki ;-)"); + close; + } else { + mes l("But you lack magic! That's a pity.\""); + select + l("How do I get magic?"), + l("Good bye."); + if (@menu == 2) + close; + mes ""; + } + + mes ""; + mesn; + mesq l("Well, the first thing would be to get access to a Mana Stone. Halinarzo had the biggest mana stone mines, but it's now depleted."); + next; + mesn; + mes l("\"That's the only hard part. As long that you do not neglect Intelligence nor Job level..."); + mes l("...If you're lucky, you can touch it and receive magic power.\""); + next; + mesn; + mesq l("Having magic power is useless by itself, so you must visit the Academy. I guess that involves approval and acknowledgment of the Mage Council that you are a mage!"); + next; + mesn; + mesq l("Keep in mind, the more levels and intelligence you have, more likely the Mana Stone will grant you more Magic Power. But that means nothing."); + next; + mesn; + mesq l("Because in the end, you are in the hands of your class leader!"); // Rare: Some loner NPCs may grant you EXTRA skills beyond that. + close; + +OnInit: + .@npcId = getnpcid(.name$); + setunitdata(.@npcId, UDT_HEADTOP, NPCEyesT); + setunitdata(.@npcId, UDT_HEADMIDDLE, ForestArmor); + setunitdata(.@npcId, UDT_HEADBOTTOM, JeansShorts); + setunitdata(.@npcId, UDT_WEAPON, DeepBlackBoots); + setunitdata(.@npcId, UDT_HAIRSTYLE, 14); + setunitdata(.@npcId, UDT_HAIRCOLOR, 13); + //setunitdata(.@npcId, UDT_HAIRSTYLE, 24); + //setunitdata(.@npcId, UDT_HAIRCOLOR, 2); + + .sex = G_MALE; + .distance = 3; + npcsit; + end; +} diff --git a/npc/003-1/jerican.txt b/npc/003-1/jerican.txt new file mode 100644 index 0000000..e25cab1 --- /dev/null +++ b/npc/003-1/jerican.txt @@ -0,0 +1,15 @@ +// TMW2 scripts. +// Author: +// Saulc +// Jesusalva +// Description: +// Jerican gives the player latest news on the world + +003-1,93,125,0 script Jerican NPC_JOURNALMAN,{ + Journalman(.name$); + +OnInit: + .sex = G_MALE; + .distance = 5; + end; +} diff --git a/npc/003-1/lieutenantdausen.txt b/npc/003-1/lieutenantdausen.txt new file mode 100644 index 0000000..f112602 --- /dev/null +++ b/npc/003-1/lieutenantdausen.txt @@ -0,0 +1,956 @@ +// TMW2 scripts. +// Authors: +// Saulc +// Jesusalva +// acsvln +// gnulinux +// Description: +// Help Tulimshar guards +// Quest variable: +// TulimsharQuests_Guards +// Quest stages: +// 0 - not started +// 1 - Lieutenant Dausen asked for help Tulimshar guards +// 2 - completed +// 3 - Reward given + +003-1,111,84,0 script Lieutenant Dausen NPC_PLAYER_TONORI,{ + function DausenMobTutorial; + + .@q = getq(TulimsharQuest_WaterForGuard); + .@t = getq(TulimsharQuest_MobTutorial); + + switch (.@q) { + case 0: + mesn; + mesq l("Greetings, wanderer. I am @@, chief of the Tulimshar guards. My wards are dying from dehydration in the sun. Bring them water and you will earn a reward.", .name$); + break; + case 1: + mesn; + mesq l("Please help my wards!"); + break; + case 2: + goto L_Reward; + break; + case 3: + mesn; + mesq l("Thank you for your help."); + break; + default: + end; + } + next; + select + rif(!.@q, l("Yes sir. I will help them.")), + rif(getq(TulimsharQuest_Hasan) == 1, l("A guy named Hasan stole from me!")), + rif (strcharinfo(2) == "Monster King", l("I'm with the Monster King.")), + l("What can you say about the monsters here?"), + l("Good bye, sir."); + mes ""; + switch (@menu) { + // Thristy Guards Quest + case 1: + setq TulimsharQuest_WaterForGuard, 1; + mes ""; + mesn; + mesq l("Good luck! Come for remuneration when you finish!"); + next; + mesc l("Protip: You need an @@ full of water to get a reply from guards.", getitemlink(EmptyBottle)); + break; + // Hasan Quest + case 2: + setq TulimsharQuest_Hasan, 2; + speech S_FIRST_BLANK_LINE, lg("Ah, Hasan... Sorry pal, afraid I can't do anything for you. Try talking to his mother Sorfina, she is in Mahoud's house, near the Inn."); + break; + // The Monster King guild have a special menu + case 3: + if (strcharinfo(2) == "Monster King") goto L_MKControl; + break; + // Monster info + case 4: + DausenMobTutorial(); + break; + default: + closedialog; + goodbye; + break; + } + close; + +// Reward for quest completion +L_Reward: + mesn; + mesq l("Thank you, here is your reward."); + + inventoryplace TulimsharGuardBoots, 1, TulimsharGuardCard, 1; + getitem TulimsharGuardBoots, 1; + getitem TulimsharGuardCard, 1; + setq TulimsharQuest_WaterForGuard, 3; + + next; + + speech 0x0, + l("Wait a minute..."), + l("The Tulimshar guards needs an freelance employee who would help us with our work. We are searching for people like you."), + l("Take this badge, so you can enter the guard house. You will find more work there. Bye, and good luck!"); + close; + +// Mob Tutorial Quest +function DausenMobTutorial { + if (BaseLevel < 9) { + mesn; + mesq l("They're strong, so keep fighting Maggots and Scorpions which you're used to, until you get stronger."); + close; + } + .@t = getq(TulimsharQuest_MobTutorial); + .@k = getq2(TulimsharQuest_MobTutorial); + // You need a Guard Card, Dausen have a bad memory :p + if (!countitem(TulimsharGuardCard)) { + mesn; + mesq l("Well, I do not trust you yet. You literally were just brought by the shore, and even if Nard and Lua seems to trust you..."); + next; + mesn; + mesq l("...I still need to cover up if they're mistaken. Give me a reason to tell you secrets, show me you're concerned with Tulimshar safety and don't want just to be strong."); + next; + mesn; + mesq l("Power in the wrong hands is nothing but a burden and a reason for others to cry. That's exactly what I don't want in this town."); + close; + } + switch (.@t) { + case 0: + case 1: + // Reward + if (.@k >= 10) { + mesn; + mesq l("Welp, you killed 10 Crocs. They're not dangerous, as you see. That's why we don't bother in cleaning them up."); + setq TulimsharQuest_MobTutorial, 2, 0; + // 30% of exp values + getexp 75, 0; + Zeny+=300; + close; + } + // Quest Body + mesn; + mesq l("So. Uhm. The monsters here have varying levels of strength... I think the best way is to witness that yourself."); + next; + mesn; + mesq l("Do you see the crocs, with their claws and hard shell? They have high defense, this means your attacks deal less damage."); + next; + mesn; + mesq l("They're not too dangerous, but they can take a lot of hits. So, if you kill 10 of them, I'll know you're dedicated in learning which monsters are out there."); + next; + mesn; + mesq l("Can you do that? I'll be waiting!"); + compareandsetq TulimsharQuest_MobTutorial, 0, 1; + close; + case 2: + case 3: + // TODO: Blubs and Ducks + // Level Requeriment (same as blubs) + if (BaseLevel < 14) { + mesn; + mesq l("There's some diversity, but you should keep aiming at helping people and killing small-fry. If you ever want a challenge, there's a Giant Maggot inside the town which can kill you in one hit."); + next; + mesn; + mesq l("Have you found Tulimshar's Secret Beach yet? Tulimshar is full of secrets. Some NPCs which only say hi may say something else depending on your level or insistence."); + close; + } + // Reward + if (.@k >= 37) { + mesn; + mesq l("Hmm, that's some progress. Nobody goes to the beach because of these slimes, but it looks like this might change sometime soon."); + next; + mesn; + mesq l("Also, the Inn folks said the Ducks keep bothering them, but they've noticed a small decrease already."); + next; + mesn; + mesq l("I don't know what you did, but both the Ducks and Blubs did got scared. I thank you in the name of the city guard. Please come back later."); + setq TulimsharQuest_MobTutorial, 4, 0; + // 30% of exp values + getexp 210, 0; + Zeny+=700; + close; + } + // Quest Body + mesn; + mesq l("West of here is a beach. There's a secret passage to it, underground. In there you'll find slime-like creatures called Blubs."); + next; + mesn; + mesq l("Some are small, others are bigger. But they all fight together, so be mindful when they're in groups."); + next; + mesn; + mesq b(l("The big one without hat"))+" "+l("is your target. They spawn smaller versions of themselves! Kill @@ of them and make the beach safe for tourists.", 37); + next; + mesn; + mesq l("Or make yourself useful by killing some Ducks. They snatch all the Cherry Cake from the Inn and the staff is getting angry at me. It'll serve, too."); + compareandsetq TulimsharQuest_MobTutorial, 2, 3; + close; + case 4: + case 5: + // TODO: Desert Log Head, Desert Bandits, Sarracenus + if (BaseLevel < 22) { + mesn; + mesq l("Have you visited the mines already? Tycoon is in charge of the security operations in there. He might need your help more than I do."); + close; + } + // Reward + if (.@k >= 100) { + mesn; + mesq l("Not bad. These are the main threat we have to fend off, along snakes and black scorpions."); + setq TulimsharQuest_MobTutorial, 6, 0; + // 30% of exp values + getexp 600, 0; + Zeny+=1200; + close; + } + // Quest Body + mesn; + mesq l("So... Have you tried visiting the Canyons? I know, it is a crazy idea."); + next; + mesn; + mesq l("But if you want to be guard, you must be brave! Go fight your fears, and go kill some bandits like a decent guard."); + next; + mesn; + mesq l("Well, if you're scared, you can kill Desert Log Heads, but they'll have a smaller worth."); + next; + mesn; + mesq l("Bring me @@ Bandits or Sarracenus heads, or the double of that in Desert Log Heads, and I'll consider you brave enough.", 50); + compareandsetq TulimsharQuest_MobTutorial, 4, 5; + close; + case 6: + case 7: + if (BaseLevel < 29) { + mesn; + mesq l("You're brave but weak. Go grind some levels, go make a wooden sword, I don't know."); + close; + } + // Reward + if (.@k >= 300) { + mesn; + mesq l("Alright, you've not only proven your worth, but you've went through most monsters in the desert close to the town."); + next; + mesn; + mesq l("Knowledge is power... And now you have both. Use them wisely."); + next; + inventoryplace Coal, 6; + getitem Coal, 6; + setq TulimsharQuest_MobTutorial, 8, 0; + // ~30% of exp values + getexp 2100, 0; + Zeny+=2400; + mesn; + mesq l("This coal will aid you to craft better weapons later. It's a token of appreciation. Good job."); + close; + } + // Quest Body + mesn; + mesq l("You've passed the test of courage. Bravure you have, but are you a real adventurer?"); + next; + mesn; + mesq l("You have good intentions, be brave, but in a world where power is measured in levels, numbers have more meaning than they should."); + next; + mesn; + mesq l("I'll present you three kind of strong monsters. Snakes are fast and dangerous. Giant Maggots are slow and dangerous. Black Scorpions have average speed and are... deadly."); + next; + mesn; + mesq l("Giant Maggots are worth 1 point, Snakes are worth 5 points and Black Scorpions are worth 10 points. The ones in caves doesn't count. Bring me 300 points. Good luck!"); + compareandsetq TulimsharQuest_MobTutorial, 6, 7; + default: + mesn; + mesq l("Eh? Well, you're in a desert. You can see Maggots and Scorpions, they're very common on these parts. Giant Maggots are very dangerous, but also very slow. If you know how to fight, they will yield you lots of experience."); + next; + mesn; + mesq l("West of here is a beach. In said beach there are blubs, they don't attack but they walk in packs. Be careful if you provoke too many of them."); + next; + mesn; + mesq l("Also, south of here are mines. Talk to Tycoon for information about it."); + next; + mesn; + mesq l("By last, east of here are the Canyons. Do not go there before level 20, and even then, do not engage snakes in combat. They are fast and very dangerous."); + close; + break; + } + return; +} + +// The Monster King guild have a special menu +L_MKControl: + mesn; + mes l("Oh noes! You've found the Tulimshar control panel!"); + next; + select + l("Abort"), + l("Initiate a siege"); + mes ""; + if (@menu == 2) { + doevent "Lieutenant Dausen::OnStartSiege"; + closedialog; + } + close; + +OnGuardDeath: + end; + +OnMKSiege: + $@SIEGE_ABORTED = false; +OnStartSiege: + kamibroadcast(col("WARNING! WARNING! Monster Army moving towards Tulimshar!!",1)); + do_siege("003-1", "004-1", "TULIM", TP_TULIM, .name$, .siegetime); + initnpctimer; + end; + +// Timers +OnTimer5000: + .siegetime+=5; + do_siege("003-1", "004-1", "TULIM", TP_TULIM, .name$, .siegetime); + switch (.siegetime) { + // Monster Army arrives in town + case 60: + disablenpc "Ched"; + disablenpc "Aahna"; + disablenpc "Constable Perry"; + disablenpc "Cyndala"; + disablenpc "Eomie"; + disablenpc "Eugene"; + disablenpc "Gladys"; + disablenpc "Inac"; + disablenpc "Ishi"; + disablenpc "Itka"; + disablenpc "Jakod"; + disablenpc "Jerican"; + disablenpc "Mahoud"; + disablenpc "Marius The Bard"; + disablenpc "Michel"; + disablenpc "Neko"; + disablenpc "Nina The Traveler"; + disablenpc "Sarah"; + disablenpc "Silvia"; + disablenpc "Tamiloc"; + disablenpc "Tinris"; + disablenpc "#water_animation0"; + disablenpc "Sailors#003-1"; + disablenpc "Guard Philip"; + disablenpc "Guard Defou"; + disablenpc "Guard Avou"; + disablenpc "Guard Benji"; + disablenpc "Guard Valou"; + disablenpc "Guard Nutelo"; + disablenpc "Guard Moustacha"; + disablenpc "Guard Popaul"; + disablenpc "Guard Yen"; + disablenpc "Guard Maxim"; + disablenpc "Guard Totor"; + disablenpc "Guard Roukin"; + disablenpc "Guard Falko"; + disablenpc "Guard Froma"; + disablenpc "Guard Tetric"; + disablenpc "Guard Biscop"; + + // Create guards + monster("003-1", 98, 100, ("Guard Philip"), FallenGuard3, 1, "Lieutenant Dausen::OnGuardDeath", Size_Medium, 2); + monster("003-1", 98, 121, ("Guard Defou"), FallenGuard3, 1, "Lieutenant Dausen::OnGuardDeath", Size_Medium, 2); + monster("003-1",102, 121, ("Guard Avou"), FallenGuard3, 1, "Lieutenant Dausen::OnGuardDeath", Size_Medium, 2); + monster("003-1", 58, 158, ("Guard Benji"), FallenGuard3, 1, "Lieutenant Dausen::OnGuardDeath", Size_Medium, 2); + monster("003-1", 62, 158, ("Guard Valou"), FallenGuard3, 1, "Lieutenant Dausen::OnGuardDeath", Size_Medium, 2); + monster("003-1", 71, 138, ("Guard Nutelo"), FallenGuard3, 1, "Lieutenant Dausen::OnGuardDeath", Size_Medium, 2); + monster("003-1", 58, 128, ("Guard Moustacha"), FallenGuard3, 1, "Lieutenant Dausen::OnGuardDeath", Size_Medium, 2); + monster("003-1", 58, 100, ("Guard Popaul"), FallenGuard3, 1, "Lieutenant Dausen::OnGuardDeath", Size_Medium, 2); + monster("003-1", 51, 73, ("Guard Yen"), FallenGuard3, 1, "Lieutenant Dausen::OnGuardDeath", Size_Medium, 2); + monster("003-1", 54, 52, ("Guard Maxim"), FallenGuard3, 1, "Lieutenant Dausen::OnGuardDeath", Size_Medium, 2); + monster("003-1", 50, 36, ("Guard Totor"), FallenGuard3, 1, "Lieutenant Dausen::OnGuardDeath", Size_Medium, 2); + monster("003-1", 53, 36, ("Guard Roukin"), FallenGuard3, 1, "Lieutenant Dausen::OnGuardDeath", Size_Medium, 2); + monster("003-1", 35, 34, ("Guard Falko"), FallenGuard3, 1, "Lieutenant Dausen::OnGuardDeath", Size_Medium, 2); + monster("003-1",111, 101, ("Guard Froma"), FallenGuard3, 1, "Lieutenant Dausen::OnGuardDeath", Size_Medium, 2); + monster("003-1",102, 80, ("Guard Tetric"), FallenGuard3, 1, "Lieutenant Dausen::OnGuardDeath", Size_Medium, 2); + monster("003-1",107, 80, ("Guard Biscop"), FallenGuard3, 1, "Lieutenant Dausen::OnGuardDeath", Size_Medium, 2); + break; + // Monster Army deployed in town + case 90: + disablenpc "Aidan"; + disablenpc "Inar"; + disablenpc "Malivox"; + disablenpc "Estard"; + disablenpc "Malindou"; + disablenpc "Jhedia"; + disablenpc "Swezanne"; + disablenpc "Luca"; + disablenpc "Colin"; + break; + // Monster army have withdrawn completly + case MK_SIEGE_DURATION: + .siegetime=0; + announce(("Tulimshar siege is over!"), bc_all); + enablenpc "Ched"; + enablenpc "Aahna"; + enablenpc "Constable Perry"; + enablenpc "Cyndala"; + enablenpc "Eomie"; + enablenpc "Eugene"; + enablenpc "Gladys"; + enablenpc "Inac"; + enablenpc "Ishi"; + enablenpc "Itka"; + enablenpc "Jakod"; + enablenpc "Jerican"; + enablenpc "Mahoud"; + enablenpc "Marius The Bard"; + enablenpc "Michel"; + enablenpc "Neko"; + enablenpc "Nina The Traveler"; + enablenpc "Sarah"; + enablenpc "Silvia"; + enablenpc "Swezanne"; + enablenpc "Tamiloc"; + enablenpc "Tinris"; + enablenpc "#water_animation0"; + enablenpc "Aidan"; + enablenpc "Inar"; + enablenpc "Malivox"; + enablenpc "Luca"; + enablenpc "Colin"; + enablenpc "Estard"; + enablenpc "Malindou"; + enablenpc "Jhedia"; + enablenpc "Sailors#003-1"; + enablenpc "Guard Philip"; + enablenpc "Guard Defou"; + enablenpc "Guard Avou"; + enablenpc "Guard Benji"; + enablenpc "Guard Valou"; + enablenpc "Guard Nutelo"; + enablenpc "Guard Moustacha"; + enablenpc "Guard Popaul"; + enablenpc "Guard Yen"; + enablenpc "Guard Maxim"; + enablenpc "Guard Totor"; + enablenpc "Guard Roukin"; + enablenpc "Guard Falko"; + enablenpc "Guard Froma"; + enablenpc "Guard Tetric"; + enablenpc "Guard Biscop"; + stopnpctimer; + end; + break; + } + + // Loop again + initnpctimer; + end; + +OnInit: + // Check items.xml for info about this. + .@npcId = getnpcid(.name$); + setunitdata(.@npcId, UDT_HEADTOP, BullHelmet); + setunitdata(.@npcId, UDT_HEADMIDDLE, LieutenantArmor); + setunitdata(.@npcId, UDT_HEADBOTTOM, RaidTrousers); + setunitdata(.@npcId, UDT_SHIELD, LousyMoccasins); // TODO FIXME: Display Boots + setunitdata(.@npcId, UDT_WEAPON, Backsword); + setunitdata(.@npcId, UDT_HAIRSTYLE, 7); + setunitdata(.@npcId, UDT_HAIRCOLOR, 17); + + .siegetime=0; + .sex = G_MALE; + .distance = 4; + end; +} + +// dausen_mobtutorial (killedrid) +// updates dausen quest +function script dausen_mobtutorial { + .@mobId=getarg(0, killedrid); + .@t = getq(TulimsharQuest_MobTutorial); + .@k = getq2(TulimsharQuest_MobTutorial); + .@v = 1; + .@upd=false; + + switch (.@mobId) { + case Croc: + if (.@t == 1) { + setq2 TulimsharQuest_MobTutorial, .@k+.@v; + .@upd=true; + } + break; + case Blub: + case Duck: + if (.@t == 3) { + setq2 TulimsharQuest_MobTutorial, .@k+.@v; + .@upd=true; + } + break; + case DesertBandit: + case Sarracenus: + .@v=2; + case DesertLogHead: + if (.@t == 5) { + setq2 TulimsharQuest_MobTutorial, .@k+.@v; + .@upd=true; + } + break; + case BlackScorpion: + .@v=10; + case Snake: + if (.@mobId != BlackScorpion) + .@v=5; + case GiantMaggot: + if (.@t == 7) { + setq2 TulimsharQuest_MobTutorial, .@k+.@v; + .@upd=true; + } + break; + } + if (.@upd) { + if (.@k+.@v % 10 == 0) + dispbottom l("Dausen Quest - @@ @@ killed", .@k+.@v, strmobinfo(1, .@mobId)); + } + return; +} + +// Render random guard answer after bringing him water +function script GuardsGratitude { + + switch (rand2(6)) + { + case 0: + .@message$ = l("God bless you! You have saved me from sweltering!"); + break; + case 1: + .@message$ = l("I am happy that such responsible citizens live in Tulimshar. Thank you for your help. It's really hot nowdays!"); + break; + case 2: + .@message$ = l("Thanks, this is very handy."); + break; + case 3: + .@message$ = l("Our service is dangerous and difficult. But I would not want any other. Thanks for the help."); + break; + case 4: + .@message$ = l("My mother told me, do not go work like a guard. You will die from overheating in the sun during the summer time."); + break; + case 5: + .@message$ = l("Who are you? Thanks for the help."); + break; + default: + .@message$=l("Thank you!"); + break; + } + + if (Sex != getvariableofnpc(.sex, strnpcinfo(0))) { + .@narrator_message$ = l("The Guard sends an air kiss to you."); + } else { + .@narrator_message$ = l("The Guard patted you on the back."); + } + + speech S_LAST_BLANK_LINE, .@message$; + narrator S_LAST_BLANK_LINE, .@narrator_message$; + + return; +} + +// Do TulimsharQuest_WaterForGuard quest +function script CheckGuard { + .@guard_id = getarg(0); + .@guard_count = 0; + .@count_tmp = 0; + + if ($@GM_OVERRIDE) + npctalk3 l("Hello, I am G-@@, of the @@ order.", .@guard_id, $@GuardBits[.@guard_id]); + + if (GUARDS_DONE_BITARRAY & $@GuardBits[.@guard_id]) + { + mesn; + mesq l("Thanks for help! Other guards may need help too!"); + close; + } else { + while (.@count_tmp < 18) + { + if (GUARDS_DONE_BITARRAY & $@GuardBits[.@count_tmp]) + .@guard_count = (.@guard_count + 1); + + .@count_tmp = (.@count_tmp + 1); + } + + if ( countitem(BottleOfTonoriWater) == 0 ) { + legiontalk; + } else { + delitem BottleOfTonoriWater, 1; + getitem EmptyBottle, 1; + + getexp 32, 2; + Zeny = (Zeny + 30); + + GUARDS_DONE_BITARRAY = GUARDS_DONE_BITARRAY | $@GuardBits[.@guard_id]; + setq2 TulimsharQuest_WaterForGuard, .@guard_count; // Update questlog + + if (.@guard_count >= 17) { + message strcharinfo(0), "That must have been the last guard."; + setq TulimsharQuest_WaterForGuard, 2; + } + + GuardsGratitude(); + narrator(l("You receive 32 exp and 30 GP.")); + close; + } + } + + return; +} + +// Handle Guard's logic +function script GuardHandler { + if (getq(TulimsharQuest_WaterForGuard) == 1) { + CheckGuard(getarg(0)); + } else { + legiontalk; + } + + return; +} + +003-1,98,100,0 script Guard Philip NPC_GUARD1,{ + GuardHandler(0); + + end; + +OnTimer1000: + domovestep; + +OnInit: + initpath "move", 98, 104, + "dir", DOWN, 0, + "wait", 60, 0, + "move", 84, 100, + "dir", DOWN, 0, + "wait", 45, 0, + "move", 93, 110, + "dir", DOWN, 0, + "wait", 70, 0, + "move", 101, 106, + "dir", RIGHT, 0, + "wait", 12, 0, + "move", 98, 104, + "dir", DOWN, 0, + "wait", 68, 0, + "move", 93, 110, + "dir", DOWN, 0, + "wait", 90, 0, + "move", 111, 109, + "dir", DOWN, 0, + "wait", 11, 0; + initialmove; + initnpctimer; + .distance = 5; + .sex = G_MALE; + + setarray $@GuardBits, 1, (1 << 1), (1 << 2), (1 << 3), (1 << 4), (1 << 5), (1 << 6), (1 << 7), (1 << 8), (1 << 9), (1 << 10), (1 << 11), (1 << 12), (1 << 13), (1 << 14), (1 << 15), (1 << 16), (1 << 17); +} +003-1,98,121,0 script Guard Defou NPC_GUARD1,{ + GuardHandler(1); + end; +OnInit: + .sex = G_MALE; + .distance = 3; + end; +} +003-1,102,121,0 script Guard Avou NPC_GUARD1,{ + GuardHandler(2); + end; +OnInit: + .sex = G_MALE; + .distance = 3; + end; +} +003-1,58,158,0 script Guard Benji NPC_GUARD1,{ + GuardHandler(3); + end; +OnInit: + .sex = G_MALE; + .distance = 3; + end; +} +003-1,62,158,0 script Guard Valou NPC_GUARD1,{ + GuardHandler(4); + end; +OnInit: + .sex = G_MALE; + .distance = 3; + end; +} +003-1,71,138,0 script Guard Nutelo NPC_GUARD1,{ + GuardHandler(5); + end; +OnInit: + .sex = G_MALE; + .distance = 3; + end; +} +003-1,58,128,0 script Guard Moustacha NPC_GUARD1,{ + GuardHandler(6); + end; +OnInit: + .sex = G_MALE; + .distance = 3; + end; +} +003-1,58,100,0 script Guard Popaul NPC_GUARD1,{ + GuardHandler(7); + end; + +OnTimer1000: + domovestep; + +OnInit: + initpath "move", 58, 100, + "dir", DOWN, 0, + "wait", 100, 0, + "move", 62, 100, + "dir", DOWN, 0, + "wait", 35, 0, + "move", 62, 93, + "dir", DOWN, 0, + "wait", 48, 0, + "move", 58, 104, + "dir", DOWN, 0, + "wait", 55, 0, + "move", 54, 102, + "dir", RIGHT, 0, + "wait", 82, 0; + + initialmove; + initnpctimer; + .distance = 5; + .sex = G_MALE; +} +003-1,51,73,0 script Guard Yen NPC_GUARD1,{ + GuardHandler(8); + end; +OnInit: + .sex = G_MALE; + .distance = 3; + end; +} +003-2,41,37,0 script Guard Yuna NPC_GUARD2,{ + if (getq(TulimsharQuest_WaterForGuard) == 1) + { + CheckGuard(9); + } else { + npctalkonce l("I like to sing."); + } + end; +OnInit: + .sex = G_FEMALE; + .distance = 3; + end; +} +003-1,54,52,0 script Guard Maxim NPC_GUARD1,{ + GuardHandler(10); + end; + +OnTimer1000: + domovestep; + +OnInit: + initpath "move", 54, 52, + "dir", DOWN, 0, + "wait", 85, 0, + "move", 54, 45, + "dir", DOWN, 0, + "wait", 70, 0, + "move", 67, 30, + "dir", LEFT, 0, + "wait", 11, 0, + "move", 49, 46, + "dir", DOWN, 0, + "wait", 55, 0, + "move", 31, 41, + "dir", LEFT, 0, + "wait", 6, 0, + "move", 35, 36, + "dir", UP, 0, + "wait", 9, 0, + "move", 49, 52, + "dir", DOWN, 0, + "wait", 70, 0; + initialmove; + initnpctimer; + .distance = 5; + .sex = G_MALE; + +} +003-1,50,36,0 script Guard Totor NPC_GUARD1,{ + GuardHandler(11); + end; + +OnTimer1000: + domovestep; + +OnInit: + initpath "move", 50, 36, + "dir", DOWN, 0, + "wait", 45, 0, + "move", 50, 39, + "dir", DOWN, 0, + "wait", 35, 0, + "move", 35, 40, + "dir", UP, 0, + "wait", 1, 0, + "move", 33, 34, + "dir", DOWN, 0, + "wait", 12, 0; + initialmove; + initnpctimer; + .distance = 5; + .sex = G_MALE; +} +003-1,53,36,0 script Guard Roukin NPC_GUARD1,{ + GuardHandler(12); + end; + +OnTimer1000: + domovestep; + +OnInit: + initpath "move", 53, 36, + "dir", DOWN, 0, + "wait", 60, 0, + "move", 56, 59, + "dir", DOWN, 0, + "wait", 1, 0, + "move", 61, 76, + "dir", RIGHT, 0, + "wait", 5, 0, + "move", 61, 105, + "dir", RIGHT, 0, + "wait", 8, 0, + "move", 59, 129, + "dir", LEFT, 0, + "wait", 4, 0, + "move", 60, 103, + "dir", UP, 0, + "wait", 1, 0, + "move", 56, 82, + "dir", LEFT, 0, + "wait", 7, 0, + "move", 56, 59, + "dir", UP, 0, + "wait", 1, 0, + "move", 53, 39, + "dir", DOWN, 0, + "wait", 25, 0; + initialmove; + initnpctimer; + .distance = 5; + .sex = G_MALE; +} +003-1,35,34,0 script Guard Falko NPC_GUARD1,{ + GuardHandler(13); + end; + +OnTimer1000: + domovestep; + +OnInit: + initpath "move", 35, 34, + "dir", DOWN, 0, + "wait", 60, 0, + "move", 51, 38, + "dir", DOWN, 0, + "wait", 10, 0; + initialmove; + initnpctimer; + .distance = 5; + .sex = G_MALE; +} +003-3,39,37,0 script Guard Malindax NPC_GUARD1,{ + GuardHandler(14); + end; +OnInit: + .sex = G_MALE; + .distance = 3; + end; +} +003-1,111,101,0 script Guard Froma NPC_GUARD1,{ + GuardHandler(15); + end; +OnInit: + .sex = G_MALE; + .distance = 3; + end; +} +003-1,102,80,0 script Guard Tetric NPC_GUARD1,{ + GuardHandler(16); + end; + +OnTimer1000: + domovestep; + +OnInit: + initpath "move", 110, 84, + "dir", RIGHT, 0, + "wait", 1, 0, + "move", 110, 101, + "dir", RIGHT, 0, + "wait", 0, 0, + "move", 99, 121, + "dir", LEFT, 0, + "wait", 1, 0, + "move", 89, 136, + "dir", DOWN, 0, + "wait", 1, 0, + "move", 65, 152, + "dir", DOWN, 0, + "wait", 1, 0, + "move", 71, 139, + "dir", RIGHT, 0, + "wait", 1, 0, + "move", 59, 128, + "dir", LEFT, 0, + "wait", 1, 0, + "move", 47, 79, + "dir", LEFT, 0, + "wait", 1, 0, + "move", 80, 73, + "dir", RIGHT, 0, + "wait", 1, 0, + "move", 53, 52, + "dir", RIGHT, 0, + "wait", 1, 0, + "move", 52, 37, + "dir", RIGHT, 0, + "wait", 1, 0, + "move", 35, 35, + "dir", RIGHT, 0, + "wait", 1, 0, + "move", 62, 105, + "dir", DOWN, 0, + "wait", 1, 0; + initialmove; + initnpctimer; + .distance = 5; + .sex = G_MALE; +} +003-1,107,80,0 script Guard Biscop NPC_GUARD1,{ + if (getq(TulimsharQuest_WaterForGuard) == 1) + { + CheckGuard(17); + } else { + npctalkonce l("No one is allowed past this point."); + } + end; +OnInit: + .sex = G_MALE; + .distance = 3; + end; +} + + +003-1,114,83,0 script #tulim-guardhouse NPC_HIDDEN,0,0,{ + end; + +OnTouch: + if (countitem(TulimsharGuardCard) >= 1) goto L_Warp; + dispbottom l("Only Tulimshar Guards are allowed in this building."); + end; + +L_Warp: + warp "003-10", 42, 79; + end; +} diff --git a/npc/003-1/magic.txt b/npc/003-1/magic.txt new file mode 100644 index 0000000..3eb9367 --- /dev/null +++ b/npc/003-1/magic.txt @@ -0,0 +1,45 @@ +// TMW2 scripts. +// Authors: +// Jesusalva +// Description: +// Controlled Warp to Magic School (+whatever magic stuff we need to add later) + +003-1,34,33,0 script #MagicSchoolGate1 NPC_HIDDEN,0,0,{ + end; +OnTouch: + // Event Restrictions + if (countitem(Event1HSword)+countitem(Event2HSword)+countitem(EventBow)+countitem(EventWand)+countitem(RentCart)) { + mesc l("You cannot enter here while you have event weapons or a cart."), 1; + close; + } + // Main Quest Event + if (LUA_ASKED_TO_SAVE_PROFESSOR) { + .@mapn$="0030@"+getcharid(0); + // Instance doesn't exists + if (!(isinstance(LUA_ASKED_TO_SAVE_PROFESSOR)) || instanceowner(LUA_ASKED_TO_SAVE_PROFESSOR) != getcharid(3)) { + .@inst = instance_create("Academy "+getcharid(0), getcharid(3), IOT_CHAR); + instance_attachmap("003-0", .@inst, false, .@mapn$); + // Instance lasts 15 minutes + instance_set_timeout(900, 900, .@inst); + instance_init(.@inst); + LUA_ASKED_TO_SAVE_PROFESSOR=.@inst; + } + /* else { + // Instance already exists: You've failed previously? + instance_set_timeout(900, 900, .@inst); + } + */ + warp .@mapn$, 48, 51; + end; + } + /* + if (countitem(JesusalvaGrimorium) <= 0 || MAGIC_LVL < 2) { + slide 36, 39; + percentheal -5, -10; + dispbottom l("Powerful magic repels you away from this magic place!"); + } + */ + warp "003-0", 48, 51; + end; +} + diff --git a/npc/003-1/mahoud.txt b/npc/003-1/mahoud.txt new file mode 100644 index 0000000..db41e5a --- /dev/null +++ b/npc/003-1/mahoud.txt @@ -0,0 +1,59 @@ +// TMW-2 Script +// Author: +// Saulc +// Jesusalva +// Description: +// Mahoud is the Tulimshar Well Master +// TODO: Chance to lose a bit of GP by getting water with money inside. +// I think water should not be so OP, and some minor RNG would be nice here + +003-1,46,79,0 script Mahoud NPC_PLAYER_ARGAES,{ + mesn; + mes l("I can fill your bottle with water for only @@ gp the bottle.", .COST_PER_BOTTLE); + mes l("After all, I am the Well Master!"); + input .@count; + + if (.@count == 0) + close; + .@Cost = .@count * .COST_PER_BOTTLE; + .@empty = countitem(EmptyBottle); + + if (.@empty < .@count) + goto L_NotEnoughBottles; + if (Zeny < .@Cost) + goto L_NotEnoughMoney; + getinventorylist; + inventoryplace BottleOfTonoriWater, .@count; + + Zeny=Zeny-.@Cost; + delitem EmptyBottle, .@count; + getitem BottleOfTonoriWater, .@count; + close; + +L_NotEnoughBottles: + mes ""; + mesn; + mes l("You don't have that many empty bottles!"); + close; + +L_NotEnoughMoney: + mes ""; + mesn; + mes l("You don't have enough gold! You need @@ gp.", .@Cost); + close; + +OnInit: + .COST_PER_BOTTLE = 50; + .sex = G_MALE; + .distance = 7; + + .@npcId = getnpcid(.name$); + // Check items.xml for info about this + setunitdata(.@npcId, UDT_HEADTOP, InfantryHelmet); + setunitdata(.@npcId, UDT_HEADMIDDLE, SailorShirt); + setunitdata(.@npcId, UDT_HEADBOTTOM, RaidTrousers); + setunitdata(.@npcId, UDT_HAIRSTYLE, 7); + setunitdata(.@npcId, UDT_HAIRCOLOR, 17); + + end; +} diff --git a/npc/003-1/malivox.txt b/npc/003-1/malivox.txt new file mode 100644 index 0000000..f35653a --- /dev/null +++ b/npc/003-1/malivox.txt @@ -0,0 +1,46 @@ +// Author: +// Saulc + +003-1,114,106,0 script Malivox NPC_PLAYER_TONORI,{ + + speech S_LAST_NEXT, + l("I am @@, an alchemist specialized in reset potions.", .name$); + + select + l("Can you reset my stats please?"), + l("You are weird, I have to go sorry."); + + switch (@menu) + { + case 1: + goto L_ResetStats; + case 2: + goto L_Quit; + } + +L_ResetStats: + mesn; + mesq l("Status point reset can't be undone. Do you really want this?"); + +L_ConfirmReset: + ConfirmStatusReset(); + goto L_Quit; + + +L_Quit: + goodbye; + end; + +OnInit: + .@npcId = getnpcid(.name$); + setunitdata(.@npcId, UDT_HEADTOP, FancyHat); + setunitdata(.@npcId, UDT_HEADMIDDLE, SailorShirt); + setunitdata(.@npcId, UDT_HEADBOTTOM, BromenalPants); + setunitdata(.@npcId, UDT_WEAPON, LousyMoccasins); // Boots + setunitdata(.@npcId, UDT_HAIRSTYLE, 7); + setunitdata(.@npcId, UDT_HAIRCOLOR, 17); + + .sex = G_MALE; + .distance = 4; + end; +} diff --git a/npc/003-1/mapflags.txt b/npc/003-1/mapflags.txt new file mode 100644 index 0000000..5b342e2 --- /dev/null +++ b/npc/003-1/mapflags.txt @@ -0,0 +1,23 @@ +003-1 mapflag mask 1 +003-1 mapflag town +003-1 mapflag nopenalty +003-2 mapflag zone indoors +003-3 mapflag zone indoors +003-4 mapflag zone indoors +003-5 mapflag zone indoors +003-6 mapflag zone indoors +003-7 mapflag zone indoors +003-8 mapflag zone indoors +//003-9 mapflag zone indoors +003-10 mapflag zone indoors +//003-11 mapflag zone indoors +//003-12 mapflag zone indoors +003-13 mapflag zone indoors + +// Magic Council +003-0 mapflag zone indoors +003-0-1 mapflag zone indoors +003-0-2 mapflag zone indoors + +// Town Walls are a no penalty zone +003-1-2 mapflag zone indoors diff --git a/npc/003-1/mariusthebard.txt b/npc/003-1/mariusthebard.txt new file mode 100644 index 0000000..8a2701c --- /dev/null +++ b/npc/003-1/mariusthebard.txt @@ -0,0 +1,231 @@ +// TMW2 Script +// Author: +// Saulc +// Jesusalva +// Description: +// Marius the Bard is a bard. Helps player with the world's background story. + +003-1,88,135,0 script Marius The Bard NPC_ELVEN_MAN_TRADER,{ + mesn; + mesq l("Hello adventurer, what may this humble minstrel do for you today?"); + next; + +L_Main: + menu + l("Who, or what are you?"), L_Who, + l("Where exactly am I?"), L_Where, + l("Can you sing me a song?"), L_Music, + l("Actually, nothing. Bye!"), L_Bye; + +L_Who: + mes ""; + mesn; + mesq l("I am a bard! I used to be an elf trader, but music got me for good."); + next; + mesq l("Now I travel by the world, composing songs about the things I see."); + next; + mesq l("I try to improve my skills every day. One day, I will sing a song no one will ever forget."); + next; + goto L_Main; + +L_Where: + mes ""; + mesn; + mesq l("This is Tulishmar, the oldest of human cities."); + next; + mesq l("It is a port city at the south of the continent. Main economic activities are mining and spices trade."); + next; + mesq l("The biggest mine, where you could find Mana Stones in the past, is now entirely depleted. Not a single stone left."); + next; + mesq l("The magic council have only a handful set of them, and they let only the most skilled ones get it."); + next; + mesq l("If you want, you can ask there for one. They are at the big building at northwest."); + next; + goto L_Main; + +L_Music: + mesc l("But do you want to hear a song about the world, or about grinding?"); + menu + l("Sing me about the world!"), L_Music_World, + l("Sing me the legend of the five heroes!"), L_Music_Heroes, + l("Sing me the fate of the weapons!"), L_Music_Fates, + l("Sing me about grinding!"), L_Music_Grind, + l("Sing me about slaying Pinkies!"), L_Music_Pinkie, + l("Sing me about miscellaneous monsters!"), L_Music_Misc; + // ??? + mes ""; + goto L_Music; + +// NOTE: Rewriting this song is always OK. +// The last line is always bigger than the previous ones. +L_Music_World: + mes ""; + mesn; + mesq l("I will sing a song about the Mana War and current times."); + next; + mes l("In times of the fire, magic came to save us."); + mes l("But we took every stone, and restricted the magic."); + mes l("Ah! Greedy humans! Why had we to desire?"); + mes l("Ah! Greedy humans! How ignorant were we, to ever do that?"); + next; + mes l("Saul and Fefe did a great revolution,"); + mes l("They wanted magic to be once again free!"); + mes l("Ah! Greedy humans! Why did we had to fight?"); + mes l("Ah! Greedy humans! Couldn't we happy with little?"); + next; + mes l("The mana war stroke, and many people died,"); + mes l("The Mana Stones were stolen, in evil hands have fallen!"); + mes l("Ah! Greedy humans! Just how big is our greed?"); + mes l("Ah! Greedy humans! Things will never be as they used to be!"); + next; + mes l("The mage thief tried to all power absorb,"); + mes l("But instead of dying a Monster King he became!"); + mes l("Ah! Greedy humans! We pay the price for our actions,"); + mes l("Ah! Greedy humans! The Monster War will now rage the globe!"); + next; + mes l("But hope is not lost, said the Sages of Fate!"); + mes l("Because heroes are not born, rather, they are made!"); + mes l("Ah! Greedy humans! Stand up to save our world!"); + mes l("Ah! Greedy humans! End this war which our greed has stroke!"); + next; + goto L_Main; + +L_Music_Heroes: + mes ""; + mesn; + mesq l("I will sing a song about the Five Legendary Heroes myth."); + next; + mes l("Once upon a time, five mighty heroes emerged;"); + mes l("Aegis with their steadfast shield, nigh impregnable;"); + mes l("The tyrant, which could shot from any distance;"); + mes l("The mightiest mage, which had control over the runes;"); + mes l("And Demure, the Queen of Dragons."); + next; + mes l("Their fight was not damned,"); + mes l("And help to obtain they were able."); + mes l("Wielding the lightbringer came the ace,"); + mes l("Whom put an end at their foes,"); + mes l("And brought peace to the land."); + next; + mes l("It was said that these five heroes will once again emerge;"); + mes l("And a great threat they shall defeat."); + mes l("Led by the Lightbringer"); + mes l("The innominable they shall face"); + mes l("And rejoice will come from their feats."); + next; + mes l("However, watch out!"); + mes l("For their weapons has a will on them."); + mes l("Don't be deemed unworthy,"); + mes l("For yourself can obtain tandem!"); + next; + goto L_Main; + +L_Music_Fates: + mes ""; + mesn; + mesq l("I will sing a song about the fate of five legendary weapons."); + next; + mes l("Once their fight was over,"); + mes l("The heroes met their rest."); + mes l("The axe, returned to its owner,"); + mes l("The runes, burried with its owner."); + next; + mes l("The aegis, entrusted to the tree,"); + mes l("Tyranny as well, but to a different tree."); + mes l("And the lightbringer,"); + mes l("King of all heroes,"); + mes l("Now wanders over the land."); + next; + mes l("The harsh pinkie holds secrets,"); + mes l("While the tyrant desires to see skill."); + mes l("Demure accepts challengers,"); + mes l("And the runes wait for the grave to be found."); + next; + mes l("Neither difficult, neither clear,"); + mes l("For extreme power they hold."); + mes l("Once the five are once again assembled,"); + mes l("The engine of fate will once again move!"); + next; + goto L_Main; + +L_Music_Grind: + mes ""; + mes l("Grind grind grind the slime!"); + mes l("Tunnel through the caves!"); + mes l("In TMW2 there is"); + mes l("Nothing so sublime!"); + next; + mes l("♪There is a server♪"); + mes l("TMW2"); + mes l("♪Hi ho, no one on♫"); + mes l("Then along came a soul as happy as can be"); + next; + mesc l("yawns"); + mes l("So what can I say, except, you're welcome"); + mes l("For all the feedback, you know"); + mes l("There's no thank me, its'kay you're welcome"); + mes l("I guess I love the server, we all know ♪"); + next; + mes l("Far over, the misty Nivalis cold ♪"); + mes l("To dungeon deep, and cavern old"); + mes l("We must away"); + mes l("ee break of day"); + mes l("To seek our pale, enchanted gold"); + mes l("Why does death embrance me so much today?"); + next; + mesc l("Authorship: Xanthem (DiamondPython)"); + mesc l("Date: 2019-03-05, 03:14 UTC"); + next; + goto L_Main; + +L_Music_Pinkie: + mes ""; + mes l("Pinkie, pinkie,pinkie, oh how i luvs thee;"); + mes l("So fine and pink, tasty too!"); + next; + mes l("♪ Pinkie,pinkie,pinkie, you're so fine."); + mes l("Pinkie,pinkie,pinkie, your blood runs like wine. ♪"); + next; + mes l("There I was knee deep in pinkie pattie,"); + mes l("Lost without an acorn."); + next; + mes l("If life gets so a person cannot laugh,"); // Out of context + mes l("Life isn't worth the living."); + mes l("What else like a Pinkie?"); // Not from Cordo + next; + mesc l("Authorship: Former_Cordo (Cordo)"); + mesc l("Date: 2020-03-27, 01:30 UTC"); + next; + goto L_Main; + +L_Music_Misc: + mes ""; + mes l("Ohhh moubiii"); + mes l("Ohhh moubiii"); + mes l("You make me dance like a monkey"); + mes l("Ohh Moubi Moubi you are too pink, that my eyes get shrink"); + mes ""; + mesc l("Authorship: Manatauro"); + mesc l("Date: 2021-02-24, 02:36 UTC"); + next; + mes l("Oh, I was wee lad on the beach singing the blub song"); + mes l("One day I saw myself a rich man ♪"); + mes l("Blub, blub, blub"); + mes l("That's the Blub Song"); + mes ""; + mesc l("Authorship: Former_Cordo (Cordo)"); + mesc l("Date: 2020-04-05, 14:40 UTC"); + next; + goto L_Main; + +L_Bye: + mes ""; + mesn; + mesq lg("Good bye my friend, and safe travels!"); + close(); + +OnInit: + .sex = G_MALE; + .distance = 5; + end; +} diff --git a/npc/003-1/michel.txt b/npc/003-1/michel.txt new file mode 100644 index 0000000..056bc82 --- /dev/null +++ b/npc/003-1/michel.txt @@ -0,0 +1,73 @@ +// TMW-2 Script +// Author: +// Jesusalva +// Description: +// This stuff should be moved somewhere else... + +003-1,89,109,0 script Michel NPC_BACCHUS,{ + + mesn; + mesq l("These people have lots of unspent Strange Coins! Waw!"); + + HallOfCoins(); + + // Anyone with GM Level, staff or not, is allowed to latest GM logs + if (!getgmlevel()) goto L_Main; + + next; + HallOfGMLog(); + + // Only Admins are allowed to change the Referral Scoreboard + if (!is_admin()) goto L_Main; + if (is_admin()) goto L_GMOnce; + close; + +L_Main: + if (!$REFERRAL_IDS[#REFERRAL_PROG]) + close; + next; + mesn; + mesq l("Hey, I see you have appointed @@ players to this game. Good job!", $REFERRAL_IDS[#REFERRAL_PROG]); + if ($REFERRAL_IDS[#REFERRAL_PROG] > 20) + mesc l("Uhm, just remember it'll be manually verified before prizes are given... Don't even think on cheating!"), 1; + close; + +L_GMOnce: + next; + .@nb = query_sql("SELECT SUM(value) FROM `mapreg` WHERE varname='$REFERRAL_IDS' LIMIT 2", .@value); + @total=.@value[0]; +L_GM: + mesc "Referral Event status: " + ($REFERRAL_ENABLED ? "##2ACTIVE##0" : "##1INACTIVE##0"); + mesc "Total refers count: "+@total; + mes ""; + select + "Close", + "Toggle Referral Event", + "Scoreboard", + "CLEAR REFERRAL ID ARRAY", + "Close"; + mes ""; + switch (@menu) { + case 2: + $REFERRAL_ENABLED=!$REFERRAL_ENABLED; logmes "Enabled REFER event.", LOGMES_ATCOMMAND; break; + case 3: + HallOfReferral(); break; + case 4: + mesc "Are you sure?", 1; + next; + if (askyesno() == ASK_YES) { + deletearray($REFERRAL_IDS); + logmes "##1Deleted PERMANENTLY the REFER event scoreboard.##0", LOGMES_ATCOMMAND; + .@nb = query_sql("SELECT SUM(value) FROM `mapreg` WHERE varname='$REFERRAL_IDS' LIMIT 2", .@value); + @total=.@value[0]; + } + default: close; + } + next; + goto L_GM; + +OnInit: + .sex = G_MALE; + .distance = 5; + end; +} diff --git a/npc/003-1/neko.txt b/npc/003-1/neko.txt new file mode 100644 index 0000000..fd461a4 --- /dev/null +++ b/npc/003-1/neko.txt @@ -0,0 +1,121 @@ +// TMW-2 Script +// Author: +// Saulc +// Jesusalva +// Description: +// Another shopkeeper which babbles about Jean Shorts, how Cave Snake drops them +// and encourage players to find it. He pays 6.000 GP and gives 1620 xp for one. +// In future, this could grant you discounts on his shop, or allow a quest with +// a family member from his. + +003-1,103,106,0 script Neko NPC_M_SHOPKEEPER,{ + .@q=getq(TulimsharQuest_Neko); + mesn; + mesq l("Only finest wares!"); + mes ""; + select + l("Trade"), + rif(BaseLevel > 20 && .@q == 0, l("Why do you only use the silk robe? Don't you have a shorts or something?")), + rif(.@q == 1 && countitem(JeansShorts) >= 1, l("Hey... I found a Jeans Shorts. Is it yours?")), + l("Leave"); + + if (@menu == 2) { + mesn; + mesq l("Oh, that's a long story."); + next; + mesn; + mesq l("You see, I was walking in the secret caves near Ched, and... well..."); + next; + mesn; + mesq l("The @@ stole my @@. Hahah. I can't find anywhere else to buy it.", getmonsterlink(CaveSnake), getitemlink(JeansShorts)); + next; + setq TulimsharQuest_Neko, 1; + mesn; + mesq l("If you bring friends, I'm sure they'll be no match. Ah... How many people already lost their shorts to Cave Snakes?"); + next; + if (getq(TulimsharQuest_AnwarField) < 10 && TUTORIAL) { + mesn; + mesq l("Actually, Anwar offered me some ugly, bright orange pants. I thanked him, of course, I prefer this robe than... that."); + next; + mesn; + mesq l("Thinking well, I've heard Cyndala could bleach these pants for free; Must be because their ugliness."); + next; + } + } + if (@menu == 3) { + getexp rand(120,200), 0; + setq TulimsharQuest_Neko, 2; + mesn; + mesq l("Oh... Wow! I'm surprised."); + next; + mesn; + mesq l("Please, keep it. I don't need it at all!"); + next; + mesn; + mesq l("This silk robe is more than enough, and you are fighting, you need the def bonus more than me. %%2"); + next; + } + + closedialog; + if (@menu == 1) { + npcshopattach(.name$); + shop .name$; + } + goodbye; + close; + +OnInit: + .@npcId = getnpcid(.name$); + setunitdata(.@npcId, UDT_HEADTOP, NPCEyes); + setunitdata(.@npcId, UDT_HEADMIDDLE, SilkRobe); + //setunitdata(.@npcId, UDT_HEADBOTTOM, LeatherTrousers); // FIXME: LeatherTrousers are BROKEN! + setunitdata(.@npcId, UDT_WEAPON, AssassinBoots); + setunitdata(.@npcId, UDT_HAIRSTYLE, 26); + setunitdata(.@npcId, UDT_HAIRCOLOR, 2); + + sleep(SHOPWAIT); + tradertype(NST_MARKET); + sellitem EarthPowder, 12000, 1; + sellitem ShortTankTop, 8000, 1; + sellitem TrainingBow, 990, 2; + sellitem SilkGloves, -1, 1; + sellitem LeatherTrousers, -1, 1; + sellitem CottonCloth, -1, 3; + sellitem RoastedMaggot, -1, 2; + sellitem ArrowAmmoBox,-1,rand(5,10); + sellitem Arrow, -1, rand(10000,30000); + sellitem CroconutBox, rand(2650,2950), 4; + sellitem EmptyBox, -1, 2; + sellitem ChamomileTea, getiteminfo(ChamomileTea, ITEMINFO_BUYPRICE)*15/10, 10; + + .sex = G_MALE; + .distance = 5; + end; + +OnClock1149: + restoreshopitem SilkGloves, -1, 1; + restoreshopitem LeatherTrousers, -1, 1; +OnClock2359: + restoreshopitem EarthPowder, 12000, 1; + restoreshopitem ShortTankTop, 8000, 1; + restoreshopitem TrainingBow, 990, 2; + restoreshopitem CottonCloth, 3; + restoreshopitem RoastedMaggot, 2; + restoreshopitem ArrowAmmoBox,rand(5,10); + restoreshopitem Arrow, rand(10000,30000); + restoreshopitem CroconutBox, rand(2650,3000), 4; + restoreshopitem EmptyBox, 2; + restoreshopitem ChamomileTea, getiteminfo(ChamomileTea, ITEMINFO_BUYPRICE)*15/10, 10; + end; + +// Pay your taxes! +OnBuyItem: + debugmes("Purchase confirmed"); + PurchaseTaxes(); + end; + +OnSellItem: + debugmes("Sale confirmed"); + SaleTaxes(); + end; +} diff --git a/npc/003-1/ninathetraveler.txt b/npc/003-1/ninathetraveler.txt new file mode 100644 index 0000000..3ef244e --- /dev/null +++ b/npc/003-1/ninathetraveler.txt @@ -0,0 +1,111 @@ +// TMW2 Script +// Author: +// Jesusalva +// Description: +// The Travelers travel around the world telling stories. + +003-1,56,143,0 script Nina The Traveler NPC_F_COINKEEPER,{ + + mesn; + if (strcharinfo(0) == $MOST_HEROIC$) mesq l("Wow! Are you @@? Everyone, in every city, talks about you!", $MOST_HEROIC$); + if (strcharinfo(0) == $MOST_HEROIC$) next; + + mesq l("Hello. I am @@, and I am from a family of travellers. We travel though the whole world, looking for exotic goods.", .name$); + next; + mesq l("You can buy rare items with me, or I can tell you about different cities in our world."); + +L_Menu: + mes ""; + menu + l("I want to trade with you."), L_Trade, + l("Tell me about Tulimshar."), L_Tulim, + l("Tell me about Hurnscald."), L_Hurns, + l("Tell me about Artis."), L_Artis, + l("Tell me about Halinarzo."), L_Halin, + l("Sorry, I'll pass."), L_Close; + +L_Tulim: + mes ""; + mesn; + mesq l("Tulimshar is the oldest human city, and its foundation is the year zero of our calendar."); + next; + mesq l("The city only flourished because Janett Platinum had the idea to build city walls surrounding this city."); + next; + mesq l("The desert climate means you'll find mostly maggots and scorpions. Their drops include cactus drinks, cake, knifes, black pearls, gold, and other common things."); + next; + mesq l("You can find for a good price desert equipment and some kind of dyes. You find all sort of crafters, artisans and warriors here."); + next; + goto L_Menu; + +L_Hurns: + mes ""; + mesn; + mesq l("Hurnscald was founded after Tulimshar, in more fertile lands. Their walls are not so sturdy as the ones of Tulimshar."); + next; + mesq l("Under the leadership of King Wusher, they were the first to accept immigrants from other races. You will find humans and non-humans there."); + next; + mesq l("The fertile climate is ideal for mushrooms. You can also find lots of wood."); + next; + mesq l("Their economy provide many edible items and potions."); + next; + goto L_Menu; + +L_Artis: + mes ""; + mesn; + mesq l("Artis is a city port founded after the Great Fire on the other continent."); + next; + mesq l("People say it is the second biggest city from the world."); + next; + mesq l("Different kind of monsters live near the city. For example, blubs. I have no idea of what are those."); + next; + mesq l("People usually dock there when travelling to the second continent. Nothing exceptional about economy."); + next; + if ($FIRESOFSTEAM) { + mesq l("They used to export food and other things but there has been radio silence recentely; Which is why Andrei Sakar and a group of adventurers borrowed Nard's ship and went to investigate."); + next; + } + goto L_Menu; + +L_Halin: + mes ""; + mesn; + mesq l("Halinarzo was founded to explore Mana Stones."); + next; + mesq l("You can find both huge swamps, as huge desertic areas near and on it."); + next; + mesq l("Lizards are the main monster found, and they steal gold from innocent bypassers."); + next; + mesq l("Without any mana stone left, and because the walls were not very strong, most of the city was destroyed."); + next; + mesq l("Unlike many other cities, if you want people in eternal need of items, there is a good place to look."); + next; + goto L_Menu; + + +L_Trade: + mesn; + mesq l("Use your @@ as currency!", getitemlink(StrangeCoin)); + tutmes l("%s is obtained during events, daily logins, heroic deeds, gifts, etc. But cannot be bought with real money.", getitemlink(StrangeCoin)); + next; + openshop "Aeros Trader"; + closedialog; + +L_Close: + close; + +OnInit: + .@npcId = getnpcid(.name$); + setunitdata(.@npcId, UDT_HEADTOP, NPCEyes); + setunitdata(.@npcId, UDT_HEADMIDDLE, UglyChristmasSweater); + setunitdata(.@npcId, UDT_HEADBOTTOM, JeansShorts); + setunitdata(.@npcId, UDT_WEAPON, CandorBoots); // Boots + setunitdata(.@npcId, UDT_HAIRSTYLE, 27); + setunitdata(.@npcId, UDT_HAIRCOLOR, 11); + npcsit; + + .sex = G_FEMALE; + .distance = 5; + end; +} + diff --git a/npc/003-1/oldwell.txt b/npc/003-1/oldwell.txt new file mode 100644 index 0000000..ff96e8a --- /dev/null +++ b/npc/003-1/oldwell.txt @@ -0,0 +1,38 @@ +// TMW-2 Script +// Author: +// Saulc +// Jesusalva +// Description: +// Free well that give sewer water. a good place for tulim kids to miss school :b + +003-1,53,144,0 script Old Well#003-1 NPC_NO_SPRITE,{ + + mesc l("You found an old well with a bucket on it! It's time to fill plenty of @@!", getitemlink(EmptyBottle)); + input .@count; + + if (.@count == 0) + close; + .@empty = countitem(EmptyBottle); + + if (.@empty < .@count) + goto L_NotEnoughBottles; + getinventorylist; + inventoryplace BottleOfSewerWater, .@count; + + delitem EmptyBottle, .@count; + getitem BottleOfSewerWater, .@count; + closeclientdialog; + dispbottom("Eek, Sewer Water! What the?! Better not drink this!"); + close; + +L_NotEnoughBottles: + mesc l("You don't have that many empty bottles!"); + close; + + +OnInit: + .sex = G_OTHER; + .distance = 3; + end; +} + diff --git a/npc/003-1/quirino.txt b/npc/003-1/quirino.txt new file mode 100644 index 0000000..2e78ebd --- /dev/null +++ b/npc/003-1/quirino.txt @@ -0,0 +1,264 @@ +// TMW2 Script +// Author: +// Ernando <ernando.quirino@hotmail.com> (Creator) +// Jesusalva <admin@tmw2.org> +// Description: +// Hunger Games™ version for The Mana World Brazil v2, created by Ernando Quirino. +// Entrance to Hungry Quirin Arena +// Variables: +// EQ - Ernando Quirino +// $@EQ_TIMER +// < gettimetick(2): Can be open! +// > gettimetick(2): Registration open! +// = gettimetick(2): Event start! +// $@EQ_STATUS +// 0: Register open +// 1: Fight happening +// 2: Event finished + +003-1,48,73,0 script Quirin NPC_ERNANDO,{ + function quirinInfo; + function quirinHonor; + if (is_admin()) + goto L_Hub; + + if ($@EQ_STATUS) goto L_NoSeason; + if ($@EQ_STATUS == 0) { + if ($@EQ_TIMER < gettimetick(2)) + goto L_Hub; + else + goto L_Register; + } + + npctalk3 l("Bug, report me!"); + end; + +L_NoSeason: + // If it finished, it can be done again in one hour + if ($@EQ_STATUS == 2) { + if ($@EQ_TIMER+3600 < gettimetick(2)) { + $@EQ_STATUS=0; + npctalkonce l("A sec... And... Done! I just finished cleaning it up!"); + } else { + npctalkonce l("I'm currently cleaning the arena, wait just @@ more.", FuzzyTime($@EQ_TIMER+3600)); + openstorage(2, STORAGE_ACCESS_GET); + end; + } + } else { + npctalkonce l("I'm currently hosting a fight."); + } + end; + +L_Register: + mesn; + mesq l("Hello player, do you want to participate on HUNGRY QUIRIN event?!"); + if ($@EQ_TIMER+180 < gettimetick(2)) + mesc l("Event will start in @@", FuzzyTime($@EQ_TIMER)); + else + mesc l("Event will start in @@", FuzzyTime($@EQ_TIMER)), 1; + next; + select + l("Yeah, sign me up!"), + l("No, not at the moment."), + l("Does it counts to Honor Ranking?"), + l("You are holding a few items of mine..."), + l("Information"); + + switch (@menu) { + case 1: + goto L_SignUp; + case 2: + close; + case 3: + quirinHonor(); + break; + case 4: + openstorage(2, STORAGE_ACCESS_GET); + closeclientdialog; + close; + break; + case 5: + quirinInfo(); + } + goto L_Register; + +function quirinInfo { + mesn col(l("Hungry Quirin Arena Rules"), 3); + mesc l("1- You must not be carrying anything with you."); + mesc l("2- You must not use a cart. If you do, YOU WILL BE SEVERELY PENALIZED."); + mesc l("3- All items from the Arena are from the Arena. You won't carry any of them back with you."); + mesc l("4- Experience and Gold earned during this event can be kept."); + next; + mesn col(l("Hungry Quirin Arena Information"), 3); + mesc l("1- Survive. If you die, you will gain nothing. And people want to kill you."); + mesc l("2- Take everything you can find. You'll be warped without equip or healing items! Kill monsters to get some stuff too!"); + mesc l("3- Trust nobody. There can be only one winner, and it must be you."); + mesc l("4- Take Care. Wildlife can kill you too. There can be traps."); + mesc l("5- Trust yourself. You will lose the moment you enter in panic. This arena is not for the weak-willed!"); + next; + return; +} + +function quirinHonor { + mesn; + mesq l("Of course it does. And the same level rules applies."); + next; + mesn; + mesq l("But if you believe in such cool challenge like mine there should be no dishonorable fight, comment it on Discord!"); + next; + mesn; + mesq l("And it might be changed in a future patch %%g"); + tutmes l("If you kill an opponent stronger than you, you will gain honor points. But if the oponent is 15 levels weaker than you, it will be NEGATIVE!"), l("About Scoreboards and Honor Points"); + tutmes l("If you kill the same person within 30 minutes, honor will not fluctuate. The whole honor system is very experimental."), l("About Scoreboards and Honor Points"); + tutmes l("Honor only applies to PvP fights. It can be seen on \"%s\" and rewards are given monthly for it.", b("@scoreboards")); + next; + return; +} + +L_SignUp: + // Player cannot be carrying anything + if(Weight >= 1) goto L_Full; + getcartinventorylist(); + if(@cartinventorylist_count>=1) goto L_Full; + + // Warp player + if (rand2(1,2) == 1) + warp "001-8", rand2(42, 57), 42; + else + warp "001-8", rand2(42, 57), 57; + + // Prevent further movements! + setpcblock(PCBLOCK_SOFT, true); + //dispbottom l("Stay ready!"); + dispbottom l("##1DON'T MOVE until the signal. Stay ready! If you move, you will desync the client!"); + close; + +L_Full: + mesn; + mesq l("You cannot bring anything to the arena. Please put everything into the storage."); + next; + mesn; + mesq l("I can do that for you, but you'll still need to go to storage to get them back."); + next; + select + l("Off to storage I go."), + l("PLEASE STORE ALL MY ITEMS"), + l("Alright, I don't like PVP anyways..."); + mes ""; + if (@menu == 2) { + closeclientdialog; + charcommand("@storeall 2"); + if (Weight == 0) + goto L_SignUp; + } + close; + +L_Hub: + mesn; + mesc l("Welcome to HUNGRY QUIRIN ARENA mangment panel."); + next; + mesn; + mesq l("I am Quirino Voraz, and my arena is the coolest PVP Arena on all Mana Worlds."); + mesq l("However, I need a tax to start, and you need to arrange players. There are no refunds."); + next; + mes l("Current player count: @@/5 must be online.", getusers(1)); + mes l("Current arena player count: @@ on map. (Min. 3 to begin event)", getmapusers("001-8")); + + // Open event? Minimum 5 connections or GM_OVERRIDE flag. + if ($@EQ_TIMER < gettimetick(2) && !$@EQ_STATUS && (getusers(1) >= 5 || $@GM_OVERRIDE)) { + next; + mesc l("Activate event?"), 1; + mesc l("It'll cost @@ GP", .price); + if (Zeny < .price) + close; + menuint + l("NO"), -1, + l("Give players 5 minutes"), 300, + l("Give players 10 minutes"), 600, + l("Give players 15 minutes"), 900, + l("Give players 20 minutes"), 1200, + l("Give players 25 minutes"), 1500, + l("Give players 30 minutes"), 1800, + l("You are holding a few items of mine..."), -2; + mes ""; + if (@menuret > 0) { + Zeny=Zeny-.price; + $@EQ_TIMER=gettimetick(2)+@menuret; + initnpctimer; + setcells "001-8", 41, 58, 41, 43, 6, "qhubN"; + setcells "001-8", 41, 58, 56, 58, 6, "qhubS"; + announce("##1HUNGRY QUIRIN EVENT: ##3##BRegister is now open! Talk to Quirin, on Tulimshar Councilroom!", bc_all|bc_npc); + channelmes("#world", strcharinfo(0)+" invites everyone to HUNGER QUIRIN PVP ARENA in Tulimshar. It'll start in "+FuzzyTime($@EQ_TIMER)); + } + if (@menuret == -2) { + openstorage(2, STORAGE_ACCESS_GET); + closeclientdialog; + } + close; + } + + // Main Control menu. Not using l() on purpose. + + select + rif($@EQ_STATUS == 0 && (getmapusers("001-8") >= 3 || $@GM_OVERRIDE) && is_gm(), "Start Event at once!"), + rif($@EQ_STATUS == 1 && is_master(), "Send wave of items and monsters!"), + rif($@EQ_STATUS == 0 && $@GM_OVERRIDE && is_admin(), "[DEBUG] Join Event"), + rif($@EQ_STATUS == 0 && $@GM_OVERRIDE && is_admin(), "[DEBUG] Join & Start Event Now"), + "I'm done."; + + if (@menu == 1) + donpcevent("#QuirinoHUB::OnStart"); + if (@menu == 2) + donpcevent("#QuirinoHUB::OnSendWave"); + if (@menu == 3) + goto L_Register; + if (@menu == 4) { + addtimer 1000, "Quirin::OnDebugReg"; + goto L_SignUp; + } + + close; + +OnDebugReg: + donpcevent("#QuirinoHUB::OnStart"); + end; + +// Each minute +OnTimer60000: + // We must autostart event now + if ($@EQ_TIMER <= gettimetick(2)) { + if (getmapusers("001-8") >= 3 || $@GM_OVERRIDE) { + donpcevent("#QuirinoHUB::OnStart"); + } else { + delcells "qhubN"; + delcells "qhubS"; + maptimer("001-8", 1000, "#QuirinoHUB::OnCancel"); + announce("##1HUNGRY QUIRIN EVENT: ##3##BCancelled due lack of players!", bc_all|bc_npc); + } + end; + } + mapannounce "003-1", "Hungry Quirin starts in " + FuzzyTime($@EQ_TIMER) + " and there are " + getmapusers("001-8") + "/3 player(s) standing by." , 0; + mapannounce "001-8", "Hungry Quirin starts in " + FuzzyTime($@EQ_TIMER), 0; + initnpctimer; + end; + +OnInit: + .price=570; + .sex=G_MALE; + .distance=5; + end; +} + + +/* +Blockwalls TileCondition and masks for setcells +manaplus/src/enums/resources/map/blockmask.h + + WALL = 0x80, // 1000 0000 = 128 + AIR = 0x04, // 0000 0100 = 4 + WATER = 0x08, // 0000 1000 = 8 + GROUND = 0x10, // 0001 0000 = 16 + GROUNDTOP = 0x20, // 0010 0000 = 32 + PLAYERWALL = 0x40, // 0100 0000 = 64 + MONSTERWALL = 0x02 // 0000 0010 = 2 +*/ diff --git a/npc/003-1/sailors.txt b/npc/003-1/sailors.txt new file mode 100644 index 0000000..45b5966 --- /dev/null +++ b/npc/003-1/sailors.txt @@ -0,0 +1,180 @@ +// TMW2 scripts. +// Authors: +// Jesusalva +// Description: +// The major reward from this one is knowledge about secret passages on Tulimshar. +// The quest pays what you spend, except for travel fees. The real reward here +// is knowledge, the fishing rod you'll need to make anyway, 150 XP and 20 JExp. +// 1 - First Quest assigned +// 2 - First Quest Complete +// 3 - Second Quest assigned +// 4 - Second Quest Complete + +003-1,112,93,0 script Sailors#003-1 NPC_ELVEN_MAN_TRADER_SITTING,{ + if (BaseLevel < 12) goto L_Complete; + .@q = getq(TulimsharQuest_Sailors); + if (.@q == 4) + goto L_Complete; + + if (.@q == 1) + goto L_Report1; + if (.@q == 3) + goto L_Report2; + mesn; + mesq lg("Hey, pal. This spot is very good, I can see the whole town from here."); + next; + mesn; + mesq lg("I am a trader from Nard's ship. We actually need supplies. Help us, and I'll help you."); + next; + mesn strcharinfo(0); + menu + rif(.@q == 0, l("What do you need?")), L_Quest1, + rif(.@q == 2, l("What do you need?")), L_Quest2, + l("Maybe another time."), -; + close; + +L_Complete: + hello; + end; + +L_Quest1: + mes ""; + mesn; + mesq l("You're willing to help? Perfect. We need @@ @@, @@ @@ and @@ @@ for travel.", 1, getitemlink(FishBox), 2, getitemlink(CroconutBox), 3, getitemlink(CottonCloth)); + next; + mesn; + mesq l("Cotton Cloth is sold at Candor, Croconut Boxes can be bought at the market. Fish, however, is a little more tricky."); + next; + mesn; + mesq l("If you hug the wall, there's a secret passage somewhere there. Well, there are many secret passages at Tulimshar."); + next; + mesn; + mesq l("You will find a fisher, maybe he is having a good time and can sell you a few boxes. And remember to keep your eye open."); + setq TulimsharQuest_Sailors, 1; + next; + mesn; + mesq l("There are secret caves on this city. In fact, Tulimshar holds many misteries."); + mesc l("Take care: Secret passages can be dangerous places (or not)."); + tutmes l("You can get Croconut from Crocotree, and fill @@ purchased in the market.", getitemlink(EmptyBox)), l("Protip"), false; + close; + +L_Report1: + mesn; + mes l("@@/1 @@", countitem(FishBox), getitemlink(FishBox)); + mes l("@@/2 @@", countitem(CroconutBox), getitemlink(CroconutBox)); + mes l("@@/3 @@", countitem(CottonCloth), getitemlink(CottonCloth)); + if (countitem(FishBox) < 1 || + countitem(CroconutBox) < 2 || + countitem(CottonCloth) < 3) + close; + next; + select + l("[Deliver all goods.]"), + l("[Maybe another time.]"); + mes ""; + if (@menu == 2) + close; + if (countitem(FishBox) < 1 || + countitem(CroconutBox) < 2 || + countitem(CottonCloth) < 3) { + mesn; + mesq l("Liar. Where are the goods? Are you trying to cheat me?!"); + next; + mesn; + mesq l("You know Jesus Saves hates cheaters, right? If Saulc didn't asked me to double-check stuff..."); + next; + mesn; + mesq l("For short, you would have lost all your items, wouldn't get anything, and there would be no refunds."); + next; + mesn; + mesq l("That's just a friendly advise. That's how things works around here."); + close; + } + inventoryplace Dagger, 1, CottonShirt, 1; + delitem FishBox, 1; // 7.500 GP → 3.750 GP + delitem CroconutBox, 2; // 12.000 GP → 10.600~11.800 GP + delitem CottonCloth, 3; // 2.000 GP + getexp 1508, 15; + Zeny=Zeny+3750; // Profit: 1800 GP → 2.400~1.200 GP + getitem Dagger, 1; + getitem CottonShirt, 1; + setq TulimsharQuest_Sailors, 2; + mesn; + mesq lg("Many thanks, your help has been invaluable. We're now capable to travel at ease."); + next; + mesn; + mesq l("Take care. Here, take this @@. You can sell it for some quick-spot cash, or use it as a weapon.", getitemlink(Dagger)); + close; + +// Second Quest +L_Quest2: + mes ""; + mesn; + mesq l("You're willing to help? Perfect. We need @@ @@, @@ @@ and @@ @@ for travel.", 2, getitemlink(FishBox), 5, getitemlink(CroconutBox), 7, getitemlink(CottonCloth)); + next; + mesn; + mesq l("Cotton Cloth is sold at Candor, Croconut Boxes can be bought at the market. Fish, however, is a little more tricky."); + next; + mesn; + mesq l("If you hug the wall, there's a secret passage somewhere there. Well, there are many secret passages at Tulimshar."); + next; + mesn; + mesq l("You will find a fisher, maybe he is having a good time and can sell you a few boxes. And remember to keep your eye open."); + setq TulimsharQuest_Sailors, 3; + next; + mesn; + mesq l("There are secret caves on this city. In fact, Tulimshar holds many misteries."); + mesc l("Take care: Secret passages can be dangerous places (or not)."); + close; + +L_Report2: + mesn; + mes l("@@/2 @@", countitem(FishBox), getitemlink(FishBox)); + mes l("@@/5 @@", countitem(CroconutBox), getitemlink(CroconutBox)); + mes l("@@/7 @@", countitem(CottonCloth), getitemlink(CottonCloth)); + if (countitem(FishBox) < 2 || + countitem(CroconutBox) < 5 || + countitem(CottonCloth) < 7) + close; + next; + select + l("[Deliver all goods.]"), + l("[Maybe another time.]"); + mes ""; + if (@menu == 2) + close; + if (countitem(FishBox) < 2 || + countitem(CroconutBox) < 5 || + countitem(CottonCloth) < 7) { + mesn; + mesq l("Liar. Where are the goods? Are you trying to cheat me?!"); + next; + mesn; + mesq l("You know Jesus Saves hates cheaters, right? If Saulc didn't asked me to double-check stuff..."); + next; + mesn; + mesq l("For short, you would have lost all your items, wouldn't get anything, and there would be no refunds."); + next; + mesn; + mesq l("That's just a friendly advise. That's how things works around here."); + close; + } + delitem FishBox, 2; // 7.500 GP → 3.750 GP + delitem CroconutBox, 5; // 12.000 GP → 10.600~11.800 GP + delitem CottonCloth, 7; // 2.000 GP + getexp 1508, 15; + Zeny=Zeny+15750; // Profit: 1800 GP → 2.400~1.200 GP + setq TulimsharQuest_Sailors, 4; + mesn; + mesq lg("Many thanks, your help has been invaluable. We're now capable to travel at ease."); + next; + mesn; + mesq l("Take care. This is a dangerous world, but I think that worse than being attacked by sea monsters, is starving from hunger!"); + close; + + +OnInit: + .sex = G_OTHER; + .distance = 5; + end; +} diff --git a/npc/003-1/sarah.txt b/npc/003-1/sarah.txt new file mode 100644 index 0000000..6038389 --- /dev/null +++ b/npc/003-1/sarah.txt @@ -0,0 +1,108 @@ +// TMW2 Script +// Author: +// Saulc +// Jesusalva +// DangerDuck +// Description: +// Random NPC without any purpose but to give SerfHat. Uh. +// TODO: Could be repeatable quest (eg. 60 GP for a cake every day, so you can have a 10 GP profit selling cakes) + +003-1,90,144,0 script Sarah NPC_FEMALE_TONORI,{ + function quest_completed; + function quest_open; + function quest_started; + function AssignGHQ; + + // Main Loop + do + { + .@q = getq(TulimsharQuest_Sarah); + if (.@q == 1) + quest_completed(); + select + rif(!.@q, l("Hello, I'm new here! Can I help you?")), + menuaction(l("Quit")); + + switch (@menu) { + case 1: + quest_started(); + break; + } + } while (@menu != 2); + + closedialog; + goodbye; + close; + +// Quest completed +function quest_completed { + speech S_FIRST_BLANK_LINE | S_LAST_NEXT, + l("It was so tasty, I can't eat anything more... Thank you."); + AssignGHQ(); + return; +} + +// Quest Core +function quest_started { + speech S_FIRST_BLANK_LINE | S_LAST_NEXT, + l("Oh, Welcome then."); + speech S_LAST_NEXT, + l("Can you bring me 5 pieces of Cherry Cake? Pretty please?"); + do + { + select + l("Here they are!"), + menuaction(l("Quit")); + + switch (@menu) { + case 1: + quest_open(); + break; + case 2: + mesc l("Protip: @@ is dropped by @@. It is a tough monster, you might need some strategy to kill it. @@ can be bought in shops.", getitemlink(CherryCake), getmonsterlink(GiantMaggot)); + mesc l("%s can also be obtained from %s, at a lower drop rate.", getitemlink(CherryCake), getmonsterlink(Duck)); + next; + break; + } + } while (@menu != 2); + return; +} + +// Quest check +function quest_open { + if (countitem(CherryCake) >= 5) { + speech S_FIRST_BLANK_LINE, + l("You brought me 5 @@ ! Here is your @@, as promised.",getitemlink(CherryCake), getitemlink(SerfHat)); + delitem CherryCake,5; + getitem SerfHat,1; + getexp 80, 2; + setq TulimsharQuest_Sarah, 1; + close; + } else { + speech S_FIRST_BLANK_LINE, + l("Sorry, that is not the cake I love."); + close; + } + return; +} + +// Grand Hunter Quest (post-quest) +function AssignGHQ { + GHQ_Assign(Duck, "Holiday"); + end; +} + +OnInit: + .@npcId = getnpcid(.name$); + setunitdata(.@npcId, UDT_HEADTOP, TerraniteArmor); + setunitdata(.@npcId, UDT_HEADMIDDLE, RaidTrousers); + setunitdata(.@npcId, UDT_HEADBOTTOM, NPCEyesT); + setunitdata(.@npcId, UDT_WEAPON, CandorBoots); // Boots + setunitdata(.@npcId, UDT_HAIRSTYLE, 19); + setunitdata(.@npcId, UDT_HAIRCOLOR, 16); + + .sex = G_FEMALE; + .distance = 5; + end; +} + diff --git a/npc/003-1/sewer.txt b/npc/003-1/sewer.txt new file mode 100644 index 0000000..a5faabd --- /dev/null +++ b/npc/003-1/sewer.txt @@ -0,0 +1,49 @@ +// TMW2 scripts. +// Author: +// Jesusalva +// Notes: +// TW: Tulimshar, West +// TE: Tulimshar, East + +003-1,56,84,0 script #Sewer-TW NPC_NO_SPRITE,{ + if (getq(TulimsharQuest_Sewers) == 0 && !countitem(MirrorLakeArmor)) { + dispbottom l("The sewer mouth is locked."); + end; + } + if (BaseLevel < 25 && !countitem(MirrorLakeArmor)) end; + + mesc l("Descend into Tulimshar sewers?"); + if (askyesno() == ASK_YES) { + closedialog; + warp "003-1-1", 57, 100; + dispbottom l("Blame Saulc."); + end; + } + close; +} + +003-1,115,111,0 script #Sewer-TE NPC_NO_SPRITE,{ + if (getq(TulimsharQuest_Sewers) == 0 && !countitem(MirrorLakeArmor)) { + dispbottom l("The sewer mouth is locked."); + end; + } + if (BaseLevel < 25 && !countitem(MirrorLakeArmor)) end; + + mesc l("Descend into Tulimshar sewers?"); + if (askyesno() == ASK_YES) { + closedialog; + warp "003-1-1", 143, 128; + dispbottom l("Blame Saulc."); + end; + } + close; +} + +003-1,73,133,0 script #ToTheater NPC_HIDDEN,0,0,{ + end; + +OnTouch: + warp "003-9-1", 27, 37; + RegEasterEgg(EE_THEATER, 2); + end; +} diff --git a/npc/003-1/ship.txt b/npc/003-1/ship.txt new file mode 100644 index 0000000..e23765d --- /dev/null +++ b/npc/003-1/ship.txt @@ -0,0 +1,44 @@ +// TMW2 scripts. +// Authors: +// Jesusalva +// Description: +// This script controls access to Ships, fixing variables. + +003-1,82,68,0 script TulimShip NPC_HIDDEN,0,0,{ + +OnTouch: + EnterTown("Tulim"); + goto L_Warp; + +L_Warp: + warp "002-3@"+LOCATION$, 31, 28; + closedialog; + close; +} + +003-1,120,25,0 script TulimShip#M NPC_HIDDEN,0,0,{ + +OnTouch: + EnterTown("Tulim"); + goto L_Warp; + +L_Warp: + /* Is Hurnscald already liberated? Precendence. */ + if (!$HURNS_LIBDATE) { + .@online=$@BG1_SIZE; + if (is_gm()) + dispbottom l("GMs are NOT allowed on Hurnscald Liberation day."); + else if (.@online) + dispbottom l("Right click on the NPC to join the Liberation Force on Hurnscald."); + else + dispbottom l("The ship is locked, probably unable to leave port."); + + if (!.@online) + npctalk3 col(l("A Game Master is required to begin the Liberation Day."), 1); + end; + } + + warp "016-1@"+LOCATION$, 21, 26; + closedialog; + close; +} diff --git a/npc/003-1/shop.txt b/npc/003-1/shop.txt new file mode 100644 index 0000000..86ca29b --- /dev/null +++ b/npc/003-1/shop.txt @@ -0,0 +1,67 @@ +// TMW2 scripts. +// Author: +// Saulc + +003-1,108,110,0 trader Shop#bazar1 NPC_NO_SPRITE,{ + +OnInit: + sleep(SHOPWAIT); + tradertype(NST_MARKET); + + sellitem YellowDye, -1, 2; + sellitem RoundLeatherShield, -1, 2; + sellitem Knife, -1, 5; + sellitem TrainingAmmoBox, -1, rand(2,5); + sellitem ArrowAmmoBox, -1, rand(2,4); + sellitem Arrow, -1, 30000; + sellitem TreasureMap, 600, 1; + sellitem DesertHelmet, -1, 1; + sellitem InfantryHelmet, -1, 1; + sellitem LeatherGloves, -1, 1; + sellitem DesertHat, -1, 8; + sellitem SilkRobe, -1, 1; + sellitem CottonCloth, -1, 2; + sellitem Bread, -1, 15; + sellitem CroconutBox, rand(2800,2900), 6; + sellitem EmptyBottle, -1, 3; // You can buy some empty bottles here, but they're scarse + sellitem EmptyBox, -1, 4; + + .sex = G_OTHER; + .distance = 3; + end; + +OnClock0621: + restoreshopitem DesertHelmet, 1; + restoreshopitem InfantryHelmet, 1; + restoreshopitem LeatherGloves, 1; +OnClock1210: +OnClock1757: +OnClock0001: + restoreshopitem YellowDye, 2; + restoreshopitem RoundLeatherShield, 2; + restoreshopitem Knife, 5; + restoreshopitem TrainingAmmoBox, rand(2,5); + restoreshopitem ArrowAmmoBox, rand(2,4); + restoreshopitem Arrow, rand(10000,30000); + restoreshopitem TreasureMap, 600, 1; + restoreshopitem DesertHat, 8; + restoreshopitem SilkRobe, 1; + restoreshopitem CottonCloth, 2; + restoreshopitem Bread, 15; + restoreshopitem CroconutBox, rand(2800,3050), 6; + restoreshopitem EmptyBottle, 3; + restoreshopitem EmptyBox, 4; + end; + +// Pay your taxes! +OnBuyItem: + debugmes("Purchase confirmed"); + PurchaseTaxes(); + end; + +OnSellItem: + debugmes("Sale confirmed"); + SaleTaxes(); + end; +} + diff --git a/npc/003-1/silvia.txt b/npc/003-1/silvia.txt new file mode 100644 index 0000000..a2f31d5 --- /dev/null +++ b/npc/003-1/silvia.txt @@ -0,0 +1,131 @@ +// TMW2 Script. +// Author: +// Saulc +// Jesusalva + +003-1,109,150,0 script Silvia NPC_FEMALE_ARGAES,{ + + if (strcharinfo(0) == $MOST_HEROIC$) npctalk l("Oh my, the great @@ has come to talk to me!", $MOST_HEROIC$); + if (getq(TulimsharQuest_Swezanne) == 4) goto L_Message; + .@q2=getq2(TulimsharQuest_Swezanne); + if (.@q2 < santime()) goto L_Unallowed; + if (getq(TulimsharQuest_Swezanne) == 1 && getq(TulimsharQuest_Lifestone) < 2) goto L_Lifestone; + if (strcharinfo(0) != $MOST_HEROIC$) hello; + if (getq(MineQuest_Naem) == 1) goto L_Hubby; + end; + +L_Message: + mesn strcharinfo(0); + mesq l("Your mother asked me to say that she loves you."); + next; + mesn; + mesq l("Oh no, not another stranger she sends me to tell that!"); + next; + mesn; + mesq l("She never leaves the shade of that tree, she is always sending messages by other people!!"); + next; + mesn; + mesq l("Oh well... That's my mother, and this is why I love her."); + next; + inventoryplace CottonGloves, 1; + getitem CottonGloves, 1; + getexp 105,0; + setq1 TulimsharQuest_Swezanne, 1; + mesn; + mesq l("Thank you, @@. Please take this pair of gloves as a thank you.", strcharinfo(0)); + close; + +L_Lifestone: + mesn; + mesq l("Hey! Good to see you. I was thinking how I could repay for what you've done for my mother."); + next; + mesn; + mesq l("I can make you a @@, and for that I will want a @@ and 500 GP.", getitemlink(LifestonePendant), getitemlink(Lifestone)); + if (getq(TulimsharQuest_Lifestone) == 0) { + next; + mesn; + mesq l("I am not sure of who makes or haves Lifestones. Try looking outside the city. Who knows."); + close; + } + menu + rif(Zeny >= 500 && countitem(Lifestone) > 0, l("Yes, I accept the pendant!")), -, + l("Not now, but I may be back later."), L_Close; + + // Whaaaat, this is a major error affecting several scripts! + if (Zeny < 500 || countitem(Lifestone) < 0) { + atcommand("@request Someone is cheating, call Jesusalva at once!"); + atcommand("@ban \""+strcharinfo(0)+"\" 15mn"); // I truly hope they bother Jesusalva they were banned + disablenpc "Silvia"; + close; + } + Zeny-=500; + delitem Lifestone, 1; + getitem LifestonePendant, 1; + setq(TulimsharQuest_Lifestone, 2); + mes ""; + mesn; + mesq l("There you go! Thanks for all the help!"); + close; + +L_Unallowed: + mesn; + mesq l("Ah, I wonder how my mother Swezanne is faring..."); + next; + mesn; + mesq l("She must be thristy, fighting monsters on this sun... If somebody could give her Cactus Potions..."); + close; + +L_Hubby: + mesc l("Did we brought everything Naem asked?"); + mesf l("%d/%d %s",countitem(Aquada), 7, getitemlink(Aquada)); + mesf l("%d/%d %s",countitem(PiouLegs), 6, getitemlink(PiouLegs)); + mesf l("%d/%d %s",countitem(Cheese), 3, getitemlink(Cheese)); + mesf l("%d/%d %s",countitem(HalfCroconut), 3, getitemlink(HalfCroconut)); + mesf l("%d/%d %s",countitem(PurpleBlobime), 1, getitemlink(PurpleBlobime)); + next; + if (askyesno() == ASK_NO) { closeclientdialog; end; } + if (countitem(Aquada) < 7 || + countitem(PiouLegs) < 6 || + countitem(Cheese) < 3 || + countitem(HalfCroconut) < 3 || + countitem(PurpleBlobime) < 1) { + mesc l("You lied, and this caused a headache! You should NEVER lie to NPCs, because they may steal your items!"); + callfunc("SC_Bonus", 15, SC_POISON, 10); + close; + } + inventoryplace IcedBottle, 1; + delitem Aquada, 7; + delitem PiouLegs, 6; + delitem Cheese, 3; + delitem HalfCroconut, 3; + delitem PurpleBlobime, 1; + getitembound IcedBottle, 1, 4; + setq MineQuest_Naem, 2; + mesn; + mesq l("Hm, groceries? Well, figure out Naem would ask someone to deliver them."); + next; + mesn; + mesq l("Thanks, please tell him I'll make his favorite dish. Oh, could you also deliver him this %s?", getitemlink(IcedBottle)); + next; + mesn; + mesq l("The mines are over a Volcano. Unless you're a Redy, the heat will slowly chip away your health if you go deep. But drinking iced water can improve temporarily your situation."); + close; + +L_Close: + closedialog; + goodbye; + close; + +OnInit: + .@npcId = getnpcid(.name$); + setunitdata(.@npcId, UDT_HEADTOP, NPCEyesD); + setunitdata(.@npcId, UDT_HEADMIDDLE, SilkRobe); + //setunitdata(.@npcId, UDT_HEADBOTTOM, LeatherTrousers); // TODO + setunitdata(.@npcId, UDT_WEAPON, LousyMoccasins); + setunitdata(.@npcId, UDT_HAIRSTYLE, 21); + setunitdata(.@npcId, UDT_HAIRCOLOR, 11); + + .sex = G_FEMALE; + .distance = 5; + end; +} diff --git a/npc/003-1/soul-menhir.txt b/npc/003-1/soul-menhir.txt new file mode 100644 index 0000000..5430c6e --- /dev/null +++ b/npc/003-1/soul-menhir.txt @@ -0,0 +1,20 @@ +// TMW2 scripts. +// Author: +// Jesusalva +// Description: +// Soul Menhir + +003-1,40,48,0 script Soul Menhir#tulim NPC_SOUL_DESERT,{ + @map$ = "003-1"; + setarray @Xs, 40, 41, 40; + setarray @Ys, 49, 49, 49; + @x = 0; + @y = 0; + SoulMenhir(); + @map$ = ""; + deletearray @Xs; + deletearray @Ys; + @x = 0; + @y = 0; + close; +} diff --git a/npc/003-1/swezanne.txt b/npc/003-1/swezanne.txt new file mode 100644 index 0000000..8e40d63 --- /dev/null +++ b/npc/003-1/swezanne.txt @@ -0,0 +1,146 @@ +// TMW-2 Script +// Author: +// Jesusalva +// Note: +// DO NOT USE QUEST STATUS 2. Thing from past. +// Structure: +// GEQ1 +// 0 - Not Accepted +// 1 - Finished Once +// 3 - Silvia Arc +// GEQ2 +// Timer +// GEQ3 +// Times complete + +003-1,70,100,0 script Swezanne NPC_FEMALE,{ + .@q=getq(TulimsharQuest_Swezanne); + mesn; + mesq l("Hi."); + next; + .@q2=getq2(TulimsharQuest_Swezanne); + if (.@q == 0) goto L_Quest; + else if (.@q == 3) goto L_Silvia; + else if (.@q2 < santime()) goto L_Repeat; + if ($FIRESOFSTEAM < 10) + mesq l("I fight every day in hopes to meet Andrei, the famous hero who prevented Hurnscald from total destruction against a horde of monsters alone."); + else + mesq l("I fight every day in hopes to be like Andrei, the famous hero who prevented Hurnscald from total destruction against a horde of monsters alone."); + if ($MOST_HEROIC$ != "") goto L_Heroics; + close; + +L_Heroics: + next; + mesn; + .@d=rand2(1,6); + + if (.@d == 1) .@deed$="protected our cities!"; + else if (.@d == 2) .@deed$="did great acts of bravery!"; + else if (.@d == 3) .@deed$="is just awesome!"; + else if (.@d == 4) .@deed$="killed a monster army single-handed!"; + else if (.@d == 5) .@deed$="proved their worth in battlefield!"; + else if (.@d == 6) .@deed$="impressed even the High Council!"; + else .@deed$="is awesome like me!"; // Should not happen + + mesq l("I hope to one day be like @@, who @@", $MOST_HEROIC$, .@deed$); + close; + +L_Quest: + mesq l("Ah, fighting monsters under this desert heat makes me thirsty. But someone must do this job, otherwise Tulimshar could fall."); + next; + mesq l("Maybe you could bring me 5 delicious @@? They have a great effect in quenching thirst and recovering vigour.", getitemlink(CactusDrink)); + menu + rif(countitem(CactusDrink) >= 5, l("Here they are!")), L_Finish, + l("I'll get to it."), L_Close; + close; // double sure + +L_Repeat: + mesq l("Ah, fighting monsters under this desert heat makes me thirsty. But someone must do this job, otherwise Tulimshar could fall."); + next; + mesq l("Maybe you could bring me 5 delicious @@? They have a great effect in quenching thirst and recovering vigour.", getitemlink(CactusPotion)); + menu + rif(countitem(CactusPotion) >= 5, l("Here they are!")), L_Finish2, + l("I'll get to it."), L_Close; + close; + +L_Finish2: + delitem CactusPotion, 5; + getexp 37, 0; + Zeny = (Zeny + 350); // 5*35 = 175 base (+100%) + .@q3=getq3(TulimsharQuest_Swezanne)+1; + setq2 TulimsharQuest_Swezanne, gettimetick(2)+60*60*24; + setq3 TulimsharQuest_Swezanne, .@q3; + if (!(.@q3 % 30)) { + //inventoryplace MercCard_Swezanne, 1; + getitem MercCard_Swezanne, 1; + mesn; + mesq l("Thanks for helping me this month. Here is my card, just call me if you need."); + } + close; + +L_Finish: + delitem CactusDrink, 5; + getexp 63, 4; // 4 Job points! A "great" reward. + Zeny = (Zeny + 250); // 5*25 = 125 base (+100%) + setq TulimsharQuest_Swezanne, 3; + setq2 TulimsharQuest_Swezanne, gettimetick(2)+60*60*24; + close; + +L_Silvia: + mesn; + mesq l("Ah, my daughter Silvia is so far away... But I don't want to leave the shade of this tree..."); + next; + mesn; + mesq l("Perhaps you could tell her how much I love her? It is already some days since I last talked to her."); + next; + mesn; + mesq l("I don't want her to think that I am a bad mother."); + mes ""; + menu + l("Sure, I'll do it."), L_SilviaAccept, + l("One day more or less won't make a difference."), L_Close; + +L_SilviaAccept: + mes ""; + mesn; + mesq l("Oh, thank you! My daughter means a lot to me."); + mesc l("Silvia is in Noble District of Tulimshar."); + setq TulimsharQuest_Swezanne, 4; + close; + +L_Close: + if (.@q == 0) { + mesc l("Protip: @@ can be found from @@ and @@. For the later one, ask Lua for strategies.", getitemlink(CactusDrink), getmonsterlink(Maggot), getmonsterlink(GiantMaggot)); + mesc l("Protip 2: Drop rates are low. Try other quests while you slay mobs for this one."); + next; + } + + closedialog; + goodbye; + close; + +OnInit: + .@npcId = getnpcid(.name$); + setunitdata(.@npcId, UDT_HEADTOP, BromenalChest); + setunitdata(.@npcId, UDT_HEADMIDDLE, CottonTrousers); + setunitdata(.@npcId, UDT_HEADBOTTOM, NPCEyes); + setunitdata(.@npcId, UDT_WEAPON, DeepBlackBoots); // Boots + setunitdata(.@npcId, UDT_HAIRSTYLE, 12); + setunitdata(.@npcId, UDT_HAIRCOLOR, 7); + + .sex = G_FEMALE; + .distance = 5; + + + /* + // Preventive check against faulty update. Must be removed afterwards. + // UPDATE `quest` SET `count1` = '3' WHERE `quest`.`quest_id` = 54 AND `count1` != '1'; + .@nb = query_sql("select `char_id` from `quest` WHERE ((`count1`=1 or `count1`=2) and `quest_id`=54) LIMIT 2", .@name$); + if (getarraysize(.@name$) > 0) { + debugmes "FATAL ERROR: Quest log not updated."; + debugmes "disabling Swezanne to prevent weirder bugs."; + disablenpc .name$; + } + */ + end; +} diff --git a/npc/003-1/taree.txt b/npc/003-1/taree.txt new file mode 100644 index 0000000..1aa0593 --- /dev/null +++ b/npc/003-1/taree.txt @@ -0,0 +1,17 @@ +// TMW2 scripts. +// Authors: +// Jesusalva +// Description: +// Mouboo Renting (var MOUBOO_RENTTIME ) + +003-1,63,31,0 script Taree NPC_ELVEN_MAN_MOUBOO_SHOP,{ + MoubooRent(); + closeclientdialog; + goodbye(); + close; + +OnInit: + .distance=4; + end; +} + diff --git a/npc/003-1/tinris.txt b/npc/003-1/tinris.txt new file mode 100644 index 0000000..92404da --- /dev/null +++ b/npc/003-1/tinris.txt @@ -0,0 +1,202 @@ +// TMW2 Script +// Author: +// Saulc +// Jesusalva +// Description: +// Part of Anwar Field quest + +003-1,66,30,0 script Tinris NPC_ELF,{ + .@q=getq(TulimsharQuest_AnwarField); + + // Results: 6 - nothing. 7- bug feast. + // On status 7, you need to talk to Eomie. + // Then Eomie will finish stuff for you, and it's reward time. + if (.@q == 10) goto L_Gift; + if (.@q == 7) goto L_Success; + if (.@q == 6) goto L_Fail; + if (.@q == 4) goto L_Craft; + if (.@q == 3) goto L_Back; + if (.@q == 2) goto L_Start; + if (.@q == 1) goto L_Refuse; + + // Placeholder dialog + if (.@q == 5) + mesc l("I still have Anwar's fertilizer with me."); + mesn; + mesq l("We elves have greater affinity for magic than humans."); + next; + mesq l("However, our skill growth rate is much smaller than those of humans."); + next; + mesq l("In the end, elves would have quite the age to rivalize with human wizards."); + close; + +// READ THE HOLY DIALOGS!! +L_Refuse: + mesn strcharinfo(0); + mesq l("Hello! Anwar sent me to get fertilizer to save Tulimshar from famine, could you help me?"); + next; + mesn; + mesq l("No."); + close; + +L_Start: + mesn strcharinfo(0); + mesq l("Hello, could I help you in exchanger of fertilizer?"); + next; + mesn; + mesq l("I like people like you, straight to the subject."); + next; + mesn; + mesq l("The birthday of me and my girlfriend is coming up. Bring me 12 @@ and I'll make the fertilizer for you.", getitemlink(CherryCake)); + setq TulimsharQuest_AnwarField, 3; + close; + +L_Back: + mesn; + mesq l("So, did you brought me the twelve cherry cakes?"); + mes ""; + mesn strcharinfo(0); + if (askyesno() != ASK_YES) { + close; + } + mes ""; + if (countitem("CherryCake") < 12) + goto L_Lying; + + delitem CherryCake, 12; + getexp 200, 5; + setq TulimsharQuest_AnwarField, 4; + mesn; + mesq l("Okay, that is very useful. However, I do need a few reagents to make it."); + next; + mesn; + mesq l("Please, come back later. I'll see whatever I can fetch for that."); + close; + +L_Craft: + mesn; + mesq l("So, for the fertilizer. The thing is, all that thing is unstable."); + next; + mesn; + mesq l("This fertilizer is projected to protect the plants from plagues, bugs, scorpions and maggots, trying to not be a plague itself."); + next; + mesn; + mesq l("That's very, very risky. I need @@ @@ and @@ @@ to make a Potion to you, and I won't warrant it will work.", 3, getitemlink(Plushroom), 9, getitemlink(MaggotSlime)); + next; + mesn; + mesq l("Give that to whoever needs them, and see if it works. Then come tell me the result. Do you have the reagents?"); + if (askyesno() != ASK_YES) + close; + mes ""; + + if (countitem(Plushroom) < 3|| + countitem(MaggotSlime) < 9) + goto L_Lying; + + delitem Plushroom, 3; + delitem MaggotSlime, 9; + setq1 TulimsharQuest_AnwarField, 5; + + mesn; + mesq l("Here it is. Come back to report the results."); + close; + +L_Fail: + setq1 TulimsharQuest_AnwarField, 4; + .@q2=getq2(TulimsharQuest_AnwarField); + if (.@q2 < 10) + getexp 180-(.@q2*10), 0; + else + getexp 90, 0; + mesn; + switch (.@q2) { + case 1: + mesq l("Well, that could fail, I said. Here is some experience."); + break; + case 2: + mesq l("Don't worry, third time is the charm. Here is some experience. Let's try again."); + break; + case 3: + mesq l("Okay, here is some experience, and forgot what I've said before. We can try again."); + break; + case 4: + mesq l("Don't worry, I've tweaked my formula this time. Here is some experience and let's try again!"); + break; + case 5: + mesq l("I'm sorry, I just... Maybe if...? Aha! Here's the EXP, ready for a next go?"); + break; + case 6: + mesq l("Uhm, maybe I mashed the Plushroom too hard this time. Here's EXP as usual, let's try again?"); + break; + case 7: + mesq l("I shall not fail any further, I think my new formula is perfect! Here's the EXP, but I need material to use it!"); + break; + case 8: + mesq l("I never knew you could fail THAT hard. I've took Saulc's Fertilizer's recipe, success chance is of 100% if you want to try again."); + break; + default: + mesq l("Well, that could fail, I said. Here is some experience."); + break; + } + next; + if (countitem(Plushroom) >= 3 && + countitem(MaggotSlime) >= 9) + goto L_Craft; + mesn; + mesq l("Now go, and fetch the materials again. I'll make another fertilizer for you."); + close; + +L_Success: + mesn; + mesq l("WHAT? The farm is plagued with insects?!"); + next; + mesn; + mesq l("Quick, tell that to Eomie. She knows how to do Bug Bombs which won't harm the plants!"); + close; + +L_Gift: + .@q2=getq2(TulimsharQuest_AnwarField); + if (.@q2 & 1) { + mesn; + mesq l("Thanks for the nice gift!"); + close; + } + // Tip. WHAT DID YOU DID WITH THE BOUND ITEM? IT SHOULD BE HARD TO GET RID OF IT... + if (countitem(TortugaShell) < 1) { + mesn; + mesq l("Ah, I wish I got something for helping people out..."); + close; + } + mesn strcharinfo(0); + mesq l("Anwar sent you this, erm, hum... @@.", getitemlink(TortugaShell)); + next; + setq2 TulimsharQuest_AnwarField, .@q2+1; + delitem TortugaShell, 1; + getexp 95, 1; + mesn; + mesq l("WOW, THIS IS AWESOME! Many, many thanks!!"); + close; + +L_Lying: + mesn; + mesq l("Ah, so you think you can fool me?"); + next; + percentheal -5, -5; + warp "Save", 0, 0; + dispbottom l("Ah... Was I warped?"); + closedialog; + close; + +OnInit: + .@npcId = getnpcid(.name$); + //setunitdata(.@npcId, UDT_HEADTOP, 2929); // TODO: This NPC is an Elf and therefore, CANNOT use NPCEyes. + setunitdata(.@npcId, UDT_HEADMIDDLE, ForestArmor); + setunitdata(.@npcId, UDT_HEADBOTTOM, CottonTrousers); + setunitdata(.@npcId, UDT_WEAPON, DeepBlackBoots); // Boots + setunitdata(.@npcId, UDT_HAIRSTYLE, 3); + setunitdata(.@npcId, UDT_HAIRCOLOR, 19); + + .sex = G_MALE; + .distance = 5; + end; +} diff --git a/npc/003-1/town.txt b/npc/003-1/town.txt new file mode 100644 index 0000000..593785d --- /dev/null +++ b/npc/003-1/town.txt @@ -0,0 +1,33 @@ +// TMW-2 Script +// Author: +// Jesusalva +// Description: +// Reset LOCATION$ when entering a town + +003-1,60,157,0 script #LocTulim NPC_HIDDEN,4,1,{ +OnTouch: + EnterTown("Tulim"); end; +} + +// Crocotree spawn experiment +003-1,0,0,0 script #CrocotreeTulim01 NPC_HIDDEN,{ + end; +// Spawn the crocotrees +OnInit: + areamonster "003-1", 20, 20, 140, 160, strmobinfo(1, CrocoTree), CrocoTree, 1, .name$+"::OnRespawn"; + end; + +// Script Generated +OnRespawn: + initnpctimer; + end; +OnTimer61000: + stopnpctimer; + areamonster "003-1", 20, 20, 140, 160, strmobinfo(1, CrocoTree), CrocoTree, 1, .name$+"::OnRespawn"; + end; +} + +003-1,0,0,0 duplicate(#CrocotreeTulim01) #CrocotreeTulim02 NPC_NO_SPRITE +003-1,0,0,0 duplicate(#CrocotreeTulim01) #CrocotreeTulim03 NPC_NO_SPRITE +003-1,0,0,0 duplicate(#CrocotreeTulim01) #CrocotreeTulim04 NPC_NO_SPRITE +003-1,0,0,0 duplicate(#CrocotreeTulim01) #CrocotreeTulim05 NPC_NO_SPRITE diff --git a/npc/003-1/wateranimation.txt b/npc/003-1/wateranimation.txt new file mode 100644 index 0000000..b3b58e8 --- /dev/null +++ b/npc/003-1/wateranimation.txt @@ -0,0 +1,61 @@ +// TMW2 scripts. +// Author: +// gumi +// Reid +// Saulc +// Description: +// Water animations, splash, fishes, etc... + +003-1,83,128,0 script #water_animation0 NPC_WATER_SPLASH,{ + + fishing; // begin or continue fishing + close; + +OnInit: + .sex = G_OTHER; + .distance = 4; + end; +} + +003-1,87,125,0 duplicate(#water_animation0) #water_animation1 NPC_WATER_SPLASH +003-1,88,120,0 duplicate(#water_animation0) #water_animation2 NPC_WATER_SPLASH +003-1,76,120,0 duplicate(#water_animation0) #water_animation3 NPC_WATER_SPLASH +003-1,75,127,0 duplicate(#water_animation0) #water_animation4 NPC_WATER_SPLASH +003-1,79,111,0 duplicate(#water_animation0) #water_animation5 NPC_WATER_SPLASH +003-1,82,105,0 duplicate(#water_animation0) #water_animation6 NPC_WATER_SPLASH +003-1,85,110,0 duplicate(#water_animation0) #water_animation7 NPC_WATER_SPLASH +003-1,88,113,0 duplicate(#water_animation0) #water_animation8 NPC_WATER_SPLASH +003-1,86,126,0 duplicate(#water_animation0) #water_animation9 NPC_WATER_SPLASH +003-1,87,132,0 duplicate(#water_animation0) #water_animation10 NPC_WATER_SPLASH +003-1,83,111,0 duplicate(#water_animation0) #water_animation11 NPC_WATER_SPLASH +003-1,78,144,0 duplicate(#water_animation0) #water_animation12 NPC_WATER_SPLASH +003-1,83,140,0 duplicate(#water_animation0) #water_animation13 NPC_WATER_SPLASH +003-1,72,147,0 duplicate(#water_animation0) #water_animation14 NPC_WATER_SPLASH +003-1,72,122,0 duplicate(#water_animation0) #water_animation15 NPC_WATER_SPLASH + + +003-1,71,58,0 script #lowsea_tulim0 NPC_WATER_SPLASH,{ + + fishing; // begin or continue fishing + close; + +OnInit: + .sex = G_OTHER; + .distance = 4; + .fishing_rod=SmallFishingNet; + .net_ratio=3; + .catch_time=8000; // You have 3 more seconds to pull here + .wait_time_min=8000; + .wait_time_max=21000; + .pull_rand_max=1600; + .regen_time=30; + end; +} + +003-1,95,47,0 duplicate(#lowsea_tulim0) #lowsea_tulim1 NPC_WATER_SPLASH +003-1,121,48,0 duplicate(#lowsea_tulim0) #lowsea_tulim2 NPC_WATER_SPLASH +003-1,121,36,0 duplicate(#lowsea_tulim0) #lowsea_tulim3 NPC_WATER_SPLASH +003-1,32,107,0 duplicate(#lowsea_tulim0) #lowsea_tulim4 NPC_WATER_SPLASH +003-1,25,78,0 duplicate(#lowsea_tulim0) #lowsea_tulim5 NPC_WATER_SPLASH +003-1,16,50,0 duplicate(#lowsea_tulim0) #lowsea_tulim6 NPC_WATER_SPLASH + diff --git a/npc/003-1/well.txt b/npc/003-1/well.txt new file mode 100644 index 0000000..c745a16 --- /dev/null +++ b/npc/003-1/well.txt @@ -0,0 +1,73 @@ +// TMW2 Script +// Author: +// Saulc +// Jesusalva + +003-1,45,80,0 script Well#003-1 NPC_NO_SPRITE,{ + if (countitem(Bucket) <= 0) { + mesc l("This well is too deep and you don't have a bucket."); + } else { + mesc l("Hey you have a bucket! Too bad there are, you know, HOLES on it, so you can see."); + mesc l("That's exactly why you can't use it to get water. Silly."); + } + if (!Zeny) + close; + next; + mesc l("Throw a coin?"); + if (askyesno() != ASK_YES) + close; + + mes ""; + Zeny=Zeny-1; + mesc l("You throw a coin into the well."); + next; + + .@n=rand(0, 10000); + if (.@n <= 10) { + getitem StrangeCoin, 1; + mes l("##9Hey wait... Your coin turned into a @@!", getitemlink(StrangeCoin)); + } else if (.@n <= 50) { + getitem CasinoCoins, 1; + mes l("##9Hey wait... Your coin turned into a @@!", getitemlink(CasinoCoins)); + } else if (.@n <= 100) { + Zeny=Zeny+2; + mesc l("Hey wait... You found 2 GP!"); + } else if (.@n <= 250) { + percentheal 100, 100; + mesc l("Hey wait... You're enveloped by a bright light and fully healed!"); + } else if (.@n <= 300) { + getexp rand(1,BaseLevel), rand(1,BaseLevel); + mesc l("Hey wait... You're enveloped by a bright light and gain experience!"); + } else if (.@n > 9900) { + mesc l("Hey wait... A monster!! Run for your life!!"); + getmapxy(.@m$, .@x, .@y, 0); + .@mobGID = monster(.@m$, .@x, .@y, "Croc", Croc, 1); + unitattack(.@mobGID, getcharid(CHAR_ID_ACCOUNT)); // Order the summoned monster to engage!! + } else if (.@n > 9850) { + mesc l("Hey wait... A monster!! Run for your life!!"); + getmapxy(.@m$, .@x, .@y, 0); + .@mobGID = monster(.@m$, .@x, .@y, "Blub", Blub, 1); + unitattack(.@mobGID, getcharid(CHAR_ID_ACCOUNT)); // Order the summoned monster to engage!! + } else if (.@n > 9800) { + mesc l("Hey wait... A monster!! Run for your life!!"); + getmapxy(.@m$, .@x, .@y, 0); + .@mobGID = monster(.@m$, .@x, .@y, "Red Scorpion", RedScorpion, 1); + unitattack(.@mobGID, getcharid(CHAR_ID_ACCOUNT)); // Order the summoned monster to engage!! + } else if (.@n > 9700) { + mesc l("Hey wait... A monster!! Run for your life!!"); + getmapxy(.@m$, .@x, .@y, 0); + .@mobGID = monster(.@m$, .@x, .@y, "Bat", Bat, 1); + unitattack(.@mobGID, getcharid(CHAR_ID_ACCOUNT)); // Order the summoned monster to engage!! + } else { + mesc l("Nothing happens."); + next; + mesc l("What did you expect?"); + } + close; + +OnInit: + .sex = G_OTHER; + .distance = 3; + end; +} + |