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
sendsellwindow packet error?

 
Post new topic   Reply to topic    PenUltima Online Forum Index -> Bug Reports 097
Display posts from previous:   

Author Message
VeNdOr



Joined: 07 Feb 2006
Posts: 52
Location: Rome, Italy

PostPosted: Sun Jan 07, 2007 7:52 pm    Post subject: sendsellwindow packet error? Reply with quote

Code:

00:47:43.250 Server -> Client: 0x9E (SendShop), frequ: 1, len: 0x55
0000: 9E 55 00 00 1A 0F 68 00 02 40 01 60 1E 14 10 09 ->.U....h..@.`....
0010: 02 00 01 00 3C 00 1A 61 6E 20 6F 62 73 69 64 69 ->....<..an obsidi
0020: 61 6E 20 70 6C 61 74 65 6D 61 69 6C 20 61 72 6D ->an platemail arm
0030: 73 40 01 60 37 14 12 09 02 00 01 00 26 00 16 61 ->s@.`7.......&..a
0040: 6E 20 6F 62 73 69 64 69 61 6E 20 70 6C 61 74 65 ->n obsidian plate
0050: 20 68 65 6C 6D                                  -> helm

00:47:47.156 Client -> Server: 0x9F (SendShop), frequ: 1, len: 0x0F
0000: 9F 0F 00 00 1A 0F 68 00 01 40 01 60 1E 00 01    ->......h..@.`...

00:47:47.187 Server -> Client: 0x3B (AcceptTrade), frequ: 1, len: 0x08
0000: 3B 08 00 00 1A 0F 68 00                         ->;.....h.


This sequence is wrong, in fact i have sellled a platemail arm but server has answered with packet 0x3b with no item in it. In my backapck remain the item, that actually is only a graphical fake wich i can't use...

CORE Version:
097-2006-10-29 and 097-2007-01-04 and maybe in previous versions...

Ah another old bug:
even if i set fileaccess.cfg so:

Code:

FileAccess
{
   AllowRead 1
   AllowWrite 1
   AllowAppend 1
   AllowRemote 1
   Package *
   Extension .log
}


if i put a scripts in scripts/textcmd/anycmdlevel/
and do a readfile, core crash.

Author Message
MuadDib
POL Developer


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

PostPosted: Mon Jan 08, 2007 9:25 am    Post subject: Reply with quote

See if you can reproduce this 100%. I ask because, that 3B it sent to you, is to clear out the sell list. Has nothing to do with what you sold. You need to check in the AI to make sure there was room, etc. Also check to make sure there was no errors returned anywhere.

Now, aside from this, it could even be a bug in moving the item and updating the client involving realms. Try everything, and let me know.

Check your weight also, do it get updated correctly now that item is no longer "suppose" to be in pack?

Is this every item you sell? Or just certain ones, and with certain npcs?

Have you read core-changes about Shini's AOS adjustments involving vendor windows?

Nothing else I can think of atm, maybe more later after you respond Very Happy

Author Message
VeNdOr



Joined: 07 Feb 2006
Posts: 52
Location: Rome, Italy

PostPosted: Mon Jan 08, 2007 7:15 pm    Post subject: Reply with quote

I've news.

This "graphical" bug (i say graphical because i've checked the weight is ok, the item is in vendor's container on storage) will disappear if i call a buy window before sell some items.

I mean, if i log in and open a buy window with one merchant (i don't need to buy anything, it's enough open e close the buy list), the next sales with sell window doesn't create this graphical bug. If i log in and i don't use a buy window everytime i make a sale, the sold items remain in my backpack (as a graphic only, obviously).

I've no more time now to go into deeper but tomorrow i will spend more time on this fact.

Author Message
MuadDib
POL Developer


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

PostPosted: Mon Jan 08, 2007 9:59 pm    Post subject: Reply with quote

kk, will try to look into it soon before next 096 and 097 releases.

Author Message
MuadDib
POL Developer


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

PostPosted: Mon Jan 08, 2007 11:15 pm    Post subject: Reply with quote

What client version, what UOExpansion, what UOFeatureEnable? Do you get the money for the sale?

Author Message
VeNdOr



Joined: 07 Feb 2006
Posts: 52
Location: Rome, Italy

PostPosted: Tue Jan 09, 2007 1:39 pm    Post subject: Reply with quote

UOFeatureEnable=0x20

Client 4 and 5 with account setted to AOS (with and without VENDOR_SEND_AOS_TOOLTIP flag).
Client 2 with account setted to T2A.

All these configurations (i haven't tried other ones) reproduce the bug.
I get the right amount of money for every sale.


Last edited by VeNdOr on Tue Jan 09, 2007 2:00 pm; edited 1 time in total

Author Message
VeNdOr



Joined: 07 Feb 2006
Posts: 52
Location: Rome, Italy

PostPosted: Tue Jan 09, 2007 1:56 pm    Post subject: Reply with quote

I add one thing when i reproduce the bug i receive this:

Code:

18:46:20.62 Server -> Client: 0x3B (AcceptTrade), frequ: 1, len: 0x08
0000: 3B 08 00 00 1A 0F 68 00                         ->;.....h.


When i use the "buy trick" to avoid it i receive this:

Code:

18:47:25.62 Server -> Client: 0x3B (AcceptTrade), frequ: 3, len: 0x08
0000: 3B 08 00 00 1A 0F 68 00                         ->;.....h.

18:47:25.62 Server -> Client: 0x25 (AddSingleItemToContainer), frequ: 5, len: 0x14
0000: 25 40 02 79 BC 14 10 00 00 01 00 2C 00 4A 40 02 ->%@.y.......,.J@.
0010: 79 77 03 EB   


That is, in the second case, in fact server sends to client the packet for moving the object in merchant's container.
But in both of cases the items are sold correctly and moved to the merchant's container.

Author Message
MuadDib
POL Developer


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

PostPosted: Tue Jan 09, 2007 3:40 pm    Post subject: Reply with quote

Check your AI Script.

I ask because, this packet should be sent regardless, unless the vendor's inventories are not created yet (and created when you use the buy command in the ai, instead of at AI initialize). Mind posting the main part of the AI script?

Author Message
VeNdOr



Joined: 07 Feb 2006
Posts: 52
Location: Rome, Italy

PostPosted: Wed Jan 10, 2007 12:18 pm    Post subject: Reply with quote

Code:

...

var storage, inv_fs, inv_pb, inv_1c,inv_fk;

var merchant_type := GetObjProperty( Self(), "MerchantType" );

if(!merchant_type)
   SetObjProperty( Self(), "MerchantGroup", "Mage" );
   merchant_type := "Mage";
endif

storage := FindStorageArea( "Merchant Storage" );
if (!storage)
   storage:=CreateStorageArea( "Merchant Storage" );
   if (!storage)   
      syslog( "Unable to FindStorageArea Merchant Storage" );
      exit;
   endif
endif

inv_fs := find_or_create_item( storage, me.serial + " FS", UOBJ_METALCHEST );
inv_pb := find_or_create_item( storage, me.serial + " PB", UOBJ_METALCHEST );
inv_1c := find_or_create_item( storage, me.serial + " 1C", UOBJ_METALCHEST );

if (!inv_fs or !inv_pb or !inv_1c)
   exit;
endif

...

program merchant()
   var none;
   var flags;
   wipe_pb := readgameclock() + WIPEPB_MINUTES*60 + randomint(WIPEPB_MINUTES*6);
   setobjproperty(me,"meserial",me.serial);

   while (1)
      var ev;
      ev := os::wait_for_event(900);
      if (ev)
         case (ev.type)
         EVID_SPEECH:
//            check_lazy_speech(ev.text, ev.speech);
//            RespondToSpeech(me,ev.text);
        if(!CanUseFaction(ev.source))
              Say("I will not sell or buy nothing from you");
              continue;
           endif
            if (ev.text["buy"])
               if(ev.source.z == me.z)
                  var res;
                  flags:=0;
                 if(ev.source.acct.uo_expansion=="AOS")                  
                   flags:=VENDOR_SEND_AOS_TOOLTIP;
                 endif                    
                  res := SendBuyWindow( ev.source, inv_fs, self(), inv_pb,flags  );
                  if (!res)
                     SysLog( "SendBuyWindow failed: " + res.errortext );
                  endif
               endif
            elseif (ev.text["sell"])
               if(ev.source.z == me.z)
                 if(maxgold && curgold>=maxgold)
                    printtextaboveprivate(self(),"I've got no money to pay your goods ,try later!",ev.source);
                else
                    none:=adjustbuyprices(ev.source);
                    flags:=0;
                   if(ev.source.acct.uo_expansion=="AOS")                  
                     flags:=VENDOR_SEND_AOS_TOOLTIP;
                   endif                                                            
                    var res := SendSellWindow( ev.source,self(),  inv_fs, inv_pb,inv_1c,flags );
                    if (res)
                       if(!none)
                          printtextaboveprivate(self(),"You have nothing of interest to me!",ev.source);
                       else
                          PrintTextAbovePrivate( self(), "Can I help thee?", ev.source );
                       endif
                    else
                       SysLog( "SendSellWindow failed: " + res.errortext );
                    endif
                    resetbuyprices(ev.source);
                 endif
               endif
            elseif ( ev.text["vendor train"] or ev.text["merchant train"] )
               if(ev.source.z == me.z)
                  MerchantTrain( me , ev.source , ev.text );
               endif
            endif

         EVID_MERCHANT_BOUGHT:
            if(ev.amount>0)
               PrintTextAbovePrivate( self(), "The total of thy sale is " + ev.amount, ev.source );
            else
               printtextaboveprivate(self(),"I've got no money to pay your goods ,try later!",ev.source);
            endif

         EVID_MERCHANT_SOLD:
            PrintTextAbovePrivate( self(), "The total of thy purchase is " + ev.amount, ev.source );
         EVID_ITEM_GIVEN:
           if(!CanUseFaction(ev.source))
              Say("I will not train you");
              continue;
           endif
            TrainSkill( me , ev.source , ev.item );
         endcase
      endif

      if (ReadGameClock() > next_restock)
         RestockInventory( merchant_type, inv_fs );
         AdjustSellPrices();
         next_restock := next_restock + RESPAWN_MINUTES*60+randomint(RESPAWN_MINUTES*6);
      elseif( readgameclock()> wipe_pb)
        curgold:=0;
         foreach item in enumerateitemsincontainer(inv_pb)
            destroyitem(item);
         endforeach
         wipe_pb:=readgameclock()+WIPEPB_MINUTES*60+randomint(WIPEPB_MINUTES*6);
      endif
   endwhile

endprogram

Post new topic   Reply to topic    PenUltima Online Forum Index -> Bug Reports 097 All times are GMT - 4 Hours
Page 1 of 1

 




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