Contribution

Submit your code requests, and if you are good at coding come help others with their requests.
Post Reply
Lukas965
noob
Posts: 28
Joined: Tue Mar 14, 2006 3:09 pm

Post by Lukas965 »

Hello:)

Give me the code sources..i want command /contribution for all players. Player write this command and he's give 100 contribution. Who's give me this code ? please:( FOR ALL PLAYERS !!!
Tafka12
<3 bd long time
Posts: 772
Joined: Wed Dec 28, 2005 6:32 pm

Post by Tafka12 »

You ask too much.
Simply put contribution PHP...
<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' />
Pener
Member
Posts: 110
Joined: Fri Feb 27, 2004 3:57 pm
Location: Czech Republic

Post by Pener »

game.cpp

Code: Select all

  if (memcmp(cp, "/contributions", 14) == 0) {
  	PlayerOrder_GiveContri(iClientH);
  	return;

  }

Code: Select all

void CGame::PlayerOrder_GiveContri(int iClientH) {
{
int i;
char buff [100];
char cItemName[20];
int ipoints;
if (m_pClientList[iClientH] == NULL) return;
  ipoints = m_pClientList[iClientH]->m_iContribution;
  PutLogList(buff);
  if (ipoints > 0) return;
   m_pClientList[iClientH]->m_iContribution = 2000; 
   wsprintf(buff,"Your Contribution count is 2000, Please Relog!");
   ShowRepNotice(iClientH,buff); 
   return;
   }
}

game.h

Code: Select all

void PlayerOrder_GiveContri(int iClientH);
<img src='http://i19.photobucket.com/albums/b153/s00pr/Pener.jpg' border='0' alt='user posted image' /><br><img src='http://i19.photobucket.com/albums/b153/ ... anner3.jpg' border='0' alt='user posted image' />
Drajwer
&lt;3 bd long time
Posts: 841
Joined: Fri Dec 10, 2004 3:24 pm

Post by Drajwer »

can be shorter:

Code: Select all

      if (memcmp (cp, "/contribution", 13) == 0)
	{
   m_pClientList[iClientH]->m_iContribution = 100;
   SendNotifyMsg (NULL, iClientH, DEF_NOTIFY_QUESTREWARD, 4, 1, 1,
    "                     ",
    m_pClientList[iClientH]->m_iContribution);
   return;
	}
w/o relog.
<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)
diuuude
Outpost bitch
Posts: 592
Joined: Wed Dec 28, 2005 11:57 pm

Post by diuuude »

Thank you Drajwer, nice tidy code :)


Easy to use and noob friendly... great work ! Feel free to add this code in source submit forum ;)

*edit* Changed it to do not set cont to 100 anymore but to increase cont by 100...
if (memcmp (cp, "/contribution", 13) == 0)
{
  m_pClientList[iClientH]->m_iContribution += 100;
  SendNotifyMsg (NULL, iClientH, DEF_NOTIFY_QUESTREWARD, 4, 1, 1,"", m_pClientList[iClientH]->m_iContribution);
  return;
}
<a href='http://www.technohell.net' target='_blank'><b><span style='color:red'>>>> Helbreath Ressources Website Here <<<</span></b></a><br>C++ Sources, Tools, Server Files, Help on Forum, C++ Snippets, Toplist... Updated often, come visit us !
Tafka12
&lt;3 bd long time
Posts: 772
Joined: Wed Dec 28, 2005 6:32 pm

Post by Tafka12 »

Srry im not the best in sources here, where to put that code ?
<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' />
diuuude
Outpost bitch
Posts: 592
Joined: Wed Dec 28, 2005 11:57 pm

Post by diuuude »

i don't remember the exact function name but look for any other / command...

like /summon or /who or /whatever and just add it below :)
<a href='http://www.technohell.net' target='_blank'><b><span style='color:red'>>>> Helbreath Ressources Website Here <<<</span></b></a><br>C++ Sources, Tools, Server Files, Help on Forum, C++ Snippets, Toplist... Updated often, come visit us !
Tafka12
&lt;3 bd long time
Posts: 772
Joined: Wed Dec 28, 2005 6:32 pm

Post by Tafka12 »

OOh yees it worked :P ty nice code
<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