| Author |
Message |
|
yeah_that_way
Chief Warrant Officer
Joined: Tue Aug 02, 2005 2:00 am Posts: 130 Location: USA
|
Ok guys writing a script here, and she is all polished up, except for one horrible thing. During a phase of the script, I need to terminate all scripts, except for the script, and thats no big deal, its a system script, I was wondering if someone could tell me how to incorparte the
$SX into a script without the script freezing up, Saar showed me that I could use the Openmenu 'TWX_STOPALL' command, but how can I stop it from freezing? Since i'm releasing the script open source anyway,
#Ender's Retaliation v1.0
#Will stop all scripts, and perfrom prespecified actions.
systemScript
send "'Ender's Retaliation v1.0 loaded! *"
clientMessage "Specifiy what action you would like to perform upon someone powering up, or holding you in IDC"
:info
echo ANSI_13 & "*Would you like to attack your attacker?*"
getInput $attack "(Y)es / (N)o"
if ($attack = "Y") or ($attack = "y")
goto :yattack
end
echo ANSI_13 & "*Would you like to xport out of your ship?*"
getInput $xport "(Y)es / (N)o"
if ($xport = "Y") or ($xport = "y")
goto :yxport
else
clientMessage "You must pick an option"
goto :info
end
:yattack
echo ANSI_13 & "*How many figs would you like to attack with?*"
getInput $attackwave "Attack wave?"
echo ANSI_13 & "*How many times would you like to attack?*"
getInput $attacktimes "Times?"
SetTextLineTrigger powering :powering "is powering"
SetTextLineTrigger idc :idc "An Interdictor"
PAUSE
:powering
send "ay" $attackwave "*"
add $attacked 1
If ($attacktimes = $attacked)
send "'Retaliated! *"
end
goto :powering
:idc
send "ay" $attackwave "*"
add $attacked 1
If ($attacktimes = $attacked)
send "'Retaliated! *"
end
HALT
goto :idc
:yxport
echo ANSI_13 & "*What ship would you like to xport to?*"
getInput $xportnumber "Xport ship?"
SetTextLineTrigger powering2 :powering2 "is powering"
SetTextLineTrigger idc :idc2 "An Interdictor"
PAUSE
:powering2
send "X" $xportnumber "**"
send "'Xported! *"
HALT
:idc2
send "X" $xportnumber "**"
send "'Xported! *"
HALT
I dont want any feed back on my style of programming or this and that, all I want is the question I asked answered, thanks a mill.
_________________ Hate me - abuse me - kill me
|
| Fri Jan 06, 2006 9:17 am |
|
 |
|
Singularity
Veteran Op
Joined: Thu Jun 02, 2005 2:00 am Posts: 5558 Location: USA
|
Set a delay trigger to close the menu like...
systemScript
setDelayTrigger menu_delay :conclude 500
openMenu TWX_STOPALLFAST
:conclude
closeMenu
halt
As for feedback on other stuff... tough. You can do a c;q to parse max ftr wave and offer an option to use "max wave" also since in a crunch speed will be critical. Not sure why you need to kill all scripts in this, tho. If you have a specific conflicting script that you know of you can simply stop it specifically, even if it's not loaded (it won't hang). And as always, beware of corb. A warning about your macro... it attacks just the first ship. So I could tow around a corbed merf (a classic unlim trick) and make life suck. Beacons will also make you stick and naturally this won't work in fedspace. If you'd like a more appropriate macro let me know, the "ayy" trick that most recommend will get you killed in fedspace.
_________________ 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
|
| Fri Jan 06, 2006 6:01 pm |
|
 |
|
Grazhoppa
Lieutenant
Joined: Fri Mar 02, 2001 3:00 am Posts: 577 Location: USA
|
forgetting something too.....
I noticed the last game I played, the first ship in the sector was never an empty ship, cept at sd for some reason, dunno whats up, buncha ferballs... has firing order changed?
_________________ http://the-glacier.com
The source for all your computer needs!
--==[The Outfit]==--
|
| Fri Jan 06, 2006 6:57 pm |
|
 |
|
Singularity
Veteran Op
Joined: Thu Jun 02, 2005 2:00 am Posts: 5558 Location: USA
|
Nope. Beacons, feds, aliens, empties and then traders. Atleast I think that's it.
_________________ 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
|
| Fri Jan 06, 2006 8:06 pm |
|
 |
|
Grazhoppa
Lieutenant
Joined: Fri Mar 02, 2001 3:00 am Posts: 577 Location: USA
|
I swear man, in this one game, it wasn't targeting empties first, cept at dock.... not a question in my mind, I remember clear as day
_________________ http://the-glacier.com
The source for all your computer needs!
--==[The Outfit]==--
|
| Fri Jan 06, 2006 9:07 pm |
|
 |
|
Singularity
Veteran Op
Joined: Thu Jun 02, 2005 2:00 am Posts: 5558 Location: USA
|
I just tested it on a 3.13 MBBS Gold setup.
The order was:
1. Beacons
2. Feds
3. Session aliens
4. Unmanned
5. Traders
I did not test it on externally-managed aliens so I'm not sure where they fall
in this line up.
Naturally beacons, feds and aliens would come before unmanned ships. As a side
note, whenever you attack you release any tow locks you have and that text comes
up before any of this.
If you have more specific data, the exact settings of the game and a copy of the
.TWA or a server we can try it on... by all means lemme know and we'll setup a
test and find out what's going on there. But the above order is consistent with
everything I've seen.
_________________ 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
|
| Fri Jan 06, 2006 10:19 pm |
|
 |
