| Author |
Message |
|
PHX
Lieutenant
Joined: Sat Mar 03, 2001 3:00 am Posts: 592 Location: USA
|
How do you skip over attacking unmanned ships and then hitting the correct ship. Either that or look for a specific person, and not just hit any manned ship.
This is what I have....assuming $who = venom .
send "a"
:checkattack
waitfor "Attack "
getword CURRENTLINE $live 2
striptext $live "'s"
if ($live = $who)
send "y " $max "*"
else
send "n"
goto :checkattack
end
But this is what happened...
]:[3601] (?=Help)? : A
<Attack>
Notack 1 [1]'s unmanned Phoenix (70,187-8) (Y/N) [N]?
Notack venom's Phoenix (70,187-79,980) (Y/N) [N]?
Command [TL=00:00:00]:[3601] (?=Help)? : N
<Set Course to NavPoint>
(T) Sector : 1 in The Federation.
Ports : Sol, Class 0 (Special)
Planets : (M) Terra
(S) Sector : 297 in The Federation.
Ports : Stargate Alpha I, Class 9 (Special) (StarDock)
(1) Sector : 6682 in uncharted space.
Ports : Crimson Outpost, Class 3 (SBB)
(2) Sector : 50 (Unknown)
(3) Sector : 495 (Unknown)
Choose NavPoint (?=Help) [Q] :
I have check and the script does accurately get both $who and $live.
I have also tried grabbing word 4 in the attack line and used an IF command to see if that word is "unmanned"...results are the same.
|
| Sun May 23, 2004 8:29 pm |
|
 |
|
Rofellos
Ensign
Joined: Thu Oct 31, 2002 3:00 am Posts: 234 Location: USA
|
I'm not a scripter, but does it matter if it says "venom's" rather than "venom"?
_________________ One bone broken for every twig snapped underfoot. -Llanowar penalty for trespassing
|
| Sun May 23, 2004 9:01 pm |
|
 |
|
PHX
Lieutenant
Joined: Sat Mar 03, 2001 3:00 am Posts: 592 Location: USA
|
Yes it does...that is why I put in
striptext $live "'s"
it gets rid of the "'s" before checking for a match.
|
| Sun May 23, 2004 10:07 pm |
|
 |
|
typh00n
Chief Warrant Officer
Joined: Sun Mar 30, 2003 3:00 am Posts: 186 Location: USA
|
if you dont want to shoot at unmanned ships - at all
use the twx db to count the # of unmanned ships in sector
(SECTOR.SHIPCOUNT[$sector] i think )
and then just add 'n's accordingly
|
| Sun May 23, 2004 10:24 pm |
|
 |
|
Wotok
Ensign
Joined: Thu Jan 23, 2003 3:00 am Posts: 206 Location: USA
|
Try this....
send "a"
:checkattack
setTextTrigger attack :attack "Attack "
pause
:attack
getword CURRENTLINE $live 2
striptext $live "'s"
if ($live = $who)
send "y " $max "*"
else
send "n"
goto :checkattack
end
_________________ --==[ http://tradewars.wotok.com ]==--
rm -rf /bin/laden
|
| Sun May 23, 2004 10:26 pm |
|
 |
|
PHX
Lieutenant
Joined: Sat Mar 03, 2001 3:00 am Posts: 592 Location: USA
|
Yes I tried using settexttrigger and settextlinetrigger instead of waitfor. No help.
|
| Sun May 23, 2004 11:13 pm |
|
 |
|
Agent D
Gunnery Sergeant
Joined: Wed Apr 04, 2001 2:00 am Posts: 20
|
im not an expert scripter but dont u have to define $max ?
_________________ I am a figment of your imagination. I am MIB.
|
| Mon May 24, 2004 12:05 am |
|
 |
|
PHX
Lieutenant
Joined: Sat Mar 03, 2001 3:00 am Posts: 592 Location: USA
|
Max is defined already....this is only part of a much larger script that I like to call "Neighborhood Watch"
$max is the max figs per attack of course which is grabbed automatically by the script earlier on.
|
| Mon May 24, 2004 3:00 am |
|
 |
|
Promethius
Ambassador
Joined: Mon Feb 09, 2004 3:00 am Posts: 3141 Location: Kansas
|
quote:Originally posted by PHX
How do you skip over attacking unmanned ships and then hitting the correct ship. Either that or look for a specific person, and not just hit any manned ship.
This is what I have....assuming $who = venom .
send "a"
:checkattack
waitfor "Attack "
getword CURRENTLINE $live 2
striptext $live "'s"
if ($live = $who)
send "y " $max "*"
else
send "n"
goto :checkattack
end
I tried your code snippet and it worked w/o any problem with one minor change:
send "y " $max "*" changed to send "y" $max "*"
I just eliminated the space after the "y" - this was on a version .56 server. I didn't test it extensively - just the first time when it worked after the change.
_________________
/ Promethius / Enigma / Wolfen /
"A man who has no skills can be taught, a man who has no honor has nothing."
|
| Mon May 24, 2004 5:08 am |
|
 |
|