0 Rep Candy

Codes already submitted by people of the forums.
Post Reply
xmukox
Member
Posts: 175
Joined: Sun Sep 11, 2005 9:53 am

Post by xmukox »

item.h:

Code: Select all

 #define DEF_ITEMEFFECTTYPE_REPZERO  	37
game.cpp:

Code: Select all

 // 0 Rep Candy
  	case DEF_ITEMEFFECTTYPE_REPZERO:
    iMax = 10000;
    if (m_pClientList[iClientH]->m_iRating < iMax) m_pClientList[iClientH]->m_iRating = 0;
    iEffectResult = 9;
  	break; 
item.cfg:

Code: Select all

 Item = 901 0RepCandy 7 0 37 0 0 0 0 0 0 1 0 6 133 -100 30 -1 0 0 0 0 0 -1 21 0
contents -> ItemName.cfg:

Code: Select all

 Item=0RepCandy===============Zero Rep Candy=

good luck.
Charles
Loyal fan
Posts: 418
Joined: Wed Nov 26, 2003 8:20 pm

Post by Charles »

Kiruku wrote: this code is useless anyways... a command is better i think... "i have 900 rep but what does this 0RepCandy?" "Eat it" "NOOO MY REP = 0 BYE SERVER"  it should have rep lower then 0 then it goes back to 0... he setted the limit to  < 10000 rep coz if u get higher then 10000 rep your rep gets to 0 anyways.... its coded into hg. if u dont edit it :P
just change: (there are a few of these around to replace)

Code: Select all

if (m_pClientList[sAttackerH]->m_iRating < -10000) m_pClientList[sAttackerH]->m_iRating = -10000;
to

Code: Select all

if (m_pClientList[sAttackerH]->m_iRating < 0) m_pClientList[sAttackerH]->m_iRating = 0;
just change (several places for these too)

Code: Select all

if (m_pClientList[iClientH]->m_iRating >  10000) m_pClientList[iClientH]->m_iRating = 0;
to

Code: Select all

if (m_pClientList[iClientH]->m_iRating >  10000) m_pClientList[iClientH]->m_iRating = 10000;
also in the function

Code: Select all

void CGame::___RestorePlayerRating(int iClientH)
replace

Code: Select all

if (m_pClientList[iClientH]->m_iRating < -10000) m_pClientList[iClientH]->m_iRating = 0;
	if (m_pClientList[iClientH]->m_iRating >  10000) m_pClientList[iClientH]->m_iRating = 0;
with

Code: Select all

if (m_pClientList[iClientH]->m_iRating < 0) m_pClientList[iClientH]->m_iRating = 0;
	if (m_pClientList[iClientH]->m_iRating >  10000) m_pClientList[iClientH]->m_iRating = 10000;
<i>"Always write good code. Feel bad to write bad code."</i>
Post Reply