PenUltima Online Forum Index Official Core: 096.7
Official Core: 097 2008-02-26
Donate towards the POL web hosting bill!
 POL Home   FAQ   Search    Memberlist   Usergroups    Register    Profile   Log in to check your private messages   Log in
New clients no more send gump result when closed with 0xBF
Goto page 1, 2  Next
 
Post new topic   Reply to topic    PenUltima Online Forum Index -> General Help 096
Display posts from previous:   

Author Message
Lagoon



Joined: 05 Mar 2006
Posts: 118
Location: Italy

PostPosted: Sun Mar 05, 2006 11:52 am    Post subject: New clients no more send gump result when closed with 0xBF Reply with quote

I use 0xBF in a lot of script to close open gumps in a client. The function I use is

function CloseDialogGump(who, gump_id, return_value := 0)
var packet_string := "BF000D0004";
packet_string := packet_string + fixPacketLength2(Hex(gump_id), 4);
packet_string := packet_string + fixPacketLength2(Hex(return_value), 4);
return SendPacket(who, packet_string);
endfunction

I use it to have gumps which autoupdate their content.
This works with Age of Shadows clients and Samurai Empire clients, but Mondain's Legacy clients seem to work in a different way. When ML clients receive 0xBF packet they close the gump, but, unlike older clients, pol does not receive the proper packet with the choosen gump selection value so the gump script continues waiting for player choice and it's impossible for me to refresh it or react in any other way to the gump closure. Does anyone know if EA changed the packet sent by client to server when 0BF packet is received? or maybe there's something different in the packet which pol isn't able to manage? I'd like to investigate further and propose a fix for the core if any fix is possible, but I don't have the knowledges to sniff POL packets. Can you suggest me an UO packet sniffer which supports newest clients encryption? or maybe someone with more experience might help?

Author Message
Lagoon



Joined: 05 Mar 2006
Posts: 118
Location: Italy

PostPosted: Sat Mar 11, 2006 11:57 am    Post subject: Reply with quote

Any hint on how to investigate further in this problem?

Author Message
MuadDib
POL Developer


Joined: 13 Feb 2006
Posts: 830
Location: Indiana, USA

PostPosted: Sat Mar 11, 2006 6:09 pm    Post subject: Reply with quote

Give me a while bro, and I'll look at OSI's current logs. I know they introduced a NEW gump packet (compressed data in the packet instead of raw gump info). Prob just a few adjustments unless it uses the new packet for the return of that. In that case, I'll have to look into someone adding the new packet to POL on the dev team (I suck at compression stuff, so don't look at me, lol ).

Author Message
Lagoon



Joined: 05 Mar 2006
Posts: 118
Location: Italy

PostPosted: Sat Mar 11, 2006 7:25 pm    Post subject: Reply with quote

Ok, thanx for the answer, I'm happy to hear that probably they changed the packet instead of removing the send gump result part when the gump is closed by server request Smile

Author Message
Lagoon



Joined: 05 Mar 2006
Posts: 118
Location: Italy

PostPosted: Sat May 13, 2006 8:01 pm    Post subject: Reply with quote

Any news about this problem?

Author Message
MuadDib
POL Developer


Joined: 13 Feb 2006
Posts: 830
Location: Indiana, USA

PostPosted: Sat May 13, 2006 8:53 pm    Post subject: Reply with quote

As of right now, this is on the back burner. We will try to get 96 out the door before adding something like this. Hopefully, it won't be a lot longer, hehe.

Author Message
OldnGrey



Joined: 04 Feb 2006
Posts: 520

PostPosted: Sat May 13, 2006 11:35 pm    Post subject: Reply with quote

Yeah? Exclamation Question Question Question Exclamation Question

Author Message
Lagoon



Joined: 05 Mar 2006
Posts: 118
Location: Italy

PostPosted: Sun May 14, 2006 5:11 am    Post subject: Reply with quote

