/getgift

All Helbreath Server Source Discussion here.
Post Reply
omar_omiez
Loyal fan
Posts: 235
Joined: Mon Jul 12, 2004 9:36 am

Post by omar_omiez »

i was thinking of trying to write a command /getGift.
sometimes players get sick of lvling. so this command allows them to get items after they get a certain amount of exp. what u all think? gd idea? or not?
- Tbone<br><a href="http://cyborg.namedecoder.com"><br><img src="http://cyborg.namedecoder.com/webimages ... ng"<br></a>
locobans
Outpost Junkie
Posts: 2264
Joined: Tue Jul 13, 2004 3:51 am
Location: Behind You
Contact:

Post by locobans »

omar_omiez wrote: i was thinking of trying to write a command /getGift.
sometimes players get sick of lvling. so this command allows them to get items after they get a certain amount of exp. what u all think? gd idea? or not?
Umm....nice ideas...you learning so fast programming :D

P.S: You take any grades, or tutorials? B)
QUOTE (ADDKiD @ Dec 1 2006, 4:01 PM) <br>You guys make me laugh alot, half the shit I say, is bullshit...<br><br><img src='http://img485.imageshack.us/img485/492/banssig1ng.gif' border='0' alt='user posted image' /><br><br><b>I see no changes at all, wake up in the morning and ask myself...<br>Is life worth living? Should I blast myself?</b><br><br><b><a href='http://2paclegacy.com' target='_blank'>2PacLegacy.com</a></b>
Slayer
&lt;3 bd long time
Posts: 947
Joined: Thu Mar 17, 2005 9:08 pm

Post by Slayer »

Don't make HB go even lamer than most servers already are. After lvling you just go raid poodles.
<img src='http://i9.tinypic.com/2vs292h.jpg' border='0' alt='user posted image' />
omar_omiez
Loyal fan
Posts: 235
Joined: Mon Jul 12, 2004 9:36 am

Post by omar_omiez »

well here we go. lol. pls note that i used the rep system for this, so players have to choose whether they want to use /rep or /getGift every hour.

void CGame::GivePlayerItem(int iClientH, char *pData, DWORD dwMsgSize)

