From 14183c51fbdf2a7e068a2cd15ee78f4abc051179 Mon Sep 17 00:00:00 2001 From: Jesusaves Date: Sat, 1 Jun 2019 21:37:06 -0300 Subject: As we use goto() system, we can and should use the lowest scope for @var. --- npc/003-1/ishi.txt | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) (limited to 'npc/003-1/ishi.txt') diff --git a/npc/003-1/ishi.txt b/npc/003-1/ishi.txt index 48ed76a1a..a99a7674a 100644 --- a/npc/003-1/ishi.txt +++ b/npc/003-1/ishi.txt @@ -68,27 +68,27 @@ rif(Mobpt >= (@mpq_cost)*11,l("Gimme as many as I deserve!")), -1, l("Sorry, I have to go now."), 0; - @var=@menuret; + .@var=@menuret; // Special cases - if (@var < 1) + if (.@var < 1) goto L_Give_all; - if (!@var) + if (!.@var) goto L_Close; goto L_Items; L_Close: - @var=0; + .@var=0; closedialog; goodbye; close; L_Items: //debugmes "Reaching item loop"; - for (.@i = 0; .@i < @var; .@i ++) + for (.@i = 0; .@i < .@var; .@i ++) { - //debugmes "Items: "+str(@var); + //debugmes "Items: "+str(.@var); .@lucked=0; .@reward=0; @@ -155,9 +155,9 @@ L_Continue: L_Give_all: - @var = Mobpt / @mpq_cost; - if (@var > 50) { // limit to avoid lag server. Probably a bad idea. - @var = 50; + .@var = Mobpt / @mpq_cost; + if (.@var > 50) { // limit to avoid lag server. Probably a bad idea. + .@var = 50; mes l("You have too much points. I can't allow you to take all at once right now. I'll try to give you 50, and you come back later!"); next; } -- cgit v1.2.3-60-g2f50