lunes, 12 de abril de 2010

Poner /post en cualquier version

Lo primero es conseguir un GS 99b desempacado o que crackees tu uno.

Despues puedes elegir entre probar a hookear una dll existente que tenga el /post (algun mygsfun podria servir), pero no te garantizo que funcione.

Si quieres que funcione si o si, crea una nueva dll y llamala como tu quieras.

Utiliza este code creado por coNsept, que es una funcion para el /post. Seguramente tendras que hacer alguna adaptacion en los offset, pero por lo demas deberia estar perfecto.

void DataSendAll(unsigned char* Packet, int Length)
{
for (int i=6400; i<7400; i++)
if(gObjIsConnected(i))
DataSend(i, Packet, Length);
}

void SendPost(int wId, LPCSTR Command, LPCSTR Text)
{
if (!IsPost) return;
if (!gObjIsConnected(wId)) return;
if (!strcmpi(Command, "/Post"))
{
MessageOutput(wId, "[%s] Useage: /Post .", szPrefix);
MessageOutput(wId, "[%s] Price for post: %d, Minimun Level: %d", szPrefix, PostCost, PostLevel);
return;
}
gObj_SetInfo(wId);
if (gObj.Level < PostLevel)
{
MessageOutput(wId, "[%s] You're level is too low to post!", szPrefix);
return;
}
if (gObj.Money < PostCost)
{
MessageOutput(wId, "[%s] You don't have enough money to post!", szPrefix);
return;
}
BYTE *Packet;
char Message[100];
Packet = (BYTE*) malloc(200);
memset(Packet, 0x00, 200);
*Packet = 0xC1;
*(Packet+2) = 0x00;
memcpy((Packet+3), gObj.Nick, strlen(gObj.Nick));
sprintf(Message, "@@[Global] %s", Text);
memcpy((Packet+13), Message, strlen(Message));
int Len = (strlen(Message) + 0x13);
*(Packet+1) = Len;
DataSendAll(Packet, Len);
int Amount = (gObj.Money - PostCost);
gObj_Write(wId, gObj_Money, Amount);
MoneySend(wId, Amount);
free (Packet);
}

Y por ultimo hookeas esa dll que creast
e al GS.

Fuente : Alkon.

Saludos,Blaky.

0 comentarios: