Selecting Npc - Opening window and buying items

08/03/2011 02:06 sarkoplata#1
Hello guys,
As you can understand , i am working on loop. All my code is ready for town loop to buy potions etc. with required amount but i have problems with npc's.

Items should be bought while only npc is selected. But something is wrong , my client is keeps getting crashed.

To select Jewelery NPC :
Code:
Dim Jewel As New Packet(&H7045)
        Jewel.WriteUInt32(73)
        Proxy.ag_remote_context.Security.Send(Jewel)
To buy item from NPC :
Code:
    Dim BuyDrugs As New Packet(&H7034)
        BuyDrugs.WriteUInt8(8)
        BuyDrugs.WriteUInt8(2)
        BuyDrugs.WriteUInt8(0)
        BuyDrugs.WriteUInt16(1)
        BuyDrugs.WriteUInt32(73)
        Proxy.ag_remote_context.Security.Send(BuyDrugs)
Im seaching for the reason of crash but :confused:
Btw: when i login after crash, item is in my inventory
Thanks in advance :)
08/03/2011 02:19 ÑõÑ_Ŝŧóp#2
as I remember
some1 made thread here (maybe jremy dun remember)
he had the same problem but with buying item from stall network
he had to block a packet which causes crashes


Edit: [Only registered and activated users can see links. Click Here To Register...] here :) you can get your answer
08/03/2011 15:00 sarkoplata#3
@non stop
Thank you ! jremy had same problem with me , but i couldnt really understand what packet to block.
08/03/2011 15:46 kevin_owner#4
In that other thread Shadowz75 already explained your problem.

The client isn't prepared for a buy packet from the server so it crashes. You have to filter this packet out so the client doesn't get it and you have to send a pickup packet to the client to simulate that it picks up an item. This way you can see the bought item in the inventory and the client doesn't crash.
08/03/2011 18:16 sarkoplata#5
To kevin :

Ok well , i blocked the packet when server sends when i buy item from npc. And so i didnt crash but i wasnt able to see the item in my inventory , of course.

So to see the item i did (faked pickup packet)

Code:
Dim FakeSuccess As New Packet(&HB074)
                            FakeSuccess.WriteUInt8(1)
                            FakeSuccess.WriteUInt8(1)
                            Proxy.ag_local_context.Security.Send(FakeSuccess)
Code:
Dim FakePickUp As New Packet(&HB034)
                            FakePickUp.WriteUInt8(1)
                            FakePickUp.WriteUInt8(6)
                            FakePickUp.WriteUInt8(Slot)
                            FakePickUp.WriteUInt32(ItemId)
                            FakePickUp.WriteUInt8(Amount)
                            Proxy.ag_local_context.Security.Send(FakePickUp)
Code:
Dim FakeOK As New Packet(&HB074)
                            FakeOK.WriteUInt8(2)
                            FakeOK.WriteUInt8(0)
                            Proxy.ag_local_context.Security.Send(FakeOK)
Although i was sure that would not work , i just tried. And it made my client crash.So should i send the pickpacket also ? well , since it does not have any uniqueid as a drop...
08/03/2011 18:37 vorosmihaly#6
seriously,would you stop asking EVERYTHING related to your "bot"?..
if you can't solve them alone,or using google,then stop it..
it's OK if you ask some questions,but I see your questions daily,so basicly you want epvp community to make a bot for you?..
08/03/2011 19:09 sarkoplata#7
Quote:
Originally Posted by vorosmihaly View Post
seriously,would you stop asking EVERYTHING related to your "bot"?..
if you can't solve them alone,or using google,then stop it..
it's OK if you ask some questions,but I see your questions daily,so basicly you want epvp community to make a bot for you?..
quit topic if it annoys you PRO boy
08/03/2011 19:16 vorosmihaly#8
Quote:
Originally Posted by sarkoplata View Post
quit topic if it annoys you PRO boy
well,I'm not a pro,but I can use google,not just ask others,rofl..
08/03/2011 19:23 sarkoplata#9
Quote:
Originally Posted by vorosmihaly View Post
well,I'm not a pro,but I can use google,not just ask others,rofl..
wanna see my google history ? its huge , lol. But if i search "silkroad item buy packet crashes client" i will just get shit as result.
And please can you look [Only registered and activated users can see links. Click Here To Register...] ?
See i have only 1 topic...
and again, if it annoys you , just dont come to topic ^^
08/03/2011 19:33 vorosmihaly#10
Quote:
Originally Posted by sarkoplata View Post
wanna see my google history ? its huge , lol. But if i search "silkroad item buy packet crashes client" i will just get shit as result.
And please can you look [Only registered and activated users can see links. Click Here To Register...] ?
See i have only 1 topic...
and again, if it annoys you , just dont come to topic ^^
well,that one was answered already,in 2 threads if I remember well,& about the other crash,you send the wrong packets..just block the incoming buy potion packet,and replace it with an other one.there's no need for 0x7074 and dunno the other one

but you really should look up things yourself..
08/03/2011 19:34 ahmed4ever2u#11
Quote:
Originally Posted by vorosmihaly View Post
seriously,would you stop asking EVERYTHING related to your "bot"?..
if you can't solve them alone,or using google,then stop it..
it's OK if you ask some questions,but I see your questions daily,so basicly you want epvp community to make a bot for you?..
if you won't help just ignor the topic !
08/03/2011 19:36 vorosmihaly#12
Quote:
Originally Posted by ahmed4ever2u View Post
if you won't help just ignor the topic !
btw,who the hell r u? I've never talked to you,so gtfo.
and I helped him,just read my post..
08/03/2011 19:54 ZeraPain#13
as far as i remember it is possible to buy from npc without blocking any packet.
i did it some time ago and it worked fine (ecsro)
i can test it later on esro (guess you're trying to use it there)
08/03/2011 20:20 sarkoplata#14
Quote:
Originally Posted by ZeraPain View Post
as far as i remember it is possible to buy from npc without blocking any packet.
i did it some time ago and it worked fine (ecsro)
i can test it later on esro (guess you're trying to use it there)
i used to do it at swsro but its not working here.
08/03/2011 22:18 pushedx#15
You have to "emulate" talking to NPCs via packets because of the way the client is setup. This has been the case in Silkroad since the beginning. It's why isrobot used to get stuck on shop menus back around version 1.0XX (Softmod days), they had some client interactions, but it was dependent on resolution and window focus. So you do need to block some packets, and then send others to the client to update the inventory. Otherwise, your inventory can get out of sync and you have to teleport to fix it.