Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?xml version="1.0" encoding="iso-8859-1"?>
- <!DOCTYPE muclient>
- <!-- Saved on Saturday, July 17, 2010, 3:06 PM -->
- <!-- MuClient version 4.43 -->
- <!-- Plugin "LotJBuildship" generated by Plugin Wizard -->
- <muclient>
- <plugin
- name="LotJBuildship"
- author="@Ilyena"
- id="48dbd8f76a18f61774974d3a"
- language="Lua"
- purpose="Making ship building easier"
- save_state="y"
- date_written="2010-07-17 15:04:58"
- requires="4.43"
- version="1.0"
- >
- <description trim="y">
- <![CDATA[
- Use buildhelp to see the commands
- ]]>
- </description>
- </plugin>
- <!-- Get our standard constants -->
- <include name="constants.lua"/>
- <!-- Triggers -->
- <triggers>
- <trigger
- enabled="y"
- group="Shipbuilding"
- match="^You step away from your finished (.*)!$"
- name="FinishedShipMove"
- regexp="y"
- script="MoveOntoNextShip"
- sequence="100"
- >
- </trigger>
- <trigger
- group="Shipbuilding"
- match="^(.*)\[ALERT\]\: EMERGENCY COPYOVER \- Keep calm\, we might pull through\!$"
- name="CopyoverCoverage"
- regexp="y"
- script="BuildShip"
- sequence="100"
- >
- </trigger>
- <trigger
- enabled="y"
- group="Shipbuilding"
- match="You don't have a component like that."
- name="GetShipParts"
- script="GetShipParts"
- sequence="100"
- >
- </trigger>
- <trigger
- enabled="y"
- group="Shipbuilding"
- match="You are now afk."
- name="GoingAFK"
- send_to="12"
- sequence="100"
- >
- <send>EnableTimer("EnduranceMode", false)</send>
- </trigger>
- <trigger
- group="Antitheft"
- match="^ Near Me(.*) $"
- name="TidyUp"
- regexp="y"
- script="TidyUp"
- sequence="100"
- >
- </trigger>
- <trigger
- enabled="y"
- group="Shipbuilding"
- match="Where to begin? It all looks so complex..."
- name="BadBuildShip"
- script="BuildShip"
- sequence="100"
- >
- </trigger>
- <trigger
- group="Shipbuilding"
- match="^(.*) COPYOVER by (.*) \- please remain seated\!$"
- name="CopyoverProtection"
- regexp="y"
- script="BuildShip"
- sequence="100"
- >
- </trigger>
- <trigger
- group="Shipbuilding"
- keep_evaluating="y"
- match="^(.*) steps away from (.*) looking very pleased with (.*)\.$"
- name="SpamRemoval1"
- omit_from_log="y"
- omit_from_output="y"
- regexp="y"
- script="TidyUp"
- sequence="100"
- >
- </trigger>
- <trigger
- group="Shipbuilding"
- keep_evaluating="y"
- match="^(.*) takes (.*) tools and starts to work on (.*)$"
- name="SpamRemoval2"
- omit_from_log="y"
- omit_from_output="y"
- regexp="y"
- sequence="100"
- >
- </trigger>
- <trigger
- group="Shipbuilding"
- keep_evaluating="y"
- match="^(.*)droid assists(.*)$"
- name="SpamRemoval3"
- omit_from_log="y"
- omit_from_output="y"
- regexp="y"
- script="TidyUp"
- sequence="100"
- >
- </trigger>
- <trigger
- group="Shipbuilding"
- keep_evaluating="y"
- match="^(.*) gets (.*)$"
- name="SpamRemoval4"
- omit_from_log="y"
- omit_from_output="y"
- regexp="y"
- sequence="100"
- >
- </trigger>
- <trigger
- group="Shipbuilding"
- keep_evaluating="y"
- match="^You gain (.*) engineering experience\.$"
- name="SpamRemoval5"
- omit_from_log="y"
- omit_from_output="y"
- regexp="y"
- sequence="100"
- >
- </trigger>
- <trigger
- group="Shipbuilding"
- keep_evaluating="y"
- match="^Your droid gains (.*) experience points\.$"
- name="SpamRemoval6"
- omit_from_log="y"
- omit_from_output="y"
- regexp="y"
- sequence="100"
- >
- </trigger>
- <trigger
- enabled="y"
- group="Shipbuilding"
- match="You step away from G-Type Light Shuttle, and realize you've done it all wrong..."
- name="ErrorBuildShip"
- script="BuildShip"
- sequence="100"
- >
- </trigger>
- <trigger
- enabled="y"
- group="Shipbuilding"
- match="^Your (.*) doesnt need any more of that\.$"
- name="MoveOnToNextPart"
- regexp="y"
- script="MoveOntoNextPart"
- sequence="100"
- >
- <send>
- </send>
- </trigger>
- <trigger
- group="Shipbuilding"
- match="You finish modifying the ship."
- name="ContinueTheShip"
- script="BuildShip"
- sequence="100"
- >
- </trigger>
- <trigger
- group="Shipbuilding"
- match="You may now bot again."
- name="ShipBotting"
- script="ReturnFromAFK"
- sequence="100"
- >
- <send>afk
- bot start</send>
- </trigger>
- <trigger
- enabled="y"
- group="Shipbuilding"
- match="You don't see a ship like that nearby to work on."
- name="MoveToNextShip"
- script="MoveOntoNextShip"
- sequence="100"
- >
- </trigger>
- </triggers>
- <!-- Aliases -->
- <aliases>
- <alias
- name="AddShipToQueue"
- script="AddShipToQueue"
- match="buildadd *"
- enabled="y"
- group="Shipbuilding"
- sequence="100"
- >
- </alias>
- <alias
- name="ShowPartNames"
- script="ShowPartNames"
- match="buildshowparts"
- enabled="y"
- group="Shipbuilding"
- sequence="100"
- >
- </alias>
- <alias
- name="ClearBuildLost"
- script="ClearBuildList"
- match="buildclear"
- enabled="y"
- group="Shipbuilding"
- sequence="100"
- >
- </alias>
- <alias
- match="buildspam on"
- enabled="y"
- group="Shipbuilding"
- send_to="12"
- sequence="100"
- >
- <send>EnableTrigger("SpamRemoval1", false)
- EnableTrigger("SpamRemoval2", false)
- EnableTrigger("SpamRemoval3", false)
- EnableTrigger("SpamRemoval4", false)
- EnableTrigger("SpamRemoval5", false)
- EnableTrigger("SpamRemoval6", false)</send>
- </alias>
- <alias
- name="ShowShipQueue"
- script="ShowShipQueue"
- match="buildlist"
- enabled="y"
- group="Shipbuilding"
- sequence="100"
- >
- </alias>
- <alias
- name="EnduranceOff"
- script="DisableEndurance"
- match="buildendurance off"
- enabled="y"
- group="Shipbuilding"
- sequence="100"
- >
- </alias>
- <alias
- name="PartNames"
- script="SetPartName"
- match="^buildpartname (.*) (.*)$"
- enabled="y"
- group="Shipbuilding"
- regexp="y"
- sequence="100"
- >
- </alias>
- <alias
- match="buildspam off"
- enabled="y"
- group="Shipbuilding"
- send_to="12"
- sequence="100"
- >
- <send>EnableTrigger("SpamRemoval1", true)
- EnableTrigger("SpamRemoval2", true)
- EnableTrigger("SpamRemoval3", true)
- EnableTrigger("SpamRemoval4", true)
- EnableTrigger("SpamRemoval5", true)
- EnableTrigger("SpamRemoval6", true)</send>
- </alias>
- <alias
- name="DisplayBuildCommands"
- script="BuildCommandHelp"
- match="buildhelp"
- enabled="y"
- group="Shipbuilding"
- sequence="100"
- >
- </alias>
- <alias
- name="BuildShip"
- script="BeginBuilding"
- match="buildship"
- enabled="y"
- group="Shipbuilding"
- sequence="100"
- >
- </alias>
- <alias
- name="EnduranceOn"
- script="EnableEndurance"
- match="buildendurance on"
- enabled="y"
- group="Shipbuilding"
- send_to="12"
- sequence="100"
- >
- </alias>
- <alias
- name="BuildSkip"
- script="SkipPart"
- match="buildskip"
- enabled="y"
- group="Shipbuilding"
- sequence="100"
- >
- </alias>
- <alias
- name="BuildBottingOnAlias"
- match="buildbot on"
- enabled="y"
- group="Shipbuilding"
- send_to="12"
- sequence="100"
- >
- <send>EnableTrigger("ShipBotting", true)
- EnableTrigger("CopyoverCoverage", true)
- EnableTrigger("CopyoverProtection", true)
- ColourNote("green", "", "Ship Building Botting On")</send>
- </alias>
- <alias
- name="BuildBottingOffAlias"
- match="buildbot off"
- enabled="y"
- group="Shipbuilding"
- send_to="12"
- sequence="100"
- >
- <send>EnableTrigger("ShipBotting", false)
- EnableTrigger("CopyoverCoverage", false)
- EnableTrigger("CopyoverProtection", false)
- ColourNote("red", "", "Ship Building Botting Off")</send>
- </alias>
- </aliases>
- <!-- Timers -->
- <timers>
- <timer name="EnduranceMode" script="BuildShip" enabled="n" second="5.40" offset_second="0.00" group="Shipbuilding" >
- </timer>
- </timers>
- <!-- Variables -->
- <variables>
- <variable name="hullpart">hull</variable>
- <variable name="circuitspart">circuits</variable>
- <variable name="enginespart">engines</variable>
- <variable name="weaponspart">weapons</variable>
- </variables>
- <!-- Script -->
- <script>
- <![CDATA[
- shipParts = {"hull", "circuits", "engines", "weapons"}
- partNames = {GetVariable("hullpart"), GetVariable("circuitspart"), GetVariable("enginespart"), GetVariable("weaponspart")}
- currentPart = 1
- shipQueue = {}
- endurance = false
- shipName = nil
- function AddShipToQueue(name, line, wildcards)
- if (wildcards[1] ~= nil) then
- if (shipQueue[1] == nil) then
- table.insert(shipQueue, 1, wildcards[1])
- Note(wildcards[1] .. " added to ship queue!")
- else
- table.insert(shipQueue, wildcards[1])
- Note(wildcards[1] .. " added to ship queue!")
- end -- if
- end -- if
- end -- function
- function BeginBuilding(name, line, wildcards)
- for i, v in ipairs(partNames) do
- Send("drop all." .. partNames[i])
- end -- for
- BuildShip()
- end -- function
- function BuildShip(name, line, wildcards)
- if (shipQueue[1] ~= nil) then
- shipName = shipQueue[1]
- end -- if
- if (shipName ~= nil) then
- --for i, v in ipairs(partNames) do
- -- Send("drop all." .. partNames[i])
- --end -- for
- Send("buildship " .. shipName .. " " .. shipParts[currentPart])
- else
- Note("Building Finished!")
- end -- if
- end -- function
- function ClearBuildList(name, line, wildcards)
- shipQueue = {}
- Note("Ship Build List Cleared!")
- end -- function
- function DisableEndurance(name, line, wildcards)
- EnableTimer("EnduranceMode", false)
- EnableTrigger("ContinueTheShip", true)
- ColourNote("red", "black", "Endurance Mode Deactivated")
- endurance = false
- end -- function
- function EnableEndurance(name, line, wildcards)
- EnableTimer("EnduranceMode", true)
- EnableTrigger("ContinueTheShip", false)
- ColourNote("green", "black", "Endurance Mode Activated")
- endurance = true
- end -- function
- function GetShipParts(name, line, wildcards)
- Send("get 100 " .. partNames[currentPart])
- BuildShip()
- end -- function
- function MoveOntoNextPart(name, line, wildcards)
- Send("drop all." .. partNames[currentPart])
- currentPart = currentPart + 1
- if (currentPart == 5) then
- currentPart = 1
- end -- if
- BuildShip()
- end -- function
- function MoveOntoNextShip(name, line, wildcards)
- if (shipQueue[1] ~= nil) then
- table.remove(shipQueue,1)
- end -- if
- shipName = shipQueue[1]
- currentPart = 1
- BeginBuilding()
- end -- function
- function ReturnFromAFK(name, line, wildcards)
- if (endurance == true) then
- EnableEndurance()
- else
- BuildShip()
- end -- if
- end -- function
- function SetPartName(name, line, wildcards)
- if (wildcards[1] == "hull") then
- SetVariable("hullpart", wildcards[2])
- partNames[1] = GetVariable("hullpart")
- ColourNote("green","","Part type '" .. shipParts[1] .. "' coupled with '" .. partNames[1] .. "'")
- elseif (wildcards[1] == "circuits") then
- SetVariable("circuitspart", wildcards[2])
- partNames[2] = GetVariable("circuitspart")
- ColourNote("green","","Part type '" .. shipParts[2] .. "' coupled with '" .. partNames[2] .. "'")
- elseif (wildcards[1] == "engines") then
- SetVariable("enginespart", wildcards[2])
- partNames[3] = GetVariable("enginespart")
- ColourNote("green","","Part type '" .. shipParts[3] .. "' coupled with '" .. partNames[3] .. "'")
- elseif (wildcards[1] == "weapons") then
- SetVariable("weaponspart", wildcards[2])
- partNames[4] = GetVariable("weaponspart")
- ColourNote("green","","Part type '" .. shipParts[4] .. "' coupled with '" .. partNames[4] .. "'")
- else
- ColourNote("red","","Part type not found")
- end -- if
- end -- function
- function ShowPartNames(name, line, wildcards)
- Note("Partnames are as follows")
- for i, v in ipairs(shipParts) do
- Note(shipParts[i] .. " = " .. partNames[i])
- end -- for
- end -- function
- function ShowShipQueue(name, line, wildcards)
- Note("Ship Queue Contains: ")
- for i, v in ipairs(shipQueue) do
- Note(shipQueue[i])
- end -- for
- end -- function
- function SkipPart(name, line, wildcards)
- Send("drop all." .. partNames[currentPart])
- currentPart = currentPart + 1
- if (currentPart > #shipParts) then
- currentPart = 1
- end -- if
- Note("Moving Onto Next Part: " .. shipParts[currentPart])
- BuildShip()
- end -- function
- function TidyUp(name, line, wildcards)
- DeleteLines(1)
- end -- function
- function BuildCommandHelp(name, list, wildcards)
- Note("LotJ - Shipbuilding by @Ilyena and @Anastasius")
- Note("buildadd #- Add a ship to the build queue")
- Note("buildclear - Clear the ship queue")
- Note("buildlist - Display the build queue")
- Note("buildship - Starts building the queue")
- Note("buildskip - Skip to next part in the list")
- Note("buildendurance on/off - Turn the timer setting on and off. Useful for not running out of movement on smaller ships")
- Note("buildpartname <buildname> <getname> - Change the name of a part name if it differs from the build name")
- Note("buildshowparts - Display the name relations between parts and their names")
- Note("buildspam on/off - Turn the build spam on or off. Off means that you don't see it")
- Note("buildbot on/off - Turn the build botting on or off. Will recover from AFK")
- end -- function
- ]]>
- </script>
- <!-- Plugin help -->
- <aliases>
- <alias
- script="OnHelp"
- match="LotJBuildship:help"
- enabled="y"
- >
- </alias>
- </aliases>
- <script>
- <![CDATA[
- function OnHelp ()
- world.Note (world.GetPluginInfo (world.GetPluginID (), 3))
- end
- ]]>
- </script>
- </muclient>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement