From c8486b73d0a033293ab68b438e02301949f77376 Mon Sep 17 00:00:00 2001 From: Stefan Beller Date: Sun, 5 Dec 2010 12:42:08 +0100 Subject: new npc in nivalis removed mapflags tested baktar KrickKrackKrock Criker Miler and the well shop does not sell forest bow but a desertbow --- npc/020-1_Nivalis/KrickKrackKrock.txt | 72 +++++++-------------- npc/020-1_Nivalis/_import.txt | 2 + npc/020-1_Nivalis/mapflags.txt | 9 +-- npc/020-1_Nivalis/rockscissor.txt | 89 ++++++++++++++++++++++++++ npc/020-1_Nivalis/well.txt | 117 ++++++++++++++++++++++++++++++++++ 5 files changed, 232 insertions(+), 57 deletions(-) mode change 100644 => 100755 npc/020-1_Nivalis/KrickKrackKrock.txt create mode 100755 npc/020-1_Nivalis/rockscissor.txt create mode 100755 npc/020-1_Nivalis/well.txt (limited to 'npc/020-1_Nivalis') diff --git a/npc/020-1_Nivalis/KrickKrackKrock.txt b/npc/020-1_Nivalis/KrickKrackKrock.txt old mode 100644 new mode 100755 index 79cb63fc..e2f4746c --- a/npc/020-1_Nivalis/KrickKrackKrock.txt +++ b/npc/020-1_Nivalis/KrickKrackKrock.txt @@ -1,23 +1,6 @@ -//################################### -//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, { +// author: Lien +// reviewed by Pjotr Orial and Jenalya +020-1.gat,82,82,0 script Criker 183, { L_Main: //Var @@ -32,14 +15,14 @@ L_Main: //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", -; + mes "\"Hello " + strcharinfo(0) + ", do you want to 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 ?\""; + mes "\"Well, how many do you want to bet?\""; input @BET; if(@BET < 50 ) goto L_poor; if(@BET > 2000) goto L_Too_rich; @@ -49,33 +32,33 @@ L_Start: set @NPC_KRICK, rand(2); - mes "(Choose Krick, Krack or Krock)"; + mes "\"Choose Krick, Krack or Krock.\""; menu @KRICK$[0], -, @KRICK$[1], -, @KRICK$[2], -; -//menu = min 1 & not 0 so I change it + //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 !\""; + mes "\"Too bad! You were not lucky!\""; close; L_Work: mes @NPC_NAME$; - mes "\"wow that has Work ... what present you want ?\""; + mes "\"Wow amazing... What kind of present do you want?\""; menu - "Money !", L_Money, - "Item !", L_Item, - "Health !", L_Health_item; + "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\""; + mes "\"Here is your money.\""; set zeny, zeny + (@BET*2); close; L_Item: @@ -89,7 +72,7 @@ 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 !\""; + mes "\"Here it is !\""; close; L_Health_item: @@ -102,36 +85,25 @@ 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 !\""; + 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 .\""; + 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... you have bet too for me. How I'll get a present who is "+ @BET +" ?\""; + mes "\"Mh... I have to bet too. How I'll get a present which is "+ @BET +"? No, that's too much.\""; close; L_No_Money: mes @NPC_NAME$; - mes "\"well you don't have "+ @BET +" money\""; + mes "\"Oh? You don't have "+ @BET +" gold pieces.\""; 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. \""; + 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 the double of your money or an item worth of what you bet. \""; goto L_Main; - - -//Do by : -//========================================= -// __ _ _____ _ _ == -// | | |_| | ____| | \ | | == -// | | _ | |___ | \ | | == -// | |__ | | | |___ | |\ \_| | == -// |____| |_| |_____| |_| \____| == -// == -//========================================= } diff --git a/npc/020-1_Nivalis/_import.txt b/npc/020-1_Nivalis/_import.txt index 8da91301..d76777a4 100644 --- a/npc/020-1_Nivalis/_import.txt +++ b/npc/020-1_Nivalis/_import.txt @@ -1,6 +1,8 @@ map: 020-1.gat npc: npc/020-1_Nivalis/KrickKrackKrock.txt +npc: npc/020-1_Nivalis/rockscissor.txt 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/well.txt diff --git a/npc/020-1_Nivalis/mapflags.txt b/npc/020-1_Nivalis/mapflags.txt index b96ea2f6..203cf649 100644 --- a/npc/020-1_Nivalis/mapflags.txt +++ b/npc/020-1_Nivalis/mapflags.txt @@ -1,7 +1,2 @@ -// - -019-1.gat mapflag nosave 009-1,54,39; -020-1.gat mapflag nosave 009-1,54,39; -020-2.gat mapflag nosave 009-1,54,39; -020-3.gat mapflag nosave 009-1,54,39; -020-4.gat mapflag nosave 009-1,54,39; +020-1.gat mapflag no_player_drops +020-1.gat mapflag town diff --git a/npc/020-1_Nivalis/rockscissor.txt b/npc/020-1_Nivalis/rockscissor.txt new file mode 100755 index 00000000..db813518 --- /dev/null +++ b/npc/020-1_Nivalis/rockscissor.txt @@ -0,0 +1,89 @@ +// 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 183, { + //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"[chose what sign you do]"; + menu + @CHOOSE_PC$[0], -, + @CHOOSE_PC$[1], -, + @CHOOSE_PC$[2], -; + + set @CHOSEN, @menu -1; + mes @CHOOSE_PC$[@CHOOSE_NPCID]; + mes strcharinfo(0)+" " + strcharinfo(0)+ ":" +@CHOOSE_PC$[@CHOSEN]; + 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."; + 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!"; + goto L_Start; + +L_finish: + if(@PC_point > @NPC_point ) goto L_Won; + mes @NPC_name$; + mes "\"Nice ! I have won, give your gp!\""; + close; +L_Won: + mes @NPC_name$; + mes "\"Here is my money\""; + set zeny, zeny + @MONEY_BET*2; + close; +} + diff --git a/npc/020-1_Nivalis/well.txt b/npc/020-1_Nivalis/well.txt new file mode 100755 index 00000000..4c200be8 --- /dev/null +++ b/npc/020-1_Nivalis/well.txt @@ -0,0 +1,117 @@ +//############################################ +//# 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; +} + -- cgit v1.2.3-70-g09d2