[src] /change City

Codes already submitted by people of the forums.
Treax2
Loyal fan
Posts: 281
Joined: Fri Mar 04, 2005 5:05 pm
Location: Estonia
Contact:

Post by Treax2 »

ok it chnages ur city with 5 majestic

add to game.cpp

Code: Select all

}

  	if (memcmp(cp, "/changecity ", 12) == 0) {
  	AdminOrder_ChangeCity(iClientH);
  	return;	
  }
then again game.cpp

Code: Select all

void CGame::AdminOrder_ChangeCity(int iClientH)
{
	char cGizonTooLow[256], cGizonSuccesful[256];
	
 if (m_pClientList[iClientH] == NULL) return;
 if (m_pClientList[iClientH]->m_iGizonItemUpgradeLeft < 5){
 ZeroMemory(cGizonTooLow, sizeof(cGizonTooLow));
 wsprintf(cGizonTooLow,"You Dont Have 5 Majestic points");
 ShowClientMsg(iClientH, cGizonTooLow);
 }
 else{
  if (memcmp(m_pClientList[iClientH]->m_cLocation, "aresden",7) == 0 ) strcpy(m_pClientList[iClientH]->m_cLocation,"elvine");
 else if (memcmp(m_pClientList[iClientH]->m_cLocation, "elvine",6) == 0 ) strcpy(m_pClientList[iClientH]->m_cLocation,"aresden");
  ZeroMemory(cGizonSuccesful, sizeof(cGizonSuccesful));
 wsprintf(cGizonSuccesful, "City Change Succesfuled!");
 ShowClientMsg(iClientH, cGizonSuccesful);
 m_pClientList[iClientH]->m_iGizonItemUpgradeLeft -= 5;
 DeleteClient(iClientH, TRUE, TRUE);
 }
}
adn then to game.h

Code: Select all

// Treax's City Change Code
	void AdminOrder_ChangeCity(int iClientH);
SlammeR
Loyal fan
Posts: 219
Joined: Fri Nov 04, 2005 1:52 am
Location: Brazil

Post by SlammeR »

<3 Treax ^^
OWNED!<br><img src='http://img50.imageshack.us/img50/1386/p ... 3vsqn2.gif' border='0' alt='user posted image' /><br><br><img src="http://hbtop50.com/button.php?u=hbuonline" alt="Helbreath Top 50 - Keepin' it real." border="0" /><br><a href='http://www.hbuonline.net' target='_blank'>Helbreath United</a>
Treax2
Loyal fan
Posts: 281
Joined: Fri Mar 04, 2005 5:05 pm
Location: Estonia
Contact:

Post by Treax2 »

hmm when i went to bed then i thinked if u are traveler or civilan then HG crush? i think it crush but i am not sure ... so somebody can maybe test it and then say it ... then i can fix it , hmm ok i got idea ... ok iwhen i go to home i post updtaded version ...
Tafka12
&lt;3 bd long time
Posts: 772
Joined: Wed Dec 28, 2005 6:32 pm

Post by Tafka12 »

Treax2 wrote: hmm when i went to bed then i thinked if u are traveler or civilan then HG crush? i think it crush but i am not sure ... so somebody can maybe test it and then say it ... then i can fix it , hmm ok i got idea ... ok iwhen i go to home i post updtaded version ...
Travellers and civilians can't get Majestic pts... majestics come from max level.
<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' />
Drajwer
&lt;3 bd long time
Posts: 841
Joined: Fri Dec 10, 2004 3:24 pm

Post by Drajwer »

useless :) you select duty for ever and what when a ares full hero become elv ?

sux :)
<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)
Shetar
Member
Posts: 148
Joined: Sun Nov 30, 2003 12:57 am

Post by Shetar »

Drajwer wrote: useless :) you select duty for ever and what when a ares full hero become elv ?

sux :)
I might agree with your opinion but never convict something which you didn't think about. Fixing the hero is easy..
Helbreath II Project Manager & All round Developer. <br><i>(Don't worry, we're not dead)</i>
Tafka12
&lt;3 bd long time
Posts: 772
Joined: Wed Dec 28, 2005 6:32 pm

Post by Tafka12 »

5 majestic is not a prize for city change
i think 500 or smth EK is better?

Code: Select all

