26

(11 replies, posted in Website releases)

MuWeb 0.9

New Update
Change Language (eng,rus,lat)
install.php
http://img717.imageshack.us/img717/1457/86843564.jpg


Downloads:
LINK 1: Download
LINK 2: Download



Credits:
- Master-for web scripts
- elwiss-for skin&cripts

27

(0 replies, posted in Tools)

MuMaker 1.13 Release !!

Support to Main KOR 1.07K

Added Support to Mains CHN 1.03H and JPN 1.03K

Added MelpMaker "Help of MuMaker"

Added Support to New Ancient Items

Added New Items:
- 5 New Rings
- 3 New Pendants
- 1 Pet
- 9 Scrolls
- 5 Fuits
- 9 Potions
- 6 Amulets
- 4 Event Tickets
- 8 Giff Boxs
- 16 Mix Items
~ 30 Test Items

Added 1 New Map:
- Market Rolen

Fix some litle bugs.


Downloads:
MuMaker 1.13:
LINK 1: Download
LINK 2: Download
LINK 3: Download

Web Oficial

28

(30 replies, posted in Server Releases)

Sorry my englsh is very bad and I cannot write it

29

(6 replies, posted in Help / FAQ)

Did you patched main.exe with the external IP

30

(6 replies, posted in Help / FAQ)

Check all config files and shortcuts. You may have missed to change the IP somewhere.

31

(2 replies, posted in Server Releases)

See the first post. The files are fixed (uploaded)

32

(1 replies, posted in Server Releases)

Source Duel System S4

DuelManager.h

#pragma once

#include "user.h"
#include "..includeprodef.h"
#include "DarkSpirit.h"
#include "GameMain.h"

#define DUEL_WIN_POINT_COUNT  10
#define MAX_DUEL_ROOMS      4
#define MAX_DUEL_LEARNERS    10
#define DUEL_TIME        30 // 15 minutos

////////////////////////////////////////////////////////////////////////////////////////////////
// PROTOCOL PACKETS
////////////////////////////////////////////////////////////////////////////////////////////////

#pragma pack(1)

struct PMSG_DUEL_ANSWER_START
{
  PBMSG_HEAD2 h;
  bool bDuelOK;
  BYTE NumberH;
  BYTE NumberL;
  char szName[10];
};

struct PMSG_DUEL_START
{
  PBMSG_HEAD2 h;  // C1:AA
  BYTE bDuelStart;  // 3
  BYTE NumberH;  // 4
  BYTE NumberL;  // 5
  char szName[10];  // 6
};

struct PMSG_DUEL_REQUEST_END
{
  PBMSG_HEAD2 h;
  BYTE NumberH;  // 3
  BYTE NumberL;  // 4
  char szName[10];  // 6
};

struct PMSG_DUEL_REQUEST_WATCH // 0x07
{
  PBMSG_HEAD2 h;
  BYTE btRoomIndex;
  BYTE btRandomValue;
};

// SERVER -> CLIENT

struct PMSG_DUEL_QUESTION_START // 0x01
{
  PBMSG_HEAD2 h;
  BYTE NumberH;
  BYTE NumberL;
  BYTE szName[10];
};

struct PMSG_DUEL_REQUEST_START // 0x02
{
  PBMSG_HEAD2 h;
  BYTE NumberH;  // 3
  BYTE NumberL;  // 4
  char szName[10];  // 5
};

struct PMSG_DUEL_END // 0x03
{
  PBMSG_HEAD2 h;
};

struct PMSG_DUEL_SCORE // 0x04
{
  PBMSG_HEAD2 h;  
  BYTE NumberH1;  
  BYTE NumberL1;  
  BYTE NumberH2;  
  BYTE NumberL2;  
  BYTE btDuelScore1;  
  BYTE btDuelScore2;  
};

struct PMSG_DUEL_LIFEBAR_REFILL // 0x05
{
  PBMSG_HEAD2 h;
  BYTE btObjId01H;
  BYTE btObjId01L;
  BYTE btObjId02H;
  BYTE btObjId02L;
  BYTE btLife01;
  BYTE btLife02;
  BYTE btShield01;
  BYTE btShield02;
};

struct PMSG_DUEL_ROOMSTATUS // Complemento de 0x06
{
  BYTE szName1[10];
  BYTE szName2[10];
  BYTE btDuelRunning;
  BYTE btDuelOpen;
};

struct PMSG_DUEL_STATUS // 0x06
{
  PBMSG_HEAD2 h;
  PMSG_DUEL_ROOMSTATUS pRoomStatus[MAX_DUEL_ROOMS];
};

struct PMSG_DUEL_LIFEBAR_NAME // 0x07 00 
{
  PBMSG_HEAD2 h;
  WORD Type; // 4
  BYTE szName1[10]; // 5
  BYTE szName2[10]; // f
  BYTE btObjId1H;
  BYTE btObjId1L;
  BYTE btObjId2H;
  BYTE btObjId2L;
};

struct PMSG_DUEL_SPEC_ADD // 0x08
{
  PBMSG_HEAD2 h;
  BYTE szName[10];
};

struct PMSG_DUEL_SPEC_DELEX // 0x09 - confirmar
{
  PBMSG_HEAD2 h;
  BYTE szName[10];
};

struct PMSG_DUEL_SPEC_DEL // 0x0A
{
  PBMSG_HEAD2 h;
  BYTE szName[10];
};

struct PMSG_DUEL_SPEC_LIST // 0x0B
{
  PBMSG_HEAD2 h;
  BYTE btCount;
  BYTE szName[MAX_DUEL_LEARNERS][10];
};

struct PMSG_DUEL_FINISH // 0x0C
{
  PBMSG_HEAD2 h;
  BYTE szWinner[10];
  BYTE szLooser[10];
};

struct PMSG_DUEL_LIFEBAR_INIT // 0x0D
{
  PBMSG_HEAD2 h;
  BYTE Unknow00;
};

#pragma pack()

////////////////////////////////////////////////////////////////////////////////////////////////
// END PROTOCOL PACKETS
////////////////////////////////////////////////////////////////////////////////////////////////



struct DUEL_ROOM
{

  BOOL  bFree;
  BOOL  bWaiting;

  LPOBJ  lpObj01;
  BYTE  btPoints01;

  LPOBJ  lpObj02;
  BYTE  btPoints02;

  LPOBJ  lpLearners[MAX_DUEL_LEARNERS];

  DWORD  dwTickCount;
  DWORD  dwStartTime;

  BOOL  bHasWinner;

};

static const struct DUEL_RESPAWN_RECTS
{
  int LowX;
  int LowY;
  int HighX;
  int HighY;
} 
g_DuelRespawns [MAX_DUEL_ROOMS] = 
{
  { 89,  62,    110,  81    },
  { 89,  113,  110,  130    },
  { 141,  63,    163,  82    },
  { 142,  111,  163,  131    }
};

class CDuelManager
{
private:
  DWORD m_UpdateTickCount;
  DWORD m_UpdateLifebarTime;

public:

  DUEL_ROOM  m_Rooms[MAX_DUEL_ROOMS];

  CDuelManager(void);
  ~CDuelManager(void);

  void Run();
  void ProtocolCore(LPOBJ lpObj, BYTE* lpPacket);

  void KillUserProc ( LPOBJ lpObj, LPOBJ lpTarget);
  int GetUserDuelRoom(LPOBJ lpObj);
  int GetFreeRoomIndex();

  bool IsDuelEnable(int aIndex);
  bool DuelCheck(LPOBJ lpObj) { return this->IsOnDuel(lpObj->m_Index); }
  bool DuelCheck(LPOBJ lpObj, LPOBJ lpObj2) { return this->IsOnDuel(lpObj->m_Index, lpObj2->m_Index); }

  void UserDuelInfoReset(LPOBJ lpObj);
  void RoomReset(int iRoom, bool dontMove = false, bool dontSendEnd = false);

  void RemoveUser(LPOBJ lpObj);

  void SetDuelOption(int lpObj, BOOL bState);

  bool IsOnDuel(int lpObj);
  bool IsOnDuel(int lpObj, int lpObj2);

  void PlayerScore(LPOBJ lpObj);

  int GetSpectatorCount(int iRoom);
  void SendDuelStatus(LPOBJ lpObj);

  void UpdateDuelScore(int iRoom);

  void RecvDuelRequest(LPOBJ lpObj, PMSG_DUEL_REQUEST_START* lpMsg);
  void RecvDuelAnswer(LPOBJ lpObj, PMSG_DUEL_ANSWER_START* lpMsg);
  void RecvWatchRequest(LPOBJ lpObj, PMSG_DUEL_REQUEST_WATCH* lpMsg);

  void SendRefuseDuel(LPOBJ lpObj)
  { 

    if(lpObj == NULL) return;

    PMSG_DUEL_START pMsgSend;
    
    pMsgSend.h.c = 0xC1;
    pMsgSend.h.headcode = 0xAA;
    pMsgSend.h.subcode = 0x01;
    pMsgSend.bDuelStart = 0x0F;
    pMsgSend.h.size = sizeof(pMsgSend);

    DataSend(lpObj->m_Index, (BYTE*)&pMsgSend, pMsgSend.h.size);

  }

  void SendEndDuel(LPOBJ lpObj);
  void SendEndDuelNotification(LPOBJ lpObj, char* Winner, char* Looser);

  void SendLifebarStatus(int iRoom);
  void SendLifebarStatus(LPOBJ lpObj, int iRoom);
  void SendLifebarInit(LPOBJ lpObj, int iRoom);
  void SendSpectatorList(int iRoom);
  void SendSpectatorList(LPOBJ lpObj, int iRoom);
  void SendSpectatorAdd(int iSpecIndex, int iRoom);
  void SendSpectatorRemove(int iSpecIndex, int iRoom);


};


extern CDuelManager    g_DuelManager;

DuelManager.cpp

#include "stdafx.h"
#include "user.h"
#include "protocol.h"
#include "..includeprodef.h"
#include "..commonwinutil.h"
#include "LogProc.h"
#include "DuelManager.h"
#include "GameMain.h"
#include "IllusionTemple.h"
#include "BloodCastle.h"
#include "ChaosCastle.h"
#include "DevilSquare.h"
#include "DarkSpirit.h"
#include "ObjUseSkill.h"

static const struct DUEL_GATES
{
  int UserGate01;
  int UserGate02;
  int LearnerGate;
} 
g_DuelGates[MAX_DUEL_ROOMS] = 
{
  { 295, 296, 303 },
  { 297, 298, 304 },
  { 299, 300, 305 },
  { 301, 302, 306 }
};


CDuelManager  g_DuelManager;

