| www.ClassicTW.com https://mail.black-squirrel.com/ |
|
| anyone know how... https://mail.black-squirrel.com/viewtopic.php?f=15&t=13131 |
Page 1 of 1 |
| Author: | BlackBeard [ Sat May 21, 2005 6:56 pm ] |
| Post subject: | |
i can do this another way...because the way it is now no data can be sent or recieved while it is counting...all it is doing is delaying between commands and sometimes causes twx to crash :wait if ($loop<> 6000000) add $loop 1 goto :wait end |
|
| Author: | Traitor [ Sat May 21, 2005 7:08 pm ] |
| Post subject: | |
have you tried a delaytrigger instead? |
|
| Author: | RammaR [ Sat May 21, 2005 9:39 pm ] |
| Post subject: | |
Not sure of exactly what you're trying to do, but like Traitor suggested I'd look into a "setDelayTrigger". From the TWX helpfile, here's the description and syntax: Purpose: Creates a trigger that will automatically activate after a specified time period. Syntax: setDelayTrigger {name} {label} {tics) Note: tics are in milliseconds :wait send "#" setDelayTrigger delay :wait 60000 pause Hope that helps. If its not what your looking for, then give us a few more details of your project. Good luck. |
|
| Author: | Zoso [ Sat May 21, 2005 11:05 pm ] |
| Post subject: | |
yup need more info. Your prolly stuck in an infinite loop. TWX freezing and not responding? ECHO $loop and see the results. BTW - TWX is in desperate need of a debugger. |
|
| Author: | BlackBeard [ Sun May 22, 2005 12:58 pm ] |
| Post subject: | |
ok i tried that delay trigger but cant get it to work.... heres what i am doing :start setVar $loop 0 KillAllTriggers send " l 1 *" setTextLineTrigger 1 :chk "There are currently" pause :chk setVar $line CURRENTLINE getWord $line $colo 4 if ($colo < 114) setVar $loop 0 gosub :wait send "q" goto :start end :getem send " t * 931 y" waitFor "Locating beam pinpointed, TransWarp Locked." send "y l 3 * s n l 1 * t n t 1 72* q 1* y" waitFor "Locating beam pinpointed" send "y" goto :start halt :wait if ($loop<> 6000) add $loop 1 goto :wait end return what it does it starts at terra checks # of colonist and if colonist is less than number of holds then it needs to pause for a bit (still sitting on terra) blast off and land again checking if there is enough colonist to fill the holds |
|
| Author: | Wildstar [ Sun May 22, 2005 3:34 pm ] |
| Post subject: | |
I have a script at griys called Terra Checker in the zip with 21 scripts that does that.<Cheap Plug> |
|
| Author: | Coke [ Sun May 22, 2005 3:42 pm ] |
| Post subject: | |
yah but he's wanting to do his own on a side note, WHOHOO 200 posts, i'm a Gunnery SGT. |
|
| Author: | BlackBeard [ Sun May 22, 2005 5:28 pm ] |
| Post subject: | |
wildstar: i just tried your script and seems to me that if you have a planet scanner on your ship it doesnt work....the way my script is you can be afk so you dont have to type in 1 all the time at terra...and what i want my script to do is land on terra while i wait for colonist to regen...maybe so if i am not fed safe i still can use it |
|
| Author: | Traitor [ Sun May 22, 2005 6:40 pm ] |
| Post subject: | |
quote:Originally posted by BlackBeard ok i tried that delay trigger but cant get it to work.... heres what i am doing BlackBeard, try this instead: :start send " l 1 *" setTextLineTrigger chk :chk "There are currently" pause :chk killtrigger chk getWord CURRENTLINE $colo 4 if ($colo < 114) gosub :wait send "q" goto :start else goto :getEm end :getEm send " t * 931 y" waitFor "Locating beam pinpointed, TransWarp Locked." send "y l 3 * s n l 1 * t n t 1 72* q 1* y" waitFor "Locating beam pinpointed" send "y" goto :start halt :wait SetDelayTrigger delay :delay 6000 pause :delay killTrigger delay return Whenever you have triggers, it's good practice to name the trigger with the same name as the lable that it's referencing. I also used to name them numbers, but as my scripts got bigger, it became a pain to keep track of them. If you name them the same as the lable they call, then you can be sure that you won't ever reuse a trigger name on accident. Also, it's good practice to kill triggers, even ones that automatically get killed when they are triggered. It's not requried, but when you are troubleshooting a 3000 line script, triggers are usually the culprit. And there is no perceptable increase in processing time. |
|
| Author: | BlackBeard [ Sun May 22, 2005 7:16 pm ] |
| Post subject: | |
thanks traitor seems to be working now i was working on it all day with the setdelaytrigger and when i added :delay killTrigger delay it started to work right... thanks again |
|
| Author: | Traitor [ Sun May 22, 2005 9:38 pm ] |
| Post subject: | |
No prob. triggers need someplace to go. |
|
| Author: | Zoso [ Sun May 22, 2005 11:00 pm ] |
| Post subject: | |
I would be very careful about AFK colo scripts. |
|
| Page 1 of 1 | All times are UTC - 5 hours |
| Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group http://www.phpbb.com/ |
|