Hi, not sure if this is how i go about it but I need a script to search uncharted space in a swr mud. Basicly I want to put in two sets of coords into the script ie '100 100' and '200 200' and have it search everywhere in between one by one. The commands would be "Calc 'x y'" then the out put would be
"The ship lurches slightly as it comes out of hyperspace."
After that message id like it to move on to the next sector. If possible id like it to go from '100 100' to '100 101' then '100 102' and so on. And when it reaches 100 200 it would roll over to 101 100 and so on again. If anyone could help me out that would be wonderful. Thanks a lot in advance
Also, if no one is able to write one for me. Could someone direct me to a site that would teach me how to write the script. I looked over a script that Flannel wrote for the same mud, but it all looks like jibberish to me. So any guideance would be very nice. Thanks.
Alright, I tried using the example scripts posted on this site. But it says "You have not specified a file name:
The Alias (OnTeleport)subroutine "OnTeleport" could not be found"
So I dont know what i did wrong any suggestions *sigh* its been a long day heh
Alright, after thinking about the problem for a while, ive figured out I can do it with triggers. But I dont know the syntax. It would be something like. (match this)
The ship lurches slightly as it comes out of hyperspace.
then send NAV then the read out from NAV is like.
Readout for BR-23 Public Transport BC120:
---------------------------------------------------------
Current Coordinates: 3338 -6445 -9670
Current Heading: 1 1 -1
Current Speed: 75/75
--Location-----------------------------------------------
Current System: Roche Sector
Current System X/Y: (-55, -6)
--Hyperspace---------------------------------------------
(No hyperspace trajectory is locked right now)
But i only need the Current System X/Y: (-55, -6)
from there I would do either +1 or -1 and there is my problem. How do I tell the trigger to add one to a number it would be like Current System X/Y: (*, *)
calc '%1 %2+1' or minus if i want to go backwards, anyway any ideas?
Well, you seem to be confused about how variables work here for one:
dim num
num = ("%2") + 1
creates a *script* variable. Setvariable and getvariable are used with *Mushclient* variables, which is one reason why:
send "calc '%1 getvariable("num")'
won't work. The other reason is that this is *not* correct VBScript syntax. You left off the final ", and getvarialble, even if it worked, can't happen 'inside' the send command. This would be correct:
Sub completejump(Thename, theoutput, thewildcards)
world.send "look"
world.send "navstat"
x1=world.getvariable ("x1")
x1o=world.getvariable ("x1o")
x2=world.getvariable ("x2")
y1=world.getvariable ("y1")
y1o=world.getvariable ("y1o")
y2=world.getvariable ("y2")
If x1 = x1o Then
Call searchy
else
Call searchx
End If
End Sub