CDuelManager::CDuelManager(void)
{

  ZeroMemory(&this->m_Rooms, sizeof(this->m_Rooms));

  for(int i = 0; i < MAX_DUEL_ROOMS; i++) 
  {
    this->m_Rooms[i].bFree = true;
    this->m_Rooms[i].bWaiting = false;
    this->m_Rooms[i].bHasWinner = false;
  }

}

CDuelManager::~CDuelManager(void)
{
}

int CDuelManager::GetUserDuelRoom(LPOBJ lpObj)
{
  for(int i = 0; i < MAX_DUEL_ROOMS; i++)
  {
    if(this->m_Rooms[i].lpObj01 == lpObj ||
      this->m_Rooms[i].lpObj02 == lpObj) 
    {
      return i;
    }
  }
  return -1;
}

void CDuelManager::Run()
{
  for(int i = 0; i < MAX_DUEL_ROOMS; i++)
  {
    if(this->m_Rooms[i].bFree == FALSE)
    {

      if(GetTickCount() - this->m_Rooms[i].dwStartTime < 5000) continue;

      for(int u = 0; u < MAX_DUEL_LEARNERS; u++)
      {
        if(this->m_Rooms[i].lpLearners[u] == NULL) continue;
        if(gObjIsConnected(this->m_Rooms[i].lpLearners[u]->m_Index))
        {
          if(this->m_Rooms[i].lpLearners[u]->MapNumber != MAP_INDEX_VULCANROOM)
          {
            this->SendEndDuel(this->m_Rooms[i].lpLearners[u]);
            GCStateInfoSend(this->m_Rooms[i].lpLearners[u], 0, eVS_INVISIBLE);
            GCStateInfoSend(this->m_Rooms[i].lpLearners[u], 0, eVS_TRANSPARENCY);
            GCStateInfoSend(this->m_Rooms[i].lpLearners[u], 0, eVS_DUEL_INTERFACE);
            LogAddTD("[Duel Manager] Spectator (%s) leaves room %d", this->m_Rooms[i].lpLearners[u]->Name, i + 1);
            this->SendSpectatorRemove(u, i);
            this->m_Rooms[i].lpLearners[u] = NULL;
          }
        }
        else
        {
          LogAddTD("[Duel Manager] Some spectator leaves room %d", this->m_Rooms[i].lpLearners[u]->Name, i + 1);
          this->m_Rooms[i].lpLearners[u] = NULL;
          this->SendSpectatorList(i);
        }
      }

      if(this->m_Rooms[i].lpObj01 != NULL && this->m_Rooms[i].lpObj02 != NULL)
      {
        if(gObjIsConnected(this->m_Rooms[i].lpObj01->m_Index) == FALSE ||
          gObjIsConnected(this->m_Rooms[i].lpObj02->m_Index) == FALSE)
        {
          this->RoomReset(i);
          continue;
        }
        else if ((this->m_Rooms[i].lpObj01->MapNumber != MAP_INDEX_VULCANROOM ||
          this->m_Rooms[i].lpObj02->MapNumber != MAP_INDEX_VULCANROOM) && 
          this->m_Rooms[i].bHasWinner == FALSE)
        {
          this->RoomReset(i);
          continue;
        }
        else if (this->m_Rooms[i].lpObj01->Connected < PLAYER_PLAYING ||
          this->m_Rooms[i].lpObj02->Connected < PLAYER_PLAYING)
        {
          this->RoomReset(i);
          continue;
        }
      }
      else
      {
        this->RoomReset(i);
        continue;
      }

      if(this->m_UpdateLifebarTime < GetTickCount())
      {
        this->SendLifebarStatus(i);
        this->m_UpdateLifebarTime = GetTickCount() + 2000;
      }

      if(this->m_Rooms[i].dwTickCount != 0)
      {
        if(this->m_Rooms[i].dwTickCount < GetTickCount())
        {
          this->RoomReset(i);
          LogAddTD("[Duel Manager] Room %d cleaned.", i+1);
        }
      }
    }
  }

  if(this->m_UpdateTickCount < GetTickCount())
  {
    for(int i = OBJ_STARTUSERINDEX; i < OBJMAX; i++)
    {
      if((gObj[i].m_IfState.use) && gObj[i].m_IfState.type == 20)
      {
        this->SendDuelStatus(&gObj[i]);
      }
    }
    this->m_UpdateTickCount = GetTickCount() + 6000;
  }

  return;
}

void CDuelManager::UpdateDuelScore(int iRoom) 
{ 

  if(iRoom < 0 || iRoom > MAX_DUEL_ROOMS - 1)
    return;

  if(this->m_Rooms[iRoom].lpObj01 == NULL || this->m_Rooms[iRoom].lpObj02 == NULL) return;

  int aIndex1 = this->m_Rooms[iRoom].lpObj01->m_Index;
  int aIndex2 = this->m_Rooms[iRoom].lpObj02->m_Index;

  if ( !OBJMAX_RANGE(aIndex1) || !OBJMAX_RANGE(aIndex2))
    return;

  if ( !gObjIsConnected(aIndex1) || !gObjIsConnected(aIndex2) )
    return;

  if ( gObj[aIndex1].Type == OBJ_MONSTER || gObj[aIndex2].Type == OBJ_MONSTER )
    return;
  
  if ( gObj[aIndex1].CloseCount >= 0 || gObj[aIndex2].CloseCount >= 0 )
    return;

  PMSG_DUEL_SCORE pMsg;

  pMsg.h.c = 0xC1;
  pMsg.h.size = sizeof(pMsg);
  pMsg.h.headcode = 0xAA;
  pMsg.h.subcode = 0x04;
  pMsg.NumberH1 = SET_NUMBERH(aIndex1);
  pMsg.NumberL1 = SET_NUMBERL(aIndex1);
  pMsg.NumberH2 = SET_NUMBERH(aIndex2);
  pMsg.NumberL2 = SET_NUMBERL(aIndex2);
  pMsg.btDuelScore1 = this->m_Rooms[iRoom].btPoints01;
  pMsg.btDuelScore2 = this->m_Rooms[iRoom].btPoints02;

  DataSend(aIndex1, (LPBYTE)&pMsg, pMsg.h.size);
  DataSend(aIndex2, (LPBYTE)&pMsg, pMsg.h.size);

  for(int i = 0; i < MAX_DUEL_LEARNERS; i++)
  {
    if(this->m_Rooms[iRoom].lpLearners[i] == NULL) 
    {
      continue;
    }
    DataSend(this->m_Rooms[iRoom].lpLearners[i]->m_Index, (LPBYTE)&pMsg, pMsg.h.size);
  }

}

void CDuelManager::PlayerScore(LPOBJ lpObj)
{
  int iRoom = this->GetUserDuelRoom(lpObj);
  if(iRoom >= 0 && iRoom < MAX_DUEL_ROOMS)
  {
    if(this->m_Rooms[iRoom].lpObj01 == lpObj)
    {
      this->m_Rooms[iRoom].btPoints01++;
      this->UpdateDuelScore(iRoom);
    }
    else if(this->m_Rooms[iRoom].lpObj02 == lpObj)
    {
      this->m_Rooms[iRoom].btPoints02++;
      this->UpdateDuelScore(iRoom);
    }
  }
}

void CDuelManager::SendEndDuel(LPOBJ lpObj) 
{ 

  if(lpObj == NULL) return;
  if(gObjIsConnected(lpObj->m_Index) == FALSE) return;

  BYTE lpMsgClose[5] = { 0xC1, 0x05, 0xAA, 0x03, 0x00 } ;

  DataSend(lpObj->m_Index, &lpMsgClose[0], lpMsgClose[1]);

}

int CDuelManager::GetSpectatorCount(int iRoom)
{

  if(iRoom < 0 || iRoom >= MAX_DUEL_ROOMS) 
  {
    return -1;
  }

  int iCount = 0;
  for(int i = 0; i < MAX_DUEL_LEARNERS; i++)
  {
    if(this->m_Rooms[iRoom].lpLearners[i] != NULL) 
    {
      iCount++;
    }
  }

  return iCount;

}

void CDuelManager::RemoveUser(LPOBJ lpObj) 
{ 

  //verificar se faz parte do duel
  //verificar se eh da batalha...
  // -> se for, finalizar a sala
  //resetar informações do duel
  //se for um watcher remover interface
  //mover para gate 294

}

void CDuelManager::SendDuelStatus(LPOBJ lpObj)
{

  PMSG_DUEL_STATUS pMsg;

  pMsg.h.c = 0xC1;
  pMsg.h.size = sizeof(pMsg);
  pMsg.h.headcode = 0xAA;
  pMsg.h.subcode = 0x06;

  ZeroMemory(&pMsg.pRoomStatus, sizeof(pMsg.pRoomStatus));
  
  for(int i = 0; i < MAX_DUEL_ROOMS; i++)
  {

    if(this->m_Rooms[i].bFree == FALSE)
    {

      if(this->m_Rooms[i].lpObj01 == NULL || this->m_Rooms[i].lpObj02 == NULL)
      {
        continue;
      }

      pMsg.pRoomStatus[i].btDuelRunning = TRUE;

      int iSpecCount = this->GetSpectatorCount(i);
      if(iSpecCount < 0 || iSpecCount >= 10)
      {
        pMsg.pRoomStatus[i].btDuelOpen = FALSE;
      }
      else
      {
        pMsg.pRoomStatus[i].btDuelOpen = TRUE;
      }

      memcpy(&pMsg.pRoomStatus[i].szName1[0], &this->m_Rooms[i].lpObj01->Name[0], 10);
      memcpy(&pMsg.pRoomStatus[i].szName2[0], &this->m_Rooms[i].lpObj02->Name[0], 10);

    }

  }

  DataSend(lpObj->m_Index, (BYTE*)&pMsg, pMsg.h.size);

}

int CDuelManager::GetFreeRoomIndex()
{
  for(int i = 0; i < MAX_DUEL_ROOMS; i++)
  {
    if(this->m_Rooms[i].bFree == TRUE)
    {
      if(this->m_Rooms[i].bWaiting == FALSE)
      {
        return i;  
      }
    }
  }
  return -1;
}

void CDuelManager::UserDuelInfoReset(LPOBJ lpObj) 
{ 
  if(lpObj == NULL) 
  {  
    return;
  }
  lpObj->m_iDuelRoom = -1;
  lpObj->m_iDuelUser = -1;
  lpObj->m_iDuelUserRequested = -1;
  lpObj->m_iDuelUserReserved = -1;
  lpObj->m_btDuelScore = 0;
  gDarkSpirit[lpObj->m_Index].ReSetTarget(lpObj->m_Index);
}