MuadDib wrote:
As of right now, this is on the back burner. We will try to get 96 out the door before adding something like this. Hopefully, it won't be a lot longer, hehe.


Thanx for the answer Smile

Author Message
Xandros



Joined: 17 Feb 2006
Posts: 76

PostPosted: Mon May 29, 2006 7:21 pm    Post subject: Re: New clients no more send gump result when closed with 0x Reply with quote

Lagoon wrote:

This works with Age of Shadows clients and Samurai Empire clients, but Mondain's Legacy clients seem to work in a different way. When ML clients receive 0xBF packet they close the gump, but, unlike older clients, pol does not receive the proper packet with the choosen gump selection value so the gump script continues waiting for player choice and it's impossible for me to refresh it or react in any other way to the gump closure.


This doesn't seem to be a general ML problem though, maybe only with
newer client versions. At least in ML Client 5.0.1h, it still seems to be working
fine.

Xandros

Author Message
Lagoon



Joined: 05 Mar 2006
Posts: 118
Location: Italy

PostPosted: Mon May 29, 2006 8:06 pm    Post subject: Reply with quote

Interesting, I'll test with that client, thanx Smile

Edit: tested, it does not work for me. I uninstalled UO, reinstalled it, autopatched till the end (5.0.2b) overwrote client.exe with 5.0.1h version and run it with UOGateway (v. 1.9.1265). I run POL096 core (pol-core-096-2006-05-24-RC-Vestal-Virgin). Nothing changed, my scripts do not receive the return value from the gump closed by script. I have no idea if the problem is related not only to client but to the overall UO installation in some way...

Author Message
Xandros



Joined: 17 Feb 2006
Posts: 76

PostPosted: Tue May 30, 2006 3:22 pm    Post subject: Reply with quote

Lagoon wrote:
Interesting, I'll test with that client, thanx Smile

Edit: tested, it does not work for me. I uninstalled UO, reinstalled it, autopatched till the end (5.0.2b) overwrote client.exe with 5.0.1h version and run it with UOGateway (v. 1.9.1265). I run POL096 core (pol-core-096-2006-05-24-RC-Vestal-Virgin). Nothing changed, my scripts do not receive the return value from the gump closed by script. I have no idea if the problem is related not only to client but to the overall UO installation in some way...


Here's the function we use...

function CloseGump(who, pid, buttonid := 0)
var packet := CreatePacket(0xbf, MSGLEN_VARIABLE);
packet.SetInt32(1, 0xd0004);
packet.SetInt32(5, pid);
packet.SetInt32(9, buttonid);
return(packet.SendPacket(who));
endfunction

Can't tell you if the return value is correct, we actually never had any
use for the return value, but I can definitely tell you that the server
doesn't wait for the gump input anymore, once we send that the
script goes on with whatever comes next in the code.
Tested with client 5.0.1h, UO patched to 5.0.1h.

Xandros

Author Message
Lagoon



Joined: 05 Mar 2006
Posts: 118
Location: Italy

PostPosted: Tue May 30, 2006 3:58 pm    Post subject: Reply with quote

The function you posted should be in practice like the one I posted... I tryed with your code and it still does not work for me Sad
So, the only difference between my uo installation is that you blocked autopatch when it finished patching 5.0.1h? It's strange, I can't see how different files and the same client could give different results... I'll reinstall UO again blocking it at 5.0.1h
Thank you for your help, it's a bug which is annoying me, maybe I'm doing something wrong, but I can't see my fault...

To MuadDib: Do you have elements to help me understand if it's something which needs core support or if I'm doing something wrong?