|
Zentock
Lieutenant J.G.
Joined: Mon Sep 22, 2003 2:00 am Posts: 486 Location: USA
|
Specifically when attacking this is the order.
1- Beacons (except in fed space)
2- Feds
3- Aliens (both breeds), in fed space the feds will protect aliens
under 100 exp if there blue
4- Empty
5- Reds
6- Blues
_________________ C.E.O. Corp Noble House Sysop - Zentock's Realm TWGS Co-Sysop - Vulcans Forge TWGS
Admin. Vulcans Forge Forums Vulcans Forge TeamSpeak
|
| Fri Jan 06, 2006 11:37 pm |
|
 |
|
Traitor
Lieutenant Commander
Joined: Thu Mar 21, 2002 3:00 am Posts: 890 Location: USA
|
Graz, From my site: Empty ships appear at the bottom of the Sector Display, but FIRST in the attack sequence, followed by players. I'm betting that's what you were seeing, and it threw you off for a bit.
Zen, red? blue? From my site (same section) The order players appear in is dictated by the order they first signed on. So, if you were the 5th person to join the game, you will appear 5th in the order. You can find out the order either by paying close attention, or you can send private hails to get the order. Start by trying to hail 'a'. It will show you all players with the letter A in their name, and in order. Then just keep working down the alphabet. Then you should be able to place them in the proper order. If someone times out during the course of a game, and a new player shows up, they will get the timed out person's slot.
_________________ http://tw-cabal.navhaz.com - THE TW info site
Man, I gotta quit showing up here...next thing you know i'll get dragged back in.
|
| Fri Jan 06, 2006 11:54 pm |
|
 |
|
Grazhoppa
Lieutenant
Joined: Fri Mar 02, 2001 3:00 am Posts: 577 Location: USA
|
naw, I know you guys think I'm nuts, but I swear, these ferrengi were coming up before the unmanned ships... if bud reads this, he was in the same game....
_________________ http://the-glacier.com
The source for all your computer needs!
--==[The Outfit]==--
|
| Fri Jan 06, 2006 11:57 pm |
|
 |
|
Traitor
Lieutenant Commander
Joined: Thu Mar 21, 2002 3:00 am Posts: 890 Location: USA
|
Oh, and try what Singularity said about stopping specific scripts. You can attempt to stop scripts that you aren't currently running without any problems. I have several scripts that kill other specific scripts because I don't want to deal with the possibility of conflicts.
_________________ http://tw-cabal.navhaz.com - THE TW info site
Man, I gotta quit showing up here...next thing you know i'll get dragged back in.
|
| Sat Jan 07, 2006 12:02 am |
|
 |
|
Maniac
Lieutenant J.G.
Joined: Sun Mar 13, 2005 3:00 am Posts: 387 Location: USA
|
yeathatway
forgive my ignorance here but what the fsck are you trying to do in this situation?
:idc
send "ay" $attackwave "*"
add $attacked 1
If ($attacktimes = $attacked)
send "'Retaliated! *"
end
---------------------------------------------
HALT <------ Are you hanging here?
---------------------------------------------
IIRC you will never get to loop ... as script will hang/abort here
goto :idc
I dont want any feed back on my style of programming or this and that, all I want is the question I asked answered, thanks a mill.
Well your style of programming is the problem.... you are halting the script as soon as someone is IG'd.... single step through the idc routine.... you send 1 attack then add one to #attacks and then check if they are equal they are not and never will be... then you halt the script.... you will never get another idc trigger because once the trigger fires it is killed and you halt the script execution... THAT is your problem not some figment of your imagination that somehow a $sx command sent to twx will fix it.
_________________ Find out just what any people will quietly submit to and you have the exact measure of the injustice and wrong which will be imposed on them. Frederick Douglas
|
| Sat Jan 07, 2006 12:59 am |
|
 |
|
Singularity
Veteran Op
Joined: Thu Jun 02, 2005 2:00 am Posts: 5558 Location: USA
|
Graz... dude. Please read what I'm saying. OF COURSE THE FERG COME UP BEFORE UNMANNED SHIPS. LOL!! Session ferg (atleast, didn't try external) always come up before unmanned ships. Read the order closer =).
All players come in the order of user ID. Same as the order of the # "Who's playing" and hailing as traitor said. I wrote a script once, will see if I can find it, that determined the "order" of players in a sector using hails (found 2 common letters, sorted from there) for a dock pre-lock attack. Hadn't thought about scrolling down all letters tho and pre-compiling a list. Not a bad idea.
_________________ 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
|
| Sat Jan 07, 2006 1:04 am |
|
 |
|
ElderProphet
Commander
Joined: Tue Oct 07, 2003 2:00 am Posts: 1134 Location: Augusta, GA
|
Forgive the plug, but the imminent version of TWX has modded the openMenu command to accept a 2nd parameter, TRUE or FALSE. So 'openMenu TWX_STOPALLFAST FALSE' will cause it to open that menu and not pause afterwards.
+EP+
_________________ Claim to Fame: only guy to ever crack the TW haggle algorithm, and fig/shield/hold price formula, twice.
|
| Sat Jan 07, 2006 1:27 am |
|
 |
|
yeah_that_way
Chief Warrant Officer
Joined: Tue Aug 02, 2005 2:00 am Posts: 130 Location: USA
|
Thanks for all the comments, basically the script will stop all other scripts, wssm, worldtrade, what ever your running, if someone tries to attack you out in space, not very well written for saftey, but better than nothing. EP i'll try what you sent, heh, I should have just asked you in the first place 
_________________ Hate me - abuse me - kill me
|
| Tue Jan 10, 2006 4:22 am |
|
 |
|
yeah_that_way
Chief Warrant Officer
Joined: Tue Aug 02, 2005 2:00 am Posts: 130 Location: USA
|
Sing how about a little less talk and a little more shut the hell up?
_________________ Hate me - abuse me - kill me
|
| Tue Jan 10, 2006 5:31 am |
|
 |
|