[reg] Code plz

Submit your code requests, and if you are good at coding come help others with their requests.
Post Reply
LasTerrenas
just visiting
Posts: 4
Joined: Sat Aug 05, 2006 4:03 am

Post by LasTerrenas »

can someone post me here the code of getting items with a command? but not giving maj points..etc.. for example that you type /gethyperslayer with the cost of "xxx" amount of eks... can someone post me the code plsssssssssssssssssssssssssssssssssssssssssssssssssssssss
Jensen
Loyal fan
Posts: 300
Joined: Tue Aug 02, 2005 7:40 am
Location: Illinois, USA
Contact:

Post by Jensen »

try looking first, there are about 30 different posts that are /almost/ exactly like this command
-><-
Namesis
Regular
Posts: 88
Joined: Fri Mar 03, 2006 12:53 pm

Post by Namesis »

i didnt find any :blink:
Treax2
Loyal fan
Posts: 281
Joined: Fri Mar 04, 2005 5:05 pm
Location: Estonia
Contact:

Post by Treax2 »

if u dont know even how edit majestic to ek then u dont need it ...

Code: Select all

//--- Coded by Daryl (Buy a HyperBlade for 1000 Enemy Kills)
void CGame::GetHyperBlade(int iClientH)
{
//Defines
class CItem * pItem;
int iItemID, iEraseReq;
//------- if player is not found then exit void
if(m_pClientList[iClientH] == NULL) return;
//---------- If user is under lvl 180 then exit void
if(m_pClientList[iClientH]->m_iLevel < 180) return;
pItem = new class CItem;
iItemID=-1;
// Enter the Item ID Number (Found in your Item.cfg's)
iItemID=HyperBlade ID;
//-- Checks to see if player has required points (If player has 1000 or more Enemy Kills then run Command)
if (m_pClientList[iClientH]->m_iEnemyKills > 999) {  
 if (iItemID != -1) //if any error occures, dont crash character
 {
  //---------- Gives the player the HyperBlade-----------------
   _bInitItemAttr(pItem, iItemID);
   //-------- Binds the HyperBlade to the player
   pItem->m_sTouchEffectType = DEF_ITET_UNIQUE_OWNER;
   pItem->m_sTouchEffectValue1 = m_pClientList[iClientH]->m_sCharIDnum1;
   pItem->m_sTouchEffectValue2 = m_pClientList[iClientH]->m_sCharIDnum2;
   pItem->m_sTouchEffectValue3 = m_pClientList[iClientH]->m_sCharIDnum3;
   _bAddClientItemList(iClientH, pItem, &iEraseReq);
   //-------- Notifys the player the Item he has recived
   SendItemNotifyMsg(iClientH, DEF_NOTIFY_ITEMOBTAINED, pItem, NULL);
   
 }
 //--- Deletes Enemy Kills Points From
m_pClientList[iClientH]->m_iGizonItemUpgradeLeft -= 1000;
//------- Updates Client with current Majestic points
SendNotifyMsg(NULL, iClientH, DEF_NOTIFY_ENEMYKILLS, m_pClientList[iClientH]->m_iEnemyKills, NULL, NULL, NULL);
}

}
Post Reply