Conectare

Mi-am uitat parola

Navigare
 Portal
 Index
 Membri
 Profil
 FAQ
 Cautare
Ultimele subiecte
» DOVENTRA MU S2 Exp: 9999x Drop: 70%
Mier Noi 14, 2012 7:48 pm Scris de uMad

» [Release][Savoy]MuOnline Webshop 0.9B
Lun Apr 23, 2012 9:52 am Scris de UlfSaars311

» Download Center
Joi Feb 23, 2012 2:47 pm Scris de angelboyy

» ReRe4Fun Season 4 Episode 1 Mu Online Server
Joi Dec 29, 2011 5:28 am Scris de CenZuraT

» Comprare Viagra. prezzo viagra generico
Joi Aug 04, 2011 2:52 pm Scris de Vizitator

» Compra Viagra. acquistare viagra generico italia
Joi Aug 04, 2011 12:17 pm Scris de Vizitator

» Acquisto Viagra. viagra generico prezzo on line
Joi Aug 04, 2011 2:05 am Scris de Vizitator

» Compra Viagra. costo viagra generico
Joi Aug 04, 2011 1:00 am Scris de Vizitator

» fish oil 3
Joi Aug 04, 2011 12:25 am Scris de Vizitator


[C++][MuOnline]/add command

In jos

[C++][MuOnline]/add command

Mesaj Scris de Azzaroth la data de Vin Aug 08, 2008 9:05 am

Cod:

void AddStats(int aIndex)
{
if (!IsAddCmd) return;
cObj->Init(aIndex);
if (!strcmpi(Message, "/add"))
{
MessageOutput(aIndex, "Useage: /add <Type> <Amount>");
MessageOutput(aIndex, "The price for Add is: %d, Maximum stats: %d", AddPrice, AddMax);
return;
}
if (cObj->Money <AddPrice>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, "Ai scris gresti! Incearca: str, agi, vit, eng, cmd");
return;
}
if (cObj->Class != 4 && AddType == 0xD8)
{
MessageOutput(aIndex, "Numai dark lord au command.");
return;
}
char Param2[100];
memset(Param2, 0x00, 100);
GetParam(2, Message, Param2);
int StatsToAdd = atoi(Param2);
if (cObj->LvlUpPoints <StatsToAdd>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;
if (AddType == 0xD8) Packet[4] = 0x04;
if (StatsToAdd <= 100)
for (int i=0; i<StatsToAdd>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, "Ai adaugat%d points. Mai ai %d points ramase.", StatsToAdd, cObj->LvlUpPoints);
if (StatsToAdd > 100)
MessageOutput(aIndex, "Relogheaza caracterul.");
}

Azzaroth
owner
owner

Numarul mesajelor : 231
Varsta : 23
Localizare : root@nasa.gov
Data de inscriere : 04/06/2008

Vezi profilul utilizatorului

Sus In jos

Sus


 
Permisiunile acestui forum:
Nu puteti raspunde la subiectele acestui forum