Advertisement
lolohac

Um Item por personagem

Mar 14th, 2014
135
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.75 KB | None | 0 0
  1. //lolohac
  2. #include"DLLMain.h"
  3. #define vNick(clientid) (char*)(clientid * 0x0410 + 0x015C69B8) // Caso não tenha.
  4.  
  5. void Volatiles::ItemX(int clientid)
  6. {
  7.     MOB *player = (MOB*)GetMobFromIndex(clientid);
  8.     FILE *arquivo;
  9.     FILE *arquivo2;
  10.     char ARQUI[50];
  11.     int itenslot = Atualizar::GetFirstSlotSADD(clientid,X,64);
  12.     sprintf(ARQUI,"DataBase/ITEMX/[%s].txt", vNick(clientid));
  13.     if(Atualizar::file_exists(ARQUI))
  14.     {
  15.         Atualizar::SendClientMsg(clientid,"Você ja utilizou o Item  X");
  16.     }
  17.     else
  18.     {
  19.         char deca [50];
  20.         player->Inventory[itenslot].Index = 0;
  21.         Atualizar::SendALL(clientid);
  22.         arquivo = fopen(ARQUI,"w");
  23.         fputs(deca,arquivo);
  24.         fclose(arquivo);
  25.         {
  26.             Atualizar::SendClientMsg(clientid,"Você utilizou Item x com sucesso");
  27.         }
  28.     }
  29. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement