View unanswered posts | View active topics It is currently Sun Apr 19, 2026 11:57 pm



Reply to topic  [ 9 posts ] 
 Attack right person 
Author Message
Lieutenant

Joined: Sat Mar 03, 2001 3:00 am
Posts: 592
Location: USA
Unread post 
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
Profile ICQ YIM WWW
Ensign

Joined: Thu Oct 31, 2002 3:00 am
Posts: 234
Location: USA
Unread post 
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
Profile ICQ YIM WWW
Lieutenant

Joined: Sat Mar 03, 2001 3:00 am
Posts: 592
Location: USA
Unread post 
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
Profile ICQ YIM WWW
Chief Warrant Officer
User avatar

Joined: Sun Mar 30, 2003 3:00 am
Posts: 186
Location: USA
Unread post 
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
Profile
Ensign

Joined: Thu Jan 23, 2003 3:00 am
Posts: 206
Location: USA
Unread post 
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

Image


Sun May 23, 2004 10:26 pm
Profile ICQ WWW
Lieutenant

Joined: Sat Mar 03, 2001 3:00 am
Posts: 592
Location: USA
Unread post 
Yes I tried using settexttrigger and settextlinetrigger instead of waitfor. No help.


Sun May 23, 2004 11:13 pm
Profile ICQ YIM WWW
Gunnery Sergeant

Joined: Wed Apr 04, 2001 2:00 am
Posts: 20
Unread post 
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
Profile
Lieutenant

Joined: Sat Mar 03, 2001 3:00 am
Posts: 592
Location: USA
Unread post 
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
Profile ICQ YIM WWW
Ambassador
User avatar

Joined: Mon Feb 09, 2004 3:00 am
Posts: 3141
Location: Kansas
Unread post 
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
Profile ICQ
Display posts from previous:  Sort by  
Reply to topic   [ 9 posts ] 

Who is online

Users browsing this forum: No registered users and 13 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

Search for:
Jump to:  
cron
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group.
Designed by wSTSoftware.