View unanswered posts | View active topics It is currently Mon Apr 20, 2026 11:17 pm



Reply to topic  [ 5 posts ] 
 MOMBot Question 
Author Message
Chief Warrant Officer
User avatar

Joined: Sun Jan 20, 2008 5:15 am
Posts: 142
Unread post MOMBot Question
Does Mombot have the ability to read and execute a list of Mombot commands from a text file?


Fri Feb 06, 2009 1:04 pm
Profile
Gameop
User avatar

Joined: Tue Sep 25, 2007 7:27 pm
Posts: 530
Location: Long Island
Unread post 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...

_________________
If you have a building game, they will come...

Proud Sysop of ICE9 TWGS
Home of Building and Non Regulated Games
http://www.oregonsouth.com/ice9
telnet://ice9-tw.com:2002


Fri Feb 06, 2009 4:51 pm
Profile
Commander
User avatar

Joined: Fri Jun 09, 2006 2:00 am
Posts: 1401
Location: Canada
Unread post 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

_________________
----------------------------
-= QUANTUM Computing 101: 15 = 3 x 5 ... 48% of the time.


Fri Feb 06, 2009 6:11 pm
Profile ICQ YIM
Chief Warrant Officer
User avatar

Joined: Wed Jan 04, 2006 3:00 am
Posts: 136
Location: USA
Unread post 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! :P

MD


Fri Feb 06, 2009 6:36 pm
Profile
Chief Warrant Officer
User avatar

Joined: Sun Jan 20, 2008 5:15 am
Posts: 142
Unread post 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.


Sat Feb 07, 2009 8:46 am
Profile
Display posts from previous:  Sort by  
Reply to topic   [ 5 posts ] 

Who is online

Users browsing this forum: No registered users and 13 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group.
Designed by wSTSoftware.