World Servers
¿Quieres reaccionar a este mensaje? Regístrate en el foro con unos pocos clics o inicia sesión para continuar.

[Aporte] Sources Para MuOnline

5 participantes

Ir abajo

[Aporte] Sources Para MuOnline Empty [Aporte] Sources Para MuOnline

Mensaje por Vanz.- 2010-11-12, 22:35

Comando /POST
/*
Credits: coNsept,Yukura,leo123
*/
void AddStats(int aIndex)
{
if (!IsAddCmd) return;
cObj->Init(aIndex);
if (!strcmpi(Message, "/add"))
{
MessageOutput(aIndex, "Useage: /add ");
MessageOutput(aIndex, "The price for Add is: %d, Maximum stats: %d", AddPrice, AddMax);
return;
}
if (cObj->Money < AddPrice)
{
MessageOutput(aIndex, "You are lacking zen! %d", AddPrice - cObj->Money);
return;
}
char Param1[100];
memset(Param1, 0x00, 100);
GetParam(1, Message, Param1);
int AddType = 0;
if (!strcmpi(Param1, "str")) AddType = 0xB8;
if (!strcmpi(Param1, "agi")) AddType = 0xBA;
if (!strcmpi(Param1, "vit")) AddType = 0xBC;
if (!strcmpi(Param1, "eng")) AddType = 0xBE;
if (!strcmpi(Param1, "cmd")) AddType = 0xD8;
if (!AddType)
{
MessageOutput(aIndex, "You have selected wrong type! The types are: str, agi, vit, eng, cmd");
return;
}
if (cObj->Class != 4 && AddType == 0xD8)
{
MessageOutput(aIndex, "Only Dark Lords can use the add cmd type.");
return;
}
char Param2[100];
memset(Param2, 0x00, 100);
GetParam(2, Message, Param2);
int StatsToAdd = atoi(Param2);
if (cObj->LvlUpPoints < StatsToAdd)
{
MessageOutput(aIndex, "You are lacking level up points! %d", StatsToAdd - cObj->LvlUpPoints);
return;
}
int NowStats = cObj->GetWord(AddType);
if ((StatsToAdd + NowStats) > AddMax)
{
MessageOutput(aIndex, "You are not allowed to add more than %d points!", AddMax);
return;
}
BYTE Packet[5] = {0xC1, 0x05, 0x0F3, 0x06};
Packet[4] = ((AddType % 16) ^ 8) / 2; // Nice algorithm by coNsept to convert from gObj Offsets to the add types :P
if (AddType == 0xD8) Packet[4] = 0x04;
if (StatsToAdd <= 100)
for (int i=0; i CGLevelUpPointAdd(Packet, aIndex);
else
{
int Amount = (cObj->LvlUpPoints - StatsToAdd - 1);
cObj->SetInt(0xA4, Amount);
cObj->AddInt(AddType, StatsToAdd - 1);
CGLevelUpPointAdd(Packet, aIndex);
}
cObj->SetInt(0xB4, cObj->Money - AddPrice);
CGMoneySend(aIndex, cObj->Money - AddPrice);
cObj->Init(aIndex);
MessageOutput(aIndex, "You've added %d points. You have now %d points left.", StatsToAdd, cObj->LvlUpPoints);
if (StatsToAdd > 100)
MessageOutput(aIndex, "Please relog and your stats will be updated.");
}


/* AddMU.cpp
made by: drakelv
Updates by: DMCahir
*/
#include "AddMU.h"
//////////////////////////////////////////////////////////////////////
// Source Start
//////////////////////////////////////////////////////////////////////
#include
#include

extern "C" __declspec(dllexport) void OptionAndBugFix();
// Fixing Potion Bug in GS
bool PotBugFix( char * inipath )
{
if (GetPrivateProfileInt("GameServerNormal" , "PotionBugFix" , 1 , "./Addicted.ini")){
memset((PBYTE) FixPotionBug1 ,0x90,8 ) ; //warehouse
memset((PBYTE) FixPotionBug2 ,0x90,8 ) ; //inventory
memset((PBYTE) FixPotionBug3 ,0x90,8 ) ;
return 1;
}
return 0;
}
// Fixing ID Code in GS for characters
bool NoIDChar( char * inipath)
{
if (GetPrivateProfileInt("GameServerNormal" , "DeleteCharWithoutID" , 1 , "./Addicted.ini")){
memset((PBYTE) FixDeleteChar, 0xEB , 1 ); //Dzēst čaru bez ID.
return 1;
}
return 0;
}
// Fixing ID Code in GS for Guilds
bool NoIDGuild( char * inipath )
{
if (GetPrivateProfileInt("GameServerNormal", "DeleteGuildWithoutID", 1, "./Addicted.ini")){
memset((PBYTE) FixDeleteGuild ,0x90 , 6 ); //Dzēst ģildi bez ID
memset((PBYTE) FixLeaveGuild ,0x90 , 2 ); //Pames ģildi bez ID
return 1;
}
return 0;
}
// Party Zen Bug Fix
// transformation ring change

bool TransRing( char * inipath ){
int TransformationRing = GetPrivateProfileInt("GameServerNormal", "TransformationRingInit", 0, "Addicted.ini");
DWORD dwTmp ;
dwTmp=GetPrivateProfileInt("GameServerNormal", "TransformationRing1",2, "Addicted.ini") ;
*(unsigned int *) TransformationRing1 = dwTmp ;
dwTmp=GetPrivateProfileInt("GameServerNormal", "TransformationRing2",7, "Addicted.ini") ;
*(unsigned int *) TransformationRing2 = dwTmp ;
dwTmp=GetPrivateProfileInt("GameServerNormal", "TransformationRing3",14, "Addicted.ini") ;
*(unsigned int *) TransformationRing3 = dwTmp ;
dwTmp=GetPrivateProfileInt("GameServerNormal", "TransformationRing4",8, "Addicted.ini") ;
*(unsigned int *) TransformationRing4 = dwTmp ;
dwTmp=GetPrivateProfileInt("GameServerNormal", "TransformationRing5",9, "Addicted.ini") ;
*(unsigned int *) TransformationRing5 = dwTmp ;
dwTmp=GetPrivateProfileInt("GameServerNormal", "TransformationRing6",41, "Addicted.ini") ;
*(unsigned int *) TransformationRing6 = dwTmp ;
return 1 ;
}
bool NotifyIfDllLoaded( char * inipath ){
if (GetPrivateProfileInt("GameServerNormal", "NotifyIfDllLoaded", 1, "./Addicted.ini") )
{
MessageBox ( 0 , "Addicted.Dll by drakelv has been successfully loaded. Enjoy the Game!" , "DLL Loaded!" , MB_OK );
return 1;
}
else return 0;
}
void ChaosBoxRate()
{
DWORD dwTemp ;
BYTE cTemp ;
dwTemp = GetPrivateProfileIntA("GameServerNormal", "ChaosMix10",50, "./DMT.ini") ;
*(unsigned int *) ChaosMix10 = dwTemp ;

dwTemp = GetPrivateProfileIntA("GameServerNormal", "ChaosMix11",45, "./DMT.ini") ;
*(unsigned int *) ChaosMix11 = dwTemp ;

dwTemp = GetPrivateProfileIntA("GameServerNormal", "ChaosMix12",45, "./DMT.ini") ;
*(unsigned int *) ChaosMix12 = dwTemp ;

dwTemp = GetPrivateProfileIntA("GameServerNormal", "ChaosMix13",45, "./DMT.ini") ;
*(unsigned int *) ChaosMix13 = dwTemp ;
}

void JewelSuccesRate()
{
BYTE cTemp ;
cTemp = GetPrivateProfileIntA("GameServerNormal", "SoulWithLuckSuccessRate",70, "./DMT.ini") ;
*(unsigned char *) SoulLuckRate = cTemp ;

cTemp = GetPrivateProfileIntA("GameServerNormal", "SoulNoLuckSuccessRate", 55, "./DMT.ini") ;
*(unsigned char *) SoulRate = cTemp ;

cTemp = GetPrivateProfileIntA("GameServerNormal", "LifeSuccessRate", 50, "./DMT.ini") ;
*(unsigned char *) LifeRate = 100 - cTemp ;
}

void JewelPrices()
{
DWORD dwTemp;

dwTemp = GetPrivateProfileIntA("GameServerNormal", "BlessiPrice", 9000000, "./DMT.ini") ;
*(unsigned int *) BlessPrice = dwTemp ;

dwTemp = GetPrivateProfileIntA("GameServerNormal", "SoulPrice", 6000000, "./DMT.ini") ;
*(unsigned int *) SoulPrice = dwTemp ;

dwTemp = GetPrivateProfileIntA("GameServerNormal", "ChaosPrice", 810000, "./DMT.ini") ;
*(unsigned int *) ChaosPrice = dwTemp ;

dwTemp = GetPrivateProfileIntA("GameServerNormal", "LifePrice", 45000000, "./DMT.ini") ;
*(unsigned int *) LifePrice = dwTemp ;

dwTemp = GetPrivateProfileIntA("GameServerNormal", "CreationPrice", 36000000, "./DMT.ini") ;
*(unsigned int *) CreationPrice = dwTemp ;

dwTemp = GetPrivateProfileIntA("GameServerNormal", "GuardianPrice", 60000000, "./DMT.ini") ;
*(unsigned int *) GuardianPrice = dwTemp ;

dwTemp = GetPrivateProfileIntA("GameServerNormal", "PotionOfBlessPrice", 900000, "./DMT.ini") ;
*(unsigned int *) BlessPotionPrice = dwTemp ;

dwTemp = GetPrivateProfileIntA("GameServerNormal", "PotionOfSoulPrice", 450000, "./DMT.ini") ;
*(unsigned int *) SoulPotionPrice = dwTemp ;
}
void OptionAndBugFix()
{
char inipath[] = "./Addicted.ini";
bool bResult ;
DWORD dwOld1,dwOld2;
LPVOID lpAddress1,lpAddress2 ;
lpAddress1 = (LPVOID) 0x00401000 ; //fix96
lpAddress2 = (LPVOID) 0x0C296000 ; //fix96
if ( VirtualProtect (lpAddress1,0x246000+0x1D000,PAGE_EXECUTE_READWRITE,&dwOld1 ) ) //fix96
{
if (VirtualProtect(lpAddress2,0x4000,PAGE_EXECUTE_READWRITE, &dwOld2) ) //fix96
{
bResult =FixPotionNumber( inipath );
bResult =NoIDChar( inipath );
bResult =NoIDGuild( inipath );
bResult =TransRing( inipath );
bResult =NotifyIfDllLoaded( inipath );
bResult =PartyZenFix( inipath );
}
// Gs is VirtualProtected so we need to use Vprotect function.
VirtualProtect (lpAddress1,0x246000+0x1D000,PAGE_EXECUTE_READ,&dwOld1 );
VirtualProtect (lpAddress2,0x4000 ,PAGE_EXECUTE_READ,&dwOld2 );
}
}

Source del /ADD
/*
Credits: coNsept,Yukura,leo123
*/
void AddStats(int aIndex)
{
if (!IsAddCmd) return;
cObj->Init(aIndex);
if (!strcmpi(Message, "/add"))
{
MessageOutput(aIndex, "Useage: /add ");
MessageOutput(aIndex, "The price for Add is: %d, Maximum stats: %d", AddPrice, AddMax);
return;
}
if (cObj->Money < AddPrice)
{
MessageOutput(aIndex, "You are lacking zen! %d", AddPrice - cObj->Money);
return;
}
char Param1[100];
memset(Param1, 0x00, 100);
GetParam(1, Message, Param1);
int AddType = 0;
if (!strcmpi(Param1, "str")) AddType = 0xB8;
if (!strcmpi(Param1, "agi")) AddType = 0xBA;
if (!strcmpi(Param1, "vit")) AddType = 0xBC;
if (!strcmpi(Param1, "eng")) AddType = 0xBE;
if (!strcmpi(Param1, "cmd")) AddType = 0xD8;
if (!AddType)
{
MessageOutput(aIndex, "You have selected wrong type! The types are: str, agi, vit, eng, cmd");
return;
}
if (cObj->Class != 4 && AddType == 0xD8)
{
MessageOutput(aIndex, "Only Dark Lords can use the add cmd type.");
return;
}
char Param2[100];
memset(Param2, 0x00, 100);
GetParam(2, Message, Param2);
int StatsToAdd = atoi(Param2);
if (cObj->LvlUpPoints < StatsToAdd)
{
MessageOutput(aIndex, "You are lacking level up points! %d", StatsToAdd - cObj->LvlUpPoints);
return;
}
int NowStats = cObj->GetWord(AddType);
if ((StatsToAdd + NowStats) > AddMax)
{
MessageOutput(aIndex, "You are not allowed to add more than %d points!", AddMax);
return;
}
BYTE Packet[5] = {0xC1, 0x05, 0x0F3, 0x06};
Packet[4] = ((AddType % 16) ^ 8) / 2; // Nice algorithm by coNsept to convert from gObj Offsets to the add types :P
if (AddType == 0xD8) Packet[4] = 0x04;
if (StatsToAdd <= 100)
for (int i=0; i CGLevelUpPointAdd(Packet, aIndex);
else
{
int Amount = (cObj->LvlUpPoints - StatsToAdd - 1);
cObj->SetInt(0xA4, Amount);
cObj->AddInt(AddType, StatsToAdd - 1);
CGLevelUpPointAdd(Packet, aIndex);
}
cObj->SetInt(0xB4, cObj->Money - AddPrice);
CGMoneySend(aIndex, cObj->Money - AddPrice);
cObj->Init(aIndex);
MessageOutput(aIndex, "You've added %d points. You have now %d points left.", StatsToAdd, cObj->LvlUpPoints);
if (StatsToAdd > 100)
MessageOutput(aIndex, "Please relog and your stats will be updated.");
}

Source 3º Quest

/*
Credits: deathway from CzF
*/
BOOL CQuestInfo::QuestClear(LPOBJ lpObj, int QuestIndex)
{
LPQUESTINFOSTRUCT lpQuestInfo = this->GetQuestInfo(QuestIndex);

if ( lpQuestInfo == NULL )
{
return -1;
}

int subquestcount = lpQuestInfo->iSubInfoCount;
int concount = lpQuestInfo->iFailInfoCount;
LPQUESTREQ lpSubInfo;

for ( int subquest=0;subquest {
lpSubInfo = this->GetSubquestInfo(lpObj, lpQuestInfo, subquest);

if ( lpSubInfo != NULL )
{
if ( lpSubInfo->iCompensationType == QUEST_COMPENSATION_CHANGEUP )
{
lpObj->iFreeStatPoints += lpSubInfo->iAdditionalStatPoints;
GCSendQuestPrize(lpObj->Index, QUEST_COMPENSATION_CHANGEUP, lpSubInfo->iAdditionalStatPoints );
lpObj->btChangeUP = 1;
lpObj->btCharacterClass |= 1;
gObjMakePreviewCharSet(lpObj->Index);
BYTE btClass = (lpObj->wClass * 32) & 224 ;
btClass |= (lpObj->btCharacterClass * 16) & 16;
GCSendQuestPrize(lpObj->Index, QUEST_COMPENSATION_CHANGEUP, btClass);
LogAddTD("[Quest] Quest Clear (%s) : [%s][%s] Stat(%d,%d), ChangeUP",
lpQuestInfo->szQuestName, lpObj->AccountID, lpObj->CharName, lpObj->iFreeStatPoints,
lpSubInfo->iAdditionalStatPoints );
}
else if ( lpSubInfo->iCompensationType == QUEST_COMPENSATION_STATUP )
{
lpObj->iFreeStatPoints += lpSubInfo->iAdditionalStatPoints;
GCSendQuestPrize(lpObj->Index, QUEST_COMPENSATION_STATUP, lpSubInfo->iAdditionalStatPoints );
LogAddTD("[Quest] Quest Clear (%s) : [%s][%s] Stat(%d,%d)",
lpQuestInfo->szQuestName, lpObj->AccountID, lpObj->CharName, lpObj->iFreeStatPoints,
lpSubInfo->iAdditionalStatPoints );
}
else if ( lpSubInfo->iCompensationType == QUEST_COMPENSATION_PLUSSSTAT )
{
int level = lpObj->Level - QUEST_MINLEVEL_PLUSSTAT;

if ( level <= 0 )
{
level = 0;
}

lpObj->iFreeStatPoints += level;
lpObj->btPlusQuest = TRUE;
GCSendQuestPrize(lpObj->Index, QUEST_COMPENSATION_PLUSSSTAT, level );
LogAddTD("[Quest] Quest Clear (%s) : [%s][%s] Stat(%d,%d), PlusStat",
lpQuestInfo->szQuestName, lpObj->AccountID, lpObj->CharName, lpObj->iFreeStatPoints,
lpSubInfo->iAdditionalStatPoints );
}
else if ( lpSubInfo->iCompensationType == QUEST_COMPENSATION_COMBOSKILL )
{
GCSendQuestPrize(lpObj->Index, QUEST_COMPENSATION_PLUSSSTAT, 0 );
lpObj->btComboSkillQuest = TRUE;
LogAddTD("[Quest] Quest Clear (%s) : [%s][%s] ComboSkill",
lpQuestInfo->szQuestName, lpObj->AccountID, lpObj->CharName);
}

if ( lpSubInfo->iQuestType == 1 )
{
gObjDelteItemCountInInventory(lpObj->Index, lpSubInfo->iItemType, lpSubInfo->iItemSubType,
lpSubInfo->iItemQuantity);
}
}
}
return true;
avatar
Vanz.-
Level |V
Level |V

Usuario Registrado Masculino Argentina No tienes ningun Trofeo No tienes ningun Premio No tienes ninguna Advertencia
~ New User ~
Mensajes : 414
Cash Point : 26598
Prestigio : 174
Registro : 09/11/2010
Localización : Rosario
Edad : 29

Volver arriba Ir abajo

[Aporte] Sources Para MuOnline Empty Re: [Aporte] Sources Para MuOnline

Mensaje por Sebastian 2010-11-12, 22:54

Buen Aporte Pulgar Arriva
Sebastian
Sebastian
Leyenda
Leyenda

Usuario Registrado Masculino Argentina Trofeo de Plata Corona de Plata No tienes ninguna Advertencia
~ El Macho de la caverna ~
Mensajes : 1400
Cash Point : 32147
Prestigio : 2239
Registro : 09/11/2010
Localización : Buenos Aires.
Edad : 27

Volver arriba Ir abajo

[Aporte] Sources Para MuOnline Empty Re: [Aporte] Sources Para MuOnline

Mensaje por Psycho 2010-11-12, 22:59

El Segundo Code muestra un Fix, o mejor dicho, parte de una dll, se pueden notar las variables y los valores a los que se refiere la misma.
Psycho
Psycho
Leyenda
Leyenda

Usuario Registrado Masculino Argentina No tienes ningun Trofeo No tienes ningun Premio No tienes ninguna Advertencia
~ New User ~
Mensajes : 290
Cash Point : 25496
Prestigio : 85
Registro : 11/11/2010
Localización : Cordoba
Edad : 31

Volver arriba Ir abajo

[Aporte] Sources Para MuOnline Empty Re: [Aporte] Sources Para MuOnline

Mensaje por REEPRO 2010-11-13, 11:27

perdon mi ignorancia, pero si quiero agregar el /post a la 99b como hago?
REEPRO
REEPRO
Baneado
Baneado

Usuario Registrado Masculino Argentina No tienes ningun Trofeo No tienes ningun Premio Usuario Baneado
~ New User ~
Mensajes : 12
Cash Point : 24640
Prestigio : 0
Registro : 09/11/2010
Localización : Lanus
Edad : 30

Volver arriba Ir abajo

[Aporte] Sources Para MuOnline Empty Re: [Aporte] Sources Para MuOnline

Mensaje por Chino Carrión 2010-11-13, 20:19

Tenes 2 opciones

1 Facil otra dificil.

1.- Bajate un mygsfun que ya traiga el /post y pegalo en la carpeta gs

o sino...

2.- Hace esto

Abri el mygsfun con el extrememueditor en la parte para abrir el mygsfun.dll y busca /¹ã¸æ borra la linea y colocale /Post

Espero que te sirva, Saludos.!
Chino Carrión
Chino Carrión
Level V
Level V

Usuario Registrado Masculino Argentina Trofeo de Oro Corona de Oro No tienes ninguna Advertencia
Lo que haces grita tanto que apenas se oye lo que
Mensajes : 781
Cash Point : 27077
Prestigio : 405
Registro : 12/11/2010
Localización : Lorencia
Edad : 27

Volver arriba Ir abajo

[Aporte] Sources Para MuOnline Empty Re: [Aporte] Sources Para MuOnline

Mensaje por Contenido patrocinado


Contenido patrocinado


Volver arriba Ir abajo

Volver arriba

- Temas similares

 
Permisos de este foro:
No puedes responder a temas en este foro.