Autor Topic: Código Borrar inventario MuEmu  (Visto 506 veces)

0 Miembros and 1 Guest are viewing this topic.

Offline KrizR on: September 30, 2017, 10:19:30 AM

  • Colaborador
  • *
  • *
  • Rank: Puto amo
  • Posts: 250
  • Gracias recibida: 2943
« Ultima edicion: January 05, 2018, 10:43:43 PM by RASTAA »

Offline sombe30 #1 on: September 30, 2017, 12:17:28 PM

  • *
  • Rank: Principiante
  • Posts: 27
  • Gracias recibida: 4
se agrega en el cCommand.cpp   y donde mas amigo

Offline seedmaker #2 on: October 17, 2017, 02:02:11 AM

  • *
  • Rank: Principiante
  • Posts: 27
  • Gracias recibida: 1
How to Fix this ? Error   1   error C2039: 'CommandClearInventory' : is not a member of 'CCommandManager'   D:\My MU Files\Server Files\[ Extra ] Source Files\Package [SOURCE] MuEmu\Package [SOURCE] MuEmu\eMU\GameServer\GameServer\CommandManager.cpp   1396   1   GameServer
Error   2   error C2039: 'm_CommandClearINVSwitch' : is not a member of 'CServerInfo'   D:\My MU Files\Server Files\[ Extra ] Source Files\Package [SOURCE] MuEmu\Package [SOURCE] MuEmu\eMU\GameServer\GameServer\CommandManager.cpp   1398   1   GameServer
Error   3   error C2039: 'm_CommandClearINVEnable' : is not a member of 'CServerInfo'   D:\My MU Files\Server Files\[ Extra ] Source Files\Package [SOURCE] MuEmu\Package [SOURCE] MuEmu\eMU\GameServer\GameServer\CommandManager.cpp   1403   1   GameServer
Error   4   error C2039: 'm_CommandClearINVMoney' : is not a member of 'CServerInfo'   D:\My MU Files\Server Files\[ Extra ] Source Files\Package [SOURCE] MuEmu\Package [SOURCE] MuEmu\eMU\GameServer\GameServer\CommandManager.cpp   1409   1   GameServer
Error   5   error C2039: 'm_CommandClearINVMoney' : is not a member of 'CServerInfo'   D:\My MU Files\Server Files\[ Extra ] Source Files\Package [SOURCE] MuEmu\Package [SOURCE] MuEmu\eMU\GameServer\GameServer\CommandManager.cpp   1415   1   GameServer
   6   IntelliSense: class "CCommandManager" has no member "CommandClearInventory"   d:\my mu files\server files\[ extra ] source files\package [source] muemu\package [source] muemu\emu\gameserver\gameserver\commandmanager.cpp   1396   23   GameServer
   7   IntelliSense: class "CServerInfo" has no member "m_CommandClearINVSwitch"   d:\my mu files\server files\[ extra ] source files\package [source] muemu\package [source] muemu\emu\gameserver\gameserver\commandmanager.cpp   1398   19   GameServer
   8   IntelliSense: class "CServerInfo" has no member "m_CommandClearINVEnable"   d:\my mu files\server files\[ extra ] source files\package [source] muemu\package [source] muemu\emu\gameserver\gameserver\commandmanager.cpp   1403   19   GameServer
   9   IntelliSense: class "CServerInfo" has no member "m_CommandClearINVMoney"   d:\my mu files\server files\[ extra ] source files\package [source] muemu\package [source] muemu\emu\gameserver\gameserver\commandmanager.cpp   1409   42   GameServer
   10   IntelliSense: class "CServerInfo" has no member "m_CommandClearINVMoney"   d:\my mu files\server files\[ extra ] source files\package [source] muemu\package [source] muemu\emu\gameserver\gameserver\commandmanager.cpp   1415   32   GameServer

Offline Lude #3 on: October 18, 2017, 08:47:50 PM

  • *
  • *
  • Rank: Puto amo
  • Posts: 701
  • Gracias recibida: 2104
Me gustaría aclarar que el código esta incompleto ya que solo está aportando el CommandManager.cpp, falta su respectiva declaración en h, también falta el ServerInfo.cpp y h, también falta agregarlo al Message.txt y al GameServer-Commands.dat

Los Niños, los Borrachos y los Logs siempre dicen la verdad.

Gracias:


Offline DeilanSasame #4 on: January 05, 2018, 11:17:07 PM

  • C++ Coder
  • *
  • *
  • Rank: Puto amo
  • Posts: 302
  • Gracias recibida: 533
Codigo Full:

+ = Agregar Linea
- = Eliminar Linea

CommandManager.h
Code: [Select]
-#define MAX_COMMAND 31
+#define MAX_COMMAND 32