{
class  CItem * pItem;
int     iItemID;
if (m_pClientList[iClientH] == NULL) return;


if ((m_pClientList[iClientH]->m_iTimeLeft_Rating != 0) || (m_pClientList[iClientH]->m_iPKCount != 0)) {
// Æò°¡¸¦ ³»¸± ½Ã°£ÀÌ µÇÁö ¾Ê¾Ò°Å³ª ¹üÁËÀÚ´Â Æò°¡¸¦ ³»¸± ¼ö ¾ø´Ù. ±â´ÉÀ» »ç¿ëÇÒ ¼ö ¾ø´Ù.
SendNotifyMsg(NULL, iClientH, DEF_NOTIFY_CANNOTRATING, m_pClientList[iClientH]->m_iTimeLeft_Rating, NULL, NULL, NULL);
return;
}

if (m_pClientList[iClientH]->m_iLevel < m_iPlayerMaxLevel) {
// Æò°¡¸¦ ³»¸± ½Ã°£ÀÌ µÇÁö ¾Ê¾Ò°Å³ª ¹üÁËÀÚ´Â Æò°¡¸¦ ³»¸± ¼ö ¾ø´Ù. ±â´ÉÀ» »ç¿ëÇÒ ¼ö ¾ø´Ù.
SendNotifyMsg(NULL, iClientH, DEF_NOTIFY_CANNOTRATING, m_pClientList[iClientH]->m_iTimeLeft_Rating, NULL, NULL, NULL);
return;
}

if (m_pClientList[iClientH]->m_iExp < 30000000) {
// Æò°¡¸¦ ³»¸± ½Ã°£ÀÌ µÇÁö ¾Ê¾Ò°Å³ª ¹üÁËÀÚ´Â Æò°¡¸¦ ³»¸± ¼ö ¾ø´Ù. ±â´ÉÀ» »ç¿ëÇÒ ¼ö ¾ø´Ù.
SendNotifyMsg(NULL, iClientH, DEF_NOTIFY_CANNOTRATING, m_pClientList[iClientH]->m_iTimeLeft_Rating, NULL, NULL, NULL);
return;
}

if (m_pClientList[iClientH]->m_iLevel >= m_iPlayerMaxLevel) &&  if (m_pClientList[iClientH]->m_iExp >= 30000000)
{
switch (iDice(1,38)) {
case 1:iItemID=188;break;//edit urself
case 2:iItemID=189;break;//edit urself
case 3:iItemID=190;break;//edit urself
case 4:iItemID=191;break;//edit urself
case 5:iItemID=192;break;//edit urself
case 6:iItemID=193;break;//edit urself
case 7:iItemID=194;break;//edit urself
case 8:iItemID=195;break;//edit urself
case 9:iItemID=196;break;//edit urself
case 10:iItemID=197;break;//edit urself
case 11:iItemID=198;break;//edit urselfr
case 12:iItemID=199;break;//edit urself
case 13:iItemID=200;break;//edit urself
case 14:iItemID=201;break;//edit urself
case 15:iItemID=202;break;//edit urself
case 16:iItemID=203;break;//edit urself
case 17:iItemID=204;break;//edit urself
case 18:iItemID=205;break;//edit urself
case 19:iItemID=206;break;//edit urself
case 20:iItemID=207;break;//edit urself
case 21:iItemID=208;break;//edit urself
case 22:iItemID=209;break;//edit urself
case 23:iItemID=210;break;//edit urself
case 24:iItemID=211;break;//edit urself
case 25:iItemID=212;break;//edit urself
case 26:iItemID=213;break;//edit urself
case 27:iItemID=214;break;//edit urself
case 28:iItemID=215;break;//edit urself
case 29:iItemID=216;break;//Sedit urself
case 30:iItemID=217;break;//edit urself
case 31:iItemID=218;break;//edit urself
case 32:iItemID=219;break;//edit urself
case 33:iItemID=220;break;//edit urself
case 34:iItemID=221;break;//Sedit urself
case 35:iItemID=222;break;//edit urself
case 36:iItemID=223;break;//edit urself
case 37:iItemID=224;break;//edit urself
case 38:iItemID=225;break;//edit urself
}

//chance
if (iDice(1,120) <= 3) iItemID=650;//ZemstoneOfSacrifice
//chance

pItem = new class CItem;
if (_bInitItemAttr(pItem, iItemID) == FALSE) {
delete pItem;
}
else {
m_pMapList[ m_pClientList[iClientH]->m_cMapIndex ]->bSetItem(m_pClientList[iClientH]->m_sX,
m_pClientList[iClientH]->m_sY, pItem);
SendEventToNearClient_TypeB(MSGID_EVENT_COMMON, DEF_COMMONTYPE_ITEMDROP, m_pClientList[iClientH]->m_cMapIndex,
m_pClientList[iClientH]->m_sX, m_pClientList[iClientH]->m_sY, 
pItem->m_sSprite, pItem->m_sSpriteFrame, pItem->m_cItemColor);
}


}
}
usage is
if (memcmp(cp, "/getGift ", 9) == 0) {
GivePlayerItem(iClientH, cp, 1, dwMsgSize - 21);
return;
}

*Note: This was written by me. Special thanks goes out to Drajwer cos i used his lottery code for this. I havent tested the code yet. If its wrong, pls reply here. This was quite hard to do. Thx.*
- Tbone<br><a href="http://cyborg.namedecoder.com"><br><img src="http://cyborg.namedecoder.com/webimages ... ng"<br></a>
Drajwer
&lt;3 bd long time
Posts: 841
Joined: Fri Dec 10, 2004 3:24 pm

Post by Drajwer »

replace dropping to bAddItem B)
<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)
omar_omiez
Loyal fan
Posts: 235
Joined: Mon Jul 12, 2004 9:36 am

Post by omar_omiez »

show plas drajwer. i not sure what u mean. but even if i dont change, the code works right?
- Tbone<br><a href="http://cyborg.namedecoder.com"><br><img src="http://cyborg.namedecoder.com/webimages ... ng"<br></a>
Post Reply