[req] /upgradesword

Submit your code requests, and if you are good at coding come help others with their requests.
Post Reply
Tafka12
<3 bd long time
Posts: 772
Joined: Wed Dec 28, 2005 6:32 pm

Post by Tafka12 »

Well upgrade sword is like majestic, only thing is that you need to write command /upgradesword not drag it to upgrade box, i think it is better and more useful?
At least i'd like it better. I think there must be all items made in cfg like Sword+2 Sword+4 Sword+6 to +15 and then it reads them?
if anyone can release it here, thank you
<img src='http://www.hot.ee/carvanho/taavi.png' border='0' alt='user posted image' /><br><br><img src='http://www.hot.ee/carvanho/Elvine.png' border='0' alt='user posted image' /><br><img src='http://www.hot.ee/carvanho/LieroX.png' border='0' alt='user posted image' /><br><img src='http://www.hot.ee/carvanho/Football.png' border='0' alt='user posted image' />
Dshaked
&lt;3 bd long time
Posts: 747
Joined: Tue Oct 11, 2005 6:40 pm

Post by Dshaked »

Tafka, are you sure all likes it? Maybe its harder, cause people dont knows about that commands, and says no majestetics? cya etc :D :D :D :D :D :P
Old Helbreath Nemesis Player<br><img src='http://img232.imageshack.us/img232/9784/dshakedqc5.jpg' border='0' alt='user posted image' /><br><img src='http://img232.imageshack.us/img232/6475 ... barqj0.jpg' border='0' alt='user posted image' /><br><a href='index.php?showtopic=7107&hl=' target='_blank'>MainServer Hexing Tutorial</a><br><a href='index.php?showtopic=7663&hl=x-mas' target='_blank'>My Files</a>
Tafka12
&lt;3 bd long time
Posts: 772
Joined: Wed Dec 28, 2005 6:32 pm

Post by Tafka12 »

I can put info about it to homesite and noticement? :rolleyes:
<img src='http://www.hot.ee/carvanho/taavi.png' border='0' alt='user posted image' /><br><br><img src='http://www.hot.ee/carvanho/Elvine.png' border='0' alt='user posted image' /><br><img src='http://www.hot.ee/carvanho/LieroX.png' border='0' alt='user posted image' /><br><img src='http://www.hot.ee/carvanho/Football.png' border='0' alt='user posted image' />
Treax2
Loyal fan
Posts: 281
Joined: Fri Mar 04, 2005 5:05 pm
Location: Estonia
Contact:

Post by Treax2 »

This thing put into game.cpp
Code is Edited // 05.04.2006

Code: Select all