void CGame::AdminOrder_ChangeCity(int iClientH)
{
char cGizonTooLow[256], cGizonSuccesful[256];

if (m_pClientList[iClientH] == NULL) return;
if (m_pClientList[iClientH]->m_iCharacter-EK-Count < 500){
ZeroMemory(cGizonTooLow, sizeof(cGizonTooLow));
wsprintf(cGizonTooLow,"You Dont Have 500 EnemyKills");
ShowClientMsg(iClientH, cGizonTooLow);
}
else{
 if (memcmp(m_pClientList[iClientH]->m_cLocation, "aresden",7) == 0 ) strcpy(m_pClientList[iClientH]->m_cLocation,"elvine");
else if (memcmp(m_pClientList[iClientH]->m_cLocation, "elvine",6) == 0 ) strcpy(m_pClientList[iClientH]->m_cLocation,"aresden");
 ZeroMemory(cGizonSuccesful, sizeof(cGizonSuccesful));
wsprintf(cGizonSuccesful, "City Change Succesfuled!");
ShowClientMsg(iClientH, cGizonSuccesful);
m_pClientList[iClientH]->m_iCharacter-EK-Count -= 500;
DeleteClient(iClientH, TRUE, TRUE);
}
}
This is right then? :unsure:

And why not PlayerOrder_ChangeCity??
Admins must change players city for 5 gizons??? *Confused*
<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 »

but if u are palyer u dont ssee the code ... that dosent matter but u can chnage it if u realy want

TO Djawer so i think players like it more that they can have both full heros ... coz both hero armor have same ability(i think) then its different is only color and name ...
Windy
Member
Posts: 157
Joined: Tue Nov 18, 2003 8:31 am
Location: wishing I was somewhere else

Post by Windy »

Treax2 wrote: but if u are palyer u dont ssee the code ... that dosent matter but u can chnage it if u realy want

TO Djawer so i think players like it more that they can have both full heros ... coz both hero armor have same ability(i think) then its different is only color and name ...
well it doesnt matter what town u are as long as you are wearing the FULL set from one town, you cant mix and match hero sets from elvine to ares to get the +5dmg and the hit% bonus....unless u wanted to then u could go into the source and fix it so as long as its used in any combo it would give the bonus but I kinda like it the way it is....ppl need to have their own color of hero armor anyways
<span style='color:blue'>Coding with Evil Intentions....Evil at its Best....</span>
Treax2
Loyal fan
Posts: 281
Joined: Fri Mar 04, 2005 5:05 pm
Location: Estonia
Contact:

Post by Treax2 »

so dont whine ... if somebody need this code ... its officali released and u can chnage it howerver u want ... u can make a hero codes or so on ... and half is always better than nothing ...
diuuude
Outpost bitch
Posts: 592
Joined: Wed Dec 28, 2005 11:57 pm

Post by diuuude »

Don't worry Treax, your code will be usefull in many other way... Peoples are free to edit the code as they want, so they wouldn't complain if they weren't so noob.
<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 !
locobans
Outpost Junkie
Posts: 2264
Joined: Tue Jul 13, 2004 3:51 am
Location: Behind You
Contact:

Post by locobans »

diuuude wrote: Don't worry Treax, your code will be usefull in many other way... Peoples are free to edit the code as they want, so they wouldn't complain if they weren't so noob.
Exactly :)
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>
slawsoo
just visiting
Posts: 9
Joined: Wed Apr 19, 2006 5:32 pm

Post by slawsoo »

Whooooooooops ;P