void CDuelManager::RoomReset(int iRoom, bool dontMove, bool dontSendEnd)
{

  if(this->m_Rooms[iRoom].lpObj01 != NULL)
  {
    if(gObjIsConnected(this->m_Rooms[iRoom].lpObj01->m_Index))
    {
      if(dontSendEnd == false)
        this->SendEndDuel(this->m_Rooms[iRoom].lpObj01);
      if(this->m_Rooms[iRoom].lpObj01->MapNumber == MAP_INDEX_VULCANROOM)
      {
        if(dontMove == false)
          gObjMoveGate(this->m_Rooms[iRoom].lpObj01->m_Index, 294);
      }
    }
    this->UserDuelInfoReset(this->m_Rooms[iRoom].lpObj01);
  }

  if(this->m_Rooms[iRoom].lpObj02 != NULL)
  {
    if(gObjIsConnected(this->m_Rooms[iRoom].lpObj02->m_Index))
    {
      if(dontSendEnd == false)
        this->SendEndDuel(this->m_Rooms[iRoom].lpObj02);
      if(this->m_Rooms[iRoom].lpObj02->MapNumber == MAP_INDEX_VULCANROOM)
      {
        if(dontMove == false)
          gObjMoveGate(this->m_Rooms[iRoom].lpObj02->m_Index, 294);
      }
    }
    this->UserDuelInfoReset(this->m_Rooms[iRoom].lpObj02);
  }

  for(int i = 0; i < MAX_DUEL_LEARNERS; i++)
  {
    if(this->m_Rooms[iRoom].lpLearners[i] != NULL)
    {
      this->SendEndDuel(this->m_Rooms[iRoom].lpLearners[i]);
      GCStateInfoSend(this->m_Rooms[iRoom].lpLearners[i], 0, eVS_INVISIBLE);
      GCStateInfoSend(this->m_Rooms[iRoom].lpLearners[i], 0, eVS_TRANSPARENCY);
      GCStateInfoSend(this->m_Rooms[iRoom].lpLearners[i], 0, eVS_DUEL_INTERFACE);
      gObjMoveGate(this->m_Rooms[iRoom].lpLearners[i]->m_Index, 294);
    }
    this->m_Rooms[iRoom].lpLearners[i] = NULL;
  }

  this->m_Rooms[iRoom].lpObj01 = NULL;
  this->m_Rooms[iRoom].btPoints01 = 0;

  this->m_Rooms[iRoom].lpObj02 = NULL;
  this->m_Rooms[iRoom].btPoints02 = 0;

  this->m_Rooms[iRoom].bFree = TRUE;
  this->m_Rooms[iRoom].bWaiting = FALSE;
  this->m_Rooms[iRoom].bHasWinner = FALSE;

  this->m_Rooms[iRoom].dwTickCount = 0;
  this->m_Rooms[iRoom].dwStartTime = 0;

  LogAddTD("[Duel Manager] Room Reset - Number: %d", iRoom + 1);

}

void CDuelManager::SendEndDuelNotification(LPOBJ lpObj, char* Winner, char* Looser)
{

  PMSG_DUEL_FINISH pMsg;
  pMsg.h.c = 0xC1;
  pMsg.h.size = sizeof(pMsg);
  pMsg.h.headcode = 0xAA;
  pMsg.h.subcode = 0x0C;
  memcpy(pMsg.szWinner, Winner, 10);
  memcpy(pMsg.szLooser, Looser, 10);

  DataSend(lpObj->m_Index, (BYTE*)&pMsg, pMsg.h.size);

}

void CDuelManager::SendSpectatorAdd(int iSpecIndex, int iRoom)
{

  if(iRoom < 0 || iRoom >= MAX_DUEL_ROOMS)
  {
    return;
  }

  if(iSpecIndex < 0 || iSpecIndex >= MAX_DUEL_LEARNERS)
  {
    return;
  }

  if(this->m_Rooms[iRoom].lpLearners[iSpecIndex] == NULL) return;

  if(this->m_Rooms[iRoom].lpObj01 == NULL || 
    this->m_Rooms[iRoom].lpObj02 == NULL)
  {
    return;
  }

  PMSG_DUEL_SPEC_ADD pMsg;
  pMsg.h.c = 0xC1;
  pMsg.h.size = sizeof(pMsg);
  pMsg.h.headcode = 0xAA;
  pMsg.h.subcode = 0x08;
  memcpy(pMsg.szName, this->m_Rooms[iRoom].lpLearners[iSpecIndex]->Name, 10);

  for(int i = 0; i < MAX_DUEL_LEARNERS; i++)
  {
    if(i == iSpecIndex) continue;
    if(this->m_Rooms[iRoom].lpLearners[i] != NULL)
    {
      DataSend(this->m_Rooms[iRoom].lpLearners[i]->m_Index, (BYTE*)&pMsg, pMsg.h.size);
    }
  }

}

void CDuelManager::SendSpectatorRemove(int iSpecIndex, int iRoom)
{

  if(iRoom < 0 || iRoom >= MAX_DUEL_ROOMS)
  {
    return;
  }

  if(iSpecIndex < 0 || iSpecIndex >= MAX_DUEL_LEARNERS)
  {
    return;
  }

  if(this->m_Rooms[iRoom].lpLearners[iSpecIndex] == NULL) return;

  if(this->m_Rooms[iRoom].lpObj01 == NULL || 
    this->m_Rooms[iRoom].lpObj02 == NULL)
  {
    return;
  }

  PMSG_DUEL_SPEC_ADD pMsg;
  pMsg.h.c = 0xC1;
  pMsg.h.size = sizeof(pMsg);
  pMsg.h.headcode = 0xAA;
  pMsg.h.subcode = 0x0A;
  memcpy(pMsg.szName, this->m_Rooms[iRoom].lpLearners[iSpecIndex]->Name, 10);

  for(int i = 0; i < MAX_DUEL_LEARNERS; i++)
  {
    if(i == iSpecIndex) continue;
    if(this->m_Rooms[iRoom].lpLearners[i] != NULL)
    {
      DataSend(this->m_Rooms[iRoom].lpLearners[i]->m_Index, (BYTE*)&pMsg, pMsg.h.size);
    }
  }

}

void CDuelManager::SendSpectatorList(int iRoom)
{

  if(iRoom < 0 || iRoom >= MAX_DUEL_ROOMS)
  {
    return;
  }

  if(this->m_Rooms[iRoom].bFree == FALSE)
  {
    for(int u = 0; u < MAX_DUEL_LEARNERS; u++)
    {
      if(this->m_Rooms[iRoom].lpLearners[u] != NULL)
      {
        this->SendSpectatorList(this->m_Rooms[iRoom].lpLearners[u], iRoom);
      }
    }
  }

}

void CDuelManager::SendSpectatorList(LPOBJ lpObj, int iRoom)
{

  if(iRoom < 0 || iRoom >= MAX_DUEL_ROOMS)
  {
    return;
  }

  if(this->m_Rooms[iRoom].lpObj01 == NULL || 
    this->m_Rooms[iRoom].lpObj02 == NULL)
  {
    return;
  }

  PMSG_DUEL_SPEC_LIST pMsg;
  pMsg.h.c = 0xC1;
  pMsg.h.headcode = 0xAA;
  pMsg.h.subcode = 0x0B;
  pMsg.btCount = 0;

  if(this->m_Rooms[iRoom].bFree == FALSE)
  {
    for(int u = 0; u < MAX_DUEL_LEARNERS; u++)
    {
      if(this->m_Rooms[iRoom].lpLearners[u] != NULL)
      {
        memcpy(&pMsg.szName[pMsg.btCount++][0], this->m_Rooms[iRoom].lpLearners[u]->Name, 10);
      }
    }
  }

  pMsg.h.size = 5 + (pMsg.btCount * 10);

  DataSend(lpObj->m_Index, (BYTE*)&pMsg, pMsg.h.size);

}

void CDuelManager::SendLifebarStatus(int iRoom)
{

  if(iRoom < 0 || iRoom >= MAX_DUEL_ROOMS)
  {
    return;
  }

  if(this->m_Rooms[iRoom].lpObj01 == NULL || 
    this->m_Rooms[iRoom].lpObj02 == NULL)
  {
    return;
  }

  if(this->m_Rooms[iRoom].bFree == FALSE)
  {
    for(int u = 0; u < MAX_DUEL_LEARNERS; u++)
    {
      if(this->m_Rooms[iRoom].lpLearners[u] != NULL)
      {
        this->SendLifebarStatus(this->m_Rooms[iRoom].lpLearners[u], iRoom);
      }
    }
  }

}

void CDuelManager::SendLifebarStatus(LPOBJ lpObj, int iRoom)
{

  if(iRoom < 0 || iRoom >= MAX_DUEL_ROOMS)
  {
    return;
  }

  if(this->m_Rooms[iRoom].lpObj01 == NULL || 
    this->m_Rooms[iRoom].lpObj02 == NULL)
  {
    return;
  }

  PMSG_DUEL_LIFEBAR_REFILL pMsg;
  pMsg.h.c = 0xC1;
  pMsg.h.size = sizeof(pMsg);
  pMsg.h.headcode = 0xAA;
  pMsg.h.subcode = 0x05;

  pMsg.btObjId01H = HIBYTE(this->m_Rooms[iRoom].lpObj01->m_Index);
  pMsg.btObjId01L = LOBYTE(this->m_Rooms[iRoom].lpObj01->m_Index);

  pMsg.btObjId02H = HIBYTE(this->m_Rooms[iRoom].lpObj02->m_Index);
  pMsg.btObjId02L = LOBYTE(this->m_Rooms[iRoom].lpObj02->m_Index);

  pMsg.btLife01 = this->m_Rooms[iRoom].lpObj01->Life / ((this->m_Rooms[iRoom].lpObj01->MaxLife + this->m_Rooms[iRoom].lpObj01->AddLife) / 100);
  pMsg.btLife02 = this->m_Rooms[iRoom].lpObj02->Life / ((this->m_Rooms[iRoom].lpObj02->MaxLife + this->m_Rooms[iRoom].lpObj02->AddLife) / 100);

  pMsg.btShield01 = this->m_Rooms[iRoom].lpObj01->iShield / ((this->m_Rooms[iRoom].lpObj01->iMaxShield + this->m_Rooms[iRoom].lpObj01->iAddShield) / 100);
  pMsg.btShield02 = this->m_Rooms[iRoom].lpObj02->iShield / ((this->m_Rooms[iRoom].lpObj02->iMaxShield + this->m_Rooms[iRoom].lpObj02->iAddShield) / 100);

  DataSend(lpObj->m_Index, (BYTE*)&pMsg, pMsg.h.size);

}

