About injection

Is it possible to inject custom function to scripts?

Saw this topic

Where there is

  • Example 1: inject,Opcode?,ItsEncrypted?,Data?,Data?,Data?,...
    This part said to be used in script injection
    added my code such as: inject,0x958,13,00000000,0003F401,FD000000
    Got this error

[11:30:15] Python Error: byte must be in range(0, 256)
[11:30:15] Script: Command not found [inject,0x958,13,00000000,0003F401,FD000000]

Help would be appreciated thank you

After working on it a bit more, I couldnt understand how to pass this data. I read this packet with xPacketTool and This FD00000 thing is after each packet. Im basicly trying to open npc, buy trade goods and close it however I have some issues in formatting the “data” part of the packet

Fixed the issue.

***** FOR OTHER USERS! ****

for example : open jg grocery npc

what it looks in bot data from xPackedPlugin
open npc : Client: (Opcode) 0x7045 (Data) 11 01 00 00
open the npc store page : Client: (Opcode) 0x7046 (Data) 11 01 00 00 01

what it should look like in script
walk,
walk,
inject,0x7045,False,11,01,00,00 <— open npc
wait,300 <— pls always add delay between op codes in script
inject,0x7046,False,11,01,00,00,01 <---- open the buy/sell window

always type “False” if the data is not encrypted like 99% of all op codes

hello, how did you solve the issue above?

1 Like

done everything like mentioned above, did not help, trying to open npc gets back with: Script: Command not found [inject,0blabla

Do you have the plugin installed?

yes, xcontrol, xpacket.

so far ive only managed to open up the npc window, however doesnt go through to buy/sell window.

Looks something like this:
inject,0x4705,False,01,00,0C
wait,500
inject,0x470B,False,01,00,00
wait,500
inject,0x5604,False,01,00,00,00,00,00,01
wait,500
inject,0x470B,False,01,00,00

(First one opens, 2nd is a “close” packet weirdly, 3d open buy/sell window. 4th close.)
I tried without sticking the close packet in a second place, instead tried- open open close, but with no different results either way, wouldnt do any other action than the first.

P.S.
Is there a command to launch an external .exe file through the config?

Thanks for help!

3d open buy/sell window. 4th close.)

this will not work it will only open it and close it derectly you have to set a packed for selling this spec. item like
open npc
select buywindow
buy 1 stack
buy 1 stack
buy 1 stack
close npc

Thank you!

hello my friend did you manage to modify the xcontrol plugin to buy / sell from npc with a command of your choice . if so can you share what you find out . that is if you agree of course .