www.ClassicTW.com
https://mail.black-squirrel.com/

$SX
https://mail.black-squirrel.com/viewtopic.php?f=15&t=16918
Page 1 of 2

Author:  yeah_that_way [ Fri Jan 06, 2006 9:17 am ]
Post subject: 

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.

Author:  Singularity [ Fri Jan 06, 2006 6:01 pm ]
Post subject: 

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.

Author:  Grazhoppa [ Fri Jan 06, 2006 6:57 pm ]
Post subject: 

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?

Author:  Singularity [ Fri Jan 06, 2006 8:06 pm ]
Post subject: 

Nope. Beacons, feds, aliens, empties and then traders. Atleast I think that's it.

Author:  Grazhoppa [ Fri Jan 06, 2006 9:07 pm ]
Post subject: 

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

Author:  Singularity [ Fri Jan 06, 2006 10:19 pm ]
Post subject: 

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.

Author:  Zentock [ Fri Jan 06, 2006 11:37 pm ]
Post subject: 

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

Author:  Traitor [ Fri Jan 06, 2006 11:54 pm ]
Post subject: 

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.

Author:  Grazhoppa [ Fri Jan 06, 2006 11:57 pm ]
Post subject: 

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....

Author:  Traitor [ Sat Jan 07, 2006 12:02 am ]
Post subject: 

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.

Author:  Maniac [ Sat Jan 07, 2006 12:59 am ]
Post subject: 

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.

Author:  Singularity [ Sat Jan 07, 2006 1:04 am ]
Post subject: 

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.

Author:  ElderProphet [ Sat Jan 07, 2006 1:27 am ]
Post subject: 

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+

Author:  yeah_that_way [ Tue Jan 10, 2006 4:22 am ]
Post subject: 

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 :-)

Author:  yeah_that_way [ Tue Jan 10, 2006 5:31 am ]
Post subject: 

Sing how about a little less talk and a little more shut the hell up?

Page 1 of 2 All times are UTC - 5 hours
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group
http://www.phpbb.com/