void CDuelManager::SendLifebarInit(LPOBJ lpObj, int iRoom)
{

  if(iRoom < 0 || iRoom >= MAX_DUEL_ROOMS)
  {
    return;
  }

  if(this->m_Rooms[iRoom].lpObj01 == NULL || 
    this->m_Rooms[iRoom].lpObj02 == NULL)
  {
    return;
  }

  PMSG_DUEL_LIFEBAR_NAME pMsg2;
  pMsg2.h.c = 0xC1;
  pMsg2.h.size = sizeof(pMsg2);
  pMsg2.h.headcode = 0xAA;
  pMsg2.h.subcode = 0x07;
  pMsg2.Type = 0x00;
  
  memcpy(pMsg2.szName1, this->m_Rooms[iRoom].lpObj01->Name, 10);
  memcpy(pMsg2.szName2, this->m_Rooms[iRoom].lpObj02->Name, 10);

  pMsg2.btObjId1H = HIBYTE(this->m_Rooms[iRoom].lpObj01->m_Index);
  pMsg2.btObjId1L = LOBYTE(this->m_Rooms[iRoom].lpObj01->m_Index);

  pMsg2.btObjId2H = HIBYTE(this->m_Rooms[iRoom].lpObj02->m_Index);
  pMsg2.btObjId2L = LOBYTE(this->m_Rooms[iRoom].lpObj02->m_Index);

  DataSend(lpObj->m_Index, (BYTE*)&pMsg2, pMsg2.h.size);

  PMSG_DUEL_LIFEBAR_INIT pMsg;
  pMsg.h.c = 0xC1;
  pMsg.h.size = sizeof(pMsg);
  pMsg.h.headcode = 0xAA;
  pMsg.h.subcode = 0x0D;

  DataSend(lpObj->m_Index, (BYTE*)&pMsg, pMsg.h.size);

}

void CDuelManager::KillUserProc(LPOBJ lpObj, LPOBJ lpTarget)
{ 
    
  if(!this->DuelCheck(lpObj, lpTarget)) return;
  
  int iDuelRoom = this->GetUserDuelRoom(lpObj);
  if(iDuelRoom == -1)
  {
    return;
  }

  lpTarget->KillerType = 3;

  int Points = ((lpObj == this->m_Rooms[iDuelRoom].lpObj01) ? this->m_Rooms[iDuelRoom].btPoints01 : this->m_Rooms[iDuelRoom].btPoints02);
  if(Points >= DUEL_WIN_POINT_COUNT)
  {

    this->m_Rooms[iDuelRoom].bHasWinner = TRUE;

    this->SendEndDuel(lpTarget);
    this->SendEndDuel(lpObj);

    this->SendEndDuelNotification(lpTarget, lpObj->Name, lpTarget->Name);
    this->SendEndDuelNotification(lpObj, lpObj->Name, lpTarget->Name);

    gDarkSpirit[lpObj->m_Index].ReSetTarget(lpTarget->m_Index);
    gDarkSpirit[lpTarget->m_Index].ReSetTarget(lpObj->m_Index);

    char szMsg[256];

    wsprintf(szMsg,lMsg.Get(1216),lpTarget->Name);
    GCServerMsgStringSend(szMsg,lpObj->m_Index,1);

    wsprintf(szMsg,lMsg.Get(1217),lpObj->Name);
    GCServerMsgStringSend(szMsg,lpTarget->m_Index,1);

    PMSG_SERVERCMD ServerCmd;

    PHeadSubSetB((LPBYTE)&ServerCmd, 0xF3, 0x40, sizeof(ServerCmd));
    ServerCmd.CmdType = 0;
    ServerCmd.X = lpObj->X;
    ServerCmd.Y = lpObj->Y;

    MsgSendV2(lpObj,(unsigned char *)&ServerCmd,sizeof(ServerCmd));
    DataSend(lpObj->m_Index,(unsigned char *)&ServerCmd,sizeof(ServerCmd));

    gObjUseSkill.AddOrRemoveBuff(eVS_DUEL_MEDAL, lpObj->m_Index, TRUE);

    this->m_Rooms[iDuelRoom].dwTickCount = GetTickCount() + 10000;

    LogAdd("[Duel] [%s][%s] Win Duel, Loser [%s][%s]",lpObj->AccountID,lpObj->Name,lpTarget->AccountID,lpTarget->Name);

  }

}

void CDuelManager::ProtocolCore(LPOBJ lpObj, BYTE* lpPacket)
{
  PMSG_DEFAULT2* pMsg = (PMSG_DEFAULT2*)lpPacket;
  switch(pMsg->subcode)
  {
  case 0x01:
    this->RecvDuelRequest(lpObj, (PMSG_DUEL_REQUEST_START*)lpPacket);
    break;
  case 0x02:
    this->RecvDuelAnswer(lpObj, (PMSG_DUEL_ANSWER_START*)lpPacket);
    break;
  case 0x07:
    this->RecvWatchRequest(lpObj, (PMSG_DUEL_REQUEST_WATCH*)lpPacket);
    break;
  case 0x09:
    if(lpObj->MapNumber == MAP_INDEX_VULCANROOM)
    {
      gObjMoveGate(lpObj->m_Index, 294); // vai pro vulcan map
    }
    break;
  }
}

void CDuelManager::RecvWatchRequest(LPOBJ lpObj, PMSG_DUEL_REQUEST_WATCH* lpMsg)
{

  if(lpObj->m_IfState.use == 0 || lpObj->m_IfState.type != 20) 
  {
    return;
  }

  lpObj->m_IfState.use = 0;
  lpObj->m_IfState.type = 0;

  if(lpMsg->btRoomIndex >= 0 && lpMsg->btRoomIndex < MAX_DUEL_ROOMS)
  {

    if(this->m_Rooms[lpMsg->btRoomIndex].bFree == TRUE) 
    {
      GCServerMsgStringSend("Não há ninguém no duelo que você está tentando assistir.", lpObj->m_Index, 1);
      LogAddC(2, "[Duel Manager] (%s)(%s) Watch request error: wrong duel state! (%d)", lpObj->AccountID, lpObj->Name, lpMsg->btRoomIndex);
      return;
    }

    for(int i = 0; i < MAX_DUEL_LEARNERS; i++)
    {
      if(this->m_Rooms[lpMsg->btRoomIndex].lpLearners[i] == NULL)
      {
        if(gObjMoveGate(lpObj->m_Index, g_DuelGates[lpMsg->btRoomIndex].LearnerGate))
        {
          this->m_Rooms[lpMsg->btRoomIndex].lpLearners[i] = lpObj;
          this->SendSpectatorList(lpObj, lpMsg->btRoomIndex);
          this->SendSpectatorAdd(i, lpMsg->btRoomIndex);
          GCServerMsgStringSend("Você está agora na sala de duelo.", lpObj->m_Index, 1);
          GCStateInfoSend(lpObj, 1, eVS_DUEL_INTERFACE);
          GCStateInfoSend(lpObj, 1, eVS_TRANSPARENCY);
          GCStateInfoSend(lpObj, 1, eVS_INVISIBLE, TRUE, TRUE);
          this->SendLifebarInit(lpObj, lpMsg->btRoomIndex);
          this->SendLifebarStatus(lpObj, lpMsg->btRoomIndex);
          this->UpdateDuelScore(lpMsg->btRoomIndex);
          return;
        }      
        GCServerMsgStringSend("Impossível mover você.", lpObj->m_Index, 1);
        return;
      }
    }

    GCServerMsgStringSend("O duelo que você está tentando assistir já está cheio.", lpObj->m_Index, 1);
    LogAddC(2, "[Duel Manager] (%s)(%s) Watch request error: room is full! (%d)", lpObj->AccountID, lpObj->Name, lpMsg->btRoomIndex);

    return;

  }

  LogAddC(2, "[Duel Manager] (%s)(%s) Wrong room index! (%d)", lpObj->AccountID, lpObj->Name, lpMsg->btRoomIndex);

}

