Salut, cumpar un cef sau daca poate modifica cineva actualul cef de pe net
Vreau sa dea load la cont cand intri pe itemshop, acum practic prima data cand ma conectez pe joc trebuie sa ma si conectez pe itemshop, vreau sa dea load automat la cont. Multumesc anticipat! astept oferte!
cumpar cef bun
- [HF]White
-

- Mesaje: 2684
- Membru din: 03 Iul 2018, 13:40
- Regat: Jinno
- Aprecieri: 338
- Mulţumiri: 5331
- Rezolvări prob.: 13
- Discord: Copiază ID
- Contact:
Tutorial de pe
This is a little tutorial on how to connect the game to the item shop of your website.
By clicking on the coin in the game client the web browser will be opened and connected to your website.
I'll explain how to automatically login the player to the item shop
First of all open cmd_general.cpp and look for do_in_game_mall and replace the whole function with this
Edit secretKey and websiteUrl with your information. The key can be a random string.
What happens is the following:
So your website you can check if the secret is corrent and then login the player. You can do something like this:
By clicking on the coin in the game client the web browser will be opened and connected to your website.
I'll explain how to automatically login the player to the item shop
First of all open cmd_general.cpp and look for do_in_game_mall and replace the whole function with this
Cod: Selectaţi tot
ACMD(do_in_game_mall)
{
char buf[512+1];
char sas[33];
MD5_CTX ctx;
const char secretKey[] = "my secret key"; // <<--- EDIT THIS!!!
const char websiteUrl[] = "http://mywebsite/shop"; // <<--- EDIT THIS!!!
snprintf(buf, sizeof(buf), "%u%s", ch->GetAID(), secretKey);
MD5Init(&ctx);
MD5Update(&ctx, (const unsigned char *) buf, strlen(buf));
#ifdef __FreeBSD__
MD5End(&ctx, sas);
#else
static const char hex[] = "0123456789abcdef";
unsigned char digest[16];
MD5Final(digest, &ctx);
int i;
for (i = 0; i < 16; ++i) {
sas[i+i] = hex[digest[i] >> 4];
sas[i+i+1] = hex[digest[i] & 0x0f];
}
sas[i+i] = '\0';
#endif
snprintf(buf, sizeof(buf), "mall %s?aid=%u&secret=%s", websiteUrl, ch->GetAID(), sas);
ch->ChatPacket(CHAT_TYPE_COMMAND, buf);
}Edit secretKey and websiteUrl with your information. The key can be a random string.
What happens is the following:
aid = account id
secret = md5( account id + your secret key )
So your website you can check if the secret is corrent and then login the player. You can do something like this:
Cod: Selectaţi tot
<?php
$secretKey = $_GET['secret'];
$accountId = $_GET['aid'];
$generatedSecret = md5($accountId . $secretKey);
if ($generatedSecret == $secretKey) {
// ok, proceed with login
} else {
// invalid secret
}
Răspunsuri
2 Vizualizări
438
2 Vizualizări
438
-
- Informaţie
-
Cine este conectat
Utilizatori ce ce navighează pe acest forum: Niciun utilizator înregistrat și 11 vizitatori





