summaryrefslogtreecommitdiff
path: root/world/map/npc/020-1
diff options
context:
space:
mode:
authorBen Longbons <b.r.longbons@gmail.com>2011-06-18 21:58:47 -0700
committerBen Longbons <b.r.longbons@gmail.com>2011-06-19 14:19:55 -0700
commitbae4b92e560c2694eaaf0e8b4d9e95e56204471b (patch)
tree4acc120f6a94cfbf9694bf344658493de5aaa67b /world/map/npc/020-1
parent319f80526f8585ecadaec986e37c9bd326f4d363 (diff)
downloadserverdata-bae4b92e560c2694eaaf0e8b4d9e95e56204471b.tar.gz
serverdata-bae4b92e560c2694eaaf0e8b4d9e95e56204471b.tar.bz2
serverdata-bae4b92e560c2694eaaf0e8b4d9e95e56204471b.tar.xz
serverdata-bae4b92e560c2694eaaf0e8b4d9e95e56204471b.zip
Move to a subdirectory
Diffstat (limited to 'world/map/npc/020-1')
-rw-r--r--world/map/npc/020-1/KrickKrackKrock.txt121
-rw-r--r--world/map/npc/020-1/_import.txt10
-rw-r--r--world/map/npc/020-1/_mobs.txt8
-rw-r--r--world/map/npc/020-1/_warps.txt12
-rw-r--r--world/map/npc/020-1/mapflags.txt2
-rw-r--r--world/map/npc/020-1/rockscissor.txt96
-rw-r--r--world/map/npc/020-1/soul-menhir.txt12
-rw-r--r--world/map/npc/020-1/well.txt119
8 files changed, 380 insertions, 0 deletions
diff --git a/world/map/npc/020-1/KrickKrackKrock.txt b/world/map/npc/020-1/KrickKrackKrock.txt
new file mode 100644
index 00000000..b37dd0e1
--- /dev/null
+++ b/world/map/npc/020-1/KrickKrackKrock.txt
@@ -0,0 +1,121 @@
+// author: Lien
+// reviewed by Pjotr Orial and Jenalya
+//020-1.gat,82,82,0 script Criker 192, {
+
+L_Main:
+//Var
+
+ set @NPC_NAME$, "[Criker]";
+ set @BET, 50;
+//lots of array ;(
+ setarray @KRICK$, "Krick", "Krack", "Krock";
+ setarray @ITEM_RAND, 613, 537, 631, 775, 703, 640, 641, 4006, 700;
+ setarray @ITEM_HEALTH, 684, 685, 686, 687;
+
+//ends of var
+
+ mes @NPC_NAME$;
+ mes "\"Hello " + strcharinfo(0) + ", do you want to play Krick-Krack-Krock?\"";
+L_Menu:
+ menu
+ "Let's start!", L_Start,
+ "What's this?", L_info,
+ "Well, not for the moment.", -;
+ close;
+L_Start:
+ mes @NPC_NAME$;
+ mes "\"Well, how many do you want to bet?\"";
+ input @BET;
+ if(@BET < 50 ) goto L_poor;
+ if(@BET > 2000) goto L_Too_rich;
+ if(zeny < @BET) goto L_No_Money;
+ set zeny, zeny - @BET;
+
+
+
+ set @NPC_KRICK, rand(2);
+ mes "\"Choose Krick, Krack or Krock.\"";
+ menu
+ @KRICK$[0], -,
+ @KRICK$[1], -,
+ @KRICK$[2], -;
+
+ //menu = min 1 & not 0 so I change it
+ set @menu, @menu - 1;
+
+ mes @NPC_NAME$;
+ mes "\" "+ @KRICK$[@NPC_KRICK] +"!\"";
+ if( @menu == @NPC_KRICK ) goto L_Work;
+ mes @NPC_NAME$;
+ mes "\"Too bad! You were not lucky!\"";
+ close;
+L_Work:
+ mes @NPC_NAME$;
+ mes "\"Wow amazing... What kind of present do you want?\"";
+ menu
+ "Money!", L_Money,
+ "An item!", L_Item,
+ "Some healing potions would be cool!", L_Health_item;
+ close;
+
+L_Money:
+ mes @NPC_NAME$;
+ mes "\"Here is your money.\"";
+ set zeny, zeny + (@BET*2);
+ close;
+L_Item:
+//item
+getinventorylist;
+ if (@inventorylist_count == 100) goto L_Full_Inv;
+
+ if( @BET > 50) getitem @ITEM_RAND[rand(1)], 1;
+ if( @BET > 200) getitem @ITEM_RAND[1 + rand(1)], 1;
+ if( @BET > 500) getitem @ITEM_RAND[2 + rand(1)], 1;
+ if( @BET > 1000) getitem @ITEM_RAND[3 + rand(1)], 1;
+ if( @BET > 1200) getitem @ITEM_RAND[4 + rand(1)], 1;
+ if( @BET > 1500) getitem @ITEM_RAND[5 + rand(1)], 1;
+ if( @BET == 2000) getitem @ITEM_RAND[6 + rand(1)], 1;
+ mes @NPC_NAME$;
+ mes "\"Here it is !\"";
+ close;
+
+L_Health_item:
+// health item
+getinventorylist;
+ if (@inventorylist_count == 100) goto L_Full_Inv;
+
+if( @BET > 50) getitem @ITEM_HEALTH[rand(1)], 1;
+if( @BET > 200) getitem @ITEM_HEALTH[ 1 +rand(1)], 1 + rand(1);
+if( @BET > 500) getitem @ITEM_HEALTH[2 + rand(1)], 1 + rand(3);
+if( @BET > 1000) getitem @ITEM_HEALTH[3], 2 + rand(1);
+if( @BET > 1500) getitem @ITEM_HEALTH[3], 3 + rand(2);
+if( @BET == 2000) getitem @ITEM_HEALTH[3], 5 + rand(10);
+ mes @NPC_NAME$;
+ mes "\"Here it is !\"";
+ close;
+
+L_Full_Inv:
+ mes @NPC_NAME$;
+ mes "\"What are you doing? You have so much stuff with you, you can't carry what you won. Ha, well, then I will keep it!\"";
+ close;
+
+L_poor:
+ mes @NPC_NAME$;
+ mes "\"Erm... if you want to play you HAVE to bet, and you can't bet "+ @BET +" gold pieces. You need at least 50gp.\"";
+ close;
+L_Too_rich:
+ mes @NPC_NAME$;
+ mes "\"Mh... I have to bet too. How will I get a present which is "+ @BET +"? No, that's too much.\"";
+ close;
+L_No_Money:
+ mes @NPC_NAME$;
+ mes "\"Oh? You don't have "+ @BET +" gold pieces.\"";
+ close;
+L_info:
+ mes @NPC_NAME$;
+ mes "\"Well, if you want to play Krick Krack Krock with me, you need to bet some money. We will both say a word (Krack, Krick or Krock). If we say the same, you can win double your money or an item worth what you bet. \"";
+ next;
+ mes "\"So, do you want to play? \"";
+ goto L_Menu;
+}
+
diff --git a/world/map/npc/020-1/_import.txt b/world/map/npc/020-1/_import.txt
new file mode 100644
index 00000000..704d916d
--- /dev/null
+++ b/world/map/npc/020-1/_import.txt
@@ -0,0 +1,10 @@
+// Map 020-1: Nivalis
+// This file is generated automatically. All manually changes will be removed when running the Converter.
+map: 020-1.gat
+npc: npc/020-1/KrickKrackKrock.txt
+npc: npc/020-1/_mobs.txt
+npc: npc/020-1/_warps.txt
+npc: npc/020-1/mapflags.txt
+npc: npc/020-1/rockscissor.txt
+npc: npc/020-1/soul-menhir.txt
+npc: npc/020-1/well.txt
diff --git a/world/map/npc/020-1/_mobs.txt b/world/map/npc/020-1/_mobs.txt
new file mode 100644
index 00000000..d236884e
--- /dev/null
+++ b/world/map/npc/020-1/_mobs.txt
@@ -0,0 +1,8 @@
+// This file is generated automatically. All manually changes will be removed when running the Converter.
+// Nivalis mobs
+
+
+
+020-1.gat,0,0,0 script Mob020-1 -1,{
+ end;
+}
diff --git a/world/map/npc/020-1/_warps.txt b/world/map/npc/020-1/_warps.txt
new file mode 100644
index 00000000..5bac9e69
--- /dev/null
+++ b/world/map/npc/020-1/_warps.txt
@@ -0,0 +1,12 @@
+// This file is generated automatically. All manually changes will be removed when running the Converter.
+// Nivalis warps
+
+020-1.gat,76,38 warp ToIceCave 1,-1,020-3.gat,31,28
+020-1.gat,47,48 warp ToClothesShop -1,-1,020-2.gat,25,33
+020-1.gat,66,52 warp ToHouse -1,-1,020-2.gat,72,68
+020-1.gat,70,127 warp toSnowField 2,-1,019-1.gat,70,22
+020-1.gat,64,82 warp toInn -1,-1,020-2.gat,111,31
+020-1.gat,86,46 warp toWeaponShop -1,-1,020-2.gat,32,72
+020-1.gat,56,90 warp ToPotionsShop -1,-1,020-2.gat,66,25
+020-1.gat,70,127 warp toSnowField 2,-1,019-1.gat,70,22
+020-1.gat,107,55 warp toPort -1,-1,031-1.gat,38,55
diff --git a/world/map/npc/020-1/mapflags.txt b/world/map/npc/020-1/mapflags.txt
new file mode 100644
index 00000000..203cf649
--- /dev/null
+++ b/world/map/npc/020-1/mapflags.txt
@@ -0,0 +1,2 @@
+020-1.gat mapflag no_player_drops
+020-1.gat mapflag town
diff --git a/world/map/npc/020-1/rockscissor.txt b/world/map/npc/020-1/rockscissor.txt
new file mode 100644
index 00000000..d4a9d6f6
--- /dev/null
+++ b/world/map/npc/020-1/rockscissor.txt
@@ -0,0 +1,96 @@
+// author: Lien
+// reviewed by Pjotr Orial and Jenalya
+//#####################################
+//== NPC [Player] #
+// anyone want to do a funny bet #
+// ------------------------ #
+// Rock-Paper-Scissors can be playing #
+// I hope that'll make fun #
+// ------------------------ #
+//#####################################
+
+//020-1.gat,74,78,0 script Gobmel 189, {
+ //var
+ set @NPC_name$, "[Gobmel]";
+ set @NPC_point, 0;
+ set @PC_point, 0;
+ set @gamblerun, 0;
+ setarray @CHOOSE_PC$, "Scissors", "Paper", "Rock";
+ setarray @CHOSE_ID, 0, 1, 2;
+ //0 : scissors; 1: Paper; 2: Rock;
+ // 0 cut 1 and 1 cover 3 and break 0 ...
+ //var ends
+
+ mes @NPC_name$;
+ mes "\"Hello " + strcharinfo(0) + "! Do you want to do a little party of Rock-Paper-Scissors and bet some gold?\"";
+ menu
+ "Yes, I want.", L_RPS,
+ "Well, maybe later.", -;
+ close;
+
+L_RPS:
+
+ mes @NPC_name$;
+ mes "\"How much money do you want to bet?\"";
+ input @MONEY_BET;
+ if(zeny < @MONEY_BET) goto L_poor;
+ set zeny, zeny - @MONEY_BET;
+
+L_Start:
+ if(@gamblerun == 3) goto L_finish;
+ //what chose the NPC ?
+
+ set @CHOOSE_NPCID, rand(2);
+
+ mes @NPC_name$;
+ mes "[ " + @gamblerun + "/3 ]";
+ mes "\"1... 2... 3...\"";
+ mes "";
+ mes"[chose what sign you do]";
+ mes "";
+ menu
+ @CHOOSE_PC$[0], -,
+ @CHOOSE_PC$[1], -,
+ @CHOOSE_PC$[2], -;
+
+ set @CHOSEN, @menu -1;
+ mes "Gobmal: " + @CHOOSE_PC$[@CHOOSE_NPCID];
+ mes strcharinfo(0)+" " + strcharinfo(0)+ ": " +@CHOOSE_PC$[@CHOSEN];
+ mes "";
+ if(@CHOSEN == @CHOOSE_NPCID) goto L_Start;
+ if(@CHOSEN == 0 && @CHOOSE_NPCID == 2) goto L_Lost;
+ if(@CHOSEN == 1 && @CHOOSE_NPCID == 0) goto L_Lost;
+ if(@CHOSEN == 2 && @CHOOSE_NPCID == 1) goto L_Lost;
+L_Win:
+ set @PC_point, @PC_point + 1;
+ set @gamblerun, @gamblerun + 1;
+ mes "Oh no! I have lost.";
+ mes "";
+ next;
+ goto L_Start;
+
+L_poor:
+ mes @NPC_name$;
+ mes "\"Go away from me...\"";
+ close;
+
+L_Lost:
+ set @NPC_point, @NPC_point + 1;
+ set @gamblerun, @gamblerun + 1;
+ mes "I have won!";
+ mes "";
+ next;
+ goto L_Start;
+
+L_finish:
+ if(@PC_point > @NPC_point ) goto L_Won;
+ mes @NPC_name$;
+ mes "\"Nice! I have won, give me your gp!\"";
+ close;
+L_Won:
+ mes @NPC_name$;
+ mes "\"Here is my money.\"";
+ set zeny, zeny + @MONEY_BET*2;
+ close;
+}
+
diff --git a/world/map/npc/020-1/soul-menhir.txt b/world/map/npc/020-1/soul-menhir.txt
new file mode 100644
index 00000000..f6e52869
--- /dev/null
+++ b/world/map/npc/020-1/soul-menhir.txt
@@ -0,0 +1,12 @@
+//
+
+020-1.gat,63,89,0 script Soul Menhir 144, {
+ callfunc "ClearVariables";
+ set @map$, "020-1.gat";
+ setarray @Xs, 62, 63, 64, 62, 64, 62, 63, 64;
+ setarray @Ys, 88, 88, 88, 89, 89, 90, 90, 90;
+ set @x, 0;
+ set @y, 0;
+ callfunc "SoulMenhir";
+ close;
+}
diff --git a/world/map/npc/020-1/well.txt b/world/map/npc/020-1/well.txt
new file mode 100644
index 00000000..ed025a0f
--- /dev/null
+++ b/world/map/npc/020-1/well.txt
@@ -0,0 +1,119 @@
+//############################################
+//# NPC Well & Miler
+//# Authors: Lien, PjotrOrial
+//# Review:
+//#
+//# There is someone in the well. This can be found out by throwing some stuff
+//# in there.
+//#
+//# When the npc in the well is detected they can be rescued by asking Miler
+//# for help.
+//#
+//# The experience reward given by Miler is 111 * Baselevel
+//#
+//# used variables: QUEST_Nivalis_state Nibble4
+//############################################
+
+020-1.gat,99,83,0 script #Well 127, {
+
+ set @Q_MASK, NIBBLE_4_MASK;
+ set @Q_SHIFT, NIBBLE_4_SHIFT;
+ set @Q_status, ((QUEST_Nivalis_state) & @Q_MASK) >> @Q_SHIFT;
+
+if(@Q_status == 2) goto L_Finished;
+ set @item_ID, 0;
+ setarray @quote_item$, "Yuck! Who has thrown that on me?","Ouch! Who hurts me?","White powder!? What's going on up there?","Ahw! It's raining ","","","";
+
+ mes "...";
+ menu "Throw something in the well.", L_trew,
+ "Leave it alone.", -;
+ close;
+
+L_trew:
+ mes "What do you want to throw?";
+ menu "Maggot slime", -,
+ "A raw log", -,
+ "Pile of ash", -,
+ "Bottle of water", -,
+ "Leave it alone", L_Close;
+
+ set @menu, @menu - 1;
+
+ // little IF to do @quote$ & @Item_ID
+ set @quote$, @quote_item$[@menu];
+ if(@menu == 0) set @item_ID, 505;
+ if(@menu == 1) set @item_ID, 569;
+ if(@menu == 2) set @item_ID, 701;
+ if(@menu == 3) set @item_ID, 541;
+
+ if(countitem(@item_ID) < 1) goto L_NO_ITEM;
+ if(@menu == 3) getitem 540, 1;
+ delitem @item_ID, 1;
+
+ mes "[Mysterious voice inside the well]";
+ mes "\" "+ @quote$ +"\"";
+ next;
+ menu
+ "Who are you?", -,
+ "How did you get there?", -,
+ "Do you need help?", -;
+
+ set @menu, @menu - 1;
+ if(@menu == 0) set @quote$, "I'll talk about who I am after leaving the well.";
+ if(@menu == 1) set @quote$, "Well, someone has pushed me in the well, I don't know who did that.";
+ if(@menu == 2) set @quote$, "";
+ mes "[Mysterious voice inside the well]";
+ mes "\" "+ @quote$ +". So if you can call help for me... please do so!\"";
+ set @Q_status, 1;
+ callsub S_Update_Var;
+ close;
+
+L_NO_ITEM:
+ mes "You don't have such an item... Come back when you have it.";
+ close;
+
+L_Finished:
+ mes "This is a well.";
+ close;
+
+L_Close:
+ close;
+
+S_Update_Var:
+ set QUEST_Nivalis_state,
+ (QUEST_Nivalis_state & ~(@Q_MASK)
+ | (@Q_status << @Q_SHIFT));
+ return;
+}
+
+020-2.gat,100,28,0 script Miler 100, {
+ set @Q_MASK, NIBBLE_4_MASK;
+ set @Q_SHIFT, NIBBLE_4_SHIFT;
+ set @Q_status, ((QUEST_Nivalis_state) & @Q_MASK) >> @Q_SHIFT;
+
+ mes "[Miler]";
+ mes "\"Hello!\"";
+ if(@Q_status == 2) close;
+ if(@Q_status == 1)
+ menu
+ "Hello.", -,
+ "Hello, Can you help me?", L_HELP;
+ close;
+L_HELP:
+ mes "[Miler]";
+ mes "\"What's the problem?\"";
+ menu "Someone has fallen in the well.", -;
+ mes "[Miler]";
+ mes "\"Ho! I'll help him!\"";
+ getexp (BaseLevel * 111), 0;
+ set @Q_status, 2;
+ callsub S_Update_Var;
+ close;
+
+S_Update_Var:
+ set QUEST_Nivalis_state,
+ (QUEST_Nivalis_state & ~(@Q_MASK)
+ | (@Q_status << @Q_SHIFT));
+ return;
+}
+