void CDuelManager::RecvDuelAnswer(LPOBJ lpObj, PMSG_DUEL_ANSWER_START* lpMsg)
{

  int iDuelIndex = -1;
  int iDuelRoom = lpObj->m_iDuelRoom;
  
  PMSG_DUEL_START pMsgSend;
  
  pMsgSend.h.c = 0xC1;
  pMsgSend.h.headcode = 0xAA;
  pMsgSend.h.subcode = 0x01;
  pMsgSend.bDuelStart = 0;
  pMsgSend.h.size = sizeof(pMsgSend);

  if(iDuelRoom < 0 || iDuelRoom > MAX_DUEL_ROOMS - 1) 
  {
    return;
  }

  if ( gObj[lpObj->m_Index].CloseType != -1 ) 
    return;
  
  iDuelIndex = MAKE_NUMBERW(lpMsg->NumberH, lpMsg->NumberL);

  if ( OBJMAX_RANGE(iDuelIndex) )
  {
    if ( !gObjIsConnected(iDuelIndex) )
      return;

    if ( gObj[iDuelIndex].Type == OBJ_MONSTER )
      return;

    if ( gObj[iDuelIndex].CloseCount >= 0 )
      return;

    if ( lpMsg->bDuelOK )
    {
      if ( BC_MAP_RANGE(gObj[iDuelIndex].MapNumber) ||
         CC_MAP_RANGE(gObj[iDuelIndex].MapNumber) ||
         DS_MAP_RANGE(gObj[iDuelIndex].MapNumber) ||
         IT_MAP_RANGE(gObj[iDuelIndex].MapNumber) )
      {

        GCServerMsgStringSend(lMsg.Get(MSGGET(4, 207)), lpObj->m_Index, 1);

        this->RoomReset(iDuelRoom, true, true);

        memcpy(pMsgSend.szName, lpObj->Name, sizeof(pMsgSend.szName));
        DataSend(iDuelIndex, (LPBYTE)&pMsgSend, pMsgSend.h.size);
        return;
      }
    }

    if ( OBJMAX_RANGE(lpObj->m_iDuelUser ) )
    {
      GCServerMsgStringSend(lMsg.Get(MSGGET(4, 160)), lpObj->m_Index, 1);
      GCServerMsgStringSend(lMsg.Get(MSGGET(4, 161)), lpObj->m_Index, 1);
      
      this->RoomReset(iDuelRoom, true, true);

      memcpy(pMsgSend.szName, lpObj->Name, sizeof(pMsgSend.szName));
      DataSend(iDuelIndex, (LPBYTE)&pMsgSend, pMsgSend.h.size);
      return;
    }

    if ( OBJMAX_RANGE(lpObj->m_iDuelUserReserved) )
    {
      GCServerMsgStringSend(lMsg.Get(MSGGET(4, 173)), lpObj->m_Index, 1);

      this->RoomReset(iDuelRoom, true, true);

      memcpy(pMsgSend.szName, lpObj->Name, sizeof(pMsgSend.szName));
      DataSend(iDuelIndex, (LPBYTE)&pMsgSend, pMsgSend.h.size);
      return;
    }

    if ( gObj[iDuelIndex].m_iDuelUserReserved == lpObj->m_Index )
    {

      char szDuelName[MAX_ACCOUNT_LEN+1]={0};
      char szDuelName2[MAX_ACCOUNT_LEN+1]={0};

      memcpy(szDuelName, gObj[iDuelIndex].Name, MAX_ACCOUNT_LEN);
      szDuelName[MAX_ACCOUNT_LEN] = 0;

      memcpy(szDuelName2, lpMsg->szName, MAX_ACCOUNT_LEN);
      szDuelName2[MAX_ACCOUNT_LEN] = 0;

      if ( !strcmp(szDuelName, szDuelName2))
      {
        if ( lpMsg->bDuelOK == false)
        {
          this->RoomReset(iDuelRoom, true, true);
          pMsgSend.bDuelStart = 0x0F;
          memcpy(pMsgSend.szName, lpObj->Name, sizeof(pMsgSend.szName));
          DataSend(iDuelIndex, (LPBYTE)&pMsgSend, pMsgSend.h.size);
        }
        else if ( lpMsg->bDuelOK == true )
        {

          if ( lpObj->Money < 30000 )
          {
            this->SendEndDuel(&gObj[iDuelIndex]);
            this->RoomReset(iDuelRoom, true);
            pMsgSend.bDuelStart = 0x0e;
            pMsgSend.h.size = sizeof(pMsgSend);
            DataSend(lpObj->m_Index, (BYTE*)&pMsgSend, pMsgSend.h.size);
            return;
          }
          if(gObj[iDuelIndex].Money < 30000)
          {
            this->SendEndDuel(lpObj);
            this->RoomReset(iDuelRoom, true);
            pMsgSend.bDuelStart = 0x0e;
            pMsgSend.h.size = sizeof(pMsgSend);
            DataSend(iDuelIndex, (BYTE*)&pMsgSend, pMsgSend.h.size);
            return;
          }

          if(gObjMoveGate(lpObj->m_Index, g_DuelGates[iDuelRoom].UserGate01) == false)
          {
            this->RoomReset(iDuelRoom, true, true);
            return;
          }
          if(gObjMoveGate(iDuelIndex, g_DuelGates[iDuelRoom].UserGate02) == false)
          {
            this->RoomReset(iDuelRoom, true, true);
            return;
          }

          lpObj->Money -= 30000;
          GCMoneySend(lpObj->m_Index, lpObj->Money);

          gObj[iDuelIndex].Money -= 30000;
          GCMoneySend(iDuelIndex, gObj[iDuelIndex].Money);

          gObj[iDuelIndex].m_iDuelUserReserved = -1;
          gObj[iDuelIndex].m_btDuelScore = 0;
          gObj[iDuelIndex].m_iDuelUser = lpObj->m_Index;

          this->m_Rooms[iDuelRoom].dwStartTime = GetTickCount();
          this->m_Rooms[iDuelRoom].dwTickCount = GetTickCount() + (DUEL_TIME * 60000);

          lpObj->m_iDuelUserRequested = -1;
          lpObj->m_iDuelUserReserved = -1;

          lpObj->m_btDuelScore = 0;
          lpObj->m_iDuelUser = iDuelIndex;

          this->m_Rooms[iDuelRoom].bFree = FALSE;
          this->m_Rooms[iDuelRoom].bWaiting = FALSE;
          this->m_Rooms[iDuelRoom].bHasWinner = FALSE;

          pMsgSend.bDuelStart = 0;

          pMsgSend.NumberH = SET_NUMBERH(iDuelIndex);
          pMsgSend.NumberL = SET_NUMBERL(iDuelIndex);

          memcpy(pMsgSend.szName, szDuelName, sizeof(pMsgSend.szName));

          DataSend(lpObj->m_Index, (LPBYTE)&pMsgSend, pMsgSend.h.size);

          pMsgSend.NumberH = SET_NUMBERH(lpObj->m_Index);
          pMsgSend.NumberL = SET_NUMBERL(lpObj->m_Index);

          memcpy(pMsgSend.szName, lpObj->Name, sizeof(pMsgSend.szName));

          DataSend(iDuelIndex, (LPBYTE)&pMsgSend, pMsgSend.h.size);

          this->UpdateDuelScore(iDuelRoom);

          LogAddTD("[Duel] [%s][%s] Duel Started [%s][%s] on Room [%d]", lpObj->AccountID, lpObj->Name,
            gObj[iDuelIndex].AccountID, gObj[iDuelIndex].Name, iDuelRoom + 1);
        }
      }
      else
      {
        this->RoomReset(iDuelRoom);
        DataSend(iDuelIndex, (LPBYTE)&pMsgSend, pMsgSend.h.size);
        return;
      }
    }
    else
    {
      this->RoomReset(iDuelRoom);
      DataSend(iDuelIndex, (LPBYTE)&pMsgSend, pMsgSend.h.size);
      return;
    }
  }
}

void CDuelManager::RecvDuelRequest(LPOBJ lpObj, PMSG_DUEL_REQUEST_START* lpMsg)
{

  if(g_DuelSystemState != TRUE)
  {
    GCServerMsgStringSend("O duel foi desativado neste servidor!", lpObj->m_Index, 1);
    return;
  }

  int iDuelIndex = MAKE_NUMBERW(lpMsg->NumberH, lpMsg->NumberL);

  if ( !OBJMAX_RANGE(iDuelIndex) )
  {
    LogAdd("error : %s %d (%d)", __FILE__, __LINE__, iDuelIndex);
    return;
  }

  if ( iDuelIndex == lpObj->m_Index )
    return;

  char szTempText[256];

  if ( lpObj->CloseType != -1 )
    return;
  
  if ( gNonPK ) 
  {
    GCServerMsgStringSend(lMsg.Get(MSGGET(4, 174)), lpObj->m_Index, 1);
    return;
  }

  if ( !gPkLimitFree ) 
  {
    if ( lpObj->m_PK_Level >= 6 )
    {
      GCServerMsgStringSend(lMsg.Get(MSGGET(4, 175)), lpObj->m_Index, 1);
      return;
    }
    if ( gObj[iDuelIndex].m_PK_Level >= 6 )
    {
      GCServerMsgStringSend(lMsg.Get(MSGGET(4, 176)), lpObj->m_Index, 1);
      return;
    }
  }

  if ( OBJMAX_RANGE(lpObj->m_iDuelUserReserved) )
  {
    GCServerMsgStringSend(lMsg.Get(MSGGET(4, 159)), lpObj->m_Index, 1);
    GCServerMsgStringSend(lMsg.Get(MSGGET(4, 161)), lpObj->m_Index, 1);
    return;
  }

  if ( OBJMAX_RANGE( lpObj->m_iDuelUser ) )
  {
    GCServerMsgStringSend(lMsg.Get(MSGGET(4, 160)), lpObj->m_Index, 1);
    GCServerMsgStringSend(lMsg.Get(MSGGET(4, 161)), lpObj->m_Index, 1);
    return;
  }

  if ( DS_MAP_RANGE(gObj[iDuelIndex].MapNumber ) )
  {
    GCServerMsgStringSend(lMsg.Get(MSGGET(4, 180)), lpObj->m_Index, 1);
    return;
  }

  if ( BC_MAP_RANGE(lpObj->MapNumber) )
  {
    GCServerMsgStringSend(lMsg.Get(MSGGET(4, 166)), lpObj->m_Index, 1);
    return;
  }

  if ( CC_MAP_RANGE(lpObj->MapNumber) )
  {
    GCServerMsgStringSend(lMsg.Get(MSGGET(4, 207)), lpObj->m_Index, 1);
    return;
  }

  if ( IT_MAP_RANGE(lpObj->MapNumber) != FALSE )
  {
    ::GCServerMsgStringSend("Duelos não são permitidos no Illusion Temple.", lpObj->m_Index, 1);
    return;
  }

  if ( lpObj->Level < 30 || gObj[iDuelIndex].Level < 30)
  {
    PMSG_DUEL_START pMsgSend;
    pMsgSend.h.c = 0xC1;
    pMsgSend.h.headcode = 0xAA;
    pMsgSend.h.subcode = 0x01;
    pMsgSend.bDuelStart = 0x0C;
    pMsgSend.h.size = sizeof(pMsgSend);
    DataSend(lpObj->m_Index, (BYTE*)&pMsgSend, pMsgSend.h.size);
    return;
  }

  if ( lpObj->Money < 30000 || gObj[iDuelIndex].Money < 30000 )
  {
    PMSG_DUEL_START pMsgSend;
    pMsgSend.h.c = 0xC1;
    pMsgSend.h.headcode = 0xAA;
    pMsgSend.h.subcode = 0x01;
    pMsgSend.bDuelStart = 0x1e;
    pMsgSend.h.size = sizeof(pMsgSend);
    DataSend(lpObj->m_Index, (BYTE*)&pMsgSend, pMsgSend.h.size);
    return;
  }

  int iDuelRoom = this->GetFreeRoomIndex();
  if ( iDuelRoom == -1 )
  {
    PMSG_DUEL_START pMsgSend;
    pMsgSend.h.c = 0xC1;
    pMsgSend.h.headcode = 0xAA;
    pMsgSend.h.subcode = 0x01;
    pMsgSend.bDuelStart = 0x10;
    pMsgSend.h.size = sizeof(pMsgSend);
    DataSend(lpObj->m_Index, (BYTE*)&pMsgSend, pMsgSend.h.size);
    return;
  }

  if ( ( GetTickCount() - lpObj->m_PacketCheckTime ) < 300 )
  {
    return;
  }
  lpObj->m_PacketCheckTime = GetTickCount();

  char szDuelName[MAX_ACCOUNT_LEN+1] = {0};
  char szDuelName2[MAX_ACCOUNT_LEN+1] = {0};

  memcpy(szDuelName, gObj[iDuelIndex].Name, MAX_ACCOUNT_LEN);
  szDuelName[MAX_ACCOUNT_LEN] = 0;

  memcpy(szDuelName2, lpMsg->szName, MAX_ACCOUNT_LEN);
  szDuelName2[MAX_ACCOUNT_LEN] = 0;

  if ( strcmp(szDuelName, szDuelName2) )
  {
    GCServerMsgStringSend(lMsg.Get(MSGGET(4, 162)), lpObj->m_Index, 1);
    return;
  }

  if ( this->IsDuelEnable(iDuelIndex) == FALSE )
  {
    GCServerMsgStringSend(lMsg.Get(MSGGET(4, 163)), lpObj->m_Index, 1);
    return;
  }

  if ( lpObj->lpGuild && lpObj->lpGuild->WarState == 1 )
  {
    GCServerMsgStringSend(lMsg.Get(MSGGET(4, 164)), lpObj->m_Index, 1);
    return;
  }

  if ( gObj[iDuelIndex].lpGuild && gObj[iDuelIndex].lpGuild->WarState == 1 )
  {
    GCServerMsgStringSend(lMsg.Get(MSGGET(4, 165)), lpObj->m_Index, 1);
    return;
  }

  if ( gObjIsConnected(iDuelIndex) == FALSE )
    return;

  if ( gObj[iDuelIndex].Type == OBJ_MONSTER )
    return;

  if ( gObj[iDuelIndex].CloseCount >= 0 )
    return;

  for (int n=0;n<MAX_SELF_DEFENSE;n++)
  {
    if ( lpObj->SelfDefense[n] >= 0 || gObj[iDuelIndex].SelfDefense[n] >= 0 )
    {
      GCServerMsgStringSend(lMsg.Get(MSGGET(4, 189)), lpObj->m_Index, 1);
      return;
    }
  }

  if ( lpObj->m_IfState.use > 0 )
  {
    GCServerMsgStringSend(lMsg.Get(MSGGET(4, 167)), lpObj->m_Index, 1);
    return;
  }

  if ( gObj[iDuelIndex].m_IfState.use > 0 )
  {
    wsprintf(szTempText, lMsg.Get(MSGGET(4, 168)), gObj[iDuelIndex].Name);
    GCServerMsgStringSend(szTempText, lpObj->m_Index, 1);
    return;
  }

  if ( OBJMAX_RANGE(gObj[iDuelIndex].m_iDuelUserRequested) )
  {
    wsprintf(szTempText, lMsg.Get(MSGGET(4, 169)), gObj[iDuelIndex].Name);
    GCServerMsgStringSend(szTempText, lpObj->m_Index, 1);
    return;
  }

  if ( OBJMAX_RANGE(gObj[iDuelIndex].m_iDuelUserReserved) )
  {
    wsprintf(szTempText, lMsg.Get(MSGGET(4, 170)), gObj[iDuelIndex].Name);
    GCServerMsgStringSend(szTempText, lpObj->m_Index, 1);
    return;
  }

  if ( OBJMAX_RANGE(gObj[iDuelIndex].m_iDuelUser) )
  {
    wsprintf(szTempText, lMsg.Get(MSGGET(4, 171)), gObj[iDuelIndex].Name);
    GCServerMsgStringSend(szTempText, lpObj->m_Index, 1);
    return;
  }

  lpObj->m_iDuelUser = -1;
  lpObj->m_iDuelUserReserved = iDuelIndex;
  gObj[iDuelIndex].m_iDuelUserRequested = lpObj->m_Index;
  lpObj->m_iDuelRoom = iDuelRoom;
  gObj[iDuelIndex].m_iDuelRoom = iDuelRoom;

  this->m_Rooms[iDuelRoom].lpObj01 = lpObj;
  this->m_Rooms[iDuelRoom].lpObj02 = &gObj[iDuelIndex];
  this->m_Rooms[iDuelRoom].bWaiting = TRUE;

  PMSG_DUEL_QUESTION_START pMsg;

  pMsg.h.c = 0xC1;
  pMsg.h.headcode = 0xAA;
  pMsg.h.subcode = 0x02;
  pMsg.h.size = sizeof(pMsg);
  pMsg.NumberH = SET_NUMBERH(lpObj->m_Index);
  pMsg.NumberL = SET_NUMBERL(lpObj->m_Index);
  memcpy(pMsg.szName, lpObj->Name, sizeof(pMsg.szName));

  DataSend(iDuelIndex, (LPBYTE)&pMsg, pMsg.h.size);

  wsprintf(szTempText, lMsg.Get(MSGGET(4, 172)), gObj[iDuelIndex].Name);
  GCServerMsgStringSend(szTempText, lpObj->m_Index, 1);

  LogAddTD("[Duel Manager] [%s][%s] Requested to Start Duel to [%s][%s] on Room [%d]", lpObj->AccountID, lpObj->Name, gObj[iDuelIndex].AccountID, gObj[iDuelIndex].Name, iDuelRoom+1);

}

