summaryrefslogtreecommitdiff
path: root/world/map/npc/008-1
diff options
context:
space:
mode:
authorBen Longbons <b.r.longbons@gmail.com>2014-04-02 11:06:32 -0700
committerBen Longbons <b.r.longbons@gmail.com>2014-04-02 22:21:29 -0700
commitc0ba38cd4b68491e28e467889804ebc09c9c002e (patch)
treeaf2890e6fe20990d2a9b7c94b991be58f25a5d52 /world/map/npc/008-1
parent514a2f05cb335c1e9210fea58bc9a9a58478283f (diff)
downloadserverdata-c0ba38cd4b68491e28e467889804ebc09c9c002e.tar.gz
serverdata-c0ba38cd4b68491e28e467889804ebc09c9c002e.tar.bz2
serverdata-c0ba38cd4b68491e28e467889804ebc09c9c002e.tar.xz
serverdata-c0ba38cd4b68491e28e467889804ebc09c9c002e.zip
Clean up main scripts
Diffstat (limited to 'world/map/npc/008-1')
-rw-r--r--world/map/npc/008-1/andra.txt28
-rw-r--r--world/map/npc/008-1/annualeaster.txt8
-rw-r--r--world/map/npc/008-1/diryn.txt1
-rw-r--r--world/map/npc/008-1/dock.txt1
-rw-r--r--world/map/npc/008-1/george.txt16
-rw-r--r--world/map/npc/008-1/hinnak.txt20
6 files changed, 58 insertions, 16 deletions
diff --git a/world/map/npc/008-1/andra.txt b/world/map/npc/008-1/andra.txt
index d86a32a1..25a7684a 100644
--- a/world/map/npc/008-1/andra.txt
+++ b/world/map/npc/008-1/andra.txt
@@ -11,13 +11,17 @@
mes "\"Hello, my name is Andra. You see those nice trees? I planted every single one of them! I'm very proud of my work!\"";
next;
menu
- "Nice! I imagine you planted them a long time ago, right?", -,
+ "Nice! I imagine you planted them a long time ago, right?", L_Next,
"Sorry, but I'm not interested in plants and trees.", L_DislikePlants;
+
+L_Next:
mes "[Andra]";
mes "\"That is the fun part... It took only some months... and look how healthy and beautiful they are!\"";
next;
menu
- "How is that possible?", -;
+ "How is that possible?", L_Next1;
+
+L_Next1:
mes "[Andra]";
mes "\"A few years ago, a nice woman from Tulimshar did something amazing to the land around here... I guess her name was Eomie. I have no idea what she did, but since she worked on this land, everything you plant here will grow really fast!\"";
next;
@@ -26,18 +30,24 @@
mes "And she also told me that this soil is so fertile because it has a lot of nutrients not only on this side, but everywhere. So it is certain that all soil in this place will become weaker if we let a lot of unfertilized spots...\"";
next;
menu
- "That sounds bad! But you just need to keep planting, right?", -;
+ "That sounds bad! But you just need to keep planting, right?", L_Next2;
+
+L_Next2:
mes "[Andra]";
mes "\"Exactly! But it is a big place. And I don't have too much money to buy seeds. If only I could find someone who could help me... ah... I know you are probably busy, but since you are here, would you like to help me in this noble task?\"";
menu
- "Of course! What can I do to help you?", -,
+ "Of course! What can I do to help you?", L_Next3,
"Not right now, I'm really busy.", L_Busy;
+
+L_Next3:
mes "[Andra]";
mes "\"Yay! I knew you would help me! I just need seeds and water... I think " + @seeds_amount + " Grass Seeds and " + @water_amount + " Bottle(s) of Water should be enough to grow some plants on the place. If you give the items, you can let the rest with me.\"";
next;
menu
"I don't have it right now, but I will come back later.", L_Close,
- "Here are the seeds and the water.", -;
+ "Here are the seeds and the water.", L_Next4;
+
+L_Next4:
if (countitem("BottleOfWater") < @water_amount || countitem("GrassSeed") < @seeds_amount) goto L_NotEnough;
if ($@spawned_plants >= $@MAX_GLOBAL_PLANTS) goto L_Gather;
mes "[Andra]";
@@ -48,6 +58,7 @@
set FLAGS, FLAGS | FLAG_ANDRA_HELPED;
mes "Andra pours some water in a lot of different places and then throws some seeds to the sky. The wind carries some of them really far from her.";
close2;
+ goto L_PreSummon;
L_PreSummon:
set $@andra_status, 1;
@@ -61,6 +72,7 @@ OnTimer1000:
if (attachrid(getcharid(3,$@farmer$)) == 0)
goto L_Spawn1000;
message strcharinfo(0), "Andra: I think some plants will grow almost instantly! Just Watch...";
+ goto L_Spawn1000;
L_Spawn1000:
set $@spawned_plants, $@spawned_plants + $@PLANTS_PER_SEED;
@@ -84,6 +96,7 @@ OnTimer7000:
if (attachrid(getcharid(3,$@farmer$)) == 0)
goto L_Spawn7000;
message strcharinfo(0), "Andra: Good... Just take a walk and you will be able to see how your seeds turned into some nice looking plants.";
+ goto L_Spawn7000;
L_Spawn7000:
set $@spawned_plants, $@spawned_plants + $@PLANTS_PER_SEED;
@@ -98,8 +111,10 @@ L_Return:
mes "\"Hi " + strcharinfo(0) + ", good to see you! You came back to help me again?\"";
next;
menu
- "Yes, and I already have the seeds and the water.", -,
+ "Yes, and I already have the seeds and the water.", L_Next5,
"No, I just wanted to say hello.", L_Bye;
+
+L_Next5:
if ($@spawned_plants >= $@MAX_GLOBAL_PLANTS) goto L_Gather;
if (countitem("BottleOfWater") < @water_amount || countitem("GrassSeed") < @seeds_amount) goto L_NotEnough;
delitem "BottleOfWater", @water_amount;
@@ -153,4 +168,5 @@ L_TooYoung:
OnInit:
set $@PLANTS_PER_SEED, 3;
set $@MAX_GLOBAL_PLANTS, 100; // You can plant only if the amount of plants currently in the map is < than this value.
+ end;
}
diff --git a/world/map/npc/008-1/annualeaster.txt b/world/map/npc/008-1/annualeaster.txt
index a06099a1..0f8e55c0 100644
--- a/world/map/npc/008-1/annualeaster.txt
+++ b/world/map/npc/008-1/annualeaster.txt
@@ -43,6 +43,7 @@ function|script|AnnualEasterEvent|,
set @random, rand(getarraysize($@MediumAnnualEasterRewards$));
getitem $@MediumAnnualEasterRewards$[@random], 1;
misceffect FX_GETITEM, strcharinfo(0);
+ goto NoEasterEgg;
NoEasterEgg:
@@ -101,6 +102,8 @@ L_End2:
set @eastertimepenalty, @eastertimepenalty + 5;
if (@eastertimepenalty > gettimetick(2))
set @eastertimepenalty, gettimetick(2);
+ goto L_End1;
+
L_End1:
set @rewardindex, 0;
set @easter_year, 0;
@@ -114,18 +117,21 @@ L_End1:
{
set @EasterEggID, 0;
callfunc("AnnualEasterEvent");
+ end;
}
008-1.gat,65,40,0|script|#TestEgg1|375,
{
set @EasterEggID, 1;
callfunc("AnnualEasterEvent");
+ end;
}
008-1.gat,65,40,0|script|#TestEgg2|375,
{
set @EasterEggID, 2;
callfunc("AnnualEasterEvent");
+ end;
}
@@ -198,6 +204,7 @@ L_done_update:
set $@EggID, 2;
callsub S_relocateEasterEgg;
// intentional fallthrough to L_End
+ goto L_End;
L_End:
set $@AEASTER_mapcount, 0;
@@ -225,6 +232,7 @@ S_relocateEasterEgg:
set $@eastereggPos, rand(getarraysize($@easteregg_posx));
npcwarp $@easteregg_posx[$@eastereggPos], $@easteregg_posy[$@eastereggPos], "#TestEgg" + $@EggID;
+ goto L_Return;
L_Return:
return;
diff --git a/world/map/npc/008-1/diryn.txt b/world/map/npc/008-1/diryn.txt
index 71f9398f..5ed6ca02 100644
--- a/world/map/npc/008-1/diryn.txt
+++ b/world/map/npc/008-1/diryn.txt
@@ -13,6 +13,7 @@
set @cost_terranitecave, 1500;
set @cost_tulimshar, 1000;
set @cost_nivalis, 1500;
+ goto L_Start;
L_Start:
mes "[Diryn]";
diff --git a/world/map/npc/008-1/dock.txt b/world/map/npc/008-1/dock.txt
index 2d6be3fe..fc6bbfeb 100644
--- a/world/map/npc/008-1/dock.txt
+++ b/world/map/npc/008-1/dock.txt
@@ -4,4 +4,5 @@
{
set @loc, DOCK_hurnscald;
callfunc "Ferry";
+ end;
}
diff --git a/world/map/npc/008-1/george.txt b/world/map/npc/008-1/george.txt
index 5e0344ff..b7c3ce5b 100644
--- a/world/map/npc/008-1/george.txt
+++ b/world/map/npc/008-1/george.txt
@@ -29,12 +29,16 @@ L_George_Easter2012:
mes "\"Aaarrrrh mate! That scarab armlet was a present from my grandfather, I swear! That is all I have to say...\"";
next;
menu
- "What? What are you talking about?", -;
+ "What? What are you talking about?", L_Next;
+
+L_Next:
mes "[George the Pirate]";
mes "\"Uh? Ahh, hehe... Arrrh, what crime are ye talking about?\"";
next;
menu
- "The Easter Bunny was kidnapped. I heard you know the person behind this crime.", -;
+ "The Easter Bunny was kidnapped. I heard you know the person behind this crime.", L_Next1;
+
+L_Next1:
mes "[George the Pirate]";
mes "\"Arrrrh, I know, I know... But it's such a sad thing. My old mate Pink Boots Hank. He was a great treasure hunter, but now he is just a criminal.\"";
next;
@@ -43,12 +47,16 @@ L_George_Easter2012:
mes "\What I know is from that day, he just started doing crazy things, like stealing money, present boxes, even chocolate cake!\"";
next;
menu
- "But what about the Easter Bunny?", -;
+ "But what about the Easter Bunny?", L_Next2;
+
+L_Next2:
mes "[George the Pirate]";
mes "\"Yes, yes... Hank is not a very smart guy. I remember he had a secret place, a big house in the desert. When he could find a treasure he would always run to this house and hide his things in the basement. I am sure he must be using this same place to hide the Easter Bunny.\"";
next;
menu
- "Thank you George, I will check this information right now!", -;
+ "Thank you George, I will check this information right now!", L_Next3;
+
+L_Next3:
set QUEST_Easter12, 4;
close;
}
diff --git a/world/map/npc/008-1/hinnak.txt b/world/map/npc/008-1/hinnak.txt
index 8deb8263..3d92de07 100644
--- a/world/map/npc/008-1/hinnak.txt
+++ b/world/map/npc/008-1/hinnak.txt
@@ -12,6 +12,7 @@
set @inspector, ((QUEST_Hurnscald & NIBBLE_3_MASK) >> NIBBLE_3_SHIFT);
if (@inspector == 10) goto L_NohMask;
+ goto L_No_NohMask;
L_No_NohMask:
set @state, ((QUEST_Hurnscald & NIBBLE_1_MASK) >> NIBBLE_1_SHIFT);
@@ -71,6 +72,7 @@ L_Exchange:
goto L_Exchange_Start;
mes "The farmer glares at your hat.";
next;
+ goto L_Exchange_Start;
L_Exchange_Start:
mes "[Farmer Hinnak]";
@@ -116,22 +118,29 @@ L_ThanksHat:
mes "[Farmer Hinnak]";
mes "\"That better be a trophy on your head.\"";
menu
- "It is.", -;
+ "It is.", L_Next;
+
+L_Next:
mes "[Farmer Hinnak]";
mes "\"Good then. Thanks for your help with the pinkies.\"";
+ goto L_ThanksMenu;
L_ThanksMenu:
menu
- "Sure, any time!", -,
- "Anything else you want me to do?", -,
+ "Sure, any time!", L_Next1,
+ "Anything else you want me to do?", L_Next1,
"You're welcome. Bye!", L_Bye;
+
+L_Next1:
mes "[Farmer Hinnak]";
mes "\"Actually, it's been a long day. If it's no trouble, could you get me a beer?\"";
next;
menu
"Here you are.", L_GiveBeer,
"Sure, I'll go get one. Bye!", L_Bye,
- "You shouldn't drink while working!", -;
+ "You shouldn't drink while working!", L_Next2;
+
+L_Next2:
mes "[Farmer Hinnak]";
mes "\"Well, I'm done for the day, and I'm quite old enough to decide when I can have a beer, thank you!\"";
next;
@@ -195,8 +204,7 @@ L_GiveBeer:
"Hahaha!", L_Sagatha_hahaha,
"Whoah, scary...", L_Sagatha_scary,
"What was that gobbledygook word?", L_Sagatha_word,
- "I better go now.", -;
- goto L_Bye;
+ "I better go now.", L_Bye;
L_Sagatha_hahaha:
mes "[Farmer Hinnak]";