diff options
Diffstat (limited to 'npc/033-1')
-rw-r--r-- | npc/033-1/_import.txt | 11 | ||||
-rw-r--r-- | npc/033-1/_mobs.txt | 6 | ||||
-rw-r--r-- | npc/033-1/_warps.txt | 4 | ||||
-rw-r--r-- | npc/033-1/backDoor.txt | 9 | ||||
-rw-r--r-- | npc/033-1/barbarianinit.txt | 25 | ||||
-rw-r--r-- | npc/033-1/birrod.txt | 263 | ||||
-rw-r--r-- | npc/033-1/kimarr.txt | 405 | ||||
-rw-r--r-- | npc/033-1/mapflags.txt | 1 | ||||
-rw-r--r-- | npc/033-1/traveler.txt | 7 | ||||
-rw-r--r-- | npc/033-1/yerrnk.txt | 205 |
10 files changed, 936 insertions, 0 deletions
diff --git a/npc/033-1/_import.txt b/npc/033-1/_import.txt new file mode 100644 index 00000000..a6b00e44 --- /dev/null +++ b/npc/033-1/_import.txt @@ -0,0 +1,11 @@ +// Map 033-1: snow Path +// This file is generated automatically. All manually added changes will be removed when running the Converter. +"npc/033-1/_mobs.txt", +"npc/033-1/_warps.txt", +"npc/033-1/backDoor.txt", +"npc/033-1/barbarianinit.txt", +"npc/033-1/birrod.txt", +"npc/033-1/kimarr.txt", +"npc/033-1/mapflags.txt", +"npc/033-1/traveler.txt", +"npc/033-1/yerrnk.txt", diff --git a/npc/033-1/_mobs.txt b/npc/033-1/_mobs.txt new file mode 100644 index 00000000..b7735315 --- /dev/null +++ b/npc/033-1/_mobs.txt @@ -0,0 +1,6 @@ +// This file is generated automatically. All manually added changes will be removed when running the Converter. +// Map 033-1: snow Path mobs +033-1,73,49,5,9 monster Wolvern 1090,2,100000,30000 +033-1,33,38,7,24 monster Reinboo 1094,3,100000,30000 +033-1,56,87,25,21 monster Squirrel 1038,15,100000,30000 +033-1,0,0,0,0 monster White Bell 1095,3,100000,30000 diff --git a/npc/033-1/_warps.txt b/npc/033-1/_warps.txt new file mode 100644 index 00000000..0387a765 --- /dev/null +++ b/npc/033-1/_warps.txt @@ -0,0 +1,4 @@ +// This file is generated automatically. All manually added changes will be removed when running the Converter. +// Map 033-1: snow Path warps +033-1,22,20,0 warp #033-1_22_20 0,1,034-1,159,19 +033-1,119,70,0 warp #033-1_119_70 0,1,019-1,22,69 diff --git a/npc/033-1/backDoor.txt b/npc/033-1/backDoor.txt new file mode 100644 index 00000000..46c5d955 --- /dev/null +++ b/npc/033-1/backDoor.txt @@ -0,0 +1,9 @@ +033-1,86,28,0 script #KimarrBackDoor NPC45,0,0,{ + if ($@Fluffy_Hunting == 0) + goto L_Warp; + end; + +L_Warp: + warp "033-1", 77, 30; + end; +} diff --git a/npc/033-1/barbarianinit.txt b/npc/033-1/barbarianinit.txt new file mode 100644 index 00000000..2b14ada3 --- /dev/null +++ b/npc/033-1/barbarianinit.txt @@ -0,0 +1,25 @@ +- script #barbarian033_1init NPC32767,{ + end; + +OnInit: + $@Q_Barbarians_MASK = NIBBLE_0_MASK; + $@Q_Barbarians_SHIFT = NIBBLE_0_SHIFT; + $@Q_Barbarians_wolvern_amount = 16; + $@Q_Barbarians_Ambush_max = 0x00007FFF; + $@Q_Barbarians_Ambush0_flag = 0x00000001; + $@Q_Barbarians_Ambush1_flag = 0x00000002; + $@Q_Barbarians_Ambush2_flag = 0x00000004; + $@Q_Barbarians_Ambush3_flag = 0x00000008; + $@Q_Barbarians_Ambush4_flag = 0x00000010; + $@Q_Barbarians_Ambush5_flag = 0x00000020; + $@Q_Barbarians_Ambush6_flag = 0x00000040; + $@Q_Barbarians_Ambush7_flag = 0x00000080; + $@Q_Barbarians_Ambush8_flag = 0x00000100; + $@Q_Barbarians_Ambush9_flag = 0x00000200; + $@Q_Barbarians_Ambush10_flag = 0x00000400; + $@Q_Barbarians_Ambush11_flag = 0x00000800; + $@Q_Barbarians_Ambush12_flag = 0x00001000; + $@Q_Barbarians_Ambush13_flag = 0x00002000; + $@Q_Barbarians_Ambush14_flag = 0x00004000; + end; +} diff --git a/npc/033-1/birrod.txt b/npc/033-1/birrod.txt new file mode 100644 index 00000000..38e624a4 --- /dev/null +++ b/npc/033-1/birrod.txt @@ -0,0 +1,263 @@ +033-1,72,27,0 script Birrod NPC217,{ + @state = ((QUEST_Barbarians & $@Q_Barbarians_MASK) >> $@Q_Barbarians_SHIFT); + + set @wolvern_level, 40; // minimum level to do the wolvern hunting + @wolvern_exp = 5000; + + @minigame_exp = 5000; + + if (@state >= 6) goto L_Impressed; + if (@state == 5) goto L_Questions; + if (@state == 4) goto L_Wolverns; + if (@state == 3) goto L_Hunting; + if (@state == 2) goto L_Kimarr; + if (@state == 1) goto L_Fluffy; + + mes "[Barbarian]"; + mes "\"Welcome. My name is Birrod, warrior of the Mangarr."; + mes "We usually live high up in the snowy mountains, but we need to solve a problem, so we came down here.\""; + next; + mes "\"But this shouldn't concern you.\""; + goto L_close; + +L_Fluffy: + mes "[Birrod]"; + mes "\"Kimarr asked you to perform the Fluffy hunting? I'm curious how you're going to do it.\""; + mes "He grins."; + goto L_close; + +L_Kimarr: + mes "[Birrod]"; + mes "\"Great! Very well done! Welcome to our tribe.\""; + next; + mes "\"I think Kimarr has something for you.\""; + goto L_close; + +L_Hunting: + if (BaseLevel < @wolvern_level) + goto L_Weak; + mes "[Birrod]"; + mes "\"Hello, " + strcharinfo(0) + "! Would you like to prove your hunting skills again?\""; + next; + mes "\"I noticed some groups of Wolverns in the forest west of here which are unusually aggressive."; + mes "This makes it dangerous for all the small people from the nearby town to go there.\""; + next; + mes "\"To prove your skills, go to the forest and hunt down " + $@Q_Barbarians_wolvern_amount + " of the very aggressive Wolverns.\""; + next; + mes "\"There are also some Wolverns that behave normally and attack you only when you come too close to them."; + mes "Those are not the ones I mean, but those that seek the battle themselves.\""; + @state = 4; + callsub S_Update_Mask; + goto L_close; + +L_Wolverns: + if (wolvern_count >= $@Q_Barbarians_wolvern_amount) + goto L_Wolverns_Done; + mes "[Birrod]"; + mes "\"Greetings, my friend."; + mes "The aggressive wolverns are still roaming the forest west of here.\""; + next; + mes "\"This is your chance to prove your worth.\""; + goto L_close; + +L_Wolverns_Done: + @state = 5; + callsub S_Update_Mask; + wolvern_count = 0; + mes "[Birrod]"; + mes "\"" + strcharinfo(0) + "!"; + mes "Good work. This area is much safer now.\""; + next; + getexp @wolvern_exp, 0; + if (getskilllv(SKILL_POOL) == 0) + goto L_Not_Ready; + mes "\"Your skills are impressive. You are worthy to be called a warrior of the Mangarr, if you accept.\""; + next; + goto L_Questions; + +L_Questions: + if (getskilllv(SKILL_POOL) == 0) + goto L_Not_Ready; + mes "Birrod has a very solemn look on his face."; + mes "[Birrod]"; + mes "\"" + strcharinfo(0) + ", are you ready to become a full-fledged member of our tribe, the Mangarr?\""; + menu + "Yes, what do I need to do?",L_Next, + "That's why I'm here.",L_Next, + "Sorry, I have to go. See you.",L_No_Member; + +L_Next: + mes "Birrod nods earnestly."; + mes "[Birrod]"; + mes "\"I will ask you some questions."; + mes "Think well and be honest, because your answers will determine whether you are worthy.\""; + next; + mes "\"What's the most important thing for a true warrior?\""; + menu + "Strength!",L_Fail11, + "A good weapon.",L_Fail12, + "Bravery.",L_Success11; + +L_Fail11: + mes "[Birrod]"; + mes "\"Strength is indeed important for a warrior. But before you can show strength, you need to have something else.\""; + next; + goto L_No_Member; + +L_Fail12: + mes "[Birrod]"; + mes "\"Are you kidding?\""; + next; + goto L_No_Member; + +L_Success11: + mes "[Birrod]"; + mes "\"Wise words.\""; + next; + mes "\"What would you do if you are wounded but Yetis are attacking our tribe?\""; + menu + "Run as fast as I can.",L_Fail21, + "Fight no matter what.",L_Fail22, + "Try to hold them back until everyone is safe, then retreat.",L_Success21; + +L_Fail21: + mes "[Birrod]"; + mes "\"You will never become an accepted member of our tribe with that attitude.\""; + next; + goto L_No_Member; + +L_Fail22: + mes "[Birrod]"; + mes "\"Honorable, but stupid.\""; + next; + goto L_No_Member; + +L_Success21: + mes "[Birrod]"; + mes "\"Right.\""; + next; + mes "\"When you are on a hunting trip with your comrades and it's time to set up a camp in the evening, what things do you do?\""; + menu + "Take care of everyone who got wounded.",L_Success31, + "Pitch the tent and make a fire.",L_Success32, + "Lay down and rest.",L_Fail31; + +L_Success31: + mes "[Birrod]"; + mes "\"You're a caring person. Good.\""; + next; + goto L_Success3; + +L_Success32: + mes "[Birrod]"; + mes "\"You're diligent, good.\""; + next; + goto L_Success3; + +L_Fail31: + mes "[Birrod]"; + mes "\"You wouldn't make friends that way.\""; + next; + goto L_No_Member; + +L_Success3: + mes "\"What is your goal in life?\""; + menu + "Learn new things and see the world.",L_Success41, + "Become as powerful as I can.",L_Fail41, + "Protect the ones I love.",L_Success42; + +L_Success41: + mes "[Birrod]"; + mes "\"You're curious. An attribute we appreciate.\""; + next; + goto L_Success4; + +L_Fail41: + mes "[Birrod]"; + mes "\"You're seeking power? For what?\""; + next; + goto L_No_Member; + +L_Success42: + mes "[Birrod]"; + mes "\"An honorable goal.\""; + next; + goto L_Success4; + +L_Success4: + mes "\"What do you think is a good reason to fight and kill?\""; + menu + "Because I want it.",L_Fail51, + "To survive.",L_Success51, + "To protect someone in need.",L_Success52; + +L_Fail51: + mes "[Birrod]"; + mes "\"You think so?\""; + next; + goto L_No_Member; + +L_Success51: + mes "[Birrod]"; + mes "\"Right.\""; + next; + goto L_Success5; + +L_Success52: + mes "[Birrod]"; + mes "\"Yes, that's the most honorable reason.\""; + next; + goto L_Success5; + +L_Success5: + getexp @minigame_exp, 0; + updateskill SKILL_RAGING, 1; + @state = 6; + callsub S_Update_Mask; + mes "You feel an exciting energy inside you."; + mes "[Birrod]"; + mes "\"You are now a warrior of the Mangarr.\""; + next; + mes "\"As a Mangarr warrior, you gain the ability to put back your own safety for Raging in battle with a tremendous power."; + mes "This power now lies within you, waiting for someone to help you focus on it.\""; + goto L_close; + +L_Impressed: + mes "[Birrod]"; + mes "\"I'm very proud that you're a member of the tribe.\""; + goto L_close; + +L_Not_Ready: + mes "[Birrod]"; + mes "\"" + strcharinfo(0) + ", you've shown great hunting skills and are an enrichment to our tribe."; + mes "But you still lack the needed mental skills to become a full member of our tribe.\""; + next; + mes "\"Roam this world to find more experienced persons than yourself to learn new things."; + mes "Then come back when you've gained the ability to focus your mind.\""; + goto L_close; + +L_No_Member: + mes "Birrod shakes his head."; + mes "[Birrod]"; + mes "\"Think again about your position in our tribe and what you want to achieve."; + mes "Come back when you feel better prepared.\""; + goto L_close; + +L_Weak: + mes "[Birrod]"; + mes "\"Hello, " + strcharinfo(0) + "! I might have a task for you when you've grown up a bit.\""; + goto L_close; + +L_close: + @state = 0; + @wolvern_level = 0; + @wolvern_exp = 0; + @minigame_exp = 0; + close; + +S_Update_Mask: + set QUEST_Barbarians, + (QUEST_Barbarians & ~($@Q_Barbarians_MASK)) | (@state << $@Q_Barbarians_SHIFT); + return; +} diff --git a/npc/033-1/kimarr.txt b/npc/033-1/kimarr.txt new file mode 100644 index 00000000..74ae45a1 --- /dev/null +++ b/npc/033-1/kimarr.txt @@ -0,0 +1,405 @@ + + + + + +033-1,74,32,0 script Kimarr NPC218,{ + @halloween_npc_id = $@halloween_npc_kimarr; + callfunc "TrickOrTreat"; + + if ($@Fluffy_FighterID == getcharid(3)) + goto L_Attention; + + @state = ((QUEST_Barbarians & $@Q_Barbarians_MASK) >> $@Q_Barbarians_SHIFT); + + if (@state >= 3) goto L_Again; + if (@state == 2) goto L_Reward; + if (@state == 1) goto L_Ask; + + mes "[Barbarian]"; + mes "\"Greetings, little person.\""; + next; + mes "\"I am Kimarr, hunter and warrior of the Mangarr.\""; + next; + mes "\"You are very small and must be careful in these snowy mountains. It is cold, and dangerous monsters are here.\""; + menu + "Hello, my name is " + strcharinfo(0) + " and I'm not small. I'm a great warrior!",L_Next, + "I'm " + strcharinfo(0) + ", don't underestimate me. I'm an experienced adventurer!",L_Next, + "I'm the legendary " + strcharinfo(0) + ", I've fought countless battles.",L_Next; + +L_Next: + mes "Kimarr seems to be amused."; + mes "[Kimarr]"; + mes "\"Really? Do you want to prove it?\""; + menu + "Sure! What shall I do?",L_Continue, + "No, I don't need to prove anything.",L_close; + +L_Continue: + mes "\"Every young member of our tribe proves his or her worth by hunting monsters.\""; + next; + mes "\"The first monsters to hunt are Fluffies. Fluffies give a good meal for a young person and the fur can be used to make clothes and blankets.\""; + next; + @state = 1; + callsub S_Update_Mask; + goto L_ExplainGame; + +L_ExplainGame: + mes "[Kimarr]"; + mes "\"In that cave there are living Fluffies. They like to eat apples.\""; + next; + mes "\"I also saw one of them getting excited about one of those sweet things you call 'cake'.\""; + next; + mes "\"Go to the cave entrance and throw food on the floor to make them come out.\""; + next; + mes "\"You should be careful, other monsters living here might like the food as well.\""; + next; + mes "\"Hunt as many Fluffies as you can until I tell you to stop.\""; + next; + mes "\"Drop more food when no Fluffies are left.\""; + next; + goto L_Ask; + +L_Ask: + mes "[Kimarr]"; + mes "\"So, are you going to try?\""; + menu + "Yeah, let's start!",L_Game, + "Could you explain again?",L_ExplainGame, + "Can you tell me who were the most successful Fluffy hunters?",L_ShowRecord, + "Maybe later.",L_close; + +L_AlreadyGotReward: + npctalk strnpcinfo(0), strcharinfo(0) + " killed " + $@Fluffy_Kills + " Fluffies and has once again proven to be a good hunter."; + message strcharinfo(0), "Kimarr: Once again you prove your worth as a hunter! You killed " + $@Fluffy_Kills + " Fluffies."; + callsub S_Clean; + goto L_close; + +L_Reward1: + @state = ((QUEST_Barbarians & $@Q_Barbarians_MASK) >> $@Q_Barbarians_SHIFT); + + if (@state >= 2) + goto L_AlreadyGotReward; + + npctalk strnpcinfo(0), "Hooray! " + strcharinfo(0) + " killed " + $@Fluffy_Kills + " Fluffies and is now a worthy hunter."; + + // as far as I can tell, this fails because it won't resume from the "next" + // when the script is executed via the "OnFluffyDeath" callback + // (I haven't tried via the 301st call of OnTimer1000) + message strcharinfo(0), "Kimarr: Hooray! You hunted " + $@Fluffy_Kills + " Fluffies. Talk to me for your reward."; + + @state = 2; + callsub S_Update_Mask; + callsub S_Clean; + goto L_close; + +L_Reward: + mes "[Kimarr]"; + mes "\"That was very impressive. Now you can call yourself a hunter, " + strcharinfo(0) + ".\""; + next; + + getinventorylist; + if (@inventorylist_count == 100) + goto L_Full_Inv; + @inventorylist_count = 0; + + mes "\"Take this as a symbol of your strength. You're a member of our tribe now.\""; + getitem "YetiSkinShirt", 1; + @state = 3; + callsub S_Update_Mask; + goto L_close; + +L_Full_Inv: + mes "\"You can't carry the reward I want to give you.\""; + goto L_close; + +L_Again: + mes "[Kimarr]"; + mes "\"Does the hunter " + strcharinfo(0) + " want to hunt some Fluffies again?\""; + menu + "Yeah!",L_Game, + "Can you tell me who were the most successful Fluffy hunters?",L_ShowRecord, + "Not now.",L_close; + +L_Game: + if ($@Fluffy_Hunting) + goto L_Someone_Else; + $@Fluffy_Hunting = 1; + $@Fluffy_Kills = 0; + $@Fluffy_PC_Deaths = PC_DIE_COUNTER; + $@Fluffy_Fighter$ = strcharinfo(0); + $@Fluffy_FighterID = getcharid(3); + $@Fluffy_Time = 180; + $@Fluffy_Min = 1 + (BaseLevel*7)/10; + + warp "033-1", 79, 34; + initnpctimer; + goto L_close; + +L_Someone_Else: + mes "[Kimarr]"; + mes "\"Someone else is hunting right now. Let's wait until that hunt has ended.\""; + goto L_close; + +L_Attention: + message strcharinfo(0), "Kimarr: You should be focused on hunting Fluffies, not talking."; + end; + +OnTimer1000: + if ($@Fluffy_Hunting == 3) + goto L_Action; + $@Fluffy_Hunting = $@Fluffy_Hunting + 1; + goto L_ContinueTimer; +L_Action: + if (attachrid($@Fluffy_FighterID) == 0) + goto L_GotOut; + if (getareausers("033-1", 79, 28, 88, 42) == 0) + goto L_GotOut; + if (PC_DIE_COUNTER > $@Fluffy_PC_Deaths) + goto L_Died; + if (getareausers("033-1", 79, 28, 88, 42) > 1) + areatimer 0, "033-1", 79, 28, 88, 42, 10, "Kimarr::OnTooMany"; + + if ($@Fluffy_Time == 180) + npctalk strnpcinfo(0), strcharinfo(0) + ", you have 3 minutes."; + if ($@Fluffy_Time == 120) + npctalk strnpcinfo(0), "You have 2 minutes left."; + if ($@Fluffy_Time == 60) + npctalk strnpcinfo(0), "You have 1 minute left."; + if ($@Fluffy_Time == 30) + npctalk strnpcinfo(0), "You have 30 seconds left."; + if ($@Fluffy_Time == 15) + npctalk strnpcinfo(0), "You have 15 seconds left."; + if ($@Fluffy_Time == 10) + npctalk strnpcinfo(0), "You have 10 seconds left."; + if ($@Fluffy_Time == 5) + npctalk strnpcinfo(0), "You have 5 seconds left."; + $@Fluffy_Time = $@Fluffy_Time - 1; + if ($@Fluffy_Time < 0) + goto L_TimeOver; + goto L_CheckDrops; + +L_ContinueTimer: + setnpctimer 0; + end; + +L_GotOut: + npctalk strnpcinfo(0), "What a strange thing... " + $@Fluffy_Fighter$ + " just disappeared!"; + callsub S_Clean; + end; + +OnTooMany: + if (getcharid(3) == $@Fluffy_FighterID) + end; + npctalk strnpcinfo(0), "Hey " + strcharinfo(0) + "! What are you doing there? This hunt is for " + $@Fluffy_Fighter$ + " alone!"; + warp "033-1", 77, 34; + end; + +L_Died: + warp "033-1", 77, 34; + message strcharinfo(0), "You are dead."; + npctalk strnpcinfo(0), "Oh no! " + $@Fluffy_Fighter$ + " got overwhelmed!"; + callsub S_Clean; + end; + +L_TimeOver: + message strcharinfo(0), "Your time is over."; + goto L_MaybeRecordScore; + +L_CheckDrops: + @Fluffy_RedApple = getareadropitem("033-1", 79, 29, 88, 42, "RedApple", 1); + @Fluffy_XmasCake = getareadropitem("033-1", 79, 29, 88, 42, "XmasCake", 1); + @Fluffy_Cake = getareadropitem("033-1", 79, 29, 88, 42, "Cake", 1); + @Fluffy_GreenApple = getareadropitem("033-1", 79, 29, 88, 42, "GreenApple", 1); + if (@Fluffy_RedApple || @Fluffy_XmasCake || @Fluffy_Cake || @Fluffy_GreenApple) + goto L_BeginHunting; + goto L_ContinueTimer; + +L_BeginHunting: + $@Fluffy_Spawn = @Fluffy_RedApple + 5 * @Fluffy_XmasCake + 3 * @Fluffy_Cake + @Fluffy_GreenApple; + // limit the number of monsters that can be spawned, to prevent people creating lag with massive amount of monsters + if (($@Fluffy_Spawn + $@Fluffy_Alive) <= 100) + goto L_SpawnFluffies; + message strcharinfo(0), "Wow, calm down, there are already too many Fluffies around here."; + $@Fluffy_Spawn = 100 - $@Fluffy_Alive; + if ($@Fluffy_Spawn <= 0) + goto L_ContinueTimer; + goto L_SpawnFluffies; + +L_SpawnFluffies: + areamonster "033-1", 79, 29, 88, 42, "", 1089, $@Fluffy_Spawn, "Kimarr::OnFluffyDeath"; + + $@Fluffy_Extra = 5 * @Fluffy_XmasCake + 3 * @Fluffy_Cake + 12 * ($@Fluffy_Alive + $@Fluffy_Spawn) + 7 * BaseLevel; + if ((BaseLevel > 40) && (rand($@Fluffy_Extra) > 500)) // Ice Goblin + areamonster "033-1", 79, 29, 88, 42, "", 1058, 1, "Kimarr::OnIceGoblinDeath"; + if ((BaseLevel > 60) && (rand($@Fluffy_Extra) > 550)) // Wolvern + areamonster "033-1", 79, 29, 88, 42, "", 1090, 1, "Kimarr::OnWolvernDeath"; + if ((BaseLevel > 70) && (rand($@Fluffy_Extra) > 600)) // Yeti + areamonster "033-1", 79, 29, 88, 42, "", 1072, 1, "Kimarr::OnYetiDeath"; + + $@Fluffy_Extra = 0; + @Fluffy_RedApple = 0; + @Fluffy_XmasCake = 0; + @Fluffy_Cake = 0; + @Fluffy_GreenApple = 0; + $@Fluffy_Alive = $@Fluffy_Alive + $@Fluffy_Spawn; + goto L_ContinueTimer; + +OnIceGoblinDeath: + @mobId = 1058; + if (getcharid(3) != $@Fluffy_FighterID) + goto L_Punish; + @mobId = 0; + end; + +OnWolvernDeath: + @mobId = 1090; + if (getcharid(3) != $@Fluffy_FighterID) + goto L_Punish; + @mobId = 0; + end; + +OnYetiDeath: + @mobId = 1072; + if (getcharid(3) != $@Fluffy_FighterID) + goto L_Punish; + @mobId = 0; + end; + +OnFluffyDeath: + @mobId = 1089; + if ($@Fluffy_Hunting == 0) + end; + if (getcharid(3) != $@Fluffy_FighterID) + goto L_Punish; + @mobId = 0; + $@Fluffy_Kills = $@Fluffy_Kills + 1; + $@Fluffy_Alive = $@Fluffy_Alive - 1; + if ($@Fluffy_Alive != 0) + end; + if (attachrid($@Fluffy_FighterID) == 1) + goto L_Killedall; + goto L_GotOut; + +L_Punish: + if (@mobId == 1089) + areamonster "033-1", 79, 29, 88, 42, "", 1089, 1, "Kimarr::OnFluffyDeath"; + if (@mobId == 1058) + areamonster "033-1", 79, 29, 88, 42, "", 1058, 1, "Kimarr::OnIceGoblinDeath"; + if (@mobId == 1090) + areamonster "033-1", 79, 29, 88, 42, "", 1090, 1, "Kimarr::OnWolvernDeath"; + if (@mobId == 1072) + areamonster "033-1", 79, 29, 88, 42, "", 1072, 1, "Kimarr::OnYetiDeath"; + + npctalk strnpcinfo(0), strcharinfo(0) + "! This hunt is for " + $@Fluffy_Fighter$ + " alone!"; + heal -Hp, 0; + @mobId = 0; + end; + +L_Killedall: + message strcharinfo(0), "Good job, but you still have time to throw more food on the ground."; + end; + +S_Clean: + stopnpctimer; + $@Fluffy_Hunting = 0; + $@Fluffy_Time = 0; + $@Fluffy_PC_Deaths = 0; + $@Fluffy_Fighter$ = ""; + $@Fluffy_FighterID = 0; + $@Fluffy_Kills = 0; + $@Fluffy_Spawn = 0; + $@Fluffy_Alive = 0; + killmonster "033-1", "Kimarr::OnIceGoblinDeath"; + killmonster "033-1", "Kimarr::OnWolvernDeath"; + killmonster "033-1", "Kimarr::OnYetiDeath"; + killmonster "033-1", "Kimarr::OnFluffyDeath"; + @state = 0; + return; + +L_MaybeRecordScore: + warp "033-1", 77, 34; + if ($@Fluffy_Kills < $@Fluffy_Min) + goto L_NotGoodEnough; + @rank = 0; + goto L_MaybeInsertNext; + +L_MaybeInsertNext: + if ($@Fluffy_Kills > $Record_Fluffy_Kills[@rank]) + goto L_InsertScore; + // you already had a better score + if (strcharinfo(0) == $Record_Fluffy_Name$[@rank]) + goto L_Reward1; + @rank = @rank + 1; + if (@rank == MAX_HIGH_SCORES) + goto L_Reward1; + goto L_MaybeInsertNext; + +L_InsertScore: + @loop = @rank; + goto L_FindLastScore; + +L_FindLastScore: + // comment this out to allow the player to be in the list more than once + // though actually, it might be better just to assume the list is full + if (strcharinfo(0) == $Record_Fluffy_Name$[@loop]) + goto L_MoveStuff; + + @loop = @loop + 1; + if (@loop == MAX_HIGH_SCORES) + goto L_MoveStuff; + goto L_FindLastScore; + +L_MoveStuff: + if (@loop == @rank) + goto L_FinallyInsertMe; + $Record_Fluffy_Kills[@loop] = $Record_Fluffy_Kills[@loop - 1]; + $Record_Fluffy_Name$[@loop] = $Record_Fluffy_Name$[@loop - 1]; + $Record_Fluffy_Date$[@loop] = $Record_Fluffy_Date$[@loop - 1]; + @loop = @loop - 1; + goto L_MoveStuff; + +L_FinallyInsertMe: + $Record_Fluffy_Kills[@rank] = $@Fluffy_Kills; + $Record_Fluffy_Name$[@rank] = strcharinfo(0); + callfunc "time_stamp"; + $Record_Fluffy_Date$[@rank] = @ts_date$ + " " + @ts_time$; + @ts_date$ = ""; + @ts_time$ = ""; + goto L_Reward1; + +L_NotGoodEnough: + npctalk strnpcinfo(0), "What a disappointment, " + strcharinfo(0) + " hunted only " + $@Fluffy_Kills + " Fluffies."; + message strcharinfo(0), "Kimarr: What a disappointment, you hunted only " + $@Fluffy_Kills + " Fluffies."; + callsub S_Clean; + end; + +L_ShowRecord: + @rank = 0; + @loop = 0; + goto L_ShowNextRecord; + +L_ShowNextRecord: + if ($Record_Fluffy_Kills[@loop] == 0) + goto L_close; + mes (@loop + 1) + " - " + $Record_Fluffy_Name$[@loop] + " - " + $Record_Fluffy_Kills[@loop] + " Fluffies killed at " + $Record_Fluffy_Date$[@loop]; + @loop = @loop + 1; + goto L_ShowNextRecord; + +L_close: + // clear all temporary player variables that are not otherwise cleared + + // it is not feasible to otherwise clear @loop + // but, not all jumpers to L_close have necessarily used it ... + // still, I think it's a good precent to ALWAYS exit via L_close + @loop = 0; + + // if you unset @state, it might break the script + // If only we had the concept of "local constants" ... + close; + +S_Update_Mask: + set QUEST_Barbarians, + (QUEST_Barbarians & ~($@Q_Barbarians_MASK)) | (@state << $@Q_Barbarians_SHIFT); + return; +} diff --git a/npc/033-1/mapflags.txt b/npc/033-1/mapflags.txt new file mode 100644 index 00000000..5887f1d6 --- /dev/null +++ b/npc/033-1/mapflags.txt @@ -0,0 +1 @@ +//033-1 mapflag resave 033-1,67,33 diff --git a/npc/033-1/traveler.txt b/npc/033-1/traveler.txt new file mode 100644 index 00000000..0e40675d --- /dev/null +++ b/npc/033-1/traveler.txt @@ -0,0 +1,7 @@ + +033-1,63,30,0 script Khoenan the Traveler NPC103,{ + @npcname$ = "Khoenan"; + @NpcTravelBit = $@barbarians_bit; + callfunc "Traveler"; + end; +} diff --git a/npc/033-1/yerrnk.txt b/npc/033-1/yerrnk.txt new file mode 100644 index 00000000..a4f6f5e2 --- /dev/null +++ b/npc/033-1/yerrnk.txt @@ -0,0 +1,205 @@ +033-1,66,28,0 script Yerrnk NPC216,{ + @state = ((QUEST_Barbarians & $@Q_Barbarians_MASK) >> $@Q_Barbarians_SHIFT); + + @yeti_level = 70; + + if (@state >= 9) goto L_Done; + if (@state == 8) goto L_Yeti_Success; + if (@state == 7) goto L_Hunt_Yeti; + if (@state == 6) goto L_Warrior; + if (@state == 5) goto L_Birrod; + if (@state == 4) goto L_Sorrow; + if (@state == 3) goto L_Duty; + if (@state == 2) goto L_Kimarr; + if (@state == 1) goto L_Fluffy; + + mes "[Barbarian]"; + mes "\"Hello. I'm Yerrnk, first warrior of the Mangarr.\""; + next; + mes "Yerrnk looks at you cautiously."; + mes "[Yerrnk]"; + mes "\"Please take care of your own business.\""; + goto L_close; + +L_Fluffy: + mes "[Yerrnk]"; + mes "\"Kimarr talks too much sometimes.\""; + mes "He sighs."; + next; + mes "[Yerrnk]"; + mes "\"Are you going to accept Kimarr's task? It's an ancient ceremony in our tribe. A young member is accepted as an adult after completing it.\""; + goto L_close; + +L_Kimarr: + mes "[Yerrnk]"; + mes "\"I think Kimarr wants to give you something.\""; + goto L_close; + +L_Duty: + mes "[Yerrnk]"; + mes "\"I'm not sure if you are aware about the meaning of your actions.\""; + next; + mes "\"You passed the initiation rite for hunters of our tribe. That means now you are a hunter of our tribe, with all the rights and duties that come along with that.\""; + next; + mes "\"So you'll have to obey our laws and traditions, protect and help any member of our tribe that is in need, and show neither weakness nor fear in battle.\""; + next; + mes "\"Keep this in mind. If you fail you'll have to receive the elders' judgement.\""; + goto L_close; + +L_Sorrow: + mes "[Yerrnk]"; + mes "\"I noticed that you're getting along with Kimarr and Birrod very well. That's good.\""; + mes "He smiles, but then an expression of worry returns to his face."; + next; + goto L_Mission; + +L_Mission: + mes "[Yerrnk]"; + mes "\"Our tribe is going through dire times. We have lived in harmony with the mountain since time beyond memory."; + mes "Life is hard in the snowy mountains, but this life suits our nature.\""; + next; + mes "\"Some weeks ago the Yetis started to act very strangely. Usually they are very shy, but now...."; + mes "They left the secluded areas high up in the mountains they used to live on and started roaming our hunting grounds.\""; + next; + mes "\"It became very dangerous to leave the village, so it's even harder to gather enough food to survive."; + mes "Not only this, but the Yetis are getting more daring every day. They might attack the village itself sooner or later.\""; + next; + mes "\"Other wild animals are more aggressive as well, though the Yetis are the most dangerous."; + mes "Something like this has never happened before. We have no idea what could cause the animals to behave like this.\""; + next; + mes "\"That's why we were sent on a mission to seek help from the Sages of Kaizei."; + mes "The Sages are wizards of great power and wisdom, and we hope they might be able to give us advice.\""; + next; + mes "\"We already went to Sage Nikolai, who's residence is located in the same snow mountains we live in."; + mes "But there happened some severe accident, so they weren't able to spent any attention to our problem and might rather need help themselves.\""; + next; + mes "\"That's why we came down here to search for Santa, he's one of the most powerful of the Sages.\""; + goto L_close; + +L_Birrod: + mes "[Yerrnk]"; + mes "\"" + strcharinfo(0) + ", I have to admit that I'm surprised by your skills."; + mes "You've proven your bravery and strength.\""; + next; + if (getskilllv(SKILL_POOL) == 0) + goto L_Not_Ready; + mes "\"Please talk to Birrod to receive the initiation rite to become a warrior of the Mangarr.\""; + menu + "Alright.",L_close, + "Can you tell me again what you are here for?",L_Mission; + +L_Not_Ready: + mes "[Yerrnk]"; + mes "\"But you're not yet ready to become a fully accepted warrior of our tribe."; + mes "You should travel the world to gain the ability to focus on your inner strength.\""; + menu + "Alright.",L_close, + "What are you doing down here?",L_Mission; + +L_Warrior: + mes "[Yerrnk]"; + mes "\"" + strcharinfo(0) + ", welcome back!"; + mes "Do you have any question?\""; + menu + "Everything's all right, thanks.",L_close, + "What are you doing down here?",L_Mission, + "Can you explain the Raging ability to me?",L_Skill, + "Do you have a task for me?",L_Task; + +L_Skill: + mes "[Yerrnk]"; + mes "\"As a warrior of our tribe it should be the most important thing to you to defend weaker members of the tribe."; + mes "To achieve this goal our warriors are training the skill to stand the pain of being hit and even use it to get into a state of rage.\""; + next; + mes "\"It works only in a melee fight, when you hear your opponent gasping, smell his sweat, and feel the heat of his body.\""; + next; + mes "Yerrnk gets excited, then he pauses a moment to calm down."; + mes "\"Basically you neglect of your own defense but gain the ability to hit your enemy with outstanding might.\""; + next; + mes "[Yerrnk]"; + mes "\"You can imagine that this creates some danger. That's why we usually fight as a group, so a weakened warrior can step back and recover while the others continue to fight."; + mes "It's also beneficial to have a healer, but very few members of our tribe are born with the ability to wield magic.\""; + goto L_close; + +L_Task: + if (BaseLevel >= @yeti_level) + goto L_Yeti; + mes "[Yerrnk]"; + mes "\"Not at the moment."; + mes "Try to stop by later and use the time to practice your abilities.\""; + goto L_close; + +L_Yeti: + mes "[Yerrnk]"; + mes "\"Indeed, there's something to do that needs a competent warrior."; + mes "We've got reports about a single Yeti prowling around one of the houses in the woods west of here.\""; + next; + mes "\"If you dare to take on this task, seek that Yeti and make the area secure again."; + mes "To find the house, enter the forest and then go first south and then west.\""; + @state = 7; + callsub S_Update_Mask; + goto L_close; + +L_Hunt_Yeti: + mes "[Yerrnk]"; + mes "\"That Yeti is still roaming in the forest west of here."; + mes "To find the house it's prowling around, enter the forest and then go first south and then west.\""; + menu + "I'm on it.",L_close, + "What are you doing down here?",L_Mission, + "Can you explain the Raging ability to me?",L_Skill; + +L_Yeti_Success: + mes "[Yerrnk]"; + mes "\"" + strcharinfo(0) + "! You made it!"; + mes "You proved that you're one of the most skilled warriors of our tribe. Please have this.\""; + getitem "LeatherTrousers", 1; + @state = 9; + callsub S_Update_Mask; + goto L_close; + +L_Done: + if (countitem("Antlers") > 0 && @state < 10) goto L_AntlerHat; + mes "Yerrnk smiles at you."; + mes "[Yerrnk]"; + mes "\"Welcome back, great warrior.\""; + menu + "What's the reason you came here?",L_Mission, + "Can you explain the raging ability to me?",L_Skill, + "(Leave)",L_close; + +L_AntlerHat: + mes "Yerrnk grins."; + next; + mes "[Yerrnk]"; + mes "\"Welcome back, great warrior.\""; + next; + mes "\"I could turn your " + getitemlink("Antlers") + " into a " + getitemlink("AntlerHat") + " for the modest price of 5,000,000 GP.\""; + if (Zeny >= 5000000) + menu + "Please do!", L_AntlerHat_Proceed; + menu + "Sorry, I'm broke", L_close; + +L_AntlerHat_Proceed: + mes "[Yerrnk]"; + mes "\"There you go.\""; + @state = 10; + callsub S_Update_Mask; + delitem "Antlers", 1; + if (Zeny < 5000000) goto L_close; + Zeny = Zeny - 5000000; + getitem "AntlerHat", 1; + goto L_close; + +L_close: + @state = 0; + @yeti_level = 0; + close; + +S_Update_Mask: + set QUEST_Barbarians, + (QUEST_Barbarians & ~($@Q_Barbarians_MASK)) + | (@state << $@Q_Barbarians_SHIFT); + return; +} |