| www.ClassicTW.com https://mail.black-squirrel.com/ |
|
| torper question https://mail.black-squirrel.com/viewtopic.php?f=15&t=21579 |
Page 1 of 1 |
| Author: | Kaus [ Thu Feb 19, 2009 8:07 pm ] |
| Post subject: | 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 |
|
| Author: | Promethius [ Thu Feb 19, 2009 9:15 pm ] |
| Post subject: | 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. |
|
| Author: | Kaus [ Thu Feb 19, 2009 10:09 pm ] |
| Post subject: | 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 |
|
| Author: | Big D [ Fri Feb 20, 2009 1:22 am ] |
| Post subject: | 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. |
|
| Author: | LoneStar [ Fri Feb 20, 2009 6:15 am ] |
| Post subject: | 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 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 |
|
| Author: | Kaus [ Fri Feb 20, 2009 9:05 am ] |
| Post subject: | 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 |
|
| Author: | Singularity [ Fri Feb 20, 2009 10:44 am ] |
| Post subject: | 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. |
|
| Author: | Kaus [ Fri Feb 20, 2009 1:08 pm ] |
| Post subject: | 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. |
|
| Author: | ElderProphet [ Fri Feb 20, 2009 8:22 pm ] |
| Post subject: | 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+ |
|
| Page 1 of 1 | All times are UTC - 5 hours |
| Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group http://www.phpbb.com/ |
|