Submit your code requests, and if you are good at coding come help others with their requests.
ogeid
Member
Posts: 110 Joined: Thu Feb 02, 2006 11:11 pm
Post
by ogeid » Sun Jun 25, 2006 2:57 am
Hi all
can someone can give me that codes?
i have this
Code: Select all
void CGame::PlayerOrder_ExchangeEXP(int iClientH) {
int i;
int exp;
int exp2;
char buff[100];
if (m_pClientList[iClientH]->m_iLevel < 180) {
ShowInGameMsg(iClientH," You must have 180 level");
return;
}
exp = m_pClientList[iClientH]->m_iExp; //ile ma expa
exp2 = exp-119633989;
if (exp2>=5000000)
{
exp2=exp2 / 5000000; //<- exp2 = points
m_pClientList[iClientH]->m_iMajesticCount += exp2;
wsprintf(buff," You have %d master upgrade points",exp2);
ShowInGameMsg(iClientH,buff);
m_pClientList[iClientH]->m_iExp = 119633989;//(exp2 * 10000000);
SendNotifyMsg(NULL, iClientH, DEF_NOTIFY_EXP, NULL, NULL, NULL, NULL);
}
}
But i dont know why exp dsnt increase
and always code give me -862962182 majestics
"Prefiero morir de pie que vivir arrodillado"
Jensen
Loyal fan
Posts: 300 Joined: Tue Aug 02, 2005 7:40 am
Location: Illinois, USA
Contact:
Post
by Jensen » Sun Jun 25, 2006 4:10 am
try this, not tested but i think its right
Code: Select all
void CGame::PlayerOrder_ExchangeEXP(int iClientH) {
int i;
int exp;
int exp2;
char buff[100];
if (m_pClientList[iClientH]->m_iLevel < 180) {
ShowInGameMsg(iClientH," You must have 180 level");
return;
}
exp = m_pClientList[iClientH]->m_iExp - 119633989;
//sets exp to ammount over your limit
if (exp>=5000000)//if you have a spendable excess
{
exp2=exp / 5000000; // exp2 = number of points obtainable
m_pClientList[iClientH]->m_iMajesticCount += exp2;
wsprintf(buff," You have gained %d master upgrade points",exp2);
ShowInGameMsg(iClientH,buff);
m_pClientList[iClientH]->m_iExp -= (exp2 * 5000000);
SendNotifyMsg(NULL, iClientH, DEF_NOTIFY_EXP, NULL, NULL, NULL, NULL);
}
}
-><-
ogeid
Member
Posts: 110 Joined: Thu Feb 02, 2006 11:11 pm
Post
by ogeid » Sun Jun 25, 2006 4:46 am
Thanks a lot Jensen , now works! and i made a ResetExp command and ResetPoints command
"Prefiero morir de pie que vivir arrodillado"
Jensen
Loyal fan
Posts: 300 Joined: Tue Aug 02, 2005 7:40 am
Location: Illinois, USA
Contact:
Post
by Jensen » Sun Jun 25, 2006 6:00 am
np, i needed something to do other than get pissed off at this fly in my room, on the other hand i just counted it up and ive removed over 13k lines of code from my hg and am now redoing the entire stat system next
-><-
Drajwer
<3 bd long time
Posts: 841 Joined: Fri Dec 10, 2004 3:24 pm
Post
by Drajwer » Sun Jun 25, 2006 10:23 am
ogeid wrote: Hi all
can someone can give me that codes?
i have this
Code: Select all
void CGame::PlayerOrder_ExchangeEXP(int iClientH) {
int i;
int exp;
int exp2;
char buff[100];
if (m_pClientList[iClientH]->m_iLevel < 180) {
ShowInGameMsg(iClientH," You must have 180 level");
return;
}
exp = m_pClientList[iClientH]->m_iExp; //ile ma expa
exp2 = exp-119633989;
if (exp2>=5000000)
{
exp2=exp2 / 5000000; //<- exp2 = points
m_pClientList[iClientH]->m_iMajesticCount += exp2;
wsprintf(buff," You have %d master upgrade points",exp2);
ShowInGameMsg(iClientH,buff);
m_pClientList[iClientH]->m_iExp = 119633989;//(exp2 * 10000000);
SendNotifyMsg(NULL, iClientH, DEF_NOTIFY_EXP, NULL, NULL, NULL, NULL);
}
}
But i dont know why exp dsnt increase
and always code give me -862962182 majestics
its mine code ... eh.
if you dont know how to edit any code, plz dont do it.
<img src='
http://img440.imageshack.us/img440/2627/15pt.jpg ' border='0' alt='user posted image' /><br><br>HBPolska characters:<br><br>Hellios 150+ Aresden Hero Mage<br>TheBill 120 Aresden plrider<br>Kill_Me 100 Full-Hero plrider<br>Rockeater 110+ Aresden Plate Mage<br><br><a href='
http://www.helbreath.org ' target='_blank'>http://www.helbreath.org</a> come and play (250 ppl online)
ADDKiD
<3 bd long time
Posts: 967 Joined: Tue Jul 12, 2005 8:07 pm
Location: Washington, USA
Contact:
Post
by ADDKiD » Wed Jun 28, 2006 3:03 am
Lawl. Jensen, we should talk about combining our servers...