| Author |
Message |
|
lewdpotato
Lieutenant J.G.
Joined: Sun Oct 28, 2001 2:00 am Posts: 347 Location: USA
|
 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)
|
| Sun Nov 21, 2010 7:33 am |
|
 |
|
Big D
Veteran Op
Joined: Tue Nov 28, 2006 4:04 pm Posts: 5025
|
 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.
|
| Sun Nov 21, 2010 8:09 am |
|
 |
|
mob
Boo! inc.
Joined: Sat Oct 09, 2004 2:00 am Posts: 865 Location: USA
|
 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?
_________________ “The object of war is not to die for your corp but to make the other bastard die for his.”
Boo! inc.
|
| Sun Nov 21, 2010 8:41 am |
|
 |
|
Space Ghost
Veteran Op
Joined: Mon Jan 05, 2009 9:24 pm Posts: 544
|
 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....
_________________ The Ghost you LOVE to HATE!!! The J.R. Ewing of TradeWars.. Time Tells All Tales. Jesus woundn't SubSpace Crawl
|
| Sun Nov 21, 2010 9:07 am |
|
 |
|
Parrothead
Commander
Joined: Wed May 03, 2006 2:00 am Posts: 1722 Location: USA
|
 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.
_________________ Coconut Telegraph (ICQ)#586137616 Team Speak3@ 220.244.125.70:9987 Founding Member -=[Team Kraaken]=- Winner of Gridwars 2010 - Ka Pla
 Jesus wounldn't Subspace Crawl
|
| Sun Nov 21, 2010 9:26 am |
|
 |
|
cc bee
Chief Warrant Officer
Joined: Tue Jan 01, 2008 8:08 pm Posts: 193
|
 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
|
| Sun Nov 21, 2010 9:47 am |
|
 |
|
T0yman
Veteran Op
Joined: Sat Dec 29, 2007 5:06 pm Posts: 2059 Location: Oklahoma
|
 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  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.
_________________ T0yman (Permanently Retired since 2012) Proverbs 17:28 <-- Don't know it, most should it would stop a lot of the discussions on here.
|
| Sun Nov 21, 2010 10:25 am |
|
 |
|
Promethius
Ambassador
Joined: Mon Feb 09, 2004 3:00 am Posts: 3141 Location: Kansas
|
 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"
_________________
/ Promethius / Enigma / Wolfen /
"A man who has no skills can be taught, a man who has no honor has nothing."
|
| Sun Nov 21, 2010 12:59 pm |
|
 |
|
Helix
Ambassador
Joined: Wed Nov 12, 2008 8:57 am Posts: 3554 Location: Long Beach, CA
|
 Re: script help
Please read this before using macros.
_________________ Helix Do I really look like a guy with a plan? You know what I am? I'm a dog chasing cars. Lest we forget I had to ask myself WWSGD?
|
| Sun Nov 21, 2010 2:10 pm |
|
 |
|
lewdpotato
Lieutenant J.G.
Joined: Sun Oct 28, 2001 2:00 am Posts: 347 Location: USA
|
 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.
|
| Sun Nov 21, 2010 4:41 pm |
|
 |
|