bool CDuelManager::IsDuelEnable(int aIndex)
{

  if ( OBJMAX_RANGE(aIndex ) == FALSE)
  {
    return false;
  }

  if ( gObjIsConnected(aIndex) == TRUE )
  {
    if ( ( gObj[aIndex].m_Option & 2 ) == 2 )
    {
      return true;
    }
  }

  return false;

}

void CDuelManager::SetDuelOption(int lpObj, BOOL bState) 
{
  if ( gObjIsConnected(lpObj) == TRUE )
  {
    if ( bState == 0 )
    {
      gObj[lpObj].m_Option = 0;
    }
    else
    {
      gObj[lpObj].m_Option |= 2;
    }
  }
}

bool CDuelManager::IsOnDuel(int lpObj) 
{ 

  for(int i = 0; i < MAX_DUEL_ROOMS; i++)
  {
    if(this->m_Rooms[i].lpObj01 == &gObj[lpObj])
    {
      return true;
    }
    if(this->m_Rooms[i].lpObj02 == &gObj[lpObj]) 
    {
      return true;
    }
  }

  return false;

}

bool CDuelManager::IsOnDuel(int lpObj, int lpObj2) 
{

  for(int i = 0; i < MAX_DUEL_ROOMS; i++)
  {

    if(this->m_Rooms[i].bFree == FALSE)
    {

      if(this->m_Rooms[i].lpObj01 == &gObj[lpObj] && 
        this->m_Rooms[i].lpObj02 == &gObj[lpObj2]) 
      {
        return true;
      }

      if(this->m_Rooms[i].lpObj01 == &gObj[lpObj2] && 
        this->m_Rooms[i].lpObj02 == &gObj[lpObj]) 
      {
        return true;
      }

    }

  }

  return false;

}

Change the #include according to the dll, you're using also make sure you tune up the #define -s

Downloads:
Duel System S4:(7 KB)
Download


Credits:
- Wolf (DarkTeam)

33

(4 replies, posted in Server Releases)

CashShopServer Bind Error Fix

Download:

34

(0 replies, posted in Tools)

Book for Windows7 Secrets - 2009


Windows7 Secrets.zip (35,093 KB):
Download: (2shared)

35

(2 replies, posted in Tools)

ACCOUNT CREATOR

MuAccountCreate (1,624 KB):
Download

Enemy Muweb 4.0

New version of Enemy MuWeb Demo edition is avaliable now.
This release is 99.99% Code Free.
Support Season 4 features.
MD5/NON-MD5 Databases.

Web Site Features are:

- News
- Registration
- Rules
- FAQ
- Download
- Forum
- Top Characters
- Top Guilds
- Top Phonomans
- Top Richest Characters
- Ban Character List
- Ban Account List
- Recover Pasword
- Disconnect from the game
- Search Character
- Search Account
- Search Nickname
- Account Panel
- Add Stats
- Reset Stats
- Reset Level
- Clear PK
- Rename Character
- Get Credits
- Anti Bug System (Recover Stats, Recover Money, Teleport to Lorencia from Unknown Map)
- Web Shop
- Buy Points
- Change Class
- Buy Zen
- My Profile (Change Passowrd, Edit Signature, Edit Avatar, Edit Profile)
- GM Panel
- Admin Panel
- News Manager
- Links Manager
- Credits Manager
- Character Manager
- Account Manager
- Advanced Search
- Web Shop Manager
- Ban Manager
- Who is online
- Server Info (Max users on web / ingame, count accounts, characters, guilds, etc)
- View Banner Panel Yes / No
- Our Friends Yes / No
- Events Panel Yes / No
- Top 10 Yes / No
- Count users ingame
- Count users on web
- Master level on top Yes / No
- Guild Info
- Online Helper
- Ban IP System (for exapme you can ban an ip wich strats with 88.14)
- forum,news text limit
- Support multi-gameservers status(a much as you wount)
- Bugs: 0% found
- Anti SQL Injection
- Support Languages: English, Russian, Romanian
- A lot of fixes and advices
- RewriteEngine On

Install:

1. Unpack the site into your root folder.
2. Install Zend Optimizer.
3. Edit cfgs.php file
4. Go to http://localhost/install/install.php

Image:
http://img62.imageshack.us/img62/762/80457872.jpg
http://img252.imageshack.us/img252/6241/93695646.jpg
http://img62.imageshack.us/img62/6813/27254619.jpg

Full version of this website you can view HERE


Downloads:
Enemy-MuWeb:
Download: (2shared)
Download: (Turboupload)

ZendOptimizer:
Download: (2shared)
Download: (Turboupload)


Credits:
- Savoy (some java functions from webshop)
- Fantazy, GrInYa (Design)
- GrInYa

Template Para Web IbanezFiles 2.0

Images:
http://img39.imageshack.us/img39/2756/98580795.jpg
http://img39.imageshack.us/img39/6900/93329340.jpg

Download:
Template.rar (9,827 KB):
Link 1: http://www.2shared.com/file/8203212/b3e … _FULL.html

ID anzfiles
KEY 12345

Credits:
- Aprendiz (IG)

38

(7 replies, posted in Server Releases)

MuServer Season5 Server Files (Bold Team)

Hello, I am providing MuServer Season 5 To test.

Client Information:
Season 5
ClientExeVersion=1.06.28
ClientExeSerial=osmdh4syh30adaup

Download:
Server (12.7 MB):
http://www.2shared.com/file/8412919/7be … ason5.html

Client (247.9 MB):
http://www.2shared.com/file/8403817/184 … nt_S4.html

MU1_06D_Patch (189.6 MB):
http://www.2shared.com/file/8403788/526 … Patch.html


Special credits for the release goes to:
- BoldTeaM

39

(2 replies, posted in Website releases)

PHP Inventory View

Insert the following code in the <head> section of the page:

<HEAD>
<SCRIPT type="text/javascript" src="PATH/overlib.js"></SCRIPT> 
</HEAD>

Where path is the location of overlib.js;
Insert the following code in  <div> element:

echo equipt(CHARACTER NAME);

http://img158.imageshack.us/img158/7205/32401799.png

