| Author |
Message |
|
ElderProphet
Commander
Joined: Tue Oct 07, 2003 2:00 am Posts: 1134 Location: Augusta, GA
|
Additionally, the game date and time is displayed when you port. Game days are one day ahead of actual days, notwithstanding the discrepancy which will occur at midnight if local and server times differ.
_________________ Claim to Fame: only guy to ever crack the TW haggle algorithm, and fig/shield/hold price formula, twice.
|
| Sat Dec 24, 2005 6:49 am |
|
 |
|
PHX
Lieutenant
Joined: Sat Mar 03, 2001 3:00 am Posts: 592 Location: USA
|
I didn't think of comparing new and old credit amounts that is a good idea, but here is what I have already settled on. It handles buying and selling product, stealing product, and also taking from and leaving on a planet, hense BSTL. Seems to be working well.
EP im right with ya on the empty cargo holds thing, that seemed to me the most reliable portion of that line to trigger on.
Harley, the script is non interactive with the game so I don't think the time taken would matter so far as vulnerability is concerned. Anyone please correct me if I am wrong and I will do anything I can to speed it up.
Code: :top settextlinetrigger BSTL :bstl "How many holds of " pause :bstl setvar $line CURRENTLINE & "@" striptext $line "Ore " getword $line $product 5 if ($product <> "Fuel") and ($product <> "Organics") and ($product <> "Equipment") goto :top end getword $line $bstl 10 if ($bstl <> "take") and ($bstl <> "leave") and ($bstl <> "buy") and ($bstl <> "sell") getword $line $bstl 7 if ($bstl = "swipe?") goto :steal end goto :top end gettext $line $var "? " "@" if ($var = "") gettext $line $var "[" "]" end if ($bstl = "take") killalltriggers settexttrigger A :takeOk "Planet command (?=help) [D]" settexttrigger B :takeNo "There aren't that many on the planet!" pause :takeOk killtrigger B if ($product = "Fuel") add $ore $var elseif ($product = "Organics") add $org $var elseif ($product = "Equipment") add $equ $var end if ($turnscut = 0) setvar $turnscut 1 end goto :update :takeNo killtrigger A goto :top elseif ($bstl = "leave") killalltriggers settexttrigger A :leaveOk "Planet command (?=help) [D]" settexttrigger B :leaveNo "They don't have room for that many on the planet!" pause :leaveOk killtrigger B if ($product = "Fuel") subtract $ore $var elseif ($product = "Organics") subtract $org $var elseif ($product = "Equipment") subtract $equ $var end goto :update :leaveNo killtrigger A goto :top elseif ($bstl = "buy") :buyPrice killalltriggers settextlinetrigger A :buyNo "Your offer [" settextlinetrigger B :buyOk " empty cargo holds." settextlinetrigger C :buyOk "Command [TL=" settextlinetrigger D :buyOk "We are selling up to " settextlinetrigger E :top "We're not interested." settextlinetrigger F :buyExp "For your great trading you receive" pause :buyNo killalltriggers getword CURRENTLINE $cash 5 if ($cash = "") gettext $line $cash "[" "]" end goto :buyPrice :buyOk killalltriggers subtract $creds $cash if ($product = "Fuel") add $ore $var elseif ($product = "Organics") add $org $var elseif ($product = "Equipment") add $equ $var end goto :update :buyExp getword CURRENTLINE $expup 7 add $exp $expup pause elseif ($bstl = "sell") :sellPrice killalltriggers settextlinetrigger A :sellNo "Your offer [" settextlinetrigger B :sellOk " empty cargo holds." settextlinetrigger C :sellOk "Command [TL=" settextlinetrigger D :sellOk "We are selling up to " settextlinetrigger E :top "We're not interested." settextlinetrigger F :sellExp "For your great trading you receive" pause :sellNo killalltriggers getword CURRENTLINE $cash 5 if ($cash = "") gettext $line $cash "[" "]" end goto :sellPrice :sellOk killalltriggers subtract $creds $cash if ($product = "Fuel") subtract $ore $var elseif ($product = "Organics") subtract $org $var elseif ($product = "Equipment") subtract $equ $var end goto :update :sellExp getword CURRENTLINE $expup 7 add $exp $expup pause end
:steal gettext $line $var "] " "@" if ($var = "") gettext $line $var "[" "]" end killalltriggers settexttrigger A :stealOk "You start your droids loading the cargo and" settexttrigger B :stealNo "There aren't that many holds of" pause :stealOk killalltriggers if ($product = "Fuel") add $ore $var elseif ($product = "Organics") add $org $var elseif ($product = "Equipment") add $equ $var end if ($turnscut = 0) setvar $turnscut 1 end goto :update :stealNo killalltriggers goto :top
:update updates the script window yada yada yada
Before anyone decides to check, no this will not trigger when taking colonists to/from planet, that trigger would be "How many groups of "
Now that I think about it, I may have to either put in the other rejection messages for when a port tells you to go to hell and sends you back to the sector prompt, or, use EP's compare credits idea. Odd thing though, the script doesn't seem to have any problems though its not equipped that way. I cannot read fast enuf to see what kind of refusal messages are coming across and not patient enough to scroll back and search. I am testing it with 2_WorldTrade.cts and WorldSSMSupG.ts
|
| Sat Dec 24, 2005 7:59 am |
|
 |
