| www.ClassicTW.com https://mail.black-squirrel.com/ |
|
| script help https://mail.black-squirrel.com/viewtopic.php?f=15&t=30625 |
Page 1 of 1 |
| Author: | lewdpotato [ Sun Nov 21, 2010 7:33 am ] |
| Post subject: | script help |
Im trying to make a script and so far I get a fail. thanks cc bee for not #sd# Me when I went flying out without any figs on My ship. Here is what Im trying to do. once I get a warpable ship I want a script that mows to the nearest port with fuel, buys the fuel then warps back to star dock. I failed to put some fail safe's in it. How do I check if I have warp drive? and figs on my ship? Any other fail safe's? I would show you what I have so far, but that would only confirm that Im an idiot that has no clue what He is doing. Thanks. (I hope) |
|
| Author: | Big D [ Sun Nov 21, 2010 8:09 am ] |
| Post subject: | Re: script help |
There's really not enough information here to know what you want to do. What type of script are you needing? Is it a twx script? Also if it is a twx script you'll need to have have the closest fuel port in you twx database or have the script ask you what sector the port is located in. Checking transwarp drive and figs is pretty easy by using a quickstats routine. There are several quickstat routines available in public scripts. |
|
| Author: | mob [ Sun Nov 21, 2010 8:41 am ] |
| Post subject: | Re: script help |
lewdpotato wrote: Im trying to make a script and so far I get a fail. thanks cc bee for not #sd# Me when I went flying out without any figs on My ship. Here is what Im trying to do. once I get a warpable ship I want a script that mows to the nearest port with fuel, buys the fuel then warps back to star dock. I failed to put some fail safe's in it. How do I check if I have warp drive? and figs on my ship? Any other fail safe's? I would show you what I have so far, but that would only confirm that Im an idiot that has no clue what He is doing. Thanks. (I hope) Can you post what you have so far? |
|
| Author: | Space Ghost [ Sun Nov 21, 2010 9:07 am ] |
| Post subject: | Re: script help |
lewdpotato wrote: Im trying to make a script and so far I get a fail. thanks cc bee for not #sd# Me when I went flying out without any figs on My ship. Here is what Im trying to do. once I get a warpable ship I want a script that mows to the nearest port with fuel, buys the fuel then warps back to star dock. I failed to put some fail safe's in it. How do I check if I have warp drive? and figs on my ship? Any other fail safe's? I would show you what I have so far, but that would only confirm that Im an idiot that has no clue what He is doing. Thanks. (I hope) im not a scripter....but i believe you would could read the quickstats "/" too see if u have those things.... |
|
| Author: | Parrothead [ Sun Nov 21, 2010 9:26 am ] |
| Post subject: | Re: script help |
As you are new I would suggest starting with an open source script and modify it. This way you can get a feel for writing scripts and how subroutines help in your safety checks. Use the mom bot mow routine coupled with a standard BFS to find the gas port That should get you want you want. In most games Dock will either sell gas now or have a port adj that does so you will want to do a cr(stardock)* and a port check adj first So you might find that a better script to write to start. |
|
| Author: | cc bee [ Sun Nov 21, 2010 9:47 am ] |
| Post subject: | Re: script help |
lewdpotatoe, i thought you said (at the time) that your macro went wild. is it a macro or script... to fuel your ship at a port adjacent to the dock. we all use a fast macro for that work... warp out of fed... attack (if necessary)... port/buy fuel... retreat back to dock. I think the prolem you experienced (when i came to your aid) was... you tried to buy fuel at a port that was a one way off the dock. So. when your macro tried to warp you back... you had the long route back to the dock. I am on base with ya? cc bee... out |
|
| Author: | T0yman [ Sun Nov 21, 2010 10:25 am ] |
| Post subject: | Re: script help |
This will work or I am sure someone can help you but this has some basic's of scripting. I am am guessing your using mombot if so this will mow to the port you select, buys ore, if alignment is > 999 it will twarp back, if < 1000 it mows back to dock. if the port is beside dock and you don't want to script just use a burst. mXXXX*a500*pt**mXXXX*yy* if no figs in sector mXXXX*pt**mXXXX*yy* I am sure there are faster ways, I have tested this and I did not fuse the 10 times I tested it Attachment: if you don't use mombot there is a couple simple changes that could be made. I have a Test Game if you want to mess around testing some scripting and I am usually around to help on there and ICQ. |
|
| Author: | Promethius [ Sun Nov 21, 2010 12:59 pm ] |
| Post subject: | Re: script help |
lewdpotato wrote: Im trying to make a script and so far I get a fail. thanks cc bee for not #sd# Me when I went flying out without any figs on My ship. Here is what Im trying to do. once I get a warpable ship I want a script that mows to the nearest port with fuel, buys the fuel then warps back to star dock. I failed to put some fail safe's in it. How do I check if I have warp drive? and figs on my ship? Any other fail safe's? I would show you what I have so far, but that would only confirm that Im an idiot that has no clue what He is doing. Thanks. (I hope) This is a simple mow to dock - you can modify it based on how it is written to mow to a sector you enter, modify it to port/buy and either mow back or twarp. You will need a quickstats routine to get the information you are wanting for your ship. Code: # int mode 1 to dock # send "v" # setTextLineTrigger sdSector :sdSector "The StarDock is located in sector" # pause # :sdSector #getword currentline $sd 7 getWord currentline $prompt 1 if ($prompt <> "Command") echo ANSI_12 "** You must be at the command prompt" halt end getText currentline $cs "]:[" "] (?=" setVar $line "" send "^f" $cs "*" STARDOCK "*q" waitfor "TO > " & STARDOCK :getPath setTextLineTrigger line :line "" pause :line getwordpos CURRENTLINE $pos ": ENDINTERROG" if ($pos > 0) goto :lineDone end setVar $line $line & CURRENTLINE setTextLineTrigger line :line "" pause :lineDone stripText $line ">" stripText $line "(" stripText $line ")" :mover setVar $moveIt "" getword $line $moveTo 2 setVar $linePos 2 while ($moveTo <> 0) if ($moveTo > 10) and ($moveTo <> STARDOCK) setVar $moveIt $moveIt & "m " & $moveTo & "* az9999* * " else setVar $moveIt $moveIt & "m " & $moveTo & "* " end add $linePos 1 getword $line $moveTo $linePos end send $moveit & " p s g y g q" |
|
| Author: | Helix [ Sun Nov 21, 2010 2:10 pm ] |
| Post subject: | Re: script help |
Please read this before using macros. |
|
| Author: | lewdpotato [ Sun Nov 21, 2010 4:41 pm ] |
| Post subject: | Re: script help |
Thanks for the help, gives me lots of options. twx script trying to make this work with the getInput var. So I already have a map, I view it with swath and see where the fuel port is. using the getImput I tell the script where I wan't to mow too.. The rest is all stuff I'm just cutting and pasting from others scripts. Thanks again. |
|
| Page 1 of 1 | All times are UTC - 5 hours |
| Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group http://www.phpbb.com/ |
|