From 62f0c65cd908cf17c092a33fbfa94a12d9b30af1 Mon Sep 17 00:00:00 2001 From: L0ne_W0lf Date: Thu, 28 Feb 2008 05:15:27 +0000 Subject: Implemented several "checkweight" NPC merchants. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@12257 54d463be-8e91-2dee-dedb-b68131a5f0ec --- npc/merchants/milk_trader.txt | 29 +++++++++++++---------------- 1 file changed, 13 insertions(+), 16 deletions(-) (limited to 'npc/merchants/milk_trader.txt') diff --git a/npc/merchants/milk_trader.txt b/npc/merchants/milk_trader.txt index 9e3472843..f960ee284 100644 --- a/npc/merchants/milk_trader.txt +++ b/npc/merchants/milk_trader.txt @@ -3,33 +3,31 @@ //===== By: ================================================== //= kobra_k88; L0ne_W0lf //===== Current Version: ===================================== -//= 1.3 +//= 1.4 //===== Compatible With: ===================================== //= eAthena SVN //===== Description: ========================================= //= [Aegis Conversion] -//= trades bottles for milk +//= Trades bottles for milk //===== Additional Comments: ================================= //= Fully working //= 1.1 Negative input bug fixed [Lupus] //= 1.2 Raised the price to close zeny exploit [Lupus] //= 1.2a Switched to Lupus's "loopless" technique.[kobra_k88] //= 1.3 Rescripted to Aegis 10.3 standards. [L0ne_W0lf] +//= 1.4 Implemented checkweight. [L0ne_W0lf] //============================================================ prontera,73,140,0 script Milk Vendor 86,{ - //Supposedly this is to make sure the character - //has room to accept items in their inventory. - //var max_max_c = CheckMaxCount 1201 1 - //if max_max_c == 1 - // mes "^3355FFJust a minute!"; - // mes "I can't offer any of my"; - // mes "services to you because"; - // mes "you're carrying too much"; - // mes "stuff. Put your extra items in"; - // mes "Kafra Storage and come again~"; - // close; - //} + if (checkweight(1201,1) == 0) { + mes "^3355FFJust a minute!"; + mes "I can't offer any of my"; + mes "services to you because"; + mes "you're carrying too much"; + mes "stuff. Put your extra items in"; + mes "Kafra Storage and come again~"; + close; + } mes "[Milk Vendor]"; mes "Hey, hey..."; mes "If you bring me"; @@ -52,7 +50,6 @@ prontera,73,140,0 script Milk Vendor 86,{ set .@bottles,countitem(713); set .@total_weight,.@bottles * 50; set .@total_cost,.@bottles * 15; - set .@now_weight,maxweight-weight; if (zeny < .@Total_cost) { mes "[Milk Vendor]"; mes "Oh, whoa~!"; @@ -63,7 +60,7 @@ prontera,73,140,0 script Milk Vendor 86,{ mes "at least " + gap + " zeny."; close; } - if (.@now_weight < .@total_weight) { + if ((maxweight-weight) < .@total_weight) { mes "[Milk Vendor]"; mes "Hmm..."; mes "Would you make"; -- cgit v1.2.3-70-g09d2