|
Page 1 of 1
|
[ 9 posts ] |
|
| Author |
Message |
|
Kaus
Gameop
Joined: Tue Nov 19, 2002 3:00 am Posts: 1050 Location: USA
|
 torper question
I've been tossing around some ideas for a torper that triggers of various text And I'm curious if there is a more efficient way to build small (less than 10 total variables) Arrays outside setting them manually such as Code: Setvar $idx 1 Setvar $pizza[1] 0 Setvar $pizza[2] 0 Etc
Start Settexttrigger withcheese :withcheese ”I like pizza" Pause
:withcheese Getword $food 1 Setvar $pizza[idx] If (my check is tru torp them) End Killtrigger withcheese Add $idx 1 Goto :start
_________________ Dark Dominion TWGS Telnet://twgs.darkworlds.org:23 ICQ#31380757, -=English 101 pwns me=- "This one claims to have been playing since 1993 and didn't know upgrading a port would raise his alignment."
|
| Thu Feb 19, 2009 8:07 pm |
|
 |
|
Promethius
Ambassador
Joined: Mon Feb 09, 2004 3:00 am Posts: 3141 Location: Kansas
|
 Re: torper question
What kind of torper are you wanting to build? Are you wanting to wait in a sector to hit anything that comes adjacent or twarp, bwarp, pwarp?
If you are wanting to sit adjacent and hit anything then a loop will setup your triggers for limp and fig hits. The adjacent would basically create custom triggers based on the sector numbers. I have an example of this type of trigger use in a tutorial I created.
_________________
/ Promethius / Enigma / Wolfen /
"A man who has no skills can be taught, a man who has no honor has nothing."
|
| Thu Feb 19, 2009 9:15 pm |
|
 |
|
Kaus
Gameop
Joined: Tue Nov 19, 2002 3:00 am Posts: 1050 Location: USA
|
 Re: torper question
Promethius wrote: What kind of torper are you wanting to build? Are you wanting to wait in a sector to hit anything that comes adjacent or twarp, bwarp, pwarp?
If you are wanting to sit adjacent and hit anything then a loop will setup your triggers for limp and fig hits. The adjacent would basically create custom triggers based on the sector numbers. I have an example of this type of trigger use in a tutorial I created. Sorry shoulda been more specific, I was on my Blackberry earlier, darn thing cant type worth trash sometimes... Anyways lets say I wanted to track fig hits to build a trajectory. More specifically I wanted to literally triangulate a sector by comparing multiple sectors, a example would be a surround(literally) fotoner. While a Surround fotoner is not what I'm working on, it would essentially work the same way in my eyes. Multiple fig hits all within 2 hits of eachother, triangulate originating sector and torp it. So in a nutshell I'd like to build x variables (without defining them prior to the loop) to compare based of similar/same textlines and not sure if a while loop works that way or will allow it. I appologise I'm not being more specific in my textline but I want to build it for the tourney sing is hosting and would hate for the offending corp's to change there ways prior to my torp 
_________________ Dark Dominion TWGS Telnet://twgs.darkworlds.org:23 ICQ#31380757, -=English 101 pwns me=- "This one claims to have been playing since 1993 and didn't know upgrading a port would raise his alignment."
|
| Thu Feb 19, 2009 10:09 pm |
|
 |
|
Big D
Veteran Op
Joined: Tue Nov 28, 2006 4:04 pm Posts: 5025
|
 Re: torper question
Kaus wrote: Promethius wrote: What kind of torper are you wanting to build? Are you wanting to wait in a sector to hit anything that comes adjacent or twarp, bwarp, pwarp?
If you are wanting to sit adjacent and hit anything then a loop will setup your triggers for limp and fig hits. The adjacent would basically create custom triggers based on the sector numbers. I have an example of this type of trigger use in a tutorial I created. Sorry shoulda been more specific, I was on my Blackberry earlier, darn thing cant type worth trash sometimes... Anyways lets say I wanted to track fig hits to build a trajectory. More specifically I wanted to literally triangulate a sector by comparing multiple sectors, a example would be a surround(literally) fotoner. While a Surround fotoner is not what I'm working on, it would essentially work the same way in my eyes. Multiple fig hits all within 2 hits of eachother, triangulate originating sector and torp it. So in a nutshell I'd like to build x variables (without defining them prior to the loop) to compare based of similar/same textlines and not sure if a while loop works that way or will allow it. I appologise I'm not being more specific in my textline but I want to build it for the tourney sing is hosting and would hate for the offending corp's to change there ways prior to my torp  You'd set it up the same way you would a pdrop that targets surround grids. Of course you'd have to have at least 2 fig hits and come up with a sector that both of those sectors have in common. So basically you just use the same type script that also torps that common sector. Most of the time these type scripts are only good when someone is surrounding a 4 way sector or higher and you have several figs around it.
|
| Fri Feb 20, 2009 1:22 am |
|
 |
