View unanswered posts | View active topics It is currently Sat Mar 25, 2017 10:34 pm



Reply to topic  [ 11 posts ] 
 Something Changed 
Author Message
Veteran Op
User avatar

Joined: Sat Dec 29, 2007 5:06 pm
Posts: 2053
Location: Oklahoma
Unread post Something Changed
Some changed in the way you exit out. Now when you start Mombot from within game it jumps to:

==-- Trade Wars 2002 --==

T - Play Trade Wars 2002
I - Introduction & Help
S - View Game Settings
H - High scores
M - View Access Modes
X - Exit

Enter your choice:

Like normal but it is not relogging back in. So the question is WHAT CHANGED? There is no trigger that would cause a relog so something has changed on that screen. If I hit * <enter> it kicks off just fine, but some trigger it wants has changed...... Once I find the issue I will post a fix unless someone beats me to it. :)

_________________
T0yman
Proverbs 17:28 <-- Don't know it, most should it would stop a lot of the discussions on here.


Tue Jan 31, 2012 10:08 am
Profile ICQ YIM WWW
Veteran Op
User avatar

Joined: Sat Dec 29, 2007 5:06 pm
Posts: 2053
Location: Oklahoma
Unread post Re: Something Changed
Adding a single line will correct the issue

# ============================== GAME STATS ==============================
:gamestats
if ($startingLocation = "Citadel")
send "qqzn"
end
if (($startingLocation = "Command") OR ($startingLocation = "Citadel"))
send "qyn"
waitfor "Enter your choice" <--- This will fix the issue
send #42 "*"

So on my initial testing this seems to fix the issue and will allow the bot to work correctly.

EDIT: I have tested on mine and RP's servers running 2.17 works without a hitch. I hope this helps someone else :)

_________________
T0yman
Proverbs 17:28 <-- Don't know it, most should it would stop a lot of the discussions on here.


Tue Jan 31, 2012 10:31 am
Profile ICQ YIM WWW
Site Admin
User avatar

Joined: Sun Dec 24, 2000 3:00 am
Posts: 3150
Location: USA
Unread post Re: Something Changed
Ok, but I don't want people to have to change their scripts for an unintended change. Let's figure out what changed so I can restore it.

_________________
John Pritchett
EIS
---
Help fund the TradeWars websites! If you open a hosting account with A2 Hosting, the service EIS uses for all of its sites, EIS will earn credits toward its hosting bill.


Tue Jan 31, 2012 10:56 am
Profile WWW
Veteran Op
User avatar

Joined: Sat Dec 29, 2007 5:06 pm
Posts: 2053
Location: Oklahoma
Unread post Re: Something Changed
I compared what I can see visually and nothing is jumping out at me. The change I placed in the above post will work with all version's so it won't make a difference on mine. But I have an older version I can test if you need me to check some thing for you later.

_________________
T0yman
Proverbs 17:28 <-- Don't know it, most should it would stop a lot of the discussions on here.


Tue Jan 31, 2012 11:03 am
Profile ICQ YIM WWW
Site Admin
User avatar

Joined: Sun Dec 24, 2000 3:00 am
Posts: 3150
Location: USA
Unread post Re: Something Changed
Can I see what was being triggered on before you fixed it? That might shed some light.

_________________
John Pritchett
EIS
---
Help fund the TradeWars websites! If you open a hosting account with A2 Hosting, the service EIS uses for all of its sites, EIS will earn credits toward its hosting bill.


Tue Jan 31, 2012 11:05 am
Profile WWW
Veteran Op
User avatar

Joined: Sat Dec 29, 2007 5:06 pm
Posts: 2053
Location: Oklahoma
Unread post Re: Something Changed
If you remove the waitfor line I added thats all it was sending. My guess is that there is a slight delay going to that menu causing the - send #42 "*" not to be sent at the right time.

I read another thread.... this might be causing the delay.

2) If the player exits the game to the start menu, the game will actually close, then re-open and return to the start menu. Before, it would just fall back to the start menu, but this allowed certain variables to be in an undefined state when restarting the game.

