same problem please help
Printable View
Thanks for sharing files, but i cant creat characters, except Dark Lord, how i can fix it ?
@RE5P3CT
Protocol.cpp
Code:void CGPCharacterCreate( PMSG_CHARCREATE * lpMsg, int aIndex)
{
if (!PacketCheckTime(&gObj[aIndex]))
{
JGCharacterCreateFailSend(aIndex, lpMsg->Name);
return;
}
if (gObj[aIndex].Connected < PLAYER_LOGGED)
{
LogAdd(lMsg.Get(MSGGET(1, 220)), aIndex, gObj[aIndex].Ip_addr);
CloseClient(aIndex);
return;
}
if (gObj[aIndex].Connected == PLAYER_PLAYING)
{
LogAddTD("[Anti-HACK][CGPCharacterCreate] Attempted Character Create during GamePlay. [%s][%s]",
gObj[aIndex].AccountID, gObj[aIndex].Name);
CloseClient(aIndex);
return;
}
if (!gCreateCharacter)
{
GCServerMsgStringSend("[CGCharacterCreate]: [%s] Try Creating DarkLord Character.", aIndex, 1);
JGCharacterCreateFailSend(aIndex, lpMsg->Name);
return;
}
if (lpMsg->ClassSkin != 0x00 && lpMsg->ClassSkin != 0x10 &&
lpMsg->ClassSkin != 0x20 && lpMsg->ClassSkin != 0x30 &&
lpMsg->ClassSkin != 0x40 && lpMsg->ClassSkin != 0x50 &&
lpMsg->ClassSkin != 0x60)
{
JGCharacterCreateFailSend(aIndex, lpMsg->Name);
return;
}
if (lpMsg->ClassSkin == 0x60 || gObj[aIndex].Magumsa < 1) //Rage Fighter
{
if (lpMsg->ClassSkin == 0x30 || gObj[aIndex].Magumsa == 0) //MG
{
if (lpMsg->ClassSkin == 0x40 || gObj[aIndex].Magumsa != 3 ) // DL
{
SDHP_CREATECHAR sCreate;
memset(&sCreate, 0, sizeof(sCreate));
PHeadSetB((LPBYTE)&sCreate, 0x04, sizeof(sCreate));
sCreate.ClassSkin = lpMsg->ClassSkin;
sCreate.Number = aIndex;
memcpy(sCreate.AccountId, gObj[aIndex].AccountID, MAX_ACCOUNT_LEN);
memcpy(sCreate.Name, lpMsg->Name, MAX_ACCOUNT_LEN);
char szTemp[20];
char szTemp2[20];
szTemp[10] = 0;
szTemp2[10] = 0;
memcpy(szTemp, sCreate.Name, MAX_ACCOUNT_LEN);
memcpy(szTemp2, sCreate.AccountId, MAX_ACCOUNT_LEN);
LogAddTD("Character create : %s,%s", szTemp2, szTemp);
cDBSMng.Send((char*)&sCreate, sCreate.h.size);
}
else
{
LogAddC(2, "error-L1: Darklord Character create error [%s]", gObj[aIndex].AccountID);
JGCharacterCreateFailSend(aIndex, lpMsg->Name);
return;
}
}
else
{
LogAddC(2, "error-L1: Magumsa Character create error [%s]", gObj[aIndex].AccountID);
JGCharacterCreateFailSend(aIndex, lpMsg->Name);
return;
}
}
else
{
JGCharacterCreateFailSend(aIndex, lpMsg->Name);
return;
}
}
@ashlay thank you very much for your help.
Shortcuts to the server is dead! Give new please!
:S link is death pls reshare
Help Error
http://image.ohozaa.com/i/f70/CxsRKD.jpg
help me enable DoppelGanger
i can't join event
this event begin wait 780'
this time does not decrease.
sorry bad englist =.='
pls help me :((
These source codes don't work, the community is in total decay.. increasingly knowledgeable people who are fully devoted to the development of MU Online there, I think at this point it is correct to say that: "Communities of development for Mu Online "and" Mu Online same, have died."
PS: Sad but true.
I can do many things by myself.. since I learned some concepts of C++, and I got into the coding server side too, so here your comment is very out of place.
PS: I've seen his work in: WzTeam Season 4.6 (source code) of that and a lot of what you wear on your fantastic code is made by other persons (95% of your "code work" is stolen from Rz true MU Coders), so here you're not the one to come and tell me that I do not I can encode by myself. :ott1:
Spanish:
PD: He visto tu trabajo en los archivos de: WzTeam Season 4.6 (tengo tus codigos fuente), y lo único que veo en tu "fantástico código", son cosas hechas por otras personas (el 95% de tu supuesto trabajo con ese código, es robado de trabajos anteriores con el GameServer 1.00.87 desarrollado por los verdaderos codificadores de RaGEZONE), entonces yo pienso que no sos la persona indicada, para venir a plantearme que yo no puedo hacer algo por mi mismo, porque por lo visto estarías siendo un Hipócrita.
PD 2: Tu fabuloso: "Gestor de Eventos", es basura solamente un montón de lineas de código (facil de entender hasta para mi, que soy Novato), y que por la forma en la que esta programado, aun sin haberlo testeado. se nota que tiene muchos bugs, o mas bien que los genera al gameserver. y vos venís a decirme a mi, que yo no puedo hacer cosas por mi mismo? EPIC FAILLLL!!! xD
para los que no me crean... porque mejor no lo ven con sus propios ojos, este es dichoso Gestor de Eventos, del señor: Josep (es una mierda):
PD 3: Yo programe el otro dia un: NPC Exchanger, para unos Files Season 3, que funciona perfectamente, que no genera bugs al gameserver, y solamente me tomo 5 min, hacerlo:Code:#include "stdafx.h"
#include "ChaosEvent.h"
#include "log.h"
#include "gameserver.h"
#include "Readscript.h"
CChaosEvent g_ChaosEvent;
typedef void (*TAllSendServerMsg)(char* msg);
typedef void (*TgObjMonsterDieGiveItem)(OBJECTSTRUCT *lpObj, OBJECTSTRUCT *lpTargetObj);
typedef short (*TgObjAddMonster)(int MapID);
typedef BOOL (*TgObjSetMonster)(int aIndex, int MonsterClass);
TAllSendServerMsg AllSendServerMsg = (TAllSendServerMsg)(0x004041D3);
TgObjMonsterDieGiveItem gObjMonsterDieGiveItem = (TgObjMonsterDieGiveItem)(0x0041D9E0);
TgObjAddMonster gObjAddMonster = (TgObjAddMonster)(0x004044F3);
TgObjSetMonster gObjSetMonster = (TgObjSetMonster)(0x0040616D);
CChaosEvent::CChaosEvent() : m_bInstantSpawn(false), m_bEnableEvent(false)
{
InitializeCriticalSection(&m_critical);
ZeroMemory(eventArray,8000);
}
CChaosEvent::~CChaosEvent()
{
DeleteCriticalSection(&m_critical);
}
void CChaosEvent::Load()
{
EnterCriticalSection(&m_critical);
//Poner funcion para limpiar bichos existentes
Clear();
SMDFile = fopen("..\\Data\\WZTGroup_EMUEvents.dat", "r");
if(SMDFile == NULL)
{
#if 0
MsgBox("[Chaos Event]Cannot load settings file\nAutomatic disable event");
#endif
m_bEnableEvent = false;
return;
}
SMDToken Token;
int iType = -1;
SPAWN_INFO SpawnInfo;
MONSTER_INFO MonsterInfo;
ITEM_INFO ItemInfo;
while(true)
{
Token = GetToken();
if(Token == END)
break;
iType = TokenNumber;
while(true)
{
if(iType == 0)
{
Token = GetToken();
if(Token == NAME && strcmp("end",TokenString) == 0)
break;
this->m_bEnableEvent = TokenNumber;
if(this->m_bEnableEvent == false)
break;
Token = GetToken();
this->m_bInstantSpawn = TokenNumber;
}
else if(iType == 1)
{
Token = GetToken();
if(Token == NAME && strcmp("end",TokenString) == 0)
break;
SpawnInfo.iCategory = TokenNumber;
Token = GetToken();
SpawnInfo.bStaticTime = TokenNumber;
SpawnInfo.wDay = 0;
Token = GetToken();
SpawnInfo.iHour = TokenNumber;
Token = GetToken();
SpawnInfo.iMinute = TokenNumber;
Token = GetToken();
SpawnInfo.bMessage = TokenNumber;
Token = GetToken();
if(Token == NAME)
strcpy(SpawnInfo.szMessage, TokenString);
if(this->m_bInstantSpawn == false)
{
SpawnInfo.dwLastTick = GetTickCount();
}
else
{
SpawnInfo.dwLastTick = 0;
}
this->m_Spawns.push_back(SpawnInfo);
}
else if(iType == 2)
{
Token = GetToken();
if(Token == NAME && strcmp("end",TokenString) == 0)
break;
MonsterInfo.iCategory = TokenNumber;
Token = GetToken();
MonsterInfo.iDropCategory = TokenNumber;
Token = GetToken();
MonsterInfo.iMonsterID = TokenNumber;
Token = GetToken();
MonsterInfo.iMapID = TokenNumber;
Token = GetToken();
MonsterInfo.iX1 = TokenNumber;
Token = GetToken();
MonsterInfo.iY1 = TokenNumber;
Token = GetToken();
MonsterInfo.iX2 = TokenNumber;
Token = GetToken();
MonsterInfo.iY2 = TokenNumber;
Token = GetToken();
MonsterInfo.iAddHP = TokenNumber;
Token = GetToken();
MonsterInfo.iAddDefense = TokenNumber;
Token = GetToken();
MonsterInfo.iAddAttack = TokenNumber;
Token = GetToken();
MonsterInfo.iDropRate = TokenNumber;
Token = GetToken();
MonsterInfo.iExcRate = TokenNumber;
Token = GetToken();
MonsterInfo.iAncRate = TokenNumber;
Token = GetToken();
MonsterInfo.iSpawnCount = TokenNumber;
Token = GetToken();
MonsterInfo.bShowMessage = TokenNumber;
Token = GetToken();
if(Token == NAME)
strcpy(MonsterInfo.szMessage,TokenString);
MonsterInfo.iCurSpawnCount = 0;
this->m_Monsters[MonsterInfo.iCategory].push_back(MonsterInfo);
}
else if(iType == 3)
{
Token = GetToken();
if(Token == NAME && strcmp("end",TokenString) == 0)
break;
ItemInfo.iCategory = TokenNumber;
Token = GetToken();
ItemInfo.iItemType = TokenNumber;
Token = GetToken();
ItemInfo.iItemType = ITEMGET(ItemInfo.iItemType,TokenNumber);
Token = GetToken();
ItemInfo.iLevel = TokenNumber;
Token = GetToken();
ItemInfo.bSkill = TokenNumber;
Token = GetToken();
ItemInfo.bLuck = TokenNumber;
Token = GetToken();
ItemInfo.iOption = TokenNumber;
Token = GetToken();
ItemInfo.iExcellent = TokenNumber;
Token = GetToken();
ItemInfo.bAncient = TokenNumber;
this->m_ItemInfo[ItemInfo.iCategory].push_back(ItemInfo);
}
}
};
fclose(SMDFile);
//if(m_bEnableEvent == true)
// Log.outInfo("[Chaos Event]Running Event Spawns(%d)", this->m_Spawns.size());
LeaveCriticalSection(&m_critical);
}
void CChaosEvent::Process()
{
EnterCriticalSection(&m_critical);
if(this->m_bEnableEvent == false)
{
LeaveCriticalSection(&m_critical);
return;
}
DWORD dwTickCount = GetTickCount();
for(LIST_SPAWN::iterator it = m_Spawns.begin();it != m_Spawns.end();it++)
{
LPSPAWN_INFO lpSpawnInfo = &(*it);
bool bRun = false;
SYSTEMTIME sysTime;
GetLocalTime(&sysTime);
if(lpSpawnInfo->bStaticTime == false)
{
bRun = ((dwTickCount - lpSpawnInfo->dwLastTick) > ((lpSpawnInfo->iHour*60)+(lpSpawnInfo->iMinute))*60*1000);
}
else
{
bRun = (sysTime.wHour == lpSpawnInfo->iHour && sysTime.wMinute == lpSpawnInfo->iMinute && sysTime.wDay != lpSpawnInfo->wDay);
}
if(bRun == true)
{
if(lpSpawnInfo->bStaticTime == true)
lpSpawnInfo->wDay = sysTime.wDay;
else
lpSpawnInfo->dwLastTick = dwTickCount;
for(LIST_MONSTER::iterator it = m_Monsters[lpSpawnInfo->iCategory].begin();it != m_Monsters[lpSpawnInfo->iCategory].end();it++)
{
LPMONSTER_INFO lpMonsterInfo = &(*it);
if(lpMonsterInfo->iCategory == lpSpawnInfo->iCategory)
{
while(lpMonsterInfo->iCurSpawnCount++ < lpMonsterInfo->iSpawnCount)
this->AddMonster(lpMonsterInfo);
}
}
if(lpSpawnInfo->bMessage == true)
{
AllSendServerMsg(lpSpawnInfo->szMessage);
}
}
}
LeaveCriticalSection(&m_critical);
}
void CChaosEvent::KillProcess(OBJECTSTRUCT *lpObj, OBJECTSTRUCT *lpTargetObj)
{
if(eventArray[lpObj->m_Index] == false)
{
gObjMonsterDieGiveItem(lpObj,lpTargetObj);
return;
}
EnterCriticalSection(&m_critical);
MONSTER_MAP::iterator it = m_MonsterMap.find(lpObj->m_Index);
if(it == m_MonsterMap.end())
{
LeaveCriticalSection(&m_critical);
return;
}
DWORD dwIndex = gObjMonsterTopHitDamageUser((LPBYTE)lpObj);
lpTargetObj = &ObjTab[dwIndex];
LPMONSTER_INFO lpMonsterInfo = it->second;
lpMonsterInfo->iCurSpawnCount--;
if(lpMonsterInfo->bShowMessage == true)
{
char szMessage[256] = {0};
sprintf(szMessage, lpMonsterInfo->szMessage, lpTargetObj->Name);
AllSendServerMsg(szMessage);
}
if(m_ItemInfo[lpMonsterInfo->iDropCategory].size() > 0 && rand()%100 < lpMonsterInfo->iDropRate)
{
int iSel = rand()%m_ItemInfo[lpMonsterInfo->iDropCategory].size();
LPITEM_INFO lpItemInfo = &m_ItemInfo[lpMonsterInfo->iDropCategory][iSel];
int iNewOption = 0, iSetOption = 0;
if(rand()%100 < lpMonsterInfo->iExcRate)
{
int iCount = rand()%(lpItemInfo->iExcellent+1);
if(iCount > 6)
iCount = 6;
for(int i = 0;i < iCount;i++)
iNewOption |= 1 << i;
}
if(rand()%100 < lpMonsterInfo->iAncRate && lpItemInfo->bAncient == true)
{
BOOL isSet = lpItemInfo->iItemType;
_asm
{
push isSet;
mov ecx,0x07AD9630;
mov eax, 0x00405551;
call eax;
mov isSet, eax;
sub esp,4;
};
if(isSet == TRUE)
{
_asm
{
mov ecx,0x07AD9630;
mov eax, 0x00404291;
call eax;
mov iSetOption, eax;
};
//iSetOption = gSetItemOption.GenSetOption(lpItemInfo->iItemType);
iNewOption = 0;
}
}
ItemSerialCreateSend(dwIndex, lpObj->MapNumber, lpObj->X, lpObj->Y, lpItemInfo->iItemType, rand()%(lpItemInfo->iLevel+1), 255, lpItemInfo->bSkill, lpItemInfo->bLuck, rand()%(lpItemInfo->iOption+1), dwIndex, iNewOption, iSetOption);
}
eventArray[lpObj->m_Index] = false;
gObjDel(lpObj->m_Index);
m_MonsterMap.erase(it);
LeaveCriticalSection(&m_critical);
}
void CChaosEvent::AddMonster(LPMONSTER_INFO lpMonsterInfo)
{
int iIndex = gObjAddMonster(lpMonsterInfo->iMapID);
if(iIndex == -1)
return;
OBJECTSTRUCT *lpObj = &ObjTab[iIndex];
lpObj->MapNumber = lpMonsterInfo->iMapID;
while(true)
{
int iPos;
int X1 = lpMonsterInfo->iX1, X2 = lpMonsterInfo->iX2, Y1 = lpMonsterInfo->iY1, Y2 = lpMonsterInfo->iY2;
BYTE MapNumber = lpObj->MapNumber;
_asm
{
mov edx, lpObj;
lea ecx, dword ptr ds:[edx+0x12E];
push ecx;
lea ecx, dword ptr ds:[edx+0x12C];
push ecx;
push Y2;
push X2;
push Y1;
push X1;
movzx eax, MapNumber;
push eax;
mov ecx, 0x07D800B0;
mov eax, 0x0040768F;
call eax;
mov iPos, eax;
};
if(iPos != 0)
break;
};
lpObj->TX = lpObj->X;
lpObj->TY = lpObj->Y;
lpObj->MTX = lpObj->X;
lpObj->MTY = lpObj->Y;
lpObj->StartX = lpObj->X;
lpObj->StartY = lpObj->Y;
lpObj->Dir = rand()%8;
lpObj->m_State = 1;
lpObj->PathCount = 0;
gObjSetMonster(iIndex,lpMonsterInfo->iMonsterID);
lpObj->Life = lpObj->MaxLife *= (1.0f+(lpMonsterInfo->iAddHP/100.0f));
lpObj->m_AttackDamageMin *= ((100.0f+lpMonsterInfo->iAddAttack)/100.0f);
lpObj->m_AttackDamageMax *= ((100.0f+lpMonsterInfo->iAddAttack)/100.0f);
lpObj->m_Defense *= ((100.0f+lpMonsterInfo->iAddDefense)/100.0f);
eventArray[iIndex] = true;
m_MonsterMap.insert(std::make_pair(iIndex,lpMonsterInfo));
}
void CChaosEvent::Clear()
{
m_Spawns.clear();
m_MonsterMap.clear();
for(int i = 0;i < MAX_CATEGORY;i++)
{
m_ItemInfo[i].clear();
m_Monsters[i].clear();
}
for(MONSTER_MAP::iterator it = m_MonsterMap.begin();it != m_MonsterMap.end();it++)
{
gObjDel(it->first);
eventArray[it->first] = false;
}
}
Code:bool InitNPCTalk(int aIndex,int aTargetIndex){
OBJECTSTRUCT* gObj = (OBJECTSTRUCT*)(aIndex * OBJECT_SIZE + OBJECT_BASE);
OBJECTSTRUCT *gTargetObj = (OBJECTSTRUCT*) OBJECT_POINTER (aTargetIndex);
if(gTargetObj->Class == LUKE_THE_HELPER && gTargetObj->MapNumber == 0) {
if(DeleteItemFromPlayer(aIndex,ITEMGET(14,68),1) == 0)
{
GCServerMsgStringSend("You don't have the special item!",aIndex,1);
return true;
}
else
{
int Type = ITEMGET(14,41);//Gemstone
GCFireworkSend(aIndex,gObj->X,gObj->Y,1);
ItemSerialCreateSend(aIndex,gObj->MapNumber,gObj->X,gObj->Y,Type,0,0,0,0,0,0,0,0);
GCServerMsgStringSend("Thank you noble warrior.. You are worthy to receive the 'Gemstone'.",aIndex,1);
}
}
return false;
}
EPIC FAIL.. im not josep from stupid wzteam... idiot...
Sos mas lento de lo que pensaba.. anda a hastle quizas ahi seas bueno muchachito..
PD: Espero que hayas usado el dialogo del Helper...