 |
 |
 |
 |
| Author |
Message |
VeNdOr
Joined: 07 Feb 2006 Posts: 52 Location: Rome, Italy
|
Posted: Sun Jan 07, 2007 7:52 pm Post subject: sendsellwindow packet error? |
|
|
| 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
|
Posted: Mon Jan 08, 2007 9:25 am Post subject: |
|
|
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  |
|
 |
|
|
 |
 |
|
 |
 |
|
 |
 |
|
 |
 |
|
 |
 |
| Author |
Message |
VeNdOr
Joined: 07 Feb 2006 Posts: 52 Location: Rome, Italy
|
Posted: Tue Jan 09, 2007 1:56 pm Post subject: |
|
|
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 |
VeNdOr
Joined: 07 Feb 2006 Posts: 52 Location: Rome, Italy
|
Posted: Wed Jan 10, 2007 12:18 pm Post subject: |
|
|
| 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
|
|
|
 |
|
|
|