Notice: Any messages purporting to come from this site telling you that your password has expired, or that you need to verify your details, confirm your email, resolve issues, making threats, or asking for money, are
spam. We do not email users with any such messages. If you have lost your password you can obtain a new one by using the
password reset link.
Due to spam on this forum, all posts now need moderator approval.
Entire forum
➜ MUSHclient
➜ VBscript
➜ Goto Coordinates
It is now over 60 days since the last post. This thread is closed.
Refresh page
Posted by
| Jcet
USA (25 posts) Bio
|
Date
| Tue 23 Apr 2002 03:39 PM (UTC) |
Message
| First of all, there's coords like 123.-24(Location: * *.*)
3rd and 4th are the coord wilcards
1st one really has no purpose just say northwest, northeast etc
Sub SetLoc (TriggerName, TriggerLine, AWC)
world.SetVariable "Loca", AWC (2)
world.SetVariable "Locb", AWC (3)
End Sub
That code is set on the location trigger to make the loca and locb
(hit like goto 23.87)
Sub GotoCoords (AliasName, AliasLine, AWC)
dim DesA
dim DesB
DesA = AWC(1)
DesB = AWC(2)
' E +, W -, N -, S
if world.getvariable ("Loca") > DesA then
world.send "west"
elseif world.getvariable ("Loca") < DesA then
world.send "east"
elseif world.getvariable ("Locb") > DesB then
world.send "north"
elseif world.getvariable ("Locb") < DesB then
world.send "south"
end if
end sub
thats the code, all i really need is to put a loop in it, so when Loca reaches DesA to stop, and Locb reaches DesB of course, stop.
not sure exactly how and where to put a loop in there. |
-Jcet
See no good, hear no good, be no good, kill all good! | Top |
|
Posted by
| Nick Gammon
Australia (23,133 posts) Bio
Forum Administrator |
Date
| Reply #1 on Tue 23 Apr 2002 09:55 PM (UTC) |
Message
| Do you mean to keep walking until you get there? In that case you don't really want a loop, you want to keep doing it until you are there.
There was a lengthy post a while back about a "wilderness walker" or something like that, that did something very similar. |
- Nick Gammon
www.gammon.com.au, www.mushclient.com | Top |
|
The dates and times for posts above are shown in Universal Co-ordinated Time (UTC).
To show them in your local time you can join the forum, and then set the 'time correction' field in your profile to the number of hours difference between your location and UTC time.
12,365 views.
It is now over 60 days since the last post. This thread is closed.
Refresh page
top