Autor Tema: Command Make Set to other player  (Leído 9827 veces)

Applayo

  • Newbie
  • *
  • Mensajes: 40
  • : 2
  • Applayo
    • Ver Perfil
Command Make Set to other player
« en: Abril 21, 2021, 05:27:32 pm »

i bring you one of useful commands, Giving player a set (similar with /makeset command)

[hide post=1 login=1]
CommandManager.h

Código: [Seleccionar]
COMMAND_SET            = Next to Last Index,

bool Commandset(LPOBJ lpObj,char* arg);

CommandManager.cpp

Código: [Seleccionar]
case COMMAND_SET:
         Result = Commandset(lpObj,argument);
         break;

Código: [Seleccionar]
bool CCommandManager::Commandset(LPOBJ lpObj,char* arg) // OK
{

   int section = this->GetNumber(arg,0);
   int type = this->GetNumber(arg,1);
   int level = this->GetNumber(arg,2);
   int skill = this->GetNumber(arg,3);
   int luck = this->GetNumber(arg,4);
   int option = this->GetNumber(arg,5);
   int exc = this->GetNumber(arg,6);
   int set = this->GetNumber(arg,7);
   int socket   = this->GetNumber(arg,8);

   char name[11] = {0};

   this->GetString(arg,name,sizeof(name),0);

   LPOBJ lpTarget = gObjFind(name);

   if(lpTarget == 0)
   {
      gNotice.GCNoticeSend(lpObj->Index,1,0,0,0,0,0,gMessage.GetMessage(edit your message.txt));
      return 0;
   }

   BYTE ItemSocketOption[MAX_SOCKET_OPTION] = {0xFF,0xFF,0xFF,0xFF,0xFF};
   for(int n=0;n < socket && socket <= MAX_SOCKET_OPTION;n++)
   {
         ItemSocketOption[n] = 0xFE;
   }

      GDCreateItemSend(lpTarget->Index,0xEB,0,0,GET_ITEM(7,type),level,0,skill,luck,option,-1,exc,set,0,0,ItemSocketOption,0xFF,0);
      GDCreateItemSend(lpTarget->Index,0xEB,0,0,GET_ITEM(8,type),level,0,skill,luck,option,-1,exc,set,0,0,ItemSocketOption,0xFF,0);
      GDCreateItemSend(lpTarget->Index,0xEB,0,0,GET_ITEM(9,type),level,0,skill,luck,option,-1,exc,set,0,0,ItemSocketOption,0xFF,0);
      GDCreateItemSend(lpTarget->Index,0xEB,0,0,GET_ITEM(10,type),level,0,skill,luck,option,-1,exc,set,0,0,ItemSocketOption,0xFF,0);
      GDCreateItemSend(lpTarget->Index,0xEB,0,0,GET_ITEM(11,type),level,0,skill,luck,option,-1,exc,set,0,0,ItemSocketOption,0xFF,0);
      
         
      gNotice.GCNoticeSend(lpObj->Index,1,0,0,0,0,0,gMessage.GetMessage(edit your message.txt));

      gLog.Output(LOG_COMMAND,"[Commandset][%s][%s] - (Type: %d, Level: %d, Skill: %d, Luck: %d, Option: %d, Exc: %d, Set: %d, Sockets: %d)",lpObj->Account,lpObj->Name,type,level,skill,luck,option,exc,set, socket);
   

   return 1;
}

Command.txt

Código: [Seleccionar]
83    "/Set"         1   1   1   1         0   0   0   0         0   0   0   0         0   0   0   0         0   0   0   0         0   0   0   0      0   0      0   0   0   //set <Player Name> <item> <level> <skill> <luck> <option> <exe> <set> <socket>[/hide]

Credito: Ifreat

robins1998

  • Newbie
  • *
  • Mensajes: 40
  • : 0
    • Ver Perfil
Re: Command Make Set to other player
« Respuesta #1 en: Mayo 27, 2021, 02:32:03 am »
Very helpful, thanks for sharing.

lazarocp2020

  • Newbie
  • *
  • Mensajes: 5
  • : 0
    • Ver Perfil
    • Super Сasual Dating - Authentic Ladies
Re: Command Make Set to other player
« Respuesta #2 en: Julio 22, 2021, 06:39:04 pm »
tentei adiciona mais da erro

lazarocp2020

  • Newbie
  • *
  • Mensajes: 5
  • : 0
    • Ver Perfil
    • Super Сasual Dating - Authentic Ladies
Re: Command Make Set to other player
« Respuesta #3 en: Julio 22, 2021, 07:21:30 pm »
NAO FUCIONO NAO