View unanswered posts | View active topics It is currently Thu Mar 28, 2024 3:24 am



Reply to topic  [ 9 posts ] 
 Swath help and advice needed > 
Author Message
Sergeant Major
User avatar

Joined: Tue Nov 26, 2013 9:11 pm
Posts: 50
Unread post Swath help and advice needed >
I'm an old player returning to the game and I am needing a bit of help/advice.

I have Swath v2.0

What I need, I would like to mass jettison or buy dump to a planet, but specify buy the products in the amounts I choose. Like if at an SSS port, I want to be able to select buy 50 ore, 20 Org, 10 EQ, so I gain the XP, etc. Anyway to do this? Or a swath script already written for it?

Also I use many macros with Swath... I really want to run macros with the 'helper' still on, how can I do that??

TY in advance guys/gals!

TroyTiger


Wed Aug 16, 2017 6:49 pm
Profile
Gameop

Joined: Mon Jan 15, 2007 2:41 am
Posts: 342
Unread post Re: Swath help and advice needed >
Hi TroyTiger,

Check the grimmytraders website for swatch scripts. I am unsure if what you are looking for is there but that would be a great place to start.

99% of the player population base uses TWX Proxy now, and the 1% that does not use it, well, I have not talked to anyone in a long time that does not use TWX Proxy.

There are many threads here that talk about how to set it up. It will work in conjunction with swatch which makes it a powerful set of tools.

Cruncher has some games that are geared towards returning players. I also have a test game on my server (game z) that is just for playing around so it is a good place to practice (I do script testing there). And if you run into problems be sure to ask your questions here. Always nice to see a returning player.

How long have you been away?

_________________
Where Chaos Reigns TW Server
chaos-twgs.com:23


Wed Aug 16, 2017 11:57 pm
Profile ICQ
Sergeant Major
User avatar