|
ElderProphet
Commander
Joined: Tue Oct 07, 2003 2:00 am Posts: 1134 Location: Augusta, GA
|
A few points...
I believe that planet trades need to trigger off of "How many units" instead of "How many holds".
For the exp bonus, you also need "For your good trading", as well as exp from "unused" and "neglected" ports.
I pull the trade qty from the "Agreed," line, which I found simpler.
I see no other obvious points. Just make sure it works with both planet and ship trades, and updates exp for unused/neglected ports and for good/great trades.
+EP+
_________________ Claim to Fame: only guy to ever crack the TW haggle algorithm, and fig/shield/hold price formula, twice.
|
| Sat Dec 24, 2005 9:30 am |
|
 |
|
Akor
Ensign
Joined: Sat May 21, 2005 2:00 am Posts: 260 Location: USA
|
quote:Originally posted by Orion_Blastar
I tried to write some Tradewars formulas in Visual BASIC and ANSI C, and I had some success, but I was discouraged when people in the forum here criticised me for asking questions about how Tradewars worked and how to figure out formulas.I ask a lot of questions and no one has criticized me about it. In fact Traitor got on Severian recently for putting down a noob that was asking questions. So, I don't think you will get that same response anymore.
JUST DON'T ASK QUESTIONS THAT ARE ALREADY ANSWERED ON TW-CABAL and you'll be fine. Also, check out the old posts from years ago for answers. There is a gold mine in them I've found.
|
| Sat Dec 24, 2005 4:03 pm |
|
 |
|
Orion_Blastar
Lieutenant Commander
Joined: Thu Jul 31, 2003 2:00 am Posts: 837 Location: USA
|
quote:Originally posted by Akor
quote:Originally posted by Orion_Blastar
I tried to write some Tradewars formulas in Visual BASIC and ANSI C, and I had some success, but I was discouraged when people in the forum here criticised me for asking questions about how Tradewars worked and how to figure out formulas.I ask a lot of questions and no one has criticized me about it. In fact Traitor got on Severian recently for putting down a noob that was asking questions. So, I don't think you will get that same response anymore.
JUST DON'T ASK QUESTIONS THAT ARE ALREADY ANSWERED ON TW-CABAL and you'll be fine. Also, check out the old posts from years ago for answers. There is a gold mine in them I've found.
I guess the noob-bashers are gone now? [:D]
I did one time try to search the forums, after hours of not finding what I wanted I gave up and posted my questions. SNITZ does not seem to search very well for me, which was one of the reasons I migrated my old SNITZ forums to PHPBB2 instead, which has a lot better search.
I'll try searching here, but it is like pulling teeth and very fustrating and painful for me.
Hint hint, can someone write a guide for noob developers to cover the basics of what you need to know to write programs to support Tradewars? You could sell it if you wanted to. That way you just point to the book as an alternative to asking lots of stupid questions and looking even more like a noob. Just a suggestion.
_________________ I'm getting too old for this sort of thing.
I am from http://district268.xormad.com/ District 268
|
| Sat Dec 24, 2005 9:53 pm |
|
 |
|
Grazhoppa
Lieutenant
Joined: Fri Mar 02, 2001 3:00 am Posts: 577 Location: USA
|
blah, ur all noobs.... we just suffer in knowing that the game will crash and burn if we don't help ya out....
still doesn't mean ur not noobs
I'd gladly take any of you in ship to ship combat (cept for loc, asshizzle)... anyway... you noobs keep up the good work!
_________________ http://the-glacier.com
The source for all your computer needs!
--==[The Outfit]==--
|
| Sat Dec 24, 2005 10:48 pm |
|
 |
|
Harley Nuss
Commander
Joined: Thu Feb 20, 2003 3:00 am Posts: 1529 Location: USA
|
Orion_Blastar - you came in here saying "Can you give me detailed formulas on everything, I want to sell them to people." That's why you got a negative response. At least, I think that was you.
|
| Sat Dec 24, 2005 11:27 pm |
|
 |
|
ElderProphet
Commander
Joined: Tue Oct 07, 2003 2:00 am Posts: 1134 Location: Augusta, GA
|
Yeah, it was Orion_Blastar. He said secret formulas... which made us laugh. In fairness though, he said he wasn't sure if he was going to charge or not. So how did that project work out anyway?
+EP+
_________________ Claim to Fame: only guy to ever crack the TW haggle algorithm, and fig/shield/hold price formula, twice.
|
| Sun Dec 25, 2005 3:39 am |
|
 |