|
LoneStar
Commander
Joined: Fri Jun 09, 2006 2:00 am Posts: 1401 Location: Canada
|
 Re: torper question
Kaus wrote: Sorry shoulda been more specific, I was on my Blackberry earlier, darn thing cant type worth trash sometimes... Anyways lets say I wanted to track fig hits to build a trajectory. More specifically I wanted to literally triangulate a sector by comparing multiple sectors, a example would be a surround(literally) fotoner. While a Surround fotoner is not what I'm working on, it would essentially work the same way in my eyes. Multiple fig hits all within 2 hits of eachother, triangulate originating sector and torp it. So in a nutshell I'd like to build x variables (without defining them prior to the loop) to compare based of similar/same textlines and not sure if a while loop works that way or will allow it. I appologise I'm not being more specific in my textline but I want to build it for the tourney sing is hosting and would hate for the offending corp's to change there ways prior to my torp  Sounds to me like you're describing an Anticipation routine (?) ...you should check out Cherokee's SUPER FOTON, in Anticipation Mode. putting aside the fact that almost all good players (better than me  ), almost never, ever, never-ever Mow, or surround sectors, we'll pretend that someone is clearing dead ends.. I would start with a simple fighit trigger, so let's say you hit my fig in sector 100. having parsed that I would do this: Code: setVar $i 1 while (sector.warps[100][$i] <> 0) setVar $ADJ sector.warps[100][$i] setTextLineTrigger (ADJ_ & $I) :GOT_SOME "Deployed Fighters Report Sector "&$ADJ&:" add $i 1 end setTextLineTrigger RESET :RESET "Deployed Fighters" pause
Without doing all the work for you, hehe, I would set my 'adjacent' triggers and proceed to determine if the next hit fig was a 2way with the next 'obvious' hit and foton *that* sector. if you fllow me. [EDIT] Probably should explain my use of the RESET Trigger. TWX processes TEXTLINETRIGGERS in order that they are set. So. IF the next Fighit is *not* one of the Adjacents (ADJ_ & $i), the routine should kill all triggers and reset --setting new adjacents. [CAVEAT] Code not tested. doubt it'll get you killed, but, just in case it does: Yer on ye own ...that's legal ease right there 
_________________ ---------------------------- -= QUANTUM Computing 101: 15 = 3 x 5 ... 48% of the time.
|
| Fri Feb 20, 2009 6:15 am |
|
 |
|
Kaus
Gameop
Joined: Tue Nov 19, 2002 3:00 am Posts: 1050 Location: USA
|
 Re: torper question