Joined: Tue Nov 26, 2013 9:11 pm
Posts: 50
Unread post Re: Swath help and advice needed >
Oh boy, Its been awhile. I could guess anywhere between 7-12 years ago. :(

I have never tried that TWX proxy thing, i guess maybe I will have to look at it.


Thu Aug 17, 2017 10:06 am
Profile
Ambassador
User avatar

Joined: Fri Feb 23, 2001 3:00 am
Posts: 4016
Location: USA
Unread post Re: Swath help and advice needed >
TroyTiger wrote:
Oh boy, Its been awhile. I could guess anywhere between 7-12 years ago. :(

I have never tried that TWX proxy thing, i guess maybe I will have to look at it.



Welcome back!

I'm not aware of a Swath or TWXProxy script that does what you're asking for, but there is a script that does a damned fine job haggling for you. Look for Elder Prophet's haggler.

One of the most efficient ways to gain experience is simply to bust planets. There's a script for that too, and you can do it at Star Dock.

_________________

BOTE 1998 Champs: Team Fament
HHT 2015 Champs: Cloud09
Big Game 2016 Champs: Draft team
HHT 2018 Champs: Rock Stars
Big Game 2019 Champs: Draft Team


Classic Style Games Here:
telnet://crunchers-twgs.com:2002

Web page from 1990's: https://web.archive.org/web/20170103155645/http://tradewars.fament.com/Cruncher/tradewar.htm
Blog with current server info: http://cruncherstw.blogspot.com
Discord: https://discord.gg/4dja5Z8
E-mail: Cruncherstw@gmail.com
FaceBook: http://www.facebook.com/CrunchersTW


Thu Aug 17, 2017 9:29 pm
Profile ICQ WWW
Sergeant Major
User avatar

Joined: Tue Nov 26, 2013 9:11 pm
Posts: 50
Unread post Re: Swath help and advice needed >
Thanks Cruncher,

I was also looking at busting planets, but sometimes I want to avoid people seeing what I'm doing. ;-)

I really wished I could use Swath macros with the helper still on. For some reason Swath turns off the helper when recording and using a macro. :/


Fri Aug 18, 2017 1:49 pm
Profile
Ambassador
User avatar

Joined: Fri Feb 23, 2001 3:00 am
Posts: 4016
Location: USA
Unread post Re: Swath help and advice needed >
TroyTiger wrote:
Thanks Cruncher,

I was also looking at busting planets, but sometimes I want to avoid people seeing what I'm doing. ;-)

I really wished I could use Swath macros with the helper still on. For some reason Swath turns off the helper when recording and using a macro. :/


I always have the helper turned off, it interferes with TWXProxy.

_________________

BOTE 1998 Champs: Team Fament
HHT 2015 Champs: Cloud09
Big Game 2016 Champs: Draft team
HHT 2018 Champs: Rock Stars
Big Game 2019 Champs: Draft Team


Classic Style Games Here:
telnet://crunchers-twgs.com:2002

Web page from 1990's: https://web.archive.org/web/20170103155645/http://tradewars.fament.com/Cruncher/tradewar.htm
Blog with current server info: http://cruncherstw.blogspot.com
Discord: https://discord.gg/4dja5Z8
E-mail: Cruncherstw@gmail.com
FaceBook: http://www.facebook.com/CrunchersTW


Fri Aug 18, 2017 10:46 pm
Profile ICQ WWW
Ambassador

Joined: Wed Feb 28, 2001 3:00 am
Posts: 1410
Location: Boo! inc. Ireland
Unread post Re: Swath help and advice needed >
TroyTiger wrote:
Oh boy, Its been awhile. I could guess anywhere between 7-12 years ago. :(

I have never tried that TWX proxy thing, i guess maybe I will have to look at it.


I remember a player named TroyTiger when I restarted 20 years ago, was on eclipse.ultranet.com. That you?

The Reverend wrote a script for ZOC that does what you want. I believe that SWATH can run ZOC scripts. I have only used SWATH once a long time ago and have never used The Reverend's jet script, so test it somewhere harmless. Tried to attach it here, but .zrx attachments not allowed.

Its hereunder in text, save it as _MEGAJET.ZRX


/* REXX _megajet.zrx by the reverend (build 126) */
/*- built by rev-builder version 1.3a on 15 Mar 2004 at 22:45:21 -*/
/*- ------------------------------------------------------------------------ -*/
/*- Copyright (C) 2003 Ron Wilson -*/
/*- -*/
/*- This script is free, and can be modified for your personal use, but you -*/
/*- cannot copy or distribute this script or any derivative work based upon -*/
/*- this script without the express permission of the author. Your use of -*/
/*- this script is governed by the terms of the REV-LICENSE. -*/
/*- -*/
/*- This program is provided to you WITHOUT ANY WARRANTY, even the implied -*/
/*- warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -*/
/*- REV-LICENSE for more details. -*/
/*- -*/
/*- A copy of the REV-LICENSE is available at: -*/
/*- http://thereverend.coastgames.com/trade ... cense.html -*/
/*- ------------------------------------------------------------------------ -*/
/*- ---------------------*/ _g.!sname="_megajet.zrx" /*--------------------- -*/
/*- --------------*/ _g.!sbuild=126; _g.!sdate="2004-03-15" /*-------------- -*/
/*- ------------------------------------------------------------------------ -*/
/* description: repeatedly buys ore, organics, and equipment in small */
/* quantities from SSS port for experience - then jetissons */
/* them. */
/* rev. 0 - initial release */
/* rev. 1 - bug fix */

globals=_setglobals()
call _timeout 30
call zocsynctime 500
call on halt name _halt

prod.1="Fuel Ore"
prod.2="Organics"
prod.3="Equipment"
holds.1=15
holds.2=12
holds.3=6

call zocrespond prod.1||" do you want to sell [", "0^M"
call zocrespond prod.2||" do you want to sell [", "0^M"
call zocrespond prod.3||" do you want to sell [", "0^M"

call _jetisson

bdone=0
do while \bdone
if _buy() then call _jetisson
end /*do*/

call zocrespond prod.1||" do you want to sell ["
call zocrespond prod.2||" do you want to sell ["
call zocrespond prod.3||" do you want to sell ["

call _quit "megajet complete."

exit

_buy:

call zocsend "pt"

if zocwait(" -------^M")=640 then call _error "timeout"
if zocwait("^M")=640 then call _error "timeout"
pore=_lastline()
if pore=640 then call _error "timeout"
if zocwait("^M")=640 then call _error "timeout"
porg=_lastline()
if porg=640 then call _error "timeout"
if zocwait("^M")=640 then call _error "timeout"
pequ=_lastline()
if pequ=640 then call _error "timeout"

pore=_stripint(substr(pore,17,9))
porg=_stripint(substr(porg,17,9))
pequ=_stripint(substr(pequ,17,9))

if pore<holds.1 then bdone=1
if porg<holds.2 then bdone=1
if pequ<holds.3 then bdone=1

trsuccess=0
tdone=0
do while \tdone

tans=zocwaitmux(prod.1||" do you want to buy [", ,
prod.2||" do you want to buy [", ,
prod.3||" do you want to buy [", ,
"Command [", ,
"You don't have anything")
if tans<3 then do
j=tans+1
if zocwait("]")=640 then call _error "timeout"
amount=_stripint(_lastline())
call zocsend min(amount,holds.j)||"^M"
if zocwait("Your offer [")=640 then call _error "timeout"
if zocwait("]")=640 then call _error "timeout"
offer=_stripint(_lastline())
end /*if*/

select
when tans=0 then trsuccess=_buyhaggle2(offer)
when tans=1 then trsuccess=_buyhaggle2(offer)
when tans=2 then trsuccess=_buyhaggle2(offer)

when tans=3 then tdone=1
when tans=4 then call _quit "nothing to trade"
when tans=640 then call _error "timeout"
end /*select*/

end /*do*/

return trsuccess

/*** THE REVEREND'S TW LIBRARY FOR ZOC/REXX ***/

/** _setglobals v.4 **/
_setglobals: procedure expose _verbose _monthdays _monthnames _baseday. _g. _msg. (globals)

_verbose=0
_msg.=""; _msg.0=0
_monthdays="31;28;31;30;31;30;31;31;30;31;30;31"
_monthnames="jan;feb;mar;apr;may;jun;jul;aug;sep;oct;nov;dec"
_baseday.2000=730118
_baseday.2001=_baseday.2000+365+1
_baseday.2002=_baseday.2001+365
_baseday.2003=_baseday.2002+365
_baseday.2004=_baseday.2003+365
_baseday.2005=_baseday.2004+365+1
_baseday.2006=_baseday.2005+365
_baseday.2007=_baseday.2006+365
_baseday.2008=_baseday.2007+365

i=lastpos(".",_g.!sname)
if i=0 then _g.!sname1=_g.!sname
else _g.!sname1=left(_g.!sname,i-1)

rslt="_g. _ini. _s. _p. _d. _v. _f. _m. _l. _q. _sl. _ex. _qs. "
rslt=rslt||"_ef. _es. _et. _ep. "
rslt=rslt||"_path. _dist. _dtomsl. _dfrmsl. "
rslt=rslt||"_bg. _nwt. _nwi. _nwo. _nw. _nwt. _od. _sv. _pv. _vs. _vn. _vi. _mcic. _fh. "
rslt=rslt||"_clv. _online. _msg _msg. "
rslt=rslt||"_verbose _monthdays _monthnames _baseday. "
rslt=rslt||"globals "
if arg(1,"E") then rslt=rslt||arg(1)

rslt=_space(rslt)
return rslt

/** _timeout v.1 **/
_timeout: procedure expose (globals)
if _g.!timeout="_G.!TIMEOUT" then _g.!timeout=60
rslt=_g.!timeout
nt=_stripint(arg(1))
if arg(1,"E") & nt>0 then do
call zoctimeout nt
_g.!timeout=nt
end /*if*/
return rslt

/** _halt v.4 **/
_halt: procedure expose (globals)
call off halt
call _cleanup
call zocwriteln "^[[1;33m< user abort >^[[0m "
exit
return

/** _jetisson v.1 **/
_jetisson: procedure expose (globals)
call zocsend "jy"
if zocwait("Command [")=640 then call _error "timeout"
rslt=1
return rslt

/** _quit v.7 **/
_quit: procedure expose (globals)
lcpy=1
arg1=""
do i=1 to 2 /* manage arguments */
select
when arg(i,"E") & lower(arg(i))="nocopy" then lcpy=0
when arg(i,"E") & arg1="" then arg1=arg(i)
otherwise nop
end /*select*/
end /*do*/
line=zocgetscreen(0, zocgetinfo("CURSOR-Y"), zocgetinfo("CURSOR-X"))
select /* define message */
when lcpy & arg1="" then msg="^[[1;32m< end script >^[[0m^M^J"||line
when \lcpy & arg1="" then msg="^[[1;32m< end script >^[[0m "
when lcpy then msg="^[[1;32m^M^J< end script: "||arg1||" >^[[0m^M^J"||line
when \lcpy then msg="^[[1;32m^M^J< end script: "||arg1||" >^[[0m "
otherwise nop
end /*select*/
call zocwrite msg
select /* choose a beep */
when lower(arg1)="script cancelled by user." then call _beep "cancel.wav"
otherwise call _beep "quit.wav"
end /*select*/
exit
return 1

/** _error v.8 **/
_error: procedure expose (globals)
call off halt
call _cleanup
call zocwrite _ansi("clearline;bt;frd")||"< script error ("||_g.!sname||" b."||_g.!sbuild||")"
if arg(1,"E") then call zocwrite " : "||arg(1)
call zocwriteln " >"
call zocwriteln _ansi("bt;fye")||"< if this is a serious problem, email me at: the.reverend@coastgames.com > "
call zocwriteln "< SCRIPT "||_g.!sname||", BUILD "||_g.!sbuild||", DATE "||_g.!sdate||" > "
call zocwriteln "< ZOC VERSION '"||zocgetinfo("VERSION")||"', OS '"||zocgetinfo("OSYS")||"', LOCATION '"||zocgetinfo("CONNECTEDTO")||"' >"
if arg(2,"E") then call zocwriteln _ansi("bt;fgr")||"< "||arg(2)||" >"
call _beep "error.wav"
exit

/** _lastline v.3 **/
_lastline: procedure expose (globals)
rslt=zoclastline()
select
when lower(arg(1))="raw" then nop
when pos(d2c(7),rslt)>0 then rslt=translate(zocstring("REMOVE", rslt, d2c(7))," ",d2c(0)||d2c(10))
otherwise rslt=translate(rslt," ",d2c(0)||d2c(10))
end /*select*/
return rslt

/** _stripint v.4 **/
_stripint: procedure expose (globals)
mask=_space(translate(arg(1)," ","-0123456789,"," "),0)
rslt=word(_space(translate(_stripcomma(arg(1))," ",mask," ")),1)
if rslt="" | rslt="-" then do; call _set_msg "##NAN##", "_stripint"; rslt=0; end
else do
if left(rslt,1)="-" then neg="-"; else neg=""
rslt=_space(translate(rslt," ","-"),0)
if length(rslt)>9 then rslt=left(rslt,9)
rslt=neg||rslt
end /*else*/
return rslt

/** _buyhaggle2 v.2 **/
_buyhaggle2: procedure expose (globals)
portoffer=arg(1)
offer=trunc(portoffer/1.06)

success=1

call zocsend offer||"^M"
iter=1

done=0
do while \done

ans=_waitmux("We'll sell them for|Our final offer|We're not interested.|You have")
select

when ans=0 then do
if _wait("Your offer [")=640 then call _error "timeout"
newportoffer=_stripint(_grabit("]"))
iter=iter+1
newoffer=trunc(offer*max(1.003,(newportoffer/portoffer)))
if newoffer<=offer then newoffer=offer+1
offer=newoffer
portoffer=newportoffer
call zocsend offer||"^M"
end /*when*/

when ans=1 then do
if _wait("Your offer [")=640 then call _error "timeout"
finalportoffer=_stripint(_grabit("]"))
iter=iter+1
factor=0.5
if iter<3 then factor=0.6
offer=trunc(offer*(1-factor) + finalportoffer*factor)
call zocsend offer||"^M"
end /*when*/

when ans=2 then do
done=1
success=0
end /*when*/

when ans=3 then done=1

when ans=640 then call _error "timeout"

otherwise nop

end /*select*/

end /*while*/

return success

/** _space v.1 **/
_space: procedure expose (globals)
str=strip(arg(1))
if arg(2,"E") then n=arg(2); else n=1
if arg(3,"E") then pad=arg(3); else pad=" "
rslt=word(str,1)
do i=2 to words(str)
rslt=rslt||copies(pad,n)||word(str,i)
end /*do*/
return rslt

/** _cleanup v.1 **/
_cleanup: procedure expose (globals)
/* put code here to do custom cleanup
for specific scripts and override
it in your main program */
return 1

/** _beep v.2 **/
_beep: procedure expose (globals)
if arg(2,"E") then n=arg(2); else n=1
if arg(3,"E") then d=arg(3); else d=0
select
when arg(1,"O") then call zocwrite copies(d2c(7),n)
when _fileexists(arg(1)) then do
do i=1 to n
call zocplaysound arg(1)
if i\=n & d>0 then call zocdelay d
end /*do*/
end /*when*/
otherwise call zocwrite copies(d2c(7),n)
end /*select*/
return

/** _ansi v.3 **/
_ansi: procedure expose (globals)
rslt="0"
pre=""
do i=1 to _dwords(arg(1),";")
w=_dword(arg(1),i,";")
select
when w="clearline" then pre=pre||"^[[100D^[[K"
when w="dl" then rslt=rslt||";"||0 /* dull */
when w="bt" then rslt=rslt||";"||1 /* bright */
when w="ul" then rslt=rslt||";"||4 /* underlined */
when w="blk" then rslt=rslt||";"||5 /* blinking */
when w="fbk" then rslt=rslt||";"||30 /* black foreground */
when w="frd" then rslt=rslt||";"||31 /* red foreground */
when w="fgr" then rslt=rslt||";"||32 /* green foreground */
when w="fye" then rslt=rslt||";"||33 /* yellow foreground */
when w="fbl" then rslt=rslt||";"||34 /* blue foreground */
when w="fmg" then rslt=rslt||";"||35 /* magenta foreground */
when w="fcy" then rslt=rslt||";"||36 /* cyan foreground */
when w="fwh" then rslt=rslt||";"||37 /* white foreground */
when w="bbk" then rslt=rslt||";"||40 /* black background */
when w="brd" then rslt=rslt||";"||41 /* red background */
when w="bgr" then rslt=rslt||";"||42 /* green background */
when w="bye" then rslt=rslt||";"||43 /* yellow background */
when w="bbl" then rslt=rslt||";"||44 /* blue background */
when w="bmg" then rslt=rslt||";"||45 /* magenta background */
when w="bcy" then rslt=rslt||";"||46 /* cyan background */
when w="bwh" then rslt=rslt||";"||47 /* white background */
otherwise nop
end /*select*/
end /*do*/
rslt=pre||"^[["||rslt||"m"
return rslt

/** _stripcomma v.1 **/
_stripcomma: procedure expose (globals)
rslt=translate(_space(translate(arg(1),", "," ,"),0)," ",",")
return rslt

_set_msg: procedure expose (globals)
i=_msg.0
if i="_MSG.0" then do; _msg.=""; _msg.0=0; i=0; end
i=i+1; _msg.0=i; _msg=""
if arg(1,"E") then do; _msg.i=arg(1); _msg=arg(1); end;
if arg(2,"E") then _msg.i.!source=arg(2)
if arg(3,"E") then _msg.i.!comment=arg(3)
return i

/** _waitmux v.1 **/
_waitmux: procedure expose (globals)
rslt=zocwaitmux(arg(1))
return rslt

/** _wait v.1 **/
_wait: procedure expose (globals)
rslt=zocwait(arg(1))
return rslt

/** _grabit v.2 **/
_grabit: procedure expose (globals)
if _wait(arg(1))=640 then call _error "timeout"
rslt=_lastline()
if lower(arg(2))="s" then rslt=reverse(substr(reverse(rslt),length(arg(1))+1))
return rslt

/** _fileexists v.4 **/
_fileexists: procedure expose (globals)
select
when \arg(1,"E") then call _error "missing parameter in _fileexists"
when arg(1)="" then rslt=0
when stream(arg(1), "C", "QUERY EXISTS")="" then rslt=0
otherwise rslt=1
end /*select*/
return rslt

/** _dwords v.2 **/
_dwords: procedure expose (globals)
rslt=words(translate(arg(1),arg(2)||" "," "||arg(2)))
return rslt

/** _dword v.2 **/
_dword: procedure expose (globals)
rslt=translate(word(translate(arg(1),arg(3)||" "," "||arg(3)),arg(2))," "||arg(3),arg(3)||" ")
return rslt


Thu Aug 24, 2017 12:03 pm
Profile
Ambassador

Joined: Wed Feb 28, 2001 3:00 am
Posts: 1410
Location: Boo! inc. Ireland
Unread post Re: Swath help and advice needed >
TroyTiger wrote:
Oh boy, Its been awhile. I could guess anywhere between 7-12 years ago. :(

I have never tried that TWX proxy thing, i guess maybe I will have to look at it.


Some of us still do not use TWX and manage OK. I use TwAssist as a database and terminal programs (Telix & ZOC). TwAsssist downside is that it will only handle up to 5K sectors.


Thu Aug 24, 2017 12:11 pm
Profile
Sergeant Major
User avatar

Joined: Tue Nov 26, 2013 9:11 pm
Posts: 50
Unread post Re: Swath help and advice needed >
lol,. yeah that was probably me way back then!

Thanks for your posting, maybe I will make some use/sense of it. ;)


Fri Aug 25, 2017 3:39 pm
Profile
Display posts from previous:  Sort by  
Reply to topic   [ 9 posts ] 

Who is online

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