View unanswered posts | View active topics It is currently Tue Apr 21, 2026 11:50 am



Reply to topic  [ 19 posts ]  Go to page 1, 2  Next
 Pscan ala Holo command 
Author Message
Commander
User avatar

Joined: Wed May 03, 2006 2:00 am
Posts: 1722
Location: USA
Unread post 
worthless cuz the data wraps around and looks like crap.
So I thru together one today that uses parsed data and pads out the data into nice columns ...I hope....laff.  Well any way the code is at navhaz.com for anyone that wants to see it as well as a CTS for use in MOMbot. 


Mon Apr 09, 2007 10:59 pm
Profile ICQ YIM
Gameop

Joined: Thu Jun 06, 2002 2:00 am
Posts: 2371
Location: USA
Unread post 
Care to elaborate? Pscan ala holo command?
I may be overly tired, but I don't understand what that means.

_________________
Ask Slim!

--==[The Outfit]==--


Tue Apr 10, 2007 12:15 am
Profile ICQ WWW
Veteran Op
User avatar

Joined: Thu Jun 02, 2005 2:00 am
Posts: 5558
Location: USA
Unread post 
Holoscan from a planet? You don't actually have to pad it all out, the data comes padded pretty nicely and rarely wraps except some very long lines. Dscan takes more effort tho.

_________________
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
Image


Tue Apr 10, 2007 12:49 am
Profile ICQ WWW
Commander
User avatar

Joined: Fri Jun 09, 2006 2:00 am
Posts: 1401
Location: Canada
Unread post 
Parrothead wrote:
worthless cuz the data wraps around and looks like crap.
So I thru together one today that uses parsed data and pads out the data into nice columns ...I hope....laff.  Well any way the code is at navhaz.com for anyone that wants to see it as well as a CTS for use in MOMbot. 


Sigh. What PHead is refering to is a script I made to send info out via SubSpace:



Instead of kindly letting me know there's a problem, he choose to one-up me and 'do it right' ..I guess.

I think PHead's still miffed I wont give him the source to the News Reader I wrote, or the DockShopper, or that I SD'd him in a game not too long ago. In true adolescent fashion witness an appeased ego. To para phrase the PHead himself... all hail the great PHead

_________________
----------------------------
-= QUANTUM Computing 101: 15 = 3 x 5 ... 48% of the time.


Tue Apr 10, 2007 1:05 am
Profile ICQ YIM
Veteran Op
User avatar

Joined: Thu Jun 02, 2005 2:00 am
Posts: 5558
Location: USA
Unread post 
Oh, ok. That's not a "pscan" ... when I think of a pscan I think of hitting "S" from the scan menu. But putting planet info out to SS has it's uses, too.

Yea, that does look like it wraps pretty badly. Suppose you could just read it all into a data structure and spit it back out the way you want tho.

Is that what you did? Because there's a chance to learn different restructuring tricks here.

_________________
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
Image


Tue Apr 10, 2007 2:16 am
Profile ICQ WWW
Commander
User avatar

Joined: Wed May 03, 2006 2:00 am
Posts: 1722
Location: USA
Unread post 
well actually ala holo means this............simplistic for explaination
settexttrigger one ne
waiton "Command [TL"
goto :send it
send "sh
pause
add $idx
setvar $line[$idx] currentline
:sendit
setvar $i 1
send "'*"
while($i <= $idx)
send $line[$i]
add $i 1
end
send "*"
this is ala "HOLO"......sorry for the confusion.
 
As we can see here that were just sending the holoscan over subspace by grabbing all the lines and resending....works great for Holo,,sector scans and a few other things.
Lonestar wrote:
Sigh. What PHead is refering to is a script I made to send info out via SubSpace:

Pscan = Planet Data..again sorry for confusion.
Actually this is not an origanial idea. And the script I was refering to was the one I wrote for my own Bot in which I was unhappy because Data would wrap around on the recieving side. Yes info was there but didnt look nice so I thru this together today using a Pack2 include..slightly modified .
Thought some of the newer scripters might like to see the padding code and or see how an include is used so they can do their own stuff.
I havent had time to look at your script Lonestar so I would have no comment on how it works. Most of the coding I do is too complicated to post as a learning tool without extensive comments so I thought I would post this one which is simple and straight foward.
As to the last comment...well I am not miffed at anyone nor do I have a need to one up anyone but If you have that opinion then perhaps I am at fault in some way. If thats the case except my best wishes and apologies.
 
 


Tue Apr 10, 2007 2:36 am
Profile ICQ YIM
Commander
User avatar

Joined: Fri Jun 09, 2006 2:00 am
Posts: 1401
Location: Canada
Unread post 
Singularity wrote:
Yea, that does look like it wraps pretty badly. Suppose you could just read it all into a data structure and spit it back out the way you want tho.

Is that what you did? Because there's a chance to learn different restructuring tricks here.


I'm probably missing something.. I really don't see it wrapping any lines (?)

I'm always willing to learn new tricks -esp data structuring. However; I wrote the script a-la-Holo scan, coded in a similar fashion as the Holo command for simplicity. I also tried to appreciate what's familiar to the eye. In other words, I opted to send out the planet data, verbatum, to allow for maximum recongnition and familiarity.

_________________
----------------------------
-= QUANTUM Computing 101: 15 = 3 x 5 ... 48% of the time.


Tue Apr 10, 2007 3:01 am
Profile ICQ YIM
Commander
User avatar

Joined: Wed May 03, 2006 2:00 am
Posts: 1722
Location: USA
Unread post 
LS wrote:
I'm probably missing something.. I really don't see it wrapping any lines (?)

