| www.ClassicTW.com https://mail.black-squirrel.com/ |
|
| MOMBot Question https://mail.black-squirrel.com/viewtopic.php?f=15&t=21531 |
Page 1 of 1 |
| Author: | Scrat [ Fri Feb 06, 2009 1:04 pm ] |
| Post subject: | MOMBot Question |
Does Mombot have the ability to read and execute a list of Mombot commands from a text file? |
|
| Author: | V'Ger [ Fri Feb 06, 2009 4:51 pm ] |
| Post subject: | Re: MOMBot Question |
No, but it should be easy enough to do... write a script that reads in the text file, and outputs it to subspace... |
|
| Author: | LoneStar [ Fri Feb 06, 2009 6:11 pm ] |
| Post subject: | Re: MOMBot Question |
Scrat wrote: Does Mombot have the ability to read and execute a list of Mombot commands from a text file? Little bit of insite: http://www.psgygq.com/Scripting102/merc.htm |
|
| Author: | Mind Dagger [ Fri Feb 06, 2009 6:36 pm ] |
| Post subject: | Re: MOMBot Question |
LoneStar wrote: Scrat wrote: Does Mombot have the ability to read and execute a list of Mombot commands from a text file? Little bit of insite: http://www.psgygq.com/Scripting102/merc.htm Very nice article Lonestar. An excellent tutorial full of great info. This question reminded me of one of the last quick scripts I wrote before the end, which basically uses bot commands and a quickstats routine to fill a sector with fighters in an automated fashion. Might also be good for an example, since I doubt the script itself will be used much. The source is already available in the MOMBot zip on grimy: Code: loadVar $bot_name loadVar $user_command_line loadVar $parm1 loadVar $parm2 loadVar $parm3 loadVar $parm4 loadVar $parm5 loadVar $parm6 loadVar $parm7 loadVar $parm8 loadVar $stardock loadVar $command loadVar $planet setVar $total 0 setVar $desired 0 gosub :quikstats~quikstats setVar $startingLocation $quikstats~CURRENT_PROMPT if ($startingLocation <> "Citadel") send "'{" $bot_name "} - Must start at Citadel.*" halt end if ($planet <= 0) send "'{" $bot_name "} - Unknown planet number. Display planet to bot so it can know the planet number.*" halt end isNumber $isNumber $parm1 if ($isNumber) if ($parm1 > 0) setVar $buyLimited TRUE setVar $desired $parm1 end end setVar $continue TRUE while (($continue = TRUE)) send "'"&$bot_name&" w*" waitOn " credits taken from citadel." gosub :quikstats~quikstats if ($quikstats~CREDITS < 1000) send "'{" $bot_name "} - Credits are under 1000.*" setVar $continue FALSE else send "'"&$bot_name&" buy fig "&($desired-$total)&"*" waitOn " Fighters added on planet "&$PLANET&"." getWord CURRENTLINE $added 3 add $total $added send "'"&$bot_name&" movefig s*" waitOn "'{"&$bot_name&"} - fighters moved" end if (($buyLimited = TRUE) AND ($total >= $desired)) setVar $continue FALSE end end send "'"&$bot_name&" d*" waitOn " credits deposited into citadel." send "'{" $bot_name "} - "&$total&" fighters purchased and added to sector.*" halt include "c:\Desktop\TWXProxy204b\scripts\MOMBot\botIncludes\quikstats" You will get much more info from Lone's tutorial, but it took me a while to remember what this script was called, so I am posting it anyways! MD |
|
| Author: | Scrat [ Sat Feb 07, 2009 8:46 am ] |
| Post subject: | Re: MOMBot Question |
Thanks for the replies! Basically I was just looking to automate some repetitive tasks and didn't want to write a full fledged script to do it. |
|
| Page 1 of 1 | All times are UTC - 5 hours |
| Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group http://www.phpbb.com/ |
|