D:\2.24b Sources\Game.cpp(10113) : error C2065: 'dwMsgSize' : undeclared identifier
D:\2.24b Sources\Game.cpp(10113) : error C2057: expected constant expression
D:\2.24b Sources\Game.cpp(10113) : error C2466: cannot allocate an array of constant size 0
D:\2.24b Sources\Game.cpp(10113) : error C2501: 'pData' : missing storage-class or type specifiers
D:\2.24b Sources\Game.cpp(10113) : error C2440: 'initializing' : cannot convert from 'const int' to 'int []'
There are no conversions to array types, although there are conversions to references or pointers to arrays
D:\2.24b Sources\Game.cpp(10115) : error C2143: syntax error : missing ';' before 'if'
D:\2.24b Sources\Game.cpp(10115) : error C2143: syntax error : missing ';' before '{'
D:\2.24b Sources\Game.cpp(10115) : error C2447: missing function header (old-style formal list?)
D:\2.24b Sources\Game.cpp(10132) : error C2501: 'cp' : missing storage-class or type specifiers
D:\2.24b Sources\Game.cpp(10132) : error C2440: 'initializing' : cannot convert from 'char *' to 'int'
This conversion requires a reinterpret_cast, a C-style cast or function-style cast
D:\2.24b Sources\Game.cpp(10134) : error C2143: syntax error : missing ';' before 'if'
D:\2.24b Sources\Game.cpp(10134) : error C2143: syntax error : missing ';' before '{'
D:\2.24b Sources\Game.cpp(10134) : error C2447: missing function header (old-style formal list?)
D:\2.24b Sources\Game.cpp(10147) : error C2501: 'wp' : missing storage-class or type specifiers
D:\2.24b Sources\Game.cpp(10147) : error C2440: 'initializing' : cannot convert from 'unsigned short *' to 'int'
This conversion requires a reinterpret_cast, a C-style cast or function-style cast
D:\2.24b Sources\Game.cpp(10148) : error C2501: 'wp' : missing storage-class or type specifiers
D:\2.24b Sources\Game.cpp(10148) : error C2040: 'wp' : 'int *' differs in levels of indirection from 'int'
D:\2.24b Sources\Game.cpp(10148) : error C2065: 'iClientH' : undeclared identifier
D:\2.24b Sources\Game.cpp(10148) : error C2440: 'initializing' : cannot convert from 'unsigned short' to 'int *'
Conversion from integral type to pointer type requires reinterpret_cast, C-style cast or function-style cast
D:\2.24b Sources\Game.cpp(10150) : error C2501: 'cp' : missing storage-class or type specifiers
D:\2.24b Sources\Game.cpp(10150) : error C2374: 'cp' : redefinition; multiple initialization
D:\2.24b Sources\Game.cpp(10132) : see declaration of 'cp'
D:\2.24b Sources\Game.cpp(10150) : error C2440: 'initializing' : cannot convert from 'char *' to 'int'
This conversion requires a reinterpret_cast, a C-style cast or function-style cast
D:\2.24b Sources\Game.cpp(10151) : error C2501: 'cp' : missing storage-class or type specifiers
D:\2.24b Sources\Game.cpp(10151) : error C2040: 'cp' : 'int *' differs in levels of indirection from 'int'
D:\2.24b Sources\Game.cpp(10151) : error C2065: 'cSendMode' : undeclared identifier
D:\2.24b Sources\Game.cpp(10151) : error C2440: 'initializing' : cannot convert from 'int' to 'int *'
Conversion from integral type to pointer type requires reinterpret_cast, C-style cast or function-style cast
D:\2.24b Sources\Game.cpp(10153) : error C2143: syntax error : missing ';' before 'if'
D:\2.24b Sources\Game.cpp(10153) : error C2143: syntax error : missing ';' before '{'
D:\2.24b Sources\Game.cpp(10153) : error C2447: missing function header (old-style formal list?)
D:\2.24b Sources\Game.cpp(10235) : error C2143: syntax error : missing ';' before 'else'
D:\2.24b Sources\Game.cpp(10235) : error C2143: syntax error : missing ';' before '{'
D:\2.24b Sources\Game.cpp(10235) : error C2447: missing function header (old-style formal list?)
D:\2.24b Sources\Game.cpp(10309) : error C2143: syntax error : missing ';' before '}'
D:\2.24b Sources\Game.cpp(10309) : error C2143: syntax error : missing ';' before '}'
D:\2.24b Sources\Game.cpp(10309) : error C2143: syntax error : missing ';' before '}'
D:\2.24b Sources\Game.cpp(10313) : error C2143: syntax error : missing ';' before '{'
D:\2.24b Sources\Game.cpp(10313) : error C2447: missing function header (old-style formal list?)
Map.cpp
Skipping... (no relevant changes detected)
wmain.cpp
Error executing cl.exe.

HGserver.exe - 37 error(s), 8 warning(s)

:blink:
<a href='http://www.helbreath.org' target='_blank'><img src='http://www.helbreath.org/banner.gif' border='0' alt='user posted image' /></a><br>
Maxis
Regular
Posts: 51
Joined: Tue Apr 04, 2006 4:47 pm

Post by Maxis »

omg Learn C++ :))) xD
Jensen
Loyal fan
Posts: 300
Joined: Tue Aug 02, 2005 7:40 am
Location: Illinois, USA
Contact:

Post by Jensen »

lol, definatly a curley brace or () error, make sure the there is one open one for every closed one and make sure the reverse is true, and never more closed then open...




-><-
Post Reply