Planet scan exceeds the Swath line limit by 4 characters forcing a line wrap when recieving the data. If your using a full 80 column telnet client it wont be visable as Twgs is not wrapping the line.


Tue Apr 10, 2007 3:16 am
Profile ICQ YIM
Veteran Op
User avatar

Joined: Thu Jun 02, 2005 2:00 am
Posts: 5558
Location: USA
Unread post 
Well when I wrote the holoscan and dscan routines for the bot I simply did small changes like removing commas, removing some double spaces, etc. This shrunk it enough for me to get it all on one screen. The holoscan screen wasn't a big problem except some long planet and ship names (rare), dscan needed it more. Planet display (the qdc) would need more work.

There are some times where that wouldn't work tho, so an efficient and quick way to restructure data without requiring everything to be read into an array and spit back out... would be nice.

And uhm phead... laff, your code above doesn't work. You might wanna fix that .

_________________
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
Image


Tue Apr 10, 2007 3:25 am
Profile ICQ WWW
Commander
User avatar

Joined: Wed May 03, 2006 2:00 am
Posts: 1722
Location: USA
Unread post 
Sing wrote:
And uhm phead... laff, your code above doesn't work. You might wanna fix that

Code:
#:K_remote~holo
:holo
setdelaytrigger rholodelay4 :9_waittrigger~timeout 14000
send "q q q q z r * "
waitfor "Command [TL="
gosub :9_comms~off
send "s"
waiton "Select (H)olo Scan"
send "h"
setvar $i 1
:hololoop
killtrigger holoscan
killtrigger holoend
settexttrigger holoend :holoend "Command [TL="
settextlinetrigger holoscan :holoscan
pause
:holoend
killalltriggers
goto utputholo
:holoscan
setvar $line[$i] CURRENTLINE
add $i 1
goto :hololoop
utputholo
setvar $sheader "-=-=-=-=-=-=-=-=-=-=-=-=-| Holo Scan |-=-=-=-=-=-=-=-=-=-=-=-=-*"
gosub :9_promptck~land
setdelaytrigger lscan9 :wait_to_land 2000
pause
:wait_to_land
goto :sendscanner
 
:sendscanner
killalltriggers
setvar $count ($i - 1)
send "'*"
send $sheader
setvar $j 1
while ($j <= $count)
if ($line[$j] = "")
send ".*"
else
send $line[$j] & "*"
end
setvar $line[$j] ""
add $j 1
end
send $sheader & "*"
gosub :9_waittrigger~waittrigger
return

well actually this is the code I use for Holo less some include subroutines and error checks
[/code]
the above was meant as an example of ala Holo for those not fimilar with bot code. the planet info was the only spot were a direct rebroadcast of the data seemed to be an issue. and it was posted as an example of padding and use of includes for the newer scripters. Seems to be alot of arguement over scripting 101 code here.


Tue Apr 10, 2007 5:22 pm
Profile ICQ YIM
Veteran Op
User avatar

Joined: Thu Jun 02, 2005 2:00 am
Posts: 5558
Location: USA
Unread post 
Hehe... ok. The original was missing some stuff .

FYI: You don't actually need to do most of that. You can qd, get planet num, qsh* l ## * then get the results. It's much quicker if the enemy is dtorping, if you wait for the prompt and then wait for subsequent prompts you could get hit. Also it would freeze if they don't have a holoscanner. Catching a macro solves that.

Anyway, I wanted to get a discussion going on how to best restructure game text.

_________________
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
Image


Tue Apr 10, 2007 7:33 pm
Profile ICQ WWW
Commander
User avatar

Joined: Wed May 03, 2006 2:00 am
Posts: 1722
Location: USA
Unread post 
well actually this is the code I use for Holo less some include subroutines and error checks
i guess you missed this statement...good thought on speed tho..i will speed it up...quality and redundant error checking is key however...this code wont go off is a holo is missing so that isnt a problem.
 
How would you like it restructured?


Tue Apr 10, 2007 8:23 pm
Profile ICQ YIM
Veteran Op
User avatar

Joined: Thu Jun 02, 2005 2:00 am
Posts: 5558
Location: USA
Unread post 
I'm talking about the 2nd snippet of code...

Code:
goto :send it
send "sh
pause
add $idx
setvar $line[$idx] currentline


Uhm... add $idx... what? That code is far from complete.

What I was saying about the holo is that in order to do it that way you have to check stuff before the scan, which slows it down and makes it more prone to error. Take for instance getting torped on the lift... you can't holoscan but the script thinks you can, getting you stuck in the sector. Now someone can pgrid in and make your life suck.

An easy solution is to make a macro that takes in account most (if not all) of the possibilities, then trigger on the various outputs. Since the code is already executed and stuff is being handled thru trigger, a timeout (5 seconds or whatever) can take care of the lockup w/o adding any risk. This is a change I made in a later version of my bot, so not everyone is familiar with how it's done.

_________________
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
Image


Tue Apr 10, 2007 9:40 pm
Profile ICQ WWW
Commander
User avatar

Joined: Wed May 03, 2006 2:00 am
Posts: 1722
Location: USA
Unread post 
we seem to be talking about 2 different things here...the code in the top you were refering to was a typed in for reference only not working code to explain what ala holo means. i.e. "capture all lines hold in array and resend"


Tue Apr 10, 2007 9:48 pm
Profile ICQ YIM
Veteran Op
User avatar

Joined: Thu Jun 02, 2005 2:00 am
Posts: 5558
Location: USA
Unread post 
Right, I realized that earlier... hence why I clarified in my last post .

_________________
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
Image


Tue Apr 10, 2007 10:47 pm
Profile ICQ WWW
Display posts from previous:  Sort by  
Reply to topic   [ 19 posts ]  Go to page 1, 2  Next

Who is online

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