function equipt($char)
{
  $inventory= mssql_fetch_array(mssql_query("SELECT * FROM Character WHERE Name='$char'"));
  mssql_query("declare @it varbinary(1920); set @it=(SELECT [Inventory] FROM [Character] WHERE [Name]='$char'); print @it");
  $items = substr(substr(mssql_get_last_message(),2),0,384);
  if($inventory['Class'] == 48) $invimage = 'images/inventorymg.jpg';
  else $invimage = 'images/inventory.jpg';

  $output = "<br />
    <table width='298' height='315' border='0' cellpadding='7' cellspacing='0' bordercolor='#FFFFFF' background='$invimage' align='center'>
      <tr>
          <td height='71' colspan='7'>
                &nbsp;
            </td>
      </tr>
      <tr>";
  //Imp
  {
    $output .= "<td width='6' rowspan='5'>&nbsp;</td>";
    $item = substr($items,8*32,32);
    if(!iteminfo($item))
        {
          $output .= "<td width='51' height='70'></td>";
        }
    else
        {
          $output .= "<td width='51' height='70' style='".iteminfo($item)."</td>";
        }
    $output .= "<td width='22'>&nbsp;</td>";
  }
  //Helm
  {
    $item = substr($items,2*32,32);
    if(!iteminfo($item))
        {
          $output .= "<td style=''></td>";
        }
    else
        {
          $output .= "<td style='".iteminfo($item)."</td>";
        }
  }
  //Wings
  {
    $item = substr($items,7*32,32);
    if(!iteminfo($item))
        {
          $output .= "<td colspan='2' style=''></td>";
        }
    else
        {
          $output .= "<td colspan='2' style='".iteminfo($item)."</td>";
        }
    $output .= "<td width='7' rowspan='5'>&nbsp;</td></tr>";
  }
  //Left Hand
  {
    $output .= "<tr>";
    $item = substr($items,0*32,32);
    if(!iteminfo($item))
        {
          $output .= "<td rowspan='2' style=''></td>";
        }
    else
        {
          $output .= "<td rowspan='2' style='".iteminfo($item)."</td>";
        }
  }
  //Pendant
  {
    $item = substr($items,9*32,32);
    if(!iteminfo($item))
        {
          $output .= "<td height='35' style=''></td>";
        }
    else
        {
          $output .= "<td height='35' style='".iteminfo($item)."</td>";
        }
  }
  //Armor
  {
    $item = substr($items,3*32,32);
    if(!iteminfo($item))
        {
          $output .= "<td rowspan='2' style=''></td>";
        }
    else
        {
          $output .= "<td rowspan='2' style='".iteminfo($item)."</td>";
        }
    $output .= "<td rowspan='2'>&nbsp;</td>";
  }
  //Shield
  {
    $item = substr($items,1*32,32);
    if(!iteminfo($item))
        {
          $output .= "<td rowspan='2' style=''></td>";
        }
    else
        {
          $output .= "<td rowspan='2' style='".iteminfo($item)."</td>";
        }
    $output .= "</tr><tr><td height='70'>&nbsp;</td></tr><tr>";
  }
  //Gloves
  {
    $item = substr($items,5*32,32);
    if(!iteminfo($item))
        {
          $output .= "<td rowspan='2' style=''></td>";
        }
    else
        {
          $output .= "<td rowspan='2' style='".iteminfo($item)."</td>";
        }
  }
  //Left Ring
  {
    $item = substr($items,10*32,32);
    if(!iteminfo($item))
        {
          $output .= "<td style='height: 30px;'></td>";
        }
    else
        {
          $output .= "<td style='height: 30px;".iteminfo($item)."</td>";
        }
  }
  //Pants
  {
    $item = substr($items,4*32,32);
    if(!iteminfo($item))
    {
      $output .= "<td rowspan='2' style=''></td>";
    }
    else
    {
      $output .= "<td rowspan='2' style='".iteminfo($item)."</td>";
    }
  }
  //Right Ring
  {
    $item = substr($items,11*32,32);
    if(!iteminfo($item))
      {
        $output .= "<td style='height: 30px;'></td>";
      }
    else
      {
        $output .= "<td style='height: 30px;".iteminfo($item)."</td>";
      }
  }
    //Boots
  {
    $item = substr($items,6*32,32);
    if(!iteminfo($item))
      {
        $output .= "<td width='51' rowspan='2' style=''></td>";
      }
    else
      {
        $output .= "<td width='51' rowspan='2' style='".iteminfo($item)."</td>";
      }
  }
      $output .= "</tr>
      <tr>
          <td height='32'>
                &nbsp;
            </td>
          <td width='19'>
                &nbsp;
            </td>
         </tr>
       <tr>
            <td colspan='7' height='7'>
            </td>
         </tr>
  </table><br />";

  return $output;
}

Download:
PHPInventoryView.rar (2.4 MB):
Link 1: http://www.2shared.com/file/8391624/1ae … yView.html

Special credits for the release goes to:
- Mephisto e Savoy (DrakE Team)

40

(0 replies, posted in Website releases)

MuWeb 0.9 Decrypted

INSTALL STEPS:
1. IF YOU USE MD5 DO THE NEXT STEPS:

    * Copy WZ_MD5_MOD.dll in c:\program files\microsoft sql server\80\tools\binn
      WZ_MD5_MOD.dll can be found in folder INSTALL STUFF\WZ_MD5_MOD.dll
    * Run the next code in SQL QUERY ANALYZER using Master database:

exec sp_addextendedproc 'XP_MD5_EncodeKeyVal', 'WZ_MD5_MOD.dll'  

2. Edit config.inc.php with your settings

    * $muweb['db_host'] - Host where sql server is hosted
    * $muweb['db_name'] - MU Online default database (MuOnline)
    * $muweb['db_name2'] - MU Online secondary database (Me_MuOnline)
      Note: If you use only 1 database (MuOnline) leave MuOnline
    * $muweb['db_user'] - SQL access user
    * $muweb['db_password'] - SQL accesss password
    * $muweb['connection_type'] - Connection of MuWeb 0.9 with SQL SERVER
      + ODBC - Run the reg file before install MuWeb 0.9, can be found in folder INSTALL STUFF\MuWeb.reg

3. Enable MOD REWRITE - Go to apache\conf\httpd.conf , open it, find #LoadModule rewrite_module modules/mod_rewrite.so, delete # from the front save and restart webserver.

4. Run in borwser install.php
    * Step 1 - Required Apache Mods
      + GD Image Library - Can be enabled from php.ini, search for ;extension=php_gd2.dll, delete ; from the front close document and save
      + Mssql - Can be enabled from php.ini, search for ;extension=php_mssql.dll, delete ; from the front close document and save
      + Mod_Rewrite - In xampp this mod is already enabled, in others webservers you can enable it from httpd.conf
    * Step 2 - Connecting To Databases
    * Step 3 - Checking,Altering Tables
    * Step 4 - Password Encryption Type
      + NO MD5
      + MD5 ENCRYPTION - Make sure you have complete Step 1. from the top of INSTALL NOTES
    * Step 5 - Create Administrator Account
    * Step 6 - Install Finished.

Download:
MuWeb 0.9 Decrypted (3.5 MB):
Link 1: http://www.2shared.com/file/8366464/628 … _Free.html
Link 2: http://www.sendspace.com/file/ko2jlb


Credits:
- =Master= (MuWeb)

How to fix Account Already Connect bug

Shut down your server

Go in: Start Menu >>All Programs >> Microsoft SQL Server >> Queary Analyzer
write your sql user name / password
Use MuOnline and put this CODE

UPDATE MEMB_STAT
SET ConnectStat='0'
WHERE ConnectStat>0

Your server must be OFFLINE

Go in ..\\MuServer\GameServer_CS\Data\Crywolf.dat

//Mode State Month Day DayOfWeek Hour Min ContinuanceTime(min)
0
0     1     -1        -1          -1                  8     40                -1
0     1     -1        -1          -1                 16    40                -1
0     1     -1        -1          -1                 22    40                -1

end


* 8 - Hour day/hour when the event will be started
* 40 - Minute day/minute when the event will be started

You block this ports : 1431, 1433, 1434

C:\PROGRA~1\MICROS~2\MSSQL\binn\sqlservr.exe [1864] 
   TCP     127.0.0.1:1433   0.0.0.0:0   LISTENING 
     UDP     0.0.0.0:1434   0.0.0.0:0   LISTENING

- For router users, there is nothing to do, just do not open these ports!
- For non-router users, just make sure in your Firewall List, the MMSQL application has Access Deny for the 3 sets of ports 1431, 1433, 1434
You can use also SQL SHIELD to protect your MS-SQL a bit more.
Also using another username than 'sa' will save you from being hacked time and time again, just make sure you edit the properties of the new User ID, make him owner of your databases.

How To Install WebShop

Open Install/index.php

$sqladdr = $webshop['mssq']['host']; // MSSQL Server Address (Host\ip)
$sqluser = $webshop['mssq']['user']; // MSSQL Server Username
$sqlpass = $webshop['mssq']['pass']; // MSSQL Server Username Password
$sqldb = $webshop['mssq']['db']; // MSSQL Database to use

Now Open Webshop/wshconf.php

There you Change:

$webshop['mssq']['host'] = '127.0.0.1'; // Server Address (Host\ip)
$webshop['mssq']['user'] = 'sa'; // Username used for a connection
$webshop['mssq']['pass'] = 'password'; // Username's password
$webshop['mssq']['db'] = 'MuOnline'; // Database name
$webshop['mssq']['dbacc'] = 'MuOnline'; // If you are using 6databases - set this to 'Me_MuOnline' or whatever your account database is named. (v0.4)
$webshop['mssq']['use_md5'] = true; // Use md5 encrypted passwords (true/false)

And for Admin acc change:
$webshop['misc']['admins'] = 'myAdminAccount';

After all of those Open:
http://yourwebsite/Webshop/Install/
This will install the webshop SQL DB's

If Everything is OK open http://yourwebsite/Webshop/

Credit:
- NeoGame

DataBase Auto Backup

Аll MU Server admins, this guide will help you backup your database using sql job agent.


Above is the Script which will backup your database:

DECLARE @ads varchar(70)
SET @ads = N'D:\MuServer\DBAutoBackUp\'+REPLACE(REPLACE(CAST( getdate() AS varchar), ' ', '_'), ':', '_')
SELECT @ads
BACKUP DATABASE [MuOnline] TO DISK = @ads WITH INIT , NOUNLOAD , NAME = N'MuOnline AutoBackUp', NOSKIP , STATS = 10, NOFORMAT

1. Create a folder called "DBAutoBackUp" in "D:\MuServer\" folder
2. Now go to Start>All programs>Microsoft SQL Server>Enterprise Manager

