View unanswered posts | View active topics It is currently Thu Apr 30, 2026 12:32 pm



Reply to topic  [ 9 posts ] 
 macro calls script 
Author Message
Sergeant

Joined: Sat Mar 18, 2006 3:00 am
Posts: 8
Location: Canada
Unread post 
How would I write a macro that calls a script.
ie: macro twarp to the dock, buy a photon, twarp to adj. sector, fire ptorp, move into sector and call ck_ship_cap.


Sun Mar 18, 2007 5:27 pm
Profile
Gameop

Joined: Thu Jun 06, 2002 2:00 am
Posts: 2371
Location: USA
Unread post 
in zoc:

$ss__ck_ship_cap.cts^m

this would fire up ck's ship cap

_________________
Ask Slim!

--==[The Outfit]==--


Sun Mar 18, 2007 7:03 pm
Profile ICQ WWW
Gameop

Joined: Thu Jun 06, 2002 2:00 am
Posts: 2371
Location: USA
Unread post 
note: i just tested moving into a sector and firing up ck ship cap and it doesn't work, you'd have to script it i believe.

_________________
Ask Slim!

--==[The Outfit]==--


Sun Mar 18, 2007 7:11 pm
Profile ICQ WWW
Veteran Op
User avatar

Joined: Thu Jun 02, 2005 2:00 am
Posts: 5558
Location: USA
Unread post 
Ya, I don't think that works because of the $... it's not read like a normal macro. Even if it was you'd have timing issues because the move wouldn't neccessarily happen before the script call.

You'd have to script it. Wouldn't be much of a script tho.

Code:
setVar $adj_sector 1234
setVar $die_sector 2345
send " n s y"
waitFor "All Systems Ready, shall we engage?"
send "y * p s h * p 1 * q q m " & $adj_sector & "* y"
waitFor "<Hardware Emporium>"
waitFor "All Systems Ready, shall we engage?"
send "y * c p y " & $die_sector & " * * q m " & $die_sector & " * n n * "
waitFor "To which Sector"
stop __ck_ship_cap.cts
stop __ck_ship_cap.cts
load __ck_ship_cap.cts


A little more elaborate but it shouldn't fuse you...

_________________
May the unholy fires of corbomite ignite deep within the depths of your soul...

1. TWGS server @ twgs.navhaz.com
2. The NavHaz Junction - Tradewars 2002 Scripts, Resources and Downloads
3. Open IRC chat @ irc.freenode.net:6667 #twchan
4. Parrothead wrote: Jesus wouldn't Subspace Crawl.

*** SG memorial donations via paypal to: dpocky68@booinc.com
Image


Mon Mar 19, 2007 1:55 am
Profile ICQ WWW
Sergeant

Joined: Sat Mar 18, 2006 3:00 am
Posts: 8
Location: Canada
Unread post 
thanks
i was hoping i could write the hot key (for ck ship cap) into the end of the macro string.
thanks for the quick reply!!


Mon Mar 19, 2007 9:10 am
Profile
Veteran Op
User avatar

Joined: Thu Jun 02, 2005 2:00 am
Posts: 5558
Location: USA
Unread post 
Nope, can't. Even if you found a way to get the macros seperated (which could prolly be done, really) you'd have problems with the script being called before the move actually took place, causing you to check the pre-move sector instead of the post-move one.

_________________
May the unholy fires of corbomite ignite deep within the depths of your soul...

1. TWGS server @ twgs.navhaz.com
2. The NavHaz Junction - Tradewars 2002 Scripts, Resources and Downloads
3. Open IRC chat @ irc.freenode.net:6667 #twchan
4. Parrothead wrote: Jesus wouldn't Subspace Crawl.

*** SG memorial donations via paypal to: dpocky68@booinc.com
Image


Mon Mar 19, 2007 9:45 am
Profile ICQ WWW
Lieutenant

Joined: Sat Nov 06, 2004 3:00 am
Posts: 600
Location: USA
Unread post 
just have it set on a hot key to call it... or add it to zoc's menus... if u use zoc...
if not add an attack or 2 to the end of the mac to weaken them... then load ship cap

_________________
Its not the Kill, Its the Thrill of the Chase
S: Min: 297 Max: 437 Average: 410 -- Just here to attack aliens
S: High/Low Removed   Average: 421
          


Mon Mar 19, 2007 10:53 am
Profile ICQ WWW
Sergeant

Joined: Sat Mar 18, 2006 3:00 am
Posts: 8
Location: Canada
Unread post 
right on, Zarkahn
that's the route i was thinking of going.
thanks again, Sing... for your insight and suggestion.
lol... i have trouble writing an effective macro.. would bat zero trying to write in scripting language.
:-)


Mon Mar 19, 2007 4:38 pm
Profile
Veteran Op
User avatar

Joined: Thu Jun 02, 2005 2:00 am
Posts: 5558
Location: USA
Unread post 
Again, problem is... the order of the macro is not the order things are executed in.

If you attack first, then call the script... you send the attack waves to the server, followed by the script. If your ping is decent, the attack will be delayed (250ms per attack w/ 0 ship delay) but the scan from the script won't be (only delay will be ping). So your script will gather information before the attack, but won't actually go to attack until after the first waves are sent. The result is that you'll probably blow the ship.

The same is true of a move macro. Move is delayed. If you call a script, all you really know is that the commands were sent to the server... so while you're waiting for the commands to be executed (there is a move delay of 250ms regardless) the cap script will be starting. This can really mess up a script if you're not careful as the info it gets to start might be all wrong.

When making holokilla run a cap program I ran into this exact problem. It would run the cap, then move, then retreat... accomplishing nothing but wasted turns. That's why you really need to wait for the move to take place, or atleast wait for the server to acknowledge the move first.

You can, of course, assign ck shipcap to a hotkey... see above as per slim's instructions. At that point you could move in and run it, but you'd have to be pretty quick at the keys to do everything (grab a torp, fire it, move in and kill during the wave) in time.

_________________
May the unholy fires of corbomite ignite deep within the depths of your soul...

1. TWGS server @ twgs.navhaz.com
2. The NavHaz Junction - Tradewars 2002 Scripts, Resources and Downloads
3. Open IRC chat @ irc.freenode.net:6667 #twchan
4. Parrothead wrote: Jesus wouldn't Subspace Crawl.

*** SG memorial donations via paypal to: dpocky68@booinc.com
Image


Mon Mar 19, 2007 6:12 pm
Profile ICQ WWW
Display posts from previous:  Sort by  
Reply to topic   [ 9 posts ] 

Who is online

Users browsing this forum: Google [Bot] and 10 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.