|
Traitor
Lieutenant Commander
Joined: Thu Mar 21, 2002 3:00 am Posts: 890 Location: USA
|
quote: Originally posted by Orion_Blastar
I guess the noob-bashers are gone now? [:D]
No. Sadly their kind never quite leaves. But they seem easily distracted by bright, shiny objects or software.
quote:
I did one time try to search the forums, after hours of not finding what I wanted I gave up and posted my questions. SNITZ does not seem to search very well for me, which was one of the reasons I migrated my old SNITZ forums to PHPBB2 instead, which has a lot better search.
I'll try searching here, but it is like pulling teeth and very fustrating and painful for me.
I'm working on that some. I personally have never had a problem finding stuff in here, but it does take some patience. One of my goals as a moderator is to go through the old threads that contain good info and rename the subjects to match, and put in associated key words in the bottom of the first message to help with searches.
quote:
Hint hint, can someone write a guide for noob developers to cover the basics of what you need to know to write programs to support Tradewars? You could sell it if you wanted to. That way you just point to the book as an alternative to asking lots of stupid questions and looking even more like a noob. Just a suggestion.
Why don't you do it? If I had taken that attitude, there would be no http://www.tw-cabal.com [:)]
_________________ http://tw-cabal.navhaz.com - THE TW info site
Man, I gotta quit showing up here...next thing you know i'll get dragged back in.
|
| Sun Dec 25, 2005 4:58 am |
|
 |
|
Coke
Lieutenant J.G.
Joined: Sat Apr 10, 2004 2:00 am Posts: 449 Location: USA
|
quote:Originally posted by Grazhoppa
blah, ur all noobs.... we just suffer in knowing that the game will crash and burn if we don't help ya out....
THAT my friend is one of the truest and funniest posts I've seen in long time on here.
|
| Sun Dec 25, 2005 6:45 am |
|
 |
|
Kavanagh
Ambassador
Joined: Wed Feb 28, 2001 3:00 am Posts: 1410 Location: Boo! inc. Ireland
|
quote:Originally posted by PHX
Ive collected these messages for my Status Window script.
Buy from port
-------------
(Sigh) Very well, pay up and take them away."
Agreed, and a pleasure doing business with you!"
Cheapskate. Here, take them and leave me alone."
I hate haggling, they're all yours."
I could have twice that much in the Androcan Empire, but they're yours."
I PAID more than that! But we'll sell them to you anyway."
SOLD! Come back anytime!"
Very well, we'll take that offer."
You are a shrewd trader, they're all yours."
You will put me out of business, I'll take your offer."
Sell to port
-------------
Agreed! We'll purchase them!"
Done, we'll take the lot."
FINE, we'll take them, just leave!"
If only more honest traders would port here, we'll take them though.
Oh well, maybe I can sell these to some other fool, we'll take them."
Very well, we'll buy them."
You are a rogue! We'll take them anyway."
You are robbing me, but we'll buy them anyway."
You drive a hard bargain, but we'll take them."
You insult my intelligence, but we'll buy them anyway."
Port Haggle
--------------
Get real ion-brain, make me a real offer."
HA! HA, ha hahahhah hehehe hhhohhohohohh! You choke me up!
I have much better things to do than waste my time. Try again."
Make a real offer or get the h*ll out of here!"
My patience grows short with you."
Quit playing around, you're wasting my time!"
So, you think I'm as stupid as you look? Make a real offer."
This is the big leagues Jr. Make a real offer."
WHAT?!@!? you must be crazy!"
What do you take me for, a fool? Make a real offer!"
Port Rejections
---------------
Nothing in this universe is free, my friend."
HA! You crack me up. Now get lost."
Well as you can see I am missing some port rejection messages and they are rather difficult to conjur up accept for the Nothing is free one. Does anyone have these? Perhaps someone who has access to the the TW source code could provide them.
For reverse haggle, my SALT script searches for "time", "crazy", "fool", "real", "choke", "patience" in the return string after the offer, using "[" as a trigger. I dont use twx much, and know almost jack about it. If it is not compiled, it might run faster on haggle just using the above (they cover all the possible dialogue), 6 searches for single words instead of 10 for entire lines.
|
| Mon Dec 26, 2005 11:33 pm |
|
 |
|
PHX
Lieutenant
Joined: Sat Mar 03, 2001 3:00 am Posts: 592 Location: USA
|
The script has a primary trigger to capture all the lines that say "You have XXX credits and XXX empty cargo holds", so I believe that should work most of the time for planet trades and such. The primary purpose of the above code was to track what is in the holds, the credits are secondary because those lines are captured as I just said. Yeah I know there are some points where you see "You have XXX credits" and there is nothing about cargo holds... this makes things more difficult because there are many many lines that begin with "You have". I am working on it.
|
| Tue Dec 27, 2005 7:48 pm |
|
 |
|
Who is online |
Users browsing this forum: No registered users and 8 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
|
|