| www.ClassicTW.com http://classictw.com/ |
|
| macro calls script http://classictw.com/viewtopic.php?f=13&t=19019 |
Page 1 of 1 |
| Author: | thrush [ Sun Mar 18, 2007 5:27 pm ] |
| Post subject: | |
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. |
|
| Author: | Slim Shady [ Sun Mar 18, 2007 7:03 pm ] |
| Post subject: | |
in zoc: $ss__ck_ship_cap.cts^m this would fire up ck's ship cap |
|
| Author: | Slim Shady [ Sun Mar 18, 2007 7:11 pm ] |
| Post subject: | |
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. |
|
| Author: | Singularity [ Mon Mar 19, 2007 1:55 am ] |
| Post subject: | |
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... |
|
| Author: | thrush [ Mon Mar 19, 2007 9:10 am ] |
| Post subject: | |
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!! |
|
| Author: | Singularity [ Mon Mar 19, 2007 9:45 am ] |
| Post subject: | |
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. |
|
| Author: | Zarkahn [ Mon Mar 19, 2007 10:53 am ] |
| Post subject: | |
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 |
|
| Author: | thrush [ Mon Mar 19, 2007 4:38 pm ] |
| Post subject: | |
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. |
|
| Author: | Singularity [ Mon Mar 19, 2007 6:12 pm ] |
| Post subject: | |
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. |
|
| Page 1 of 1 | All times are UTC - 5 hours |
| Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group http://www.phpbb.com/ |
|