Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- if((strncmp(comando, "Criar %s", 5) == 0))
- {
- if(cGuild != 0)
- {
- SendClientMsg(clientid, "Você ja pertence a alguma guild !");
- return;
- }
- if(cGold <= 99999999)
- {
- SendClientMsg(clientid, "Necessario 100 Milhões de gold !");
- return;
- }
- if(cGuild == 509)
- {
- SendClientMsg(clientid, "Você ja tem Guild !");
- return;
- }
- if(file_exists("Dados.txt"))
- {
- arquivo = fopen("Dados.txt", "r");
- while ((fscanf(arquivo, "%[^\n]", line)) != EOF)
- {
- fgetc(arquivo);
- int Guil1,Guil2,Guil3;
- sscanf(line, "%d,%d,%d",&Guil1,&Guil2,&Guil3);
- {
- PByte(0x04BFF76) = Guil1;
- PByte(0x04BFF77) = Guil2;
- PByte(0x04BFF78) = Guil3;
- fclose(arquivo);
- }
- }
- arquivo = fopen("Dados.txt", "w");
- if(arquivo != NULL)
- {
- cGold -= 100000000;
- PByte(0x04BFF76) += 1;
- PByte(0x04BFF77) += 1;
- PByte(0x04BFF78) += 1;
- Guild1 = PByte(0x04BFF76);
- Guild2 = PByte(0x04BFF77);
- Guild3 = PByte(0x04BFF78);
- PInt(addr_bclient + 0x015C6A74) = 509;
- PInt(addr_bclient + 0x015C6A74 +2) = 56;
- PInt(addr_bclient + 0x015C6A74 +3) = Guild1;
- PInt(addr_bclient + 0x015C6A74 +4) = 57;
- PInt(addr_bclient + 0x015C6A74 +5) = Guild2;
- PInt(addr_bclient + 0x015C6A74 +6) = 59;
- PInt(addr_bclient + 0x015C6A74 +7) = Guild3;
- PLong(addr_bclient + 0x015C69D0) = cGold;
- SendALL(clientid);
- SendItens(clientid,12);
- SendClientMsg(clientid, "Guild Registrada !");
- SaveChar(1,clientid);
- SendCharList(clientid);
- Guil1 = PByte(0x04BFF76);
- Guil2 = PByte(0x04BFF77);
- Guil3 = PByte(0x04BFF78);
- sprintf(tmp,"%d,%d,%d",Guil1,Guil1,Guil1);
- fputs(tmp, arquivo);
- fclose(arquivo);
- return;
- }
- }
- else
- {
- arquivo = fopen("Dados.txt", "w");
- if(arquivo != NULL)
- {
- char text[] = "1,1,1";
- fputs(text, arquivo);
- fclose(arquivo);
- }
- }
- }
Add Comment
Please, Sign In to add comment