summaryrefslogtreecommitdiff
path: root/npc/020-1_Nivalis
diff options
context:
space:
mode:
Diffstat (limited to 'npc/020-1_Nivalis')
-rw-r--r--npc/020-1_Nivalis/KrickKrackKrock.txt137
-rw-r--r--npc/020-1_Nivalis/_import.txt1
2 files changed, 138 insertions, 0 deletions
diff --git a/npc/020-1_Nivalis/KrickKrackKrock.txt b/npc/020-1_Nivalis/KrickKrackKrock.txt
new file mode 100644
index 00000000..79cb63fc
--- /dev/null
+++ b/npc/020-1_Nivalis/KrickKrackKrock.txt
@@ -0,0 +1,137 @@
+//###################################
+//playing game #
+// -Kric Krack Krock #
+// -if you said the same as NPC #
+// -he give you a redward depending #
+//-of you're betting #
+//###################################
+// var of this game #
+// =======================#
+// NPCNAME | name of the NPC #
+// ITEM_RAND | item you can get #
+//ITEM_HEALTH| Potion you can get #
+// kRICK |array with the tree #
+// BET | the betting of PC #
+// =======================#
+//###################################
+
+
+
+009-1.gat,82,82,0 script Criker 127, {
+
+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) + ", you want play Krick-Krack-Krock\"";
+ 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 you want to bet with me ?\"";
+ 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 "\"well, to bad We were not lucky !\"";
+ close;
+L_Work:
+ mes @NPC_NAME$;
+ mes "\"wow that has Work ... what present you want ?\"";
+ menu
+ "Money !", L_Money,
+ "Item !", L_Item,
+ "Health !", L_Health_item;
+ close;
+
+L_Money:
+ mes @NPC_NAME$;
+ mes "\"Here is your money\"";
+ set zeny, zeny + (@BET*2);
+ close;
+L_Item:
+//item
+
+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
+
+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_poor:
+ mes @NPC_NAME$;
+ mes "\"Erm... if you want to play you HAVE to bet, and you can't bet "+ @BET +" gold piece you need to bet something more of 50gp .\"";
+ close;
+L_Too_rich:
+ mes @NPC_NAME$;
+ mes "\"Mh... you have bet too for me. How I'll get a present who is "+ @BET +" ?\"";
+ close;
+L_No_Money:
+ mes @NPC_NAME$;
+ mes "\"well you don't have "+ @BET +" money\"";
+ close;
+L_info:
+ mes @NPC_NAME$;
+ mes "\"Well, if you want to do Krick Krack Krock with me you need to bet some money if you say the same thing like me (Krack, Krick or Krock) you can win the double of your money you have bet or an item depend of what you bet too. \"";
+ goto L_Main;
+
+
+//Do by :
+//=========================================
+// __ _ _____ _ _ ==
+// | | |_| | ____| | \ | | ==
+// | | _ | |___ | \ | | ==
+// | |__ | | | |___ | |\ \_| | ==
+// |____| |_| |_____| |_| \____| ==
+// ==
+//=========================================
+}
+
diff --git a/npc/020-1_Nivalis/_import.txt b/npc/020-1_Nivalis/_import.txt
index 7dd9e29a..73719acc 100644
--- a/npc/020-1_Nivalis/_import.txt
+++ b/npc/020-1_Nivalis/_import.txt
@@ -3,3 +3,4 @@ npc: npc/020-1_Nivalis/_mobs.txt
npc: npc/020-1_Nivalis/_warps.txt
npc: npc/020-1_Nivalis/mapflags.txt
npc: npc/020-1_Nivalis/soul-menhir.txt
+npc: npc/020-1_Nivalis/KrickKrackKrock.txt