void CGame::PlayerOrder_UpgradeSword(int iClientH) {
{
int i;
char buff [100];
int iItemID;
char cItemName[20];
int ipoints;
if (m_pClientList[iClientH] == NULL) return;
ipoints=0;
for (i = 0; i < DEF_MAXITEMS; i++) {
 if ((m_pClientList[iClientH]->m_pItemList[i] != NULL) && (memcmp(m_pClientList[iClientH]->m_pItemList[i]->m_cName, "ImperialHammer", 9) == 0)) {
  ZeroMemory(cItemName,sizeof(cItemName));
  memcpy(cItemName,m_pClientList[iClientH]->m_pItemList[i]->m_cName,strlen(m_pClientList[iClientH]->m_pItemList[i]->m_cName));
  wsprintf(buff,"(!) %s depletes %s",m_pClientList[iClientH]->m_cCharName,cItemName);
  ipoints = m_pClientList[iClientH]->m_iGizonItemUpgradeLeft;
  PutLogList(buff);
  if (ipoints < 4) return;           
  if ((memcmp(cItemName,"ImperialHammer",16) == 0) && (ipoints >= 4) && (ipoints - 4 >= 0)) {
   ItemDepleteHandler(iClientH, i, TRUE); 
   ipoints -= 4;  
   DropItemID(iClientH,892,m_pClientList[iClientH]->m_sX,m_pClientList[iClientH]->m_sY); 
   m_pClientList[iClientH]->m_iGizonItemUpgradeLeft = ipoints; 
   wsprintf(buff,"Majestic upgrade points decreased by 4 (Majestic %d)", m_pClientList[iClientH]->m_iGizonItemUpgradeLeft);
   ShowRepNotice(iClientH,buff); 
   return;
   }
  if ((memcmp(cItemName,"ImperialHammer+2",16) == 0) && (ipoints >= 8) && (ipoints - 8 >= 0)) { 
   ItemDepleteHandler(iClientH, i, TRUE);
   ipoints -= 8;
   DropItemID(iClientH,893,m_pClientList[iClientH]->m_sX,m_pClientList[iClientH]->m_sY);
   m_pClientList[iClientH]->m_iGizonItemUpgradeLeft = ipoints;
   wsprintf(buff,"Majestic upgrade points decreased by 8 (Majestic %d)", m_pClientList[iClientH]->m_iGizonItemUpgradeLeft);
   ShowRepNotice(iClientH,buff);
   return;
  }
  if ((memcmp(cItemName,"ImperialHammer+4",16) == 0) && (ipoints >= 12) && (ipoints - 12 >= 0)) { 
   ItemDepleteHandler(iClientH, i, TRUE);
   ipoints -= 12;
   DropItemID(iClientH,894,m_pClientList[iClientH]->m_sX,m_pClientList[iClientH]->m_sY);
   m_pClientList[iClientH]->m_iGizonItemUpgradeLeft = ipoints;
   wsprintf(buff,"Majestic upgrade points decreased by 12 (Majestic %d)", m_pClientList[iClientH]->m_iGizonItemUpgradeLeft);
   ShowRepNotice(iClientH,buff);
   return;
   }
  if ((memcmp(cItemName,"ImperialHammer+6",16) == 0) && (ipoints >= 16) && (ipoints - 16 >= 0)) { 
   ItemDepleteHandler(iClientH, i, TRUE);
   ipoints -= 16;
   DropItemID(iClientH,895,m_pClientList[iClientH]->m_sX,m_pClientList[iClientH]->m_sY);
   m_pClientList[iClientH]->m_iGizonItemUpgradeLeft = ipoints;
   wsprintf(buff,"Majestic upgrade points decreased by 16 (Majestic %d)", m_pClientList[iClientH]->m_iGizonItemUpgradeLeft);
   ShowRepNotice(iClientH,buff);
   return;
   }
  if ((memcmp(cItemName,"ImperialHammer+8",20) == 0) && (ipoints >= 20) && (ipoints - 20 >= 0)) { 
   ItemDepleteHandler(iClientH, i, TRUE);
   ipoints -= 20;
   DropItemID(iClientH,896,m_pClientList[iClientH]->m_sX,m_pClientList[iClientH]->m_sY);
   m_pClientList[iClientH]->m_iGizonItemUpgradeLeft = ipoints;
   wsprintf(buff,"Majestic upgrade points decreased by 20 (Majestic %d)", m_pClientList[iClientH]->m_iRating);
   ShowRepNotice(iClientH,buff);
   return;
   }
  if ((memcmp(cItemName,"ImperialHammera+10",18) == 0) && (ipoints >= 24) && (ipoints - 24 >= 0)) { 
   ItemDepleteHandler(iClientH, i, TRUE);
   ipoints -= 24;
   DropItemID(iClientH,897,m_pClientList[iClientH]->m_sX,m_pClientList[iClientH]->m_sY);
   m_pClientList[iClientH]->m_iGizonItemUpgradeLeft = ipoints;
   wsprintf(buff,"Majestic upgrade points decreased by 24 (Majestic %d)", m_pClientList[iClientH]->m_iGizonItemUpgradeLeft);
   ShowRepNotice(iClientH,buff);
   return;
   }
  if ((memcmp(cItemName,"ImperialHammera+12",18) == 0) && (ipoints >= 28) && (ipoints - 28 >= 0)) { 
   ItemDepleteHandler(iClientH, i, TRUE);
   ipoints -= 28;
   DropItemID(iClientH,898,m_pClientList[iClientH]->m_sX,m_pClientList[iClientH]->m_sY);
   m_pClientList[iClientH]->m_iGizonItemUpgradeLeft = ipoints;
   wsprintf(buff," Majestic upgrade points decreased by 28 (Majestic %d)", m_pClientList[iClientH]->m_iGizonItemUpgradeLeft);
   ShowRepNotice(iClientH,buff);
   return;
  }
  if ((memcmp(cItemName,"ImperialHammera+14",18) == 0) && (ipoints >= 30) && (ipoints - 30 >= 0)) { 
   ItemDepleteHandler(iClientH, i, TRUE);
   ipoints -= 30;
   DropItemID(iClientH,899,m_pClientList[iClientH]->m_sX,m_pClientList[iClientH]->m_sY);
   m_pClientList[iClientH]->m_iGizonItemUpgradeLeft = ipoints;
   wsprintf(buff,"Majestic upgrade points decreased by 30 (Majestic %d)", m_pClientList[iClientH]->m_iGizonItemUpgradeLeft);
   ShowRepNotice(iClientH,buff);
   return;
   }
 }
}
}
}



void CGame::DropItemID(int iClientH,int iItemID,int iX, int iY) {
 class CItem * pItem;
 pItem = new class CItem;
 if (_bInitItemAttr(pItem, iItemID) == FALSE) {
   delete pItem;
   } 
   else {

     m_pMapList[ m_pClientList[iClientH]->m_cMapIndex ]->bSetItem(iX, iY, pItem);
     SendEventToNearClient_TypeB(MSGID_EVENT_COMMON, DEF_COMMONTYPE_ITEMDROP, m_pClientList[iClientH]->m_cMapIndex,iX, iY, pItem->m_sSprite, pItem->m_sSpriteFrame, pItem->m_cItemColor); // v1.4
   }
}

void CGame::ShowRepNotice(int iClientH,char *pMsg)
{
SendNotifyMsg(NULL, iClientH, DEF_NOTIFY_NOTICEMSG, NULL, NULL, NULL, pMsg);
}
and this put again in game.cpp

Code: Select all

