Heal for Rev 7

Status
Not open for further replies.
Newbie Spellweaver
Joined
Apr 22, 2008
Messages
40
Reaction score
0
This is my first release so I might have done something wrong.
Anyways tell me if you have any troubles.

First, download the XML file:



And place it in your skills folder.
Yes, it will replace the other one.

THIS DOES ATTACK THE UNDEAD.
(Tested on Krytical's Repack v9.2)

Now near other similar codes, put:
Code:
	else if(skillid == 2301002){ // Heal
		float healrate = Skills::skills[2301002][player->skills->getSkillLevel(2301002)].x;
	        int healhp = player->getMHP()*(healrate/100);
		player->setHP(player->getHP() + healhp);
	}
And there you go.
You don't need any of that other "end" coding because this isn't a buff.

Here's the "party" code.
This will cause all users (?) in the map to get healed.
Code:
else if(skillid == 2301002){ // Heal
		float healrate = Skills::skills[2301002][player->skills->getSkillLevel(2301002)].x;
		int healhp = player->getMHP()*(healrate/100);
		for (unsigned int i=0; i<Maps::info[player->getMap()].Players.size(); i++){
			Player *curplayer = Maps::info[player->getMap()].Players[i];
			curplayer->setHP(curplayer->getHP() + healhp);
		}
	}
 
Last edited:
Re: [Release] Heal for Rev 7

Can u uplod the xml onto sendspace or mediafire? Please? Sorry for askin the noob question everybody ask's....
 
Re: [Release] Heal for Rev 7

Code:
.\Skills.cpp(569) : error C2065: 'healhp' : undeclared identifier
.\Skills.cpp(573) : error C2065: 'healhp' : undeclared identifier
Only two errors i get..lol
 
Re: [Release] Heal for Rev 7

Code:
.\Skills.cpp(569) : error C2065: 'healhp' : undeclared identifier
.\Skills.cpp(573) : error C2065: 'healhp' : undeclared identifier
Only two errors i get..lol
Oh whoops.
While I was typing, I re-edited the code since there was a bunch of unecessary stuff.
One sec.

EDIT:
Here try this:
Code:
	else if(skillid == 2301002){ // Heal
		float healrate = Skills::skills[2301002][player->skills->getSkillLevel(2301002)].x;
	        int healhp = player->getMHP()*(healrate/100);
		if((player->getHP() + healhp) > player->getMHP()){
			player->setHP(player->getMHP());
		}
		else {
			player->setHP(player->getHP() + healhp);
		}
	}

Wow I can't believe I missed that one line.
That ONE line decides the hp recovery...

btw, you will get a warning for converting 'float' to 'int' in the first code.
Don't worry about that.
 
Re: [Release] Heal for Rev 7

:p k thanks. and thanks for the info everyone. Just everyone else said they didnt release cause it didnt attack undead. O.o
 
Re: [Release] Heal for Rev 7

btw This was tested on Krytical's Repack v9.2
Since that repack was based on TitanMS Rev 7, I'm assuming it will attack the undead for TitanMS Rev 7.
 
Re: [Release] Heal for Rev 7

Thanks compiles fine, gonna test it out now XD

~Edit: Heals just fine, testing mob skills now
~Edit2: Everything works perfect. FINE RELEASE =D
 
Re: [Release] Heal for Rev 7

>.> Is there anything special im sopossed to do with the xml? When i d/l it from mediafire i just get a pop up wit the data in there...
 
Re: [Release] Heal for Rev 7

Since this isn't an attacking skill, how would you go about converting it into a "GM" skill (I did that for sharp eyes, and haste, etc... till Parties are working).
 
Re: [Release] Heal for Rev 7

Since this isn't an attacking skill, how would you go about converting it into a "GM" skill (I did that for sharp eyes, and haste, etc... till Parties are working).
Try this:
Code:
else if(skillid == 2301002){ // Heal
		float healrate = Skills::skills[2301002][player->skills->getSkillLevel(2301002)].x;
		int healhp = player->getMHP()*(healrate/100);
		for (unsigned int i=0; i<Maps::info[player->getMap()].Players.size(); i++){
			Player *curplayer = Maps::info[player->getMap()].Players[i];
			curplayer->setHP(curplayer->getHP() + healhp);
		}
	}
Untested atm.
Thanks to doyos (I think) for the GM Heal + Dispel code.
 
Status
Not open for further replies.
Back