LoneStar wrote: Kaus wrote: Sorry shoulda been more specific, I was on my Blackberry earlier, darn thing cant type worth trash sometimes... Anyways lets say I wanted to track fig hits to build a trajectory. More specifically I wanted to literally triangulate a sector by comparing multiple sectors, a example would be a surround(literally) fotoner. While a Surround fotoner is not what I'm working on, it would essentially work the same way in my eyes. Multiple fig hits all within 2 hits of eachother, triangulate originating sector and torp it. So in a nutshell I'd like to build x variables (without defining them prior to the loop) to compare based of similar/same textlines and not sure if a while loop works that way or will allow it. I appologise I'm not being more specific in my textline but I want to build it for the tourney sing is hosting and would hate for the offending corp's to change there ways prior to my torp  Sounds to me like you're describing an Anticipation routine.  Code: setVar $i 1 while (sector.warps[100][$i] <> 0) setVar $ADJ sector.warps[100][$i] setTextLineTrigger (ADJ_ & $I) :GOT_SOME "Deployed Fighters Report Sector "&$ADJ&:" add $i 1 end setTextLineTrigger RESET :RESET "Deployed Fighters" pause
Without doing all the work for you, hehe, I would set my 'adjacent' triggers and proceed to determine if the next hit fig was a 2way with the next 'obvious' hit and foton *that* sector. if you fllow me. [EDIT] Probably should explain my use of the RESET Trigger. TWX processes TEXTLINETRIGGERS in order that they are set. So. IF the next Fighit is *not* one of the Adjacents (ADJ_ & $i), the routine should kill all triggers and reset --setting new adjacents. [CAVEAT] Code not tested. doubt it'll get you killed, but, just in case it does: Yer on ye own ...that's legal ease right there  Yes..just not one that is in the wild..might not work but if it does I'm gunning for u D
_________________ Dark Dominion TWGS Telnet://twgs.darkworlds.org:23 ICQ#31380757, -=English 101 pwns me=- "This one claims to have been playing since 1993 and didn't know upgrading a port would raise his alignment."
|
| Fri Feb 20, 2009 9:05 am |
|
 |
|
Singularity
Veteran Op
Joined: Thu Jun 02, 2005 2:00 am Posts: 5558 Location: USA
|
 Re: torper question
Laff. If you want to target a specific gridding method you need to know what that method is. There's no way to "triangulate" a hit, but if you know their pattern you can usually predict something. If you want us to help, we'll need more info on what that pattern is.
_________________ 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 Feb 20, 2009 10:44 am |
|
 |
|
Kaus
Gameop
Joined: Tue Nov 19, 2002 3:00 am Posts: 1050 Location: USA
|
 Re: torper question
Singularity wrote: Laff. If you want to target a specific gridding method you need to know what that method is. There's no way to "triangulate" a hit, but if you know their pattern you can usually predict something. If you want us to help, we'll need more info on what that pattern is. I already got my answer.... Thank you anyways If I told everyone way I'm working on the point of the script would be moot. I really just was trying to make sure I'm writing efficently. Lones example clarified my confusion.
_________________ Dark Dominion TWGS Telnet://twgs.darkworlds.org:23 ICQ#31380757, -=English 101 pwns me=- "This one claims to have been playing since 1993 and didn't know upgrading a port would raise his alignment."
|
| Fri Feb 20, 2009 1:08 pm |
|
 |
|
ElderProphet
Commander
Joined: Tue Oct 07, 2003 2:00 am Posts: 1134 Location: Augusta, GA
|
 Re: torper question
Kaus wrote: [quote="So in a nutshell I'd like to build x variables (without defining them prior to the loop) to compare based of similar/same textlines... If these variables are sector numbers, then a faster approach might be to use a boolean (true/false) array. So let's say you decide (by whatever secret method) that sectors 40, 50, and 60 are the sectors you want to test the CURRENTLINE against... Code: :setTestSectors setArray $boolArray SECTORS setVar $boolArray[40] TRUE # that is the same as: setVar $boolArray[40] 1 setVar $boolArray[50] TRUE setVar $boolArray[60] TRUE setTextLineTrigger figHit :figHit ""Deployed Fighters Report Sector " pause
:figHit getWord CURRENTLINE $sector 5 if ($boolArray[$sector]) # that is the same as: if ($boolArray[$sector] = 1) # which is also equivalent to: if ($boolArray[$sector] = TRUE) goto :attack end setTextLineTrigger figHit :figHit ""Deployed Fighters Report Sector " pause Obviously, you'd use a while loop to set the individual array elements instead of setVar, but that is an efficient method for testing one variable against a list of possible values. This boolean array approach is the best way in TWX to see if some variable is present in a list of other variables. Regards, +EP+
_________________ Claim to Fame: only guy to ever crack the TW haggle algorithm, and fig/shield/hold price formula, twice.
|
| Fri Feb 20, 2009 8:22 pm |
|
 |
|
|
Page 1 of 1
|
[ 9 posts ] |
|
Who is online |
Users browsing this forum: Bing [Bot] and 19 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
|
|