summaryrefslogtreecommitdiff
path: root/npc/012-1
diff options
context:
space:
mode:
authorJesusaves <cpntb1@ymail.com>2018-06-02 21:41:28 -0300
committerJesusaves <cpntb1@ymail.com>2018-06-02 21:41:28 -0300
commite743e6ebd5b7e079da83713305cd90b8bee78588 (patch)
treea324d66efb7022ca3395104b84409f1380509ff4 /npc/012-1
parent66dde6aea61038694e414d818fe3288495bb0326 (diff)
downloadserverdata-e743e6ebd5b7e079da83713305cd90b8bee78588.tar.gz
serverdata-e743e6ebd5b7e079da83713305cd90b8bee78588.tar.bz2
serverdata-e743e6ebd5b7e079da83713305cd90b8bee78588.tar.xz
serverdata-e743e6ebd5b7e079da83713305cd90b8bee78588.zip
Scope error
Diffstat (limited to 'npc/012-1')
-rw-r--r--npc/012-1/gwendolyn.txt35
1 files changed, 19 insertions, 16 deletions
diff --git a/npc/012-1/gwendolyn.txt b/npc/012-1/gwendolyn.txt
index efb557c13..e6138cbbd 100644
--- a/npc/012-1/gwendolyn.txt
+++ b/npc/012-1/gwendolyn.txt
@@ -206,10 +206,10 @@ L_Game:
//here is where the wind comes from, that's why it is the opposite.
setarray .@wd$,"error1, please report", l("southeast"), l("south"), l("southwest"), l("east"),
"error2, please report", l("west"), l("northeast"), l("north"), l("northwest");
- .@paramX = .@wdX;
- .@paramY = .@wdY;
+ @paramX = .@wdX;
+ @paramY = .@wdY;
callsub S_getDirection;
- .@wdIndex = .@returnIndex;
+ .@wdIndex = @returnIndex;
.@wp_sq = (.@wdX * .@wdX) + (.@wdY * .@wdY);
@@ -365,10 +365,10 @@ L_Power:
setarray .@target_direction$, "error3, please report", l("left above"), l("above"), l("right above"), l("left"),
"error4, please report", l("right"), l("lower left"), l("below"), l("lower right");
- .@paramX = .@pointX;
- .@paramY = .@pointY;
+ @paramX = .@pointX;
+ @paramY = .@pointY;
callsub S_getDirection;
- .@targethit = .@returnIndex;
+ .@targethit = @returnIndex;
//now check how close
//get the distance squared:
@@ -515,36 +515,39 @@ L_Arrows:
goto L_Close;
L_Close:
+ @paramX=0;
+ @paramY=0;
+ @returnIndex=0;
closedialog;
goodbye;
close;
S_getDirection:
- // get .@paramX .@paramY as parameters
+ // get @paramX @paramY as parameters
// returns an index where these parameters are in relation to origin
// 123
// 456 whereas 5 is the origin. (3,6,9 there is paramX>0); (1,2,3 there is paramY>0)
// 789
//first check the quadrants and after check more precisely
- if(.@paramX>0 && .@paramY>0) .@returnIndex = 3;
- if(.@paramX>0 && .@paramY<0) .@returnIndex = 9;
- if(.@paramX<0 && .@paramY>0) .@returnIndex = 1;
- if(.@paramX<0 && .@paramY<0) .@returnIndex = 7;
+ if(@paramX>0 && @paramY>0) @returnIndex = 3;
+ if(@paramX>0 && @paramY<0) @returnIndex = 9;
+ if(@paramX<0 && @paramY>0) @returnIndex = 1;
+ if(@paramX<0 && @paramY<0) @returnIndex = 7;
//straight left
- if ( (.@paramX < 0) && (.@paramY >= .@paramX/2) && (-.@paramY >= .@paramX/2) ) .@returnIndex = 4;
+ if ( (@paramX < 0) && (@paramY >= @paramX/2) && (-@paramY >= @paramX/2) ) @returnIndex = 4;
//straight right
- if ( (.@paramX > 0) && (.@paramY <= .@paramX/2) && (-.@paramY <= .@paramX/2) ) .@returnIndex = 6;
+ if ( (@paramX > 0) && (@paramY <= @paramX/2) && (-@paramY <= @paramX/2) ) @returnIndex = 6;
//straight above
- if ( (.@paramY > 0) && (.@paramX <= .@paramY/2) && (-.@paramX <= .@paramY/2) ) .@returnIndex = 2;
+ if ( (@paramY > 0) && (@paramX <= @paramY/2) && (-@paramX <= @paramY/2) ) @returnIndex = 2;
//straight below
- if ( (.@paramY < 0) && (.@paramX >= .@paramY/2) && (-.@paramX >= .@paramY/2) ) .@returnIndex = 8;
+ if ( (@paramY < 0) && (@paramX >= @paramY/2) && (-@paramX >= @paramY/2) ) @returnIndex = 8;
//check the origin, because the origin is found by the "straight" lines as well. (should not, but is.. maybe a bug?)
- if( .@paramX==0 && .@paramY==0 ) .@returnIndex = 5;
+ if( @paramX==0 && @paramY==0 ) @returnIndex = 5;
return;
OnInit: