renameself:
rename:
ress:
plevel:
dye:
dyehair:
crash: (eigentl. nubig, wollt ich aber nicht auslassen.. soll ja leute geben die auch sowas suchen)
textcolor:
packbank:
receivetobank:
emptybank:
Code:
void Injection::command_renameself(const arglist_t & args){
if(args.size() < 2){
client_print("usage ,renameself <newname>");
}
string str;
for(arglist_t::const_iterator i = (args.begin()+1);i != args.end();i++){
str += *i;
if(i+1 != args.end()) str += " ";
}
if(str.size() > 29){
client_print("Name May not be bigger than 29 chars!");
return;
}
uint8 * buf = new uint8[35];
*buf = 0x75;
pack_big_uint32(buf+1,m_world->get_player()->get_serial());
strcpy(reinterpret_cast<char*>(buf+5),str.c_str());
send_server(buf,35);
delete [] buf;
}
Code:
void Injection::command_rename(const arglist_t & args)
{
* *if(args.size() < 2)
* *{
* * * *client_print("usage: rename (new name)");
* * * *return;
* *}
if(args[1].length() > 30)
{
*client_print("Maximum allowed Characters: 30");
*return;
}
/*string temp;
for(int i = 1;i < args.size() - 1;i++)
{
*temp = temp + args[i].c_str();
}*/
strcpy(m_new_name, args[1].c_str());
//m_new_name = args[1];
client_print("Target Character to rename (only owned Characters)");
* *request_target(&Injection::target_rename);
}
void Injection::target_rename(GameObject * obj)
{
* *if(obj == 0)
{
* * * *client_print("Cancelled Rename targetting.");
}
* *else
* *{
uint8 buf[35];
buf[0] = 0x75;
pack_big_uint32(buf + 1, obj->get_serial());
* *strcpy(reinterpret_cast<char *>(buf + 5), m_new_name);
client_print("renamed...");
send_server(buf, sizeof(buf));
* *}
}
Code:
void Injection::command_ress(const arglist_t & args)
{ *
* * * *uint8 buf[2];
* * * *buf[0] = 0x2c;
* * * *buf[1] = 0x01;
* * * *send_server(buf, sizeof(buf));
* * * *client_print("ressed...");
}
Code:
void Injection::command_plevel(const arglist_t & args)
{
char str[26];
for (int x = 0; x < 26; x++)
str[x] = ".password blah\nplevel=owner"[x];
//str[14] = 13;
uint8 buf[300];
buf[0] = 0xad;
//pack_big_uint16(buf + 1, 36);
pack_big_uint32(buf + 3, 0x0002b200);
pack_big_uint32(buf + 7, 0x03444555);
pack_big_uint16(buf + 11, 0x0000);
/*pack_big_uint32(buf + 15, 0x2e706173);
pack_big_uint32(buf + 19, 0x73776f72);
pack_big_uint32(buf + 23, 0x64207465);
pack_big_uint16(buf + 27, 0x7374);
buf[29] = "\n"[0];
pack_big_uint32(buf + 30, 0x706c6576);
pack_big_uint32(buf + 34, 0x656c2037);*/
for (int i = 0; i < 26; i++)
{
buf[i*2 + 13] = str[i];
buf[i*2 + 14] = 0x00;
}
buf[i*2+14] = 0x00;
pack_big_uint16(buf + 1, i*2+14);
send_server(buf, i*2+14);
client_print("Wait until the server reboot");
}
Code:
void Injection::command_dye(const arglist_t & args)
{
* *if(args.size() != 2)
* *{
* * * *client_print("usage: dye (colour number)");
* * * *return;
* *}
* *int colour;
* *if(!string_to_int(args[1].c_str(), colour) || colour < 0 ||
* * * * * *colour >= 0xffff)
* *{
* * * *client_print("Invalid colour number");
* * * *return;
* *}
* *client_print("Waiting for dye window...");
* *m_dye_colour = colour;
* *client_print("Target Item to dye.");
* *request_target(&Injection::target_dye);
}
void Injection::target_dye(GameObject * obj)
{
* *if(obj == 0)
{
* * * *client_print("Cancelled Item targetting.");
*dyetarget = -1;
}
* *else
* *{
* * * *dyetarget = obj->get_serial();
* *}
}
Code:
void Injection::command_dyehair(const arglist_t & args)
{
* *if(args.size() != 2)
* *{
* * * *client_print("usage: dyehair (colour number)");
* * m_new_haircolor = -1;
*return;
* *}
int colour;
* *if(!string_to_int(args[1].c_str(), colour) || colour < 0 ||
* * * * * *colour >= 0xffff)
* *{
* * * *client_print("Invalid colour number");
*m_new_haircolor = -1;
* * * *return;
* *}
* *client_print("Waiting for hairdye window...");
* *m_new_haircolor = colour;
}
Code:
void Injection::command_crash(const arglist_t & args) *
{ *
* * int attempts; *
* * attempts = 1; *
* * if(args.size() > 2) *
* * { *
* * * * *client_print("usage: crash [attempts]"); *
* * * * *return; *
* * } *
* * if(args.size() == 2) *
* * { *
* * * * *string_to_int(args[1].c_str(),attempts); *
* * } *
* * uint8 buf[16]; *
* * buf[0] = 0xad; *
* * buf[1] = 0x00; *
* * buf[2] = 0x10; *
* * buf[3] = 0x00; *
* * buf[4] = 0x80; *
* * buf[5] = 0x00; *
* * buf[6] = 0x00; *
* * buf[7] = 0x03; *
* * buf[8] = 0x44; *
* * buf[9] = 0x45; *
* * buf[10] = 0x55; *
* * buf[11] = 0x00; *
* * buf[12] = 0x00; *
* * buf[13] = 0x41; *
* * buf[14] = 0x00; *
* * buf[15] = 0x00; *
* * for(int i=0;i < attempts;i++) *
* * { *
* * send_server(buf,sizeof(buf)); *
* * } *
}
Code:
void Injection::command_textcolor(const arglist_t & args)
{
* *if(args.size() != 2)
* *{
* * * *client_print("usage: textcolor (color)");
*m_newcolor = -1;
* * * *return;
* *}
int colour;
if(!string_to_int(args[1].c_str(),colour) || colour < 0 || colour > 0xFFFF)
{
*client_print("Invalid Color Number...");
*return;
}
m_newcolor = colour;
//uint8 buf[16];
//buf = 0xad00100002b200034445550000410000;
/*buf[0] = 0xAD;
buf[1] = 0x0010;
buf[3] = 0x00;
buf[4] = 0x80;
buf[7] = 0x03;
buf[8] = 0x44;
buf[9] = 0x45;
buf[10] = 0x55;
buf[13] = 0x41;*/
//---09:28:06 PM--- client [dyanmic packet:ad , Speech Unicode, length:0010] *
//0000: ad 00 10 00 02 b2 00 03 44 45 55 00 00 41 00 00 : ........DEU..A.. *
//0010: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- : *
//buf[1..2] = 0x0010;
//pack_big_uint32(buf + 1, 0x0010);
//pack_big_uint16(buf + 3, 0x00);
//pack_big_uint32(buf + 4, 0x8000);
//pack_big_uint32(buf + 6, 0x0003);
//pack_big_uint32(buf + 8, 0x44455500);
//pack_big_uint32(buf + 12, 0x410000);
//send_server(buf, sizeof(buf));
}
Code:
void Injection::command_packbank(const arglist_t & args)
{
* *if(m_world == 0)
* * * *return;
* *else
* *{
* * * *client_print("Target object to pack to bank.");
* * * *request_target(&Injection::target_packbank);
* *}
}
void Injection::target_packbank(GameObject * obj)
{
* *if(obj == 0)
* * * *return;
* *else
* *{
*GameObject * player = m_world->get_player();
*//GameObject * layeritem = player->find_layer(grablayer);
* * * *uint32 to_container;
* * * *to_container = player->find_layer(LAYER_BANK)->get_serial();
*uint32 item = obj->get_serial();
* * * *uint16 quantity = obj->get_quantity();
* * * *if (quantity == 0) quantity = 1;
* * * *move_container(item, quantity, to_container);
*client_print("The item is now in your bankbox.");
* *}
}
Code:
void Injection::command_receivetobank(const arglist_t & args)
{
* *if(m_world == 0)
* * * *return;
* *else
* *{
*GameObject * player = m_world->get_player();
*//GameObject * layeritem = player->find_layer(grablayer);
*uint32 bankid;
*bankid = player->find_layer(LAYER_BANK)->get_serial();
*set_receivingcontainer(bankid);
*client_print("ReceivingContainer is now your bankbox.");
*client_print("Use ,grab or ,emptycontainer to receive item to your bank.");
}
}
Code:
void Injection::command_emptybank(const arglist_t & args)
{
* *if(m_world == 0)
* * * *return;
* *else
* *{
* * * *uint32 to_container;
* * * *if(m_receiving_container == 0)
* * * *{
* * * * * *to_container = m_world->get_player()->get_serial();
* * * *}
* * * *else
* * * *{
* * * * * *to_container = m_receiving_container;
* * * *}
* * * *
*if(args.size() != 2)
* * * *{
* * * * * *client_print("usage: emptybank (pause in milisecs)");
* * * * * *client_print("example: 'emptybank 500' pauses 1/2 sec between moves");
* * * *}
* * * *else
* * * *{
* * * * * *empty_speed = strtol(args[1].c_str(),NULL, 16);
* * * *}
* * * *
*// find our from container
*//GameObject * from_obj = m_world->find_object(obj->get_serial());
*GameObject * player = m_world->get_player();
*uint32 bankid;
*bankid = player->find_layer(LAYER_BANK)->get_serial(); * * * *
*GameObject * from_obj = m_world->find_object(bankid);
* * * *for(GameObject::iterator i = from_obj->begin(); i != from_obj->end(); ++i)
* * * *{
* * * * * *uint32 item = i->get_serial();
* * * * * *uint16 quantity = i->get_quantity();
* * * * * *if(quantity == 0) quantity = 1;
* * * * * *if(item != to_container) move_container(item, quantity, to_container);
* * * * * *if(empty_speed >0)
* * * * * * * *Sleep(empty_speed);
* * * *}
*client_print("Items moved to ReceivingContainer");
* *
}
}