From 4585fddd1d0137c07369679040803e5e5f20d8b5 Mon Sep 17 00:00:00 2001 From: Jessica Tölke Date: Sun, 17 Jul 2011 15:55:30 +0200 Subject: Barbarians: adding three new npcs on 033-1, updating pointer to submodule npcs are work in progress --- client-data | 2 +- world/map/npc/033-1/_import.txt | 3 + world/map/npc/033-1/birrod.txt | 109 ++++++++++++++++++++ world/map/npc/033-1/kimarr.txt | 217 ++++++++++++++++++++++++++++++++++++++++ world/map/npc/033-1/yerrnk.txt | 88 ++++++++++++++++ 5 files changed, 418 insertions(+), 1 deletion(-) create mode 100644 world/map/npc/033-1/birrod.txt create mode 100644 world/map/npc/033-1/kimarr.txt create mode 100644 world/map/npc/033-1/yerrnk.txt diff --git a/client-data b/client-data index ece001fc..60760da9 160000 --- a/client-data +++ b/client-data @@ -1 +1 @@ -Subproject commit ece001fcac4c49fdd6db3bd3aaa838c3f435e1d0 +Subproject commit 60760da93d48ae8c0c1a727c843945c2fd9b4c84 diff --git a/world/map/npc/033-1/_import.txt b/world/map/npc/033-1/_import.txt index 32de0cb4..0099a368 100644 --- a/world/map/npc/033-1/_import.txt +++ b/world/map/npc/033-1/_import.txt @@ -3,3 +3,6 @@ map: 033-1.gat npc: npc/033-1/_mobs.txt npc: npc/033-1/_warps.txt +npc: npc/033-1/birrod.txt +npc: npc/033-1/kimarr.txt +npc: npc/033-1/yerrnk.txt diff --git a/world/map/npc/033-1/birrod.txt b/world/map/npc/033-1/birrod.txt new file mode 100644 index 00000000..39ccaa9f --- /dev/null +++ b/world/map/npc/033-1/birrod.txt @@ -0,0 +1,109 @@ +033-1.gat,72,27,0 script Birrod 217, { + + set @Q_Barbarians_MASK, NIBBLE_0_MASK; + set @Q_Barbarians_SHIFT, NIBBLE_0_SHIFT; + + set @state, ((QUEST_Barbarians & @Q_Barbarians_MASK) >> @Q_Barbarians_SHIFT); + +//TODO: think about amount + set @candy, 25; + set @chocolate, 20; + set @candycane, 15; + set @sweet_exp, 10000; + + if (@state >= 6) goto L_Impressed; + if (@state == 5) goto L_Questions; + if (@state == 4) goto L_Warrior; + if (@state == 3) goto L_Sweets; + if (@state == 2) goto L_Kimarr; + if (@state == 1) goto L_Fluffy; + + mes "[Barbarian]"; + mes "\"Welcome. My name is Birrod, warrior of the Mangarr.\""; + next; + 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.\""; + 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."; + close; + +L_Kimarr: + mes "[Birrod]"; + mes "\"Great! Very well done! Welcome to our tribe.\""; + next; + mes "\"But I think, Kimarr has something for you.\""; + close; + +L_Sweets: + mes "Birrod speaks with a lowered voice."; + mes "[Birrod]"; + mes "\"" + strcharinfo(0) + ", can I ask you for a favor?\""; + next; + mes "\"I noticed those slime things with the funny hats. And they have so tasty stuff with them!\""; + next; + mes "He blushes."; + mes "[Birrod]"; + mes "\"A warrior shouldn't get excited about sweets, so ahm, it would be great if you don't tell Yerrnk and Kimarr about it.\""; + next; + mes "\"Do you have " + @candy + " Candys, " + @chocolate + " Chocolate Bars and " + @candycane + " Candy Canes for me?\""; + menu + "Sure.",-, + "I'll see what I can do.",L_Close, + "I'm a great warrior, I don't have sweets with me!",L_Close; + + if ((countitem("Candy") < @candy) || (countitem("ChocolateBar") < @chocolate) || (countitem("CandyCane") < @candycane)) goto L_No_Items; + delitem "Candy", @candy; + delitem "ChocolateBar", @chocolate; + delitem "CandyCane", @candycane; + getexp @sweet_exp, 0; + set @state, 4; + callsub S_Update_Mask; + close; + +L_Warrior: +//TODO: player can show his fighting abilities by bringing some drop of wolve monsters +// wolve monsters are more dangerous and harder to hunt than fluffies -> harder task +// reason to hunt them: there unusual aggressive and are a danger for the people living in that area +// also use of the items the drop (e.g. fur -> clothes) + mes "TODO: add story about hunting the wolf monsters here."; + menu + "Debug: succes",-, + "Debug: no succes",L_Close; + set @state, 5; + callsub S_Update_Mask; + close; + +L_Questions: +//TODO: minigame idea: barbarian asks some questions with three possible answers, player needs to always choose the right answer +//question are about how the player would act in certain situations and about his attitude +// give raging skill if successfull + mes "TODO: minigame and skill"; + menu + "Debug: succes",-, + "Debug: no succes",L_Close; + set @state, 6; + callsub S_Update_Mask; + close; + +L_Impressed: + mes "\"I'm very proud of you being a member of the tribe.\""; + close; + +L_No_Items: + mes "\"" + strcharinfo(0) + ", remember that a member of our tribe is candid and honest.\""; + close; + +L_Close: + close; + +S_Update_Mask: + set QUEST_Barbarians, + (QUEST_Barbarians & ~(@Q_Barbarians_MASK)) + | (@state << @Q_Barbarians_SHIFT); + return; +} diff --git a/world/map/npc/033-1/kimarr.txt b/world/map/npc/033-1/kimarr.txt new file mode 100644 index 00000000..7cdac533 --- /dev/null +++ b/world/map/npc/033-1/kimarr.txt @@ -0,0 +1,217 @@ +033-1.gat,74,32,0 script Kimarr 218, { + + set @Q_Barbarians_MASK, NIBBLE_0_MASK; + set @Q_Barbarians_SHIFT, NIBBLE_0_SHIFT; + + set @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, better be careful in this 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!",-, + "I'm " + strcharinfo(0) + ", don't underestimate me. I'm an experienced adventurer!" ,-, + "I'm the legendary " + strcharinfo(0) + ", I've fought countless battles.",-; + + mes "Kimarr seems to be amused."; + mes "[Kimarr]"; + mes "\"Really? Do you want to prove it?\""; + menu + "Sure! What shall I do?", L_Explain, + "No, I don't need to prove anything.",L_Close; + +L_Explain: + mes "[Kimarr]"; + 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; + callsub S_Explain_Game; + + set @state, 1; + callsub S_Update_Mask; +L_Ask: + mes "[Kimarr]"; + mes "\"So, are you going to try?\""; + menu + "Yeah, let's start",L_Game, + "Could you explain again?",-, + "Maybe later.",L_Close; + + callsub S_Explain_Game; + goto L_Ask; + +S_Explain_Game: + 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 that sweet things you call 'cake'.\""; + next; + mes "\"You should be careful, other monsters living here might like the food as well\""; + next; + mes "\"Go to the cave entrance and throw food on the floor to make them come out.\""; + next; + mes "\"Then hunt as many fluffies as you can until I tell you to stop.\""; + next; + mes "\"Drop more food when no fluffies are left.\""; + return; + +L_Reward: + mes "[Kimarr]"; + mes "\"That was very impressing - now you can call yourself hunter " + strcharinfo(0) +".\""; + next; + getinventorylist; + if (@inventorylist_count == 100) goto L_Full_Inv; + mes "\"Take this as a symbol of your strength. You're a member of our tribe now.\""; + getitem "YetiSkinShirt", 1; + set @state, 3; + callsub S_Update_Mask; + close; + +L_Again: + mes "[Kimarr]"; + mes "\"Does hunter " + strcharinfo(0) + " want to hunt some fluffies again?\""; + menu + "Yeah!",L_Game, + "Can you tell me who were the most successfull fluffy hunters?",-, + "Not now.",L_Close; + //TODO: give list of best hunters + close; + +L_Full_Inv: + mes "[Kimarr]"; + mes "\"You are carrying a lot of things. I will give something to you when you have room for it.\""; + close; + +L_Close: + close; + +L_Game: +//REMOVE +goto L_Reward; + if ($@FLUFFY_HUNTING) goto L_Someone_Else; + set $@FLUFFY_HUNTING, 1; + set $@FLUFFY_COUNTER, 0; + set $@FLUFFY_TIME, 0; + set $@FLUFFY_LVL, baselevel; +//TODO: set minimum number of killed fluffies (maybe based on level?) + set $@FLUFFY_MIN, 10; + warp "033-1.gat", 79, 34; + startnpctimer; + goto L_Close; + +L_Someone_Else: + mes "[Kimarr]"; + mes "\"At the moment someone else is hunting. Let's wait until that hunting has ended.\""; + close; + +OnTimer1000: + setnpctimer 0; + if ($@FLUFFY_HUNTING != 0) goto L_Hunting; + +L_Hunting: + set $@FLUFFY_TIME, $@FLUFFY_TIME + 1; + if ($@FLUFFY_TIME > 300) goto L_CleanUp; + //TODO: monsterID angry fluffy + if (getareausers("033-1.gat", 79, 29, 88, 42) == 0) goto L_CleanUp; + + set $@FLUFFY_REDAPPLES, getareadropitem("033-1.gat", 79, 29, 88, 42, 535, 1); + set $@FLUFFY_XMASCAKE, getareadropitem("033-1.gat", 79, 29, 88, 42, 508, 1); + set $@FLUFFY_CAKE, getareadropitem("033-1.gat", 79, 29, 88, 42, 513, 1); + set $@FLUFFY_GREENAPPLE, getareadropitem("033-1.gat", 79, 29, 88, 42, 719, 1); + +//TODO: balance the spawns and maybe add the new monster + set $@FLUFFY_SPAWN, $@FLUFFY_REDAPPLES + 5 * $@FLUFFY_XMASCAKE + 3 * $@FLUFFY_CAKE + $@FLUFFY_GREENAPPLE; + +//TODO: remove debug messages + if ($@FLUFFY_TIME % 10 == 0) + mapannounce "033-1.gat", "$@FLUFFY_TIME " + $@FLUFFY_TIME, 0; + if ($@FLUFFY_TIME % 10 == 0) + mapannounce "033-1.gat", "$@FLUFFY_COUNTER " + $@FLUFFY_COUNTER, 0; + areamonster "033-1.gat", 79, 29, 88, 42, "", 1020, $@FLUFFY_SPAWN, "Kimarr::onFluffyDeath"; + if (($@FLUFFY_SPAWN > 0) && ($@FLUFFY_LVL > 40) && (rand(5 * $@FLUFFY_XMASCAKE + 3 * $@FLUFFY_CAKE + 10 * $@FLUFFY_LVL) > 500)) // Ice Goblin + areamonster "033-1.gat", 79, 29, 88, 42, "", 1058, 1, "Kimarr::onPetDeath"; + if (($@FLUFFY_SPAWN > 0) && ($@FLUFFY_LVL > 60) && (rand(5 * $@FLUFFY_XMASCAKE + 3 * $@FLUFFY_CAKE + 10 * $@FLUFFY_LVL) > 550)) // Santa Slime + areamonster "033-1.gat", 79, 29, 88, 42, "", 1015, 1, "Kimarr::onPetDeath"; + if (($@FLUFFY_SPAWN > 0) && ($@FLUFFY_LVL > 70) && (rand(5 * $@FLUFFY_XMASCAKE + 3 * $@FLUFFY_CAKE + 10 * $@FLUFFY_LVL) > 600)) // Yeti + areamonster "033-1.gat", 79, 29, 88, 42, "", 1072, 1, "Kimarr::onPetDeath"; + set $@FLUFFY_REDAPPLES, 0; + set $@FLUFFY_XMASCAKE , 0; + set $@FLUFFY_CAKE, 0; + set $@FLUFFY_GREENAPPLE, 0; + end; +//onInit: +// initnpctimer; +// stopnpctimer; + +onFluffyDeath: + set $@FLUFFY_COUNTER, $@FLUFFY_COUNTER + 1; + mapannounce "033-1.gat", "fluffies killed: " + $@FLUFFY_COUNTER, 0; + end; + +L_CleanUp: + areatimer "033-1.gat", 79, 29, 88, 42, 10, "Kimarr::onReward"; + set $@FLUFFY_HUNTING, 0; + mapannounce "033-1.gat", "You killed " + $@FLUFFY_COUNTER + "Fluffies", 0; + set $@FLUFFY_COUNTER, 0; + //TODO: save amount of killed fluffies in playervariable (hunting redoable, npc tells the best result) + set $@FLUFFY_TIME, 0; +//TODO: check if that command really only kills the event monsters + killmonster "033-1.gat", "All"; + stopnpctimer; + setnpctimer 0; + mapannounce "033-1.gat", "clean up", 0; + end; + +onReward: + //TODO: add check for new record + warp "033-1.gat", 77, 34; + set @place, -1; +//TODO: prevent that one player can be in that list more than once + if ($FLUFFYGAME_PTS[8] < $@FLUFFY_COUNTER) set @place,8; + if ($FLUFFYGAME_PTS[7] < $@FLUFFY_COUNTER) set @place,7; + if ($FLUFFYGAME_PTS[6] < $@FLUFFY_COUNTER) set @place,6; + if ($FLUFFYGAME_PTS[5] < $@FLUFFY_COUNTER) set @place,5; + if ($FLUFFYGAME_PTS[4] < $@FLUFFY_COUNTER) set @place,4; + if ($FLUFFYGAME_PTS[3] < $@FLUFFY_COUNTER) set @place,3; + if ($FLUFFYGAME_PTS[2] < $@FLUFFY_COUNTER) set @place,2; + if ($FLUFFYGAME_PTS[1] < $@FLUFFY_COUNTER) set @place,1; + if ($FLUFFYGAME_PTS[0] < $@FLUFFY_COUNTER) set @place,0; + if (@place != -1) callsub MOVE_NAME; + + if (@state > 1) goto L_Skip; + if ($@FLUFFY_COUNTER < $@FLUFFY_MIN) goto L_Skip; + set @state, 2; + callsub S_Update_Mask; +L_Skip: + end; +////// + +S_MOVE_NAME: + set @i,9; + +MOVE_NAME_L1: + set @i, @i-1; + set $FLUFFYGAME_PTS[@i+1], $FLUFFYGAME_PTS[@i]; + set $FLUFFYGAME_PTS[@i+1], $FLUFFYGAME_PTS[@i]; + if (@i == @place) goto MOVE_NAME_L2; + goto MOVE_NAME_L1; + +MOVE_NAME_L2: + set $FLUFFYGAME_PTS[@place], $@FLUFFY_COUNTER; + set $FLUFFYGAME_NAME[@place], strcharinfo(0); + return; + +S_Update_Mask: + set QUEST_Barbarians, + (QUEST_Barbarians & ~(@Q_Barbarians_MASK)) + | (@state << @Q_Barbarians_SHIFT); + return; +} diff --git a/world/map/npc/033-1/yerrnk.txt b/world/map/npc/033-1/yerrnk.txt new file mode 100644 index 00000000..022fb7ee --- /dev/null +++ b/world/map/npc/033-1/yerrnk.txt @@ -0,0 +1,88 @@ +033-1.gat,66,28,0 script Yerrnk 216, { + + set @Q_Barbarians_MASK, NIBBLE_0_MASK; + set @Q_Barbarians_SHIFT, NIBBLE_0_SHIFT; + + set @state, ((QUEST_Barbarians & @Q_Barbarians_MASK) >> @Q_Barbarians_SHIFT); + + 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 in a reserved way."; + mes "[Yerrnk]"; + mes "\"Please take care of your own business.\""; + 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 when completing it.\""; + close; + +L_Kimarr: + mes "[Yerrnk]"; + mes "\"I think Kimarr wants to give you something.\""; + 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 inition ritus 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 traditiones, protect and help any member of our tribe that is in need and never show weakness nor fear in battle.\""; + next; + mes "\"Keep this in mind. If you fail you'll have to recieve the elders judgement.\""; + 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 gets back to his face."; + next; + mes "[Yerrnk]"; + mes "\"Our tribe is going through dire straits. We used to live in harmony with the mountain ever since."; + mes "Life is hard in the snowy mountains, but this life suits our nature.\""; + next; + mes "\"But some weeks ago the Yetis started to act very strange. 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 "But not only this, the Yetis are getting more daring every day - they might attack the village itself sooner or later.\""; + next; + mes "\"Other wild animals got more aggressive as well, though the Yetis are the most dangerous."; + mes "Something like that 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 find and talk to Santa, one of the Sages of Kazei."; + mes "The Sages are wizards of great power and wisdom, and we hope Santa might be able to give us advice.\""; + close; + +L_Birrod: + mes "[Yerrnk]"; + mes "\"" + strcharinfo(0) + ", I have to admit that I'm surprised by your skills."; + mes "You've proved your braveness and strength."; + mes "Please talk to Birrod to receive the initiation ritual to become a warrior of the Mangarr.\""; + close; + +L_Warrior: +//TODO: player is now fully accepted warrior of the tribe, gets a task: bring yeti claws +// reason: claws can be used to craft spears which are effective to use against the yetis + mes "TODO: add story about bringing yeti claw (probably final quest)"; + close; + +S_Update_Mask: + set QUEST_Barbarians, + (QUEST_Barbarians & ~(@Q_Barbarians_MASK)) + | (@state << @Q_Barbarians_SHIFT); + return; +} -- cgit v1.2.3-70-g09d2