Fixed item select in Novice Exchanger

git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@9157 54d463be-8e91-2dee-dedb-b68131a5f0ec
This commit is contained in:
Lupus 2006-11-06 19:46:53 +00:00
parent 91b73455dc
commit 7cced33d9d
2 changed files with 7 additions and 4 deletions

View File

@ -33,6 +33,8 @@ KarLaeda
Date Added Date Added
====== ======
11/06
* Fixed item select in Novice Exchanger [KarLaeda]
11/05 11/05
* Fixed extra EOL in jro spawn [KarLaeda] * Fixed extra EOL in jro spawn [KarLaeda]
* Fixed reward of gunslinger job quest [Playtester] * Fixed reward of gunslinger job quest [Playtester]

View File

@ -11,6 +11,7 @@
//= Official NPC. //= Official NPC.
//===== Additional Comments: ================================= //===== Additional Comments: =================================
//= 1.1 Made it as a function. U can add your own Merchs [Lupus] //= 1.1 Made it as a function. U can add your own Merchs [Lupus]
//= 1.1a Fixed item select [KarLaeda]
//============================================================ //============================================================
function script F_NMerch { function script F_NMerch {
@ -41,16 +42,16 @@ function script F_NMerch {
mes "Or "+getitemname(getarg(5))+"?"; mes "Or "+getitemname(getarg(5))+"?";
next; next;
if(getarg(5)) if(getarg(5))
set @i,select(""+getitemname(getarg(1))+"",""+getitemname(getarg(3))+"",""+getitemname(getarg(5))+"","Cancel")-1; set @i,select(""+getitemname(getarg(1))+"",""+getitemname(getarg(3))+"",""+getitemname(getarg(5))+"","Cancel");
else else
set @i,select(""+getitemname(getarg(1))+"",""+getitemname(getarg(3))+"","Cancel")-1; set @i,select(""+getitemname(getarg(1))+"",""+getitemname(getarg(3))+"","Cancel");
if(@i==4 || (@i==3 && !getarg(5))) { if(@i==4 || (@i==3 && !getarg(5))) {
mes "["+getarg(0)+"]"; mes "["+getarg(0)+"]";
mes "Sure, no problem."; mes "Sure, no problem.";
close; close;
} }
set @item,getarg(1+@i*2); set @item,getarg(@i*2-1);
set @amount,getarg(2+@i*2); set @amount,getarg(@i*2);
set @have,countitem(@item); set @have,countitem(@item);
if(@have < @amount) { if(@have < @amount) {
mes "["+getarg(0)+"]"; mes "["+getarg(0)+"]";