if (memcmp(cp, "/UpgradeSword ", 13) == 0) {
  	PlayerOrder_UpgradeSword(int iClientH);
  	return;	
  }
and this thing put into game.h

Code: Select all

void PlayerOrder_UpgradeSword(int iClientH);
Edited: If the Code Didnt work ... try it now again ...
Tafka12
&lt;3 bd long time
Posts: 772
Joined: Wed Dec 28, 2005 6:32 pm

Post by Tafka12 »

This was for sword for example, if i want to put sword and staff i got to copy the same code again change PlayerOrder_UpgradeHammer in places and do it all up again or easier way too?
Thank you anyway :)
ole mees :lol:

suht palju errore tli muide.
<img src='http://www.hot.ee/carvanho/taavi.png' border='0' alt='user posted image' /><br><br><img src='http://www.hot.ee/carvanho/Elvine.png' border='0' alt='user posted image' /><br><img src='http://www.hot.ee/carvanho/LieroX.png' border='0' alt='user posted image' /><br><img src='http://www.hot.ee/carvanho/Football.png' border='0' alt='user posted image' />
Treax2
Loyal fan
Posts: 281
Joined: Fri Mar 04, 2005 5:05 pm
Location: Estonia
Contact:

Post by Treax2 »

usun ei viicinud testida ma natuke muutsin akh seda ... kontrolli yle

yes u have copy it all the time xD
Tafka12
&lt;3 bd long time
Posts: 772
Joined: Wed Dec 28, 2005 6:32 pm

Post by Tafka12 »

Didn't even look all those.. had about 10 or smth
<img src='http://www.hot.ee/carvanho/taavi.png' border='0' alt='user posted image' /><br><br><img src='http://www.hot.ee/carvanho/Elvine.png' border='0' alt='user posted image' /><br><img src='http://www.hot.ee/carvanho/LieroX.png' border='0' alt='user posted image' /><br><img src='http://www.hot.ee/carvanho/Football.png' border='0' alt='user posted image' />
Treax2
Loyal fan
Posts: 281
Joined: Fri Mar 04, 2005 5:05 pm
Location: Estonia
Contact:

Post by Treax2 »

try that cpde now again to copy and i u get errors copy it to hre ...
Drajwer
&lt;3 bd long time
Posts: 841
Joined: Fri Dec 10, 2004 3:24 pm

Post by Drajwer »

i did that code long time ago.. better you should use majestic dialog.
<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)
RageIlluminati
Outpost bitch
Posts: 559
Joined: Wed Mar 30, 2005 6:45 am

Post by RageIlluminati »

why the hell add more new commands.. why somebody just does not fix the majestics and DK items upgrading like it was originally? :huh:
<img src='http://helbreath.pri.ee/userbars/hbest-gamemaster2.jpg' border='0' alt='user posted image' /> <img src='http://helbreath.pri.ee/userbars/hbsoccer-owner.jpg' border='0' alt='user posted image' /> <img src='http://helbreath.pri.ee/userbars/scorpa-rider.jpg' border='0' alt='user posted image' /> <img src='http://helbreath.pri.ee/userbars/logout-master.jpg' border='0' alt='user posted image' /> <br>.<br>................................Ego sum Rage, flagellum Dei!<br><br>The problem with America is stupidity. I'm not saying there should be a capital punishment for stupidity, but why don't we just take the safety labels off of everything and let the problem solve itself? (bash.org)
kahn
Loyal fan
Posts: 203
Joined: Thu Oct 07, 2004 1:20 am

Post by kahn »

i thought majesticks were fixed ?
Drajwer
&lt;3 bd long time
Posts: 841
Joined: Fri Dec 10, 2004 3:24 pm

Post by Drajwer »

when i use that code, alot of ppl asked me how upgrade sword. i was mad and remove it. its very annoying :) in 3.0 hg src there is majestics. (not sure about stats change)
<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)
Aragorn
Regular
Posts: 81
Joined: Fri Mar 03, 2006 12:02 pm

Post by Aragorn »

Drajwer wrote: when i use that code, alot of ppl asked me how upgrade sword. i was mad and remove it. its very annoying :) in 3.0 hg src there is majestics. (not sure about stats change)
lol well if they learned then they could teach others in server to do it. Shouldn't let small things get you mad :lol:
The fear of making permanent commitments can change the mutual love of husband and wife into two loves of self-two loves existing side by side, until they end in separation.
Treax2
Loyal fan
Posts: 281
Joined: Fri Mar 04, 2005 5:05 pm
Location: Estonia
Contact:

Post by Treax2 »

but in original all items dont stay the upgrade box ...
Tafka12
&lt;3 bd long time
Posts: 772
Joined: Wed Dec 28, 2005 6:32 pm

Post by Tafka12 »

Yea like Hammers..
<img src='http://www.hot.ee/carvanho/taavi.png' border='0' alt='user posted image' /><br><br><img src='http://www.hot.ee/carvanho/Elvine.png' border='0' alt='user posted image' /><br><img src='http://www.hot.ee/carvanho/LieroX.png' border='0' alt='user posted image' /><br><img src='http://www.hot.ee/carvanho/Football.png' border='0' alt='user posted image' />
Post Reply