From 91e26c617e764c87f1a9def277d0f463d01bb673 Mon Sep 17 00:00:00 2001 From: Lupus Date: Fri, 20 Oct 2006 15:46:07 +0000 Subject: tested and fixed novice Red Potion exchanger git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@9027 54d463be-8e91-2dee-dedb-b68131a5f0ec --- npc/merchants/novice_exchange.txt | 46 ++++++++++++++++++++++----------------- npc/scripts_athena.conf | 3 +-- 2 files changed, 27 insertions(+), 22 deletions(-) (limited to 'npc') diff --git a/npc/merchants/novice_exchange.txt b/npc/merchants/novice_exchange.txt index 8e7bcfadf..750d88606 100644 --- a/npc/merchants/novice_exchange.txt +++ b/npc/merchants/novice_exchange.txt @@ -3,7 +3,7 @@ //===== By: ================================================== //= ???, eAthena Team //===== Current Version: ===================================== -//= 1.1 +//= 1.1a //===== Compatible With: ===================================== //= eAthena 1.0+ //===== Description: ========================================= @@ -20,47 +20,50 @@ function script F_NMerch { close; } mes "Good day!"; - mes "Do you have any collection items such as "+getitemname(getarg(1))+"s or "+getitemname(getarg(3))+"s ?"; + mes "Do you have any collection items such as "+getitemname(getarg(1))+" or "+getitemname(getarg(3))+"?"; if(getarg(5)) - mes "...how about "+getitemname(getarg(5))+"-s ?.."; + mes "...how about "+getitemname(getarg(5))+"?.."; mes "Oh, yeah, I need those for something."; next; mes "["+getarg(0)+"]"; mes "Of course I am not asking you to give those for free!"; - mes "How about...if I give you 1 Red"; - mes "Potion for "+getarg(2)+" "+getitemname(getarg(1))+"s or "+getarg(4)+" "+getitemname(getarg(3))+"s ?"; + mes "How about... if I give you 1 Red"; + mes "Potion for "+getarg(2)+" "+getitemname(getarg(1))+" or "+getarg(4)+" "+getitemname(getarg(3))+"?"; if(getarg(5)) - mes "or "+getarg(6)+" "+getitemname(getarg(5))+" ?"; + mes "Or "+getarg(6)+" "+getitemname(getarg(5))+"?"; next; switch (select("Sure!:Think you're ripping me off...:No, thanks")) { case 1: mes "["+getarg(0)+"]"; - mes "So which item do you bring me ?"; - mes ""+getitemname(getarg(1))+"-s? "+getitemname(getarg(3))+"-s ?"; - mes "Or "+getitemname(getarg(5))+"-s?"; + mes "So which item do you bring me?"; + mes ""+getitemname(getarg(1))+"? "+getitemname(getarg(3))+"?"; + if(getarg(5)) + mes "Or "+getitemname(getarg(5))+"?"; next; if(getarg(5)) - set @i,select(""+getitemname(getarg(1))+"",""+getitemname(getarg(3))+"",""+getitemname(getarg(5))+"","Cancel"); + set @i,select(""+getitemname(getarg(1))+"",""+getitemname(getarg(3))+"",""+getitemname(getarg(5))+"","Cancel")-1; else - set @i,select(""+getitemname(getarg(1))+"",""+getitemname(getarg(3))+"","Cancel"); + set @i,select(""+getitemname(getarg(1))+"",""+getitemname(getarg(3))+"","Cancel")-1; if(@i==4 || (@i==3 && !getarg(5))) { mes "["+getarg(0)+"]"; mes "Sure, no problem."; close; } - set @have,countitem(getarg(1+@i*2)); - if(@have < getarg(2+@i*2)) { + set @item,getarg(1+@i*2); + set @amount,getarg(2+@i*2); + set @have,countitem(@item); + if(@have < @amount) { mes "["+getarg(0)+"]"; mes "Hey, where are all those"; - mes getitemname(getarg(1+@i*2))+"-s you promised?"; + mes getitemname(@item)+" you promised?"; close; } mes "["+getarg(0)+"]"; mes "Okay, let me take a look at the stuff you brought."; next; - set @max,@have / getarg(2+@i*2); + set @max,@have / @amount; mes "["+getarg(0)+"]"; - mes "You have total "+@have+" "+getitemname(getarg(1+@i*2))+"-s..."; + mes "You have total "+@have+" "+getitemname(@item)+"..."; mes "I can give you"; mes "total "+@max+" Red Potion for those."; next; @@ -75,7 +78,7 @@ function script F_NMerch { } mes "["+getarg(0)+"]"; mes "You know the exact number of Red Potions"; - mes "you can receive for "+getitemname(getarg(1+@i*2))+"-s, don't you?"; + mes "you can receive for "+getitemname(@item)+", don't you?"; next; mes "["+getarg(0)+"]"; mes "You can get Red Potions"; @@ -89,8 +92,8 @@ function script F_NMerch { mes "["+getarg(0)+"]"; mes "Uh oh, the number you entered"; mes "seemed incorrect."; - mes "You'd better check how many red"; - mes "potions you can get."; + mes "You'd better check how many Red"; + mes "Potions you can get."; continue; } break; @@ -110,7 +113,7 @@ function script F_NMerch { mes "potions you can get."; close; } - delitem getarg(1+@i*2),getarg(2+@i*2)*@val; + delitem @item,@amount*@val; getitem 501,@val; mes "There you go!"; mes "Thanks, it was a good deal."; @@ -119,6 +122,8 @@ function script F_NMerch { mes "["+getarg(0)+"]"; mes "Did you say I am ripping you off?!"; mes "You got to know how ignorant that comment was!"; + next; + mes "["+getarg(0)+"]"; mes "When you check the price of each item,"; mes "I am doing a losing business."; mes "If you don't want to do then, fine!"; @@ -138,6 +143,7 @@ prontera.gat,123,102,5 script Merchant#1 85,{ geffen.gat,173,88,5 script Merchant#2 85,{ callfunc "F_NMerch","Merchant",935,5,915,6,909,10; } + morocc.gat,180,259,3 script Merchant#3 85,{ callfunc "F_NMerch","Merchant",935,5,916,7,909,10; } diff --git a/npc/scripts_athena.conf b/npc/scripts_athena.conf index a964cc76e..dc05590ce 100644 --- a/npc/scripts_athena.conf +++ b/npc/scripts_athena.conf @@ -56,8 +56,7 @@ npc: npc/merchants/shuriken_maker.txt npc: npc/merchants/socket_enchant.txt npc: npc/merchants/ammo_boxes.txt npc: npc/merchants/ammo_dealer.txt -//Not properly tested yet -//npc: npc/merchants/novice_exchange.txt +npc: npc/merchants/novice_exchange.txt // -------------------------------------------------------------- // -------------------------- Airport --------------------------- npc: npc/airports/airships.txt -- cgit v1.2.3-70-g09d2