Continuing the "Spells" effort
Moderator: Team Members
-
LethalEncounter
- Team: Zombie
- Posts: 2717
- Joined: Wed Jul 25, 2007 10:10 pm
Re: Continuing the "Spells" effort
Nothing magical about it
The code is there in the COMMAND_TEST block, commented out. If you want to use it, just comment out the code that is in the COMMAND_TEST block which isn't currently commented and uncomment the code that is. Basically the way it works is I have a raw packet there (should still be for a spell) that we are going to edit and then send the packet to the player to view the results. The /test command takes up to 4 arguments, the first being an offset in the packet and the next being the new value of the data. The third and fourth arguments are optional but allow you to set the value for a second offset (third argument is another offset and fourth is the value). The code itself could be modified to work better, but it fit my needs pretty well
The hard part is figuring out exactly what offset you are wanting to change. If you want to change a custom packet make sure that you paste in your values starting at the packet size and make sure that the opcode type (0x0233 for 972) matches your client. Also you want want to verify that the packet is correct by just calling the command with 2 0 as the arguments. If the spell pops up then it is set up correctly and you should be able to continue.
- Zcoretri
- Team Member
- Posts: 1642
- Joined: Fri Jul 27, 2007 12:55 pm
- Location: SoCal
Re: Continuing the "Spells" effort
By offset, you mean which piece of data is going to get the new passed in value?
I will give it a try
I will give it a try
- Zcoretri
- Team Member
- Posts: 1642
- Joined: Fri Jul 27, 2007 12:55 pm
- Location: SoCal
Re: Continuing the "Spells" effort
Got it to work just fine...more fun shit to play with now, lol
It is actually a book itemLethalEncounter wrote:Nothing magical about itThe code is there in the COMMAND_TEST block, commented out. If you want to use it, just comment out the code that is in the COMMAND_TEST block which isn't currently commented and uncomment the code that is. Basically the way it works is I have a raw packet there (should still be for a spell) that we are going to edit and then send the packet to the player to view the results.
Can this be expanded to eight arguments? (so you can change 4 bytes at a time)The /test command takes up to 4 arguments
-
LethalEncounter
- Team: Zombie
- Posts: 2717
- Joined: Wed Jul 25, 2007 10:10 pm
Re: Continuing the "Spells" effort
Zcoretri wrote: Can this be expanded to eight arguments? (so you can change 4 bytes at a time)
Try changing the code to this:
Code: Select all
int index = 0;
while(sep && sep->arg[index+1] && sep->IsNumber(index) && sep->IsNumber(index+1)){
pos = atoi(sep->arg[index]);
val = atoi(sep->arg[index+1]);
memset(blah+pos, val, 1);
index+=2;
}
EQ2Packet* packet = new EQ2Packet(OP_ClientCmdMsg, blah, sizeof(blah));
DumpPacket(packet);
client->QueuePacket(packet);Who is online
Users browsing this forum: No registered users and 0 guests