Edit: Ok, I did a lot of tests and here are the results:
* The code I posted to close a gump does not seem to be different from the one posted by Xandros
* The UO installation is not important, only the client (as expected) is important: 4.0.0l client send result back to pol and pol send the result to the script waiting for the gump result. And the result is the one submitted with the closegump function. Client 5.0.1h and older clients (did not have time to check ML clients before 5.0.1h) acti differently, since POL doesn't send the result back to the script. No idea what's different in the packets sent back, I have, as said, no experience in packet sniffers, I'll search for a simple one and try to understand what's happening. Anyway... no idea how Xandros scripts can receive a return value from the gump with 5.0.1h client (I'm not saying you're wrong, I really have no idea Razz )
* UOFeatureEnable in servspecopt does not seem to change this behaviour, as well as account.set_uo_expansion()

Author Message
CWO



Joined: 04 Feb 2006
Posts: 691
Location: Chicago, IL USA

PostPosted: Wed May 31, 2006 5:41 am    Post subject: Reply with quote

A simple one with no hassles is Folko's UOLog. Its in the post here http://forums.polserver.com/viewtopic.php?t=407

just update the clients.cfg with the extra values for the 5.x clients with the ones that are posted by MuadDib in that post.

Author Message
Lagoon



Joined: 05 Mar 2006
Posts: 118
Location: Italy

PostPosted: Wed May 31, 2006 6:39 am    Post subject: Reply with quote

Thank you very much, I'll give it a try and post results...

Edit: Tested 4.0.0l, 5.0.1h and 5.0.2b clients. Only 4.0.0l, when 0xBF (0xD subcommand) packet (CloseGump) closes the gump and then send a 0xB1 (GumpReply) packet back to the server with the result asked in the 0xBF. 5.0.1h and 5.0.2b clients Only close the gump and don't send any packet back to the server. So this functionality seems to be broken in those clients... The only other option is that it must be activated somehow, since Xandors says his server receives the GumpReply packet from 5.0.1h
Do you send some packet to activate features on the client? which UOFeatureEnable value to you use? What do you use for Account.set_uo_expansion(string)?
by the way, the tool is great, thanx Smile

Author Message
Xandros



Joined: 17 Feb 2006
Posts: 76

PostPosted: Wed May 31, 2006 6:15 pm    Post subject: Reply with quote

Lagoon,

I just tested a little bit more and in fact you were right, the server
does not get the response, and the script keeps waiting. The reason why
we didn't notice that, is because we always start an external script to send
the gump in such cases, and this script does nothing else than sending
the gump and returning the return value using an event, if there is one.

To clarify, the corresponding section in the calling script looks about like
this:

Code:

while (who.ip)
  CloseGump(who, gump.pid);
  gump := start_script("misc/custom/startgump", {who, GetPid(), layout_array, text_array});
  ev := wait_for_event(5);
  if (ev.source == gump.pid)
    dialog := ev.result;
    //change gump data, or exit the loop, depending on dialog result ...
  else //no button pressed
    //periodical gump data refresh...
  endif
endwhile


And the called script that will display the gump data looks like
this:

Code:

program StartGump(param)
  var who := param[1];
  var cpid := param[2];
  if (!who.ip)
    exit;
  endif
  var proc := GetProcess(cpid);
  if (!proc)
    exit;
  endif
  var res := SendDialogGump(who, param[3], param[4]);
  if (!who.ip)
    exit;
  endif
  proc := GetProcess(cpid);
  if (!proc)
    exit;
  endif
  var ev := struct{type := EVID_GUMPRESULT, source, result};
  ev.source := GetPid();
  ev.result := res;
  proc.SendEvent(ev);
endprogram


This method works, as long as you don't need any return value
when killing the gump. It will of course leave many hanging
StartGump scripts in memory, as you found out they'll keep
waiting for the gump return value, once the gump has been
killed. But it works, and you can easily get rid of the waiting
scripts by inserting a line of code to kill the StartGump script, after
the CloseGump() call. And that is what I will have to do in my
scripts now...

Xandros

Post new topic   Reply to topic    PenUltima Online Forum Index -> General Help 096 All times are GMT - 4 Hours
Goto page 1, 2  Next
Page 1 of 2

 




Powered by phpBB © 2001, 2005 phpBB Group :: Theme & Graphics by GHS & Scott E. Royalty