3. Follow the images below:
Step 1
http://img384.imageshack.us/img384/199/90927323.jpg
Step 2
http://img525.imageshack.us/img525/9363/52850400.jpg
Step 3
http://img203.imageshack.us/img203/7193/45729840.jpg
Step 4
http://img134.imageshack.us/img134/1355/43274608.jpg
Step 5
http://img23.imageshack.us/img23/9071/57587949.jpg
Step 6
http://img246.imageshack.us/img246/285/56143023.jpg
Step 7
http://img246.imageshack.us/img246/9329/70815809.jpg
Step 8
http://img96.imageshack.us/img96/6291/31430333.jpg
4. Ok, when you finish, you may Right Click the Job and select Start Job
5. The job continue to occure depends on the Occure Time you set for that Job.

Credit:
- 6efa

This guide teaches to create a DLL

Objective: To create a DLL which will put the functions to change the drop of Blood Castle, using as a basis the beta 39 of Luciano Aibar.

Link 1:
http://www.2shared.com/file/7824425/b2e … a_DLL.html

Credit:
Chris05 (Prepared Tutorial
Rodrigobmg (For explanations and corrections)

First you have to download this:
Edytor SNModifier:
Link 2shared: http://www.2shared.com/file/7966194/b40 … ifier.html
Link Turboupload: http://www.turboupload.com/uuq2rtudlstn … r.rar.html

1. When you done to download it , double click on it!
http://img195.imageshack.us/img195/3266/54001660.png

2. You chose the main from your client
http://img196.imageshack.us/img196/6418/63255945.png

3. U click defaults and chose what version do you have
http://img196.imageshack.us/img196/9642/99362359.png

4. Click Save As
http://img87.imageshack.us/img87/2973/87489115.png

5. Chose your main and click save
http://img242.imageshack.us/img242/6127/23815122.png

Credits:
D3scene

48

(4 replies, posted in Website releases)

MuOnline WebVirtua 2.2

Specifications Panel [Show the Login]:
How-Online: [Your Login]
-Account Type: [If your account is FREE / VIP / S. VIP]
-Maturity: [FREE = No Expire! , VIP / S.VIP = Date and Time]

Screen:
http://img408.imageshack.us/img408/3440/29577939.jpg

Available Options Panel:

-Reset ............... [FREE / VIP / S. VIP]
-Resetão ............... [FREE / VIP / S. VIP]
Distribute-Points .... [FREE / VIP / S. VIP]
-Change Password ........ [FREE / VIP / S. VIP]
Clear-Pk ............. [FREE / VIP / S. VIP]
-Change Nick ........... [VIP / S. VIP]
Vip-Map .............. [VIP / S. VIP]
Teleport-............ [VIP / S. VIP]
Points-Desbugear .... [VIP / S. VIP]
Bau-Change ............ [VIP / S. VIP]
Class-Change ......... [S. VIP]
Inventory-Reset .. [S. VIP]
Reset-Bau ........... [S. VIP]
Zen-Desbugear ....... [S. VIP]

Specifications Panel Administration:

- Unban Char ............. [Administrator / Game Master]
- Ban Char .................. [Administrator / Game Master]
- View Chars Banned ........ [Administrator / Game Master]
- Unban Account ......... [Administrator / Game Master]
- Ban Account .............. [Administrator / Game Master]
- View Accounts Banned ....... [Administrator / Game Master]
- Add Items ............. [Administrator / Game Master]
- Add VIP ................ [Administrator / Game Master]
- Add VIP Master ...... [Administrator / Game Master]
- View Data Char ............ [Administrator]
- View Account Information ....... [Administrator] - [No Link Set]
- Edit Account ............. [Administrator] - [Fixed]
- Edit Char .................. [Administrator] - [Fixed]
- Delete Account ........... [Administrator]
- Delete Chars .............. [Administrator]
- Remove Vip ................... [Administrator]
- Change Time Facilities ......... [Administrator]

Some of the things you need on the web:

Search and Char-Guild (SHOW GuildMark)
Time-DS, CC, BC
-Options Panel
Recover-Password (No Bug Do OPERA)
Guiding
Multi-Admin News
GM-Control Panel In-Common
-Quick News
Banners-Disclosure
-Quick links
Between-Other
-Resets working normally by the panel
Change-bau included and editable in conf_funcoes
-Index with all local images
-Picture Folder with all
Was rebuilt INDEX AND NOW 97% OF WEB is formed within the PASTA CONFIGS.

To Add ADM ou GM run this query:

UPDATE MEMB_INFO
SET contagm=('2') /* 2 = ADM or 1 = GM */
FROM MEMB_INFO
WHERE memb___id =('login') /*login*/

Download:
WebVirtua 2.2:
Link 1: http://www.2shared.com/file/8303337/3b2 … tua22.html

Credits:
DarkADM - Layout used as ORIGINAL BASE
Fabricionaweb - Correct Bugs!, He secured the site 90%
Crazy - Main Base and Scripts.
Ramonvic - Correct Bugs!, He secured the site 99.9% and add something.
SIKK - Banners
Malex - Various Updates functional and useful.
Muhero - Adding new functions to the main menu.
Leandro Daldegan - set the Edit Account and Char.
Other - Several other places, where they were caught scripts and tips.

Raphael Varela (raphael89) - Changed the layout entirely, added functions and fixed some functions added by romonvic, tutorial correct installation of AppServer, among others.

List of useful programs to create MU Online server

This is a collection of programs for server administrators (security,
settings, design);

1. Every server needs MSSQL Database. You can download the database
server (MSSQL 2000 Evaluation Edition) from the following locations:

1.1 MSSQL 2000 Evaluation Edition (267.6 MB):
      Link 1 : http://www.turboupload.com/y5s8cvbstp98 … L.exe.html
      Link 2 : http://4storing.com/dizuwa/ec227dbd5e88 … a82a1.html

1.2 MSSQL 2000 Service Pack 4 (66.9 MB):
      Link 1: http://4storing.com/z8r42f/4fe2ea2c404f … 7a184.html

1.3 Microsoft SQL Server Management Studio Express (38.5 MB):
      Link 1: http://4storing.com/46fedh/0eedb06a8fd0 … ba273.html
      Link 2: http://www.2shared.com/file/8058149/921 … SMSEE.html

1.4 Security_Tools_Guide:
      Link 1: http://4storing.com/0st2l4/064a9c426d00 … 19749.html
      Link 1: http://www.turboupload.com/m2ymikx7r456 … e.doc.html

2. WEB server:
    XAMPP- Apache web server, MySQL, PHP, Perl, a FTP server and
phpMyAdmin. Web server for the frontend websites (Darkstyleweb, MuWeb
all versions and muweb 0.9)
      Link 1: http://sourceforge.net/projects/xampp/f … ndows/1.7/

3.  WEB sites and templates for them:
3.1 MuWeb 0.9 (work with season 4)
      Link 1: http://depositfiles.com/files/q361tddlg
3.2 Template 1:
      Link 1: http://www.2shared.com/file/8058662/a98 … o_V10.html
      Link 1: http://www.turboupload.com/57iee1xchtsn … 0.rar.html
3.2 Template 2:
      Link 1: http://4storing.com/vhm78d/016c42d67ed9 … 8c062.html
      Link 1: http://www.2shared.com/file/8058758/63b … 4_V10.html

4. SECURITY
Sygate-Firewall - quite nice and easy firewall. It's a trusted
software and protects well from different attacks an trojan horses.
Easy to setup.

5. Admin editors:
5.1 MU Maker (items and skills editor; add and remove characters and
accounts) Last version -
     Link 1:http://forum.muonlinehelp.com/viewtopic … 5&t=39
5.2 MonsterSetBase_Formater - spot editor - add and remove monsters
     Link 1: http://www.2shared.com/file/8058918/d42 … mater.html
     Link 1: http://4storing.com/jngqnt/746d876263b2 … e6ab5.html
5.3 Mu-Shop и Еventitems bag - shop and event drop editor:
     Link 1: http://muonlinehelp.com/items/8
How to use:

1. select the items You want included;
2. choose "generate file...";
3. choose the shop or event bag;
4. download the file

5.4 CzF MuEditor  - very useful for MU administrators (create and delete
      for characters and accounts):
     Link 1: http://4storing.com/tr5bmv/673e78c23686 … 68798.html
     Link 2: http://www.2shared.com/file/8059124/997 … _v15a.html

6. Client editor:
6.1 MUimgGUI  - used to convert ozj and ozt files to jpeg and tga and vice versia. Using this program, You can completely  redesign the game interface.
     Link 1: http://4storing.com/46ff0h/6246a3a4b0f7 … 3dedb.html
     Link 2: http://www.2shared.com/file/8059190/7de … mggui.html

50

(1 replies, posted in Tools)

This hack will only work with your Agility. You can try it with Strenght, Vitality and Energy aswell but it won't do any effect (other then showing that you have 32767 stats f.e.).

What we need for this:
- Download  CheatEngine 5.3 Link: http://www.turboupload.com/ocgvbebg5dmn … 3.zip.html
- 1 statpoint to find/change the agility value;
- Functional brains.
First, open your MU game in windowed mode, then select a character. When minimized you should be able to open the Cheat Engine. Do this...

In the Cheat Engine, Click the top left button with the computer logo (if I'm correct this button is lined with a colour). Then find the "main.exe", probably at the bottom of the list.

Fill in the following fields:
Value: Your Agility stats (f.e. 2000, if you have 2000 Agility)
Scan Type: Exact value
Value type: 2 Bytes
Memory Scan Option: 32-bit
(All should be set like this or it won't work!)

When you're done filling out this fields, press "First Scan".

Now, go back to your MU game and add 1 statpoint at Agility, when you're done go back to the Cheat Engine.

Now the tricky part. Changing the content of Value field in the Cheat Engine.
put in the following fields:

Value: Your new Agility stats (if you had 2000, then you should now fill in 2001)
Scan Type: Exact value (Same as previous scan)
Value Type: 2 Bytes (Same as previous scan)
Memory Scan Option: 32-bit (Same as previous scan)

When you're done and checked everything, press "Next Scan".

If the Cheat Engine finds 1 value, double click it. This should move the value down to the list at the bottom of the Engine. (When the Cheat Engine didn't found anything, do the whole thing over again! Because that just a little mistake..)

If the value is listed in the bottom list, right click it (it will deploy a menu). Click on "Change Record" (this will deploy another menu), and then click on "Value".

Change this value to whatever you like (Max stat is the maximum, or else the game will bug). Now you hit faster, but you spend much more mana.

Instruction Video: http://www.youtube.com/watch?v=VR2_9wInxBE

Credits: Bas, Shad0w