Alright, I got a script but for some reason the triggers dont work :/ any suggestions?
<?xml version="1.0" encoding="iso-8859-1" ?>
<!DOCTYPE muclient (View Source for full doctype...)>
- <!-- Saved on Monday, December 12, 2005, 7:00 PM
-->
- <!-- MuClient version 3.70
-->
- <!-- Plugin "systemsearch" generated by Plugin Wizard
-->
- <muclient>
- <plugin name="systemsearch" author="Rojan QDel" id="4e6527d4dd49421b577e993b" language="VBscript" purpose="Search for starsystems in LOTJ" save_state="y" date_written="2005-12-12 18:59:46" requires="3.65" version="1.0">
- <description trim="y">
- <![CDATA[
Made by Rojan QDel
rojanqdel@verizon.net
AIM: RojanQDel
]]>
</description>
</plugin>
- <!-- Get our standard constants
-->
<include name="constants.vbs" />
- <!-- Triggers
-->
- <triggers>
<trigger enabled="y" group="search" match="Hyperjump complete." name="search" script="completejump" sequence="100" />
</triggers>
- <!-- Aliases
-->
- <aliases>
<alias script="startsearch" match="startsearch" enabled="y" group="search" sequence="100" />
<alias script="stopsearch" match="stopsearch" enabled="y" group="search" sequence="100" />
<alias name="setfirst" script="setfirst" match="setfirst * *" enabled="y" group="search" sequence="100" />
<alias name="setsecond" script="setsecond" match="setsecond * *" enabled="y" group="search" sequence="100" />
</aliases>
- <!-- Variables
-->
- <variables>
<variable name="x1">0</variable>
<variable name="x2">0</variable>
<variable name="y1">0</variable>
<variable name="y2">0</variable>
<variable name="x1o">0</variable>
<variable name="y1o">0</variable>
</variables>
- <!-- Script
-->
- <script>
- <![CDATA[
Dim x1
Dim x1o
Dim x2
Dim y1
Dim y1o
Dim y2
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
Sub setfirst(Thename, theoutput, thewildcards)
x1o = GetAliasWildcard ("setfirst", "1")
world.setvariable "x1o", x1o
world.setvariable "x1", x1
y1o = GetAliasWildcard ("setfirst", "2")
world.setvariable "y1o", y1o
world.setvariable "y1", y1
world.note "Starting coordinates are: '" & x1o & " " & y1o & "'"
End Sub
Sub setsecond(Thename, theoutput, thewildcards)
x2 = GetAliasWildcard ("setsecond", "1")
world.setvariable "x2", x2
y2 = GetAliasWildcard ("setsecond", "2")
world.setvariable "y2", y2
world.note "Ending coordinates are: '" & x2 & " " & y2 & "'"
End Sub
Sub startsearch (Thename, theoutput, thewildcards)
world.EnableTriggerGroup "search", 1
world.note "Enabled Search Triggers!"
Call searchx
End Sub
Sub searchx ()
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 <> x2 Then
If x1 < 0 Then
x1 = x1 - 1
Else
x1 = x1 + 1
End if
world.setvariable "x1", x1
world.send "calc '" & x1 & " " & y1o & "'"
Else
x1 = x1o
world.setvariable "x1", x1
Call searchy
End If
End Sub
Sub searchy ()
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 y1 <> y2 Then
If y1 < 0 Then
y1 = y1 - 1
Else
y1 = y1 + 1
End if
world.setvariable "y1", y1
world.send "calc '" & x1o & " " & y1 & "'"
Else
Call stopsearchs
End If
End Sub
Sub stopsearch (Thename, theoutput, thewildcards)
world.EnableTriggerGroup "search", 0
world.note "Disabled Search Triggers!"
End Sub
Sub stopsearchs ()
world.EnableTriggerGroup "search", 0
world.note "Disabled Search Triggers!"
End Sub
]]>
</script>
- <!-- Plugin help
-->
- <aliases>
<alias script="OnHelp" match="systemsearch:help" enabled="y" />
</aliases>
- <script>
- <![CDATA[
Sub OnHelp (sName, sLine, wildcards)
world.Note world.GetPluginInfo (world.GetPluginID, 3)
End Sub
]]>
</script>
</muclient> |