programmer needs help :v

06/23/2015 22:03 TheRealHero#1
Hey guys. Im working on a bot. But i ran into a big problem.
My bot can buy Items from NPC no problem in that(if i've opened it manually once). But If i logout or teleport and start my bot, client crash.. I tried to block a few packets but i just cant get it to work. Now I ran out of ideas...

When I log back in the item is there.. So i know it has something to do with the client is not ready for a received packet but I cant figur which one^^

If you know any programming pls gimme a hint :) Thx you.
06/24/2015 03:33 ​Exo#2
Character data update. You're probably missing that. PS: Not so easy.
06/24/2015 03:39 TheRealHero#3
can you be more specific?

- i really appreciate your time.
06/24/2015 03:49 ​Exo#4
When you do any change to your inventory or character data in general. You need to handle the character data update packet. You will find it in that old documentation. If you didn't handle it then your client will have false data and will crash or freeze.
06/24/2015 04:13 TheRealHero#5
But what I dont get is that its working just fine, if I have opened the NPC manually once. and then close it it's still working. Just not if i teleport/relog.
What I do is sending the packets for selecting NPC>Open npc>Open 2option in NPC>Buying item. I'll Look it up.

Thx for your response.
06/24/2015 11:33 daryllrab8#6
block the opcode "B034", works on me on my auto buying attribute stones and sell fuser. The disadvantage of this is you must teleport everytime there is changes on your inventory (moving, dropping, etc).
06/24/2015 11:35 qqdev#7
You have to block a particular Opcode & fake a packet (if I remember it correctly)
06/24/2015 17:18 TheRealHero#8
Quote:
Originally Posted by daryllrab8 View Post
block the opcode "B034", works on me on my auto buying attribute stones and sell fuser. The disadvantage of this is you must teleport everytime there is changes on your inventory (moving, dropping, etc).
Blocking "B034" still gives me crash.


Quote:
Originally Posted by qqdev View Post
You have to block a particular Opcode & fake a packet (if I remember it correctly)
As daryllrab explained. I have tried to block "B034", and I've faked the packet "B034" "

I noticed something strange about the packets.
Both 1. and 2. at the store, share same Opcode, data.
I think that's my issue.

Here is an exampel:

Select NPC
[C -> S][7045]
1B 0B 00 00 ;Store ID ................

Open NPC (1ST.)
[C -> S][7046]
1B 0B 00 00 ;Store ID ................
01 ;?

Open NPC(2ND)
[C -> S][7046]
1B 0B 00 00 ;Store ID ................
01 ;?

What you'll notice is that they share exactly the same opcodes and data.
Any solutions guys:)?

- Thx for your time.

I tried blocking b034 at potion store. works sometimes... HMMM!!
But not at the other NPC (its a special npc)

>.<!
06/25/2015 01:56 daryllrab8#9
Is that the "Drug Store" npc?

If it is, you don't need to inject the opcode in selecting the 2nd option in NPC. You will only need the "Select npc opcode - 7045" then you can start injecting the opcode for buying which is "7034"

So, here's what i did on my asf

1. Select NPC - 7045 opcode
2. Wait for "B045" opcode
3. Start Buying items - 7034 opcode
4. Wait for "304E" with packet that refers to full inventory.
5. Teleport the bot
06/26/2015 20:26 TheRealHero#10
1. Select NPC - 7045 opcode (Done)
2. Wait for "B045" opcode (Done)
3. Start Buying items - 7034 opcode (Done) -> crash.
4. Wait for "304E" with packet that refers to full inventory. ??
5. Teleport the bot ??

If you logout, and login and don't open any NPC or stores. and you start your bot, don't you get crash too? cuz that's my problem.
06/28/2015 17:46 daryllrab8#11
if B034 was not blocked, i was getting crash too, but with B034 blocked, it doesn't.
You sure you blocked B034 correctly? try to move your items in your inventory, if there is changes > means B034 not blocked
07/01/2015 00:21 TheRealHero#12
I used the phconnector ini's file and added it. Yes when i move my items they don't move.
But I'm still getting crash when bot opens npc the first time. If i open it manually once everything works fine...