TWX Proxy Feature Request
Author |
Message |
ElderProphet
Commander
Joined: Tue Oct 07, 2003 2:00 am Posts: 1131 Location: Augusta, GA
|
Re: TWX Proxy Feature Request
Surprise, I've already implemented Trim and point 4 in my original post, they're actually in the beta build Sing posted a month or so ago, but still undocumented. They'll likely change before a final release though.
I'm working on point 2, escaping from a long variable dump. It's mostly done.
In a previous working build, I implemented point 3, being able to break out of a runaway loop, but it had too much of a performance impact so I didn't commit it. It's something that I've wanted for a long time though, I just need to implement it in a way that doesn't impact performance.
_________________ Claim to Fame: only guy to ever crack the TW haggle algorithm, and fig/shield/hold price formula, twice.
|
Sun Aug 14, 2011 9:00 pm |
|
|
LoneStar
Commander
Joined: Fri Jun 09, 2006 2:00 am Posts: 1396 Location: Canada
|
Re: TWX Proxy Feature Request
speaking of variable-dumps.. Would it be possible to dump variables from a specific script, in the same fashion as killing a script?
Alternatively. the one feature request I believe many would appreciate would be a variable dump to a text file; perhaps in the Logs folder.
Thanks
_________________ ---------------------------- -= QUANTUM Computing 101: 15 = 3 x 5 ... 48% of the time. -= There are 10 types of people in the world: Those that understand Binary and those who do not -= If Oil is made from Dinosaurs, and Plastic is made from Oil... are plastic Dinosaurs made from real Dinosaurs? -= I like to keep my friends and my enemies rich, and wait to see which is which - Tony Stark (R.I.P.)
|
Sun Aug 14, 2011 9:20 pm |
|
|
ElderProphet
Commander
Joined: Tue Oct 07, 2003 2:00 am Posts: 1131 Location: Augusta, GA
|
Re: TWX Proxy Feature Request
These are reasonable requests, I'll see how easy they are to implement.
I've completed and committed the code to abort a variable dump.
If there's interest, I can attach these interim builds for people to play with.
_________________ Claim to Fame: only guy to ever crack the TW haggle algorithm, and fig/shield/hold price formula, twice.
|
Tue Aug 16, 2011 11:53 am |
|
|
LoneStar
Commander
Joined: Fri Jun 09, 2006 2:00 am Posts: 1396 Location: Canada
|
Re: TWX Proxy Feature Request
ElderProphet wrote: If there's interest, I can attach these interim builds for people to play with. I'm interested.
_________________ ---------------------------- -= QUANTUM Computing 101: 15 = 3 x 5 ... 48% of the time. -= There are 10 types of people in the world: Those that understand Binary and those who do not -= If Oil is made from Dinosaurs, and Plastic is made from Oil... are plastic Dinosaurs made from real Dinosaurs? -= I like to keep my friends and my enemies rich, and wait to see which is which - Tony Stark (R.I.P.)
|
Tue Aug 16, 2011 3:57 pm |
|
|
ElderProphet
Commander
Joined: Tue Oct 07, 2003 2:00 am Posts: 1131 Location: Augusta, GA
|
Re: TWX Proxy Feature Request
Okay, keep the feature requests coming.
I realize I need to publish a full beta build, but here at least an interim build (just the twxproxy.exe) is attached. So make a copy of your TWX folder, call it something like TWX2.05.70, and overwrite its twxproxy.exe with the unzipped attached file. And you should probably delete any game data too.
The following is not a list of changes since 2.04, but rather since the last interim build. Commands Added: Trim $var // remove left and right white space Truncate $var // truncate a decimal number (round down) * I'll add the ability to truncate at a specified decimal place later ** Also, in all 2.05 builds, you can do inline commenting, using // as above.
Improvements: It has the ability to ESC (by pressing ESC) from a long var dump.
Bug Fixes: Fixed a potential bug when sending really large amounts of data.
Attachments:
File comment: Interim Build 2.05.70, exe only.
TWXProxy.zip [463.2 KiB]
Downloaded 568 times
_________________ Claim to Fame: only guy to ever crack the TW haggle algorithm, and fig/shield/hold price formula, twice.
|
Mon Aug 22, 2011 9:34 pm |
|
|
rem0te
1st Sergeant
Joined: Fri May 27, 2011 9:20 am Posts: 45
|
Re: TWX Proxy Feature Request
Right now its possible to make a client deaf, that is, not receive game update but only what TWX is saying. I would like to be able to do the opposite, that is, receive only what comes from the game and not see output generated by TWX. Another way of saying it would be to allow TWX to proxy dirrectly to the game without interfering with ouput. This would allow for helper to do lots of TWX call without messing the game output. Am I making any sense? If its hard to implement I could always setup a second proxy layer using something else than TWX, but I'd rather not
_________________ -=[ rem0te ]=- I'm an Insane-Cyber-Techno-Evil-Gothic-TradeWars-Freak
My TW Visual Map Helper
|
Thu Sep 08, 2011 1:18 pm |
|
|
T0yman
Veteran Op
Joined: Sat Dec 29, 2007 5:06 pm Posts: 2059 Location: Oklahoma
|
Re: TWX Proxy Feature Request
$ = that will toggle deaf mode on/off
Help for option '=':
Deafs clients are telnet terminals that don't receive anything from the remote server. This option will turn your connected terminal into a 'deaf' terminal. This is great if you have a fast-paced script running in the background and you want to query your database.
_________________ T0yman (Permanently Retired since 2012) Proverbs 17:28 <-- Don't know it, most should it would stop a lot of the discussions on here.
|
Thu Sep 08, 2011 1:21 pm |
|
|
rem0te
1st Sergeant
Joined: Fri May 27, 2011 9:20 am Posts: 45
|
Re: TWX Proxy Feature Request
T0yman wrote: $ = that will toggle deaf mode on/off You didnt read my post correctly it seems. I know that, I said on the very first line that its possible to do it right now. What I asked is the oposite: don't receive from TWX, but see the remote server.
_________________ -=[ rem0te ]=- I'm an Insane-Cyber-Techno-Evil-Gothic-TradeWars-Freak
My TW Visual Map Helper
|
Thu Sep 08, 2011 3:22 pm |
|
|
SteveH_66
Ensign
Joined: Wed Nov 06, 2002 3:00 am Posts: 268
|
Re: TWX Proxy Feature Request
Hey EP, if you happen to have a little time again and you want more suggestions about additions to TWX Proxy, I thought of one. Don't know how hard it would be to implement but maybe you could give me an idea if it would be fairly easy or a lot of work. I was thinking it would be nice if TWX could do a count of the lines in a text file and save it as a variable. Would make it easier for setting up static Array's. If it would be a major undertaking that's cool, a little bit of code in a script and you can do it yourself. So no big deal. Just an idea.
|
Tue Apr 10, 2012 3:59 pm |
|
|
Promethius
Ambassador
Joined: Mon Feb 09, 2004 3:00 am Posts: 3141 Location: Kansas
|
Re: TWX Proxy Feature Request
SteveH_66 wrote: Hey EP, if you happen to have a little time again and you want more suggestions about additions to TWX Proxy, I thought of one. Don't know how hard it would be to implement but maybe you could give me an idea if it would be fairly easy or a lot of work. I was thinking it would be nice if TWX could do a count of the lines in a text file and save it as a variable. Would make it easier for setting up static Array's. If it would be a major undertaking that's cool, a little bit of code in a script and you can do it yourself. So no big deal. Just an idea. Have you used readToArray?
_________________
/ Promethius / Enigma / Wolfen /
"A man who has no skills can be taught, a man who has no honor has nothing."
|
Tue Apr 10, 2012 6:12 pm |
|
|
SteveH_66
Ensign
Joined: Wed Nov 06, 2002 3:00 am Posts: 268
|
Re: TWX Proxy Feature Request
Thanks Pro, I have used it, I have found it to be a very handy command in the script arsenal. However, I was working under the mistaken understanding that it only worked in a file where each line only had one 'word' and that it wouldn't store a line with multiple words in an array element. From a quick test script I see that I was mistaken on that. So I am going to have to play around with the command and learn some additional ways to work with the readToArray command. Seeing that it can store a line with more than one word in it I am thinking, correct me if I'm wrong, that you could use this to build a static multi-dimension array. So thanks for pointing out that readToArray is already set up as a static array, if I understand that correctly.
|
Wed Apr 11, 2012 4:48 am |
|
|
ElderProphet
Commander
Joined: Tue Oct 07, 2003 2:00 am Posts: 1131 Location: Augusta, GA
|
Re: TWX Proxy Feature Request
Yes, readtoarray is your friend. Want to know how many lines are in the file "bubbasfile.txt"?
readToArray bubbasfile.txt $array echo "Line Count: " $array
Done. That was almost like the EASY button in those commercials.
_________________ Claim to Fame: only guy to ever crack the TW haggle algorithm, and fig/shield/hold price formula, twice.
|
Wed Apr 11, 2012 11:41 pm |
|
|
SteveH_66
Ensign
Joined: Wed Nov 06, 2002 3:00 am Posts: 268
|
Re: TWX Proxy Feature Request
another one of those undocumented features EP? That was like the easy button, you're good man
|
Thu Apr 12, 2012 4:34 am |
|
|
T0yman
Veteran Op
Joined: Sat Dec 29, 2007 5:06 pm Posts: 2059 Location: Oklahoma
|
Re: TWX Proxy Feature Request
SteveH_66 wrote: another one of those undocumented features EP? That was like the easy button, you're good man From script.html in the TWX folder: Quote: readToArray
Purpose: Reads a text file directly into a TWX array.
Syntax: readToArray {file} storageArray
{file}: The file to read text from.
storageArray: The TWX Array to store the strings in.
Notes: This command is especially useful when reading in large text files, especially those greater than 10K lines. The array will be created and populated in one step. Any existing array with the same name will first be overwritten. Also, a variable with the same name as the array will be created, and its integer value will be the the element count of the array.
Example:
# Read a text file into an array readToArray figlist.txt $figArray # A variable $figArray also exists, and is equal to the element count echo "*Figged Sectors read:" $figArray setVar $i 1 while ($i <= $figArray) echo "*" $figArray[$i] add $i 1 end
_________________ T0yman (Permanently Retired since 2012) Proverbs 17:28 <-- Don't know it, most should it would stop a lot of the discussions on here.
|
Thu Apr 12, 2012 6:09 am |
|
|
SteveH_66
Ensign
Joined: Wed Nov 06, 2002 3:00 am Posts: 268
|
Re: TWX Proxy Feature Request
Thanks Toyman, I had seen that in the description in scripts.html, so I knew about the variable of the same name as the array being the count of the array. As I said earlier, the reason I didn't use readToArray in some scripts was when I was wanting to get multiple words from a line in a file, and I had mistakenly thought it would only grab the first word from the line not a whole line. And I wasn't sure it was a static array, i like to work with them as they are faster I have heard. A more careful reading of the description would show one that it is a static array though. Don't know where I got that assumption from, I think probably from one of my many scripting errors when I was working with the array. I probably wrote some code wrong, it only got the first word, and instead of checking it out more or asking about it in the forum, I probably just assumed it didn't grab the whole line when it populated the array. Good looking out though, if anyone is wondering about that in a search in the future they should run across your post and learn something new or have a question answered. And it did cause me to take another read of the description and figure out that it is a static array.
|
Thu Apr 12, 2012 7:32 am |
|
|
|
Who is online |
Users browsing this forum: No registered users and 10 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
|
|