COMMAND_CUSTOM_ATTACK_OFFLINE = 31,
+ COMMAND_CLEAR_INV = 32,

commandmanager.cpp
Code: [Select]
	this->Add(gCustomAttack.m_CustomAttackOfflineCommandSyntax,COMMAND_CUSTOM_ATTACK_OFFLINE);
+ this->Add(gMessage.GetMessage(59),COMMAND_CLEAR_INV);

case COMMAND_CUSTOM_ATTACK_OFFLINE:
gCustomAttack.CommandCustomAttackOffline(lpObj,argument);
break;
+ case COMMAND_CLEAR_INV:
+ this->CommandClearInv(lpObj,argument);
+ break;
default:
return 0;


Al Final Agregar lo Siguiente:

Code: [Select]
void CCommandManager::CommandClearInv(LPOBJ lpObj,char* arg) // OK
{

if(gServerInfo.m_CommandClearInvSwitch == 0)
{
return;
}

if(lpObj->Money < ((DWORD)gServerInfo.m_CommandClearInvZen[lpObj->AccountLevel]))
   {
      gNotice.GCNoticeSend(lpObj->Index,1,0,0,0,0,0,gMessage.GetMessage(492),gServerInfo.m_CommandClearInvZen[lpObj->AccountLevel]);
      return;
   }

   lpObj->Money -= gServerInfo.m_CommandClearInvZen[lpObj->AccountLevel];

   GCMoneySend(lpObj->Index,lpObj->Money);

   int MaxValue = gItemManager.GetInventoryMaxValue(lpObj);

    for (int i = INVENTORY_WEAR_SIZE; i < MaxValue; i++)
   {
      gItemManager.InventoryDelItem(lpObj->Index,i);
      gItemManager.GCItemDeleteSend(lpObj->Index,i,1);
   }

   gNotice.GCNoticeSend(lpObj->Index,1,0,0,0,0,0,gMessage.GetMessage(493));

   gLog.Output(LOG_COMMAND,"[Command Clear Iventory] Use for:[%s][%s]",lpObj->Account,lpObj->Name);

}

serverinfo.h

Code: [Select]
	int m_CommandHideGameMasterLevel;
+ int m_CommandClearInvSwitch;
+ int m_CommandClearInvZen[MAX_ACCOUNT_LEVEL];

ServerInfo.cpp
Code: [Select]
this->m_CommandHideGameMasterLevel = GetPrivateProfileInt(section,"CommandHideGameMasterLevel",0,path);

+ this->m_CommandClearInvSwitch = GetPrivateProfileInt(section,"CommandClearInvSwitch",0,path);

+ this->m_CommandClearInvZen[0] = GetPrivateProfileInt(section,"CommandClearInvMoney_AL0",0,path);
+ this->m_CommandClearInvZen[1] = GetPrivateProfileInt(section,"CommandClearInvMoney_AL1",0,path);
+ this->m_CommandClearInvZen[2] = GetPrivateProfileInt(section,"CommandClearInvMoney_AL2",0,path);
+ this->m_CommandClearInvZen[3] = GetPrivateProfileInt(section,"CommandClearInvMoney_AL3",0,path);
+ this->m_CommandClearInvZen[4] = GetPrivateProfileInt(section,"CommandClearInvMoney_AL4",0,path);
}

Messager.txt
Code: [Select]
57        "/re"
58        "/hide"
+ 59        "/clearinv"

491       "%s won %d Jewel of Bless"
+ 492       "You must have at least %d Zen to use this command"
+ 493       "Inventory Cleaned Successfully"
end

GameServerInfo - Command.dat
Code: [Select]
;==================================================
; Hide Command Settings
;==================================================
CommandHideSwitch = 1
CommandHideGameMasterLevel = 0

+ ;==================================================
+ ; Inv Clear Command Settings
+ ;==================================================
+ CommandClearInvSwitch = 1
+ CommandClearInvMoney_AL0 = 1000000
+ CommandClearInvMoney_AL1 = 1000000
+ CommandClearInvMoney_AL2 = 1000000
+ CommandClearInvMoney_AL3 = 1000000
+ CommandClearInvMoney_AL4 = 1000000

« Ultima edicion: January 06, 2018, 11:00:59 AM by DeilanSasame »

Gracias:



 

Related Topics

  Subject / Started by Replies Last post
1 Replies
253 Views
Last post October 07, 2016, 01:18:55 AM
by nik2013
8 Replies
277 Views
Last post November 19, 2016, 11:56:20 PM
by jigokush
8 Replies
200 Views
Last post June 26, 2017, 09:46:49 PM
by Karuritoku
0 Replies
152 Views
Last post June 29, 2017, 03:23:39 PM
by Azzlaer
1 Replies
104 Views
Last post September 19, 2017, 08:04:58 PM
by Tauro14