_________________
T0yman
Proverbs 17:28 <-- Don't know it, most should it would stop a lot of the discussions on here.


Tue Jan 31, 2012 11:10 am
Profile ICQ YIM WWW
Site Admin
User avatar

Joined: Sun Dec 24, 2000 3:00 am
Posts: 3150
Location: USA
Unread post Re: Something Changed
Yes, that is a change for this version. But there should be no difference in the output. From the player's side, it should be impossible to tell that the game closed and restarted vs that it just dropped to the startup menu. If there is any change (and you'd see it in a raw log even if you visually can't see something), I can clean it up.

_________________
John Pritchett
EIS
---
Help fund the TradeWars websites! If you open a hosting account with A2 Hosting, the service EIS uses for all of its sites, EIS will earn credits toward its hosting bill.


Tue Jan 31, 2012 11:36 am
Profile WWW
Site Admin
User avatar

Joined: Sun Dec 24, 2000 3:00 am
Posts: 3150
Location: USA
Unread post Re: Something Changed
Oh, I think I see what it might be. When TW is closing and then restarting, it's discarding input that would otherwise have been sent to the startup menu. There seems to be a period of time in which data sent to TW is pulled off the socket but not used. That isn't supposed to happen, so I'll clean that up. Then even if you send the "*" line before getting back into the startup menu, it will get processed by the startup menu just as before.

_________________
John Pritchett
EIS
---
Help fund the TradeWars websites! If you open a hosting account with A2 Hosting, the service EIS uses for all of its sites, EIS will earn credits toward its hosting bill.


Tue Jan 31, 2012 11:38 am
Profile WWW
Veteran Op
User avatar

Joined: Sat Dec 29, 2007 5:06 pm
Posts: 2053
Location: Oklahoma
Unread post Re: Something Changed
Yep, thanks John.... not bad we got this one discussed in under 3 pages.... :lol:

_________________
T0yman
Proverbs 17:28 <-- Don't know it, most should it would stop a lot of the discussions on here.


Tue Jan 31, 2012 11:40 am
Profile ICQ YIM WWW
Boo! inc.
User avatar

Joined: Sat Oct 09, 2004 2:00 am
Posts: 840
Location: USA
Unread post Re: Something Changed
I just went over the same thing with Vid, and thats what my post was in Crosby's thread. I came up with the exact same fix and tested it multiple times. I figured the same thing that happened to crosby might have some how happened here.

(9:58:00 AM) 421291872: :gamestats
if ($startingLocation = "Citadel")
send "qqzn"
end
if (($startingLocation = "Command") OR ($startingLocation = "Citadel"))
send "qyn"
waiton "Enter your choice:"
send #42 "*"
(9:58:25 AM) 421291872: without the waiton it just sits at the game menu...not main menu
(9:58:41 AM) 421291872: once I put that in it works perfect

_________________
“The object of war is not to die for your corp but to make the other bastard die for his.”

Boo! inc.


Tue Jan 31, 2012 2:35 pm
Profile
Site Admin
User avatar

Joined: Sun Dec 24, 2000 3:00 am
Posts: 3150
Location: USA
Unread post Re: Something Changed
This is fixed. I may provide RP with the fixed version, but hold the public release until we see if any more bugs surface and can be fixed. At least a few days wait.

What was happening here was that input that was buffered on TW along with the Qy commands were getting discarded when TW shut down and restarted. With the fix, I will buffer up to 1024 characters of data between the quit prompt and the startup menu. This will fix the bug you're describing, but I think it'll become more important once I start using this restart mechanism to support warping from one game to another. In that case, I'd expect to see more input buffered as a player warps through a jumpgate from one game into another.

_________________
John Pritchett
EIS
---
Help fund the TradeWars websites! If you open a hosting account with A2 Hosting, the service EIS uses for all of its sites, EIS will earn credits toward its hosting bill.


Tue Jan 31, 2012 3:06 pm
Profile WWW
Display posts from previous:  Sort by  
Reply to topic   [ 11 posts ] 

Who is online

Users browsing this forum: No registered users and 1 guest


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.