Thread: Prevent hurting
View Single Post
  #16  
Old 08-28-2001, 03:26 AM
LiquidIce00 LiquidIce00 is offline
RadioActive Monkeeh
LiquidIce00's Avatar
Join Date: Apr 2001
Location: dirty south
Posts: 2,112
LiquidIce00 is on a distinguished road
Send a message via ICQ to LiquidIce00 Send a message via AIM to LiquidIce00 Send a message via Yahoo to LiquidIce00
if youre going to make armor then all you simply have to do is check to see if the player got hurt . then you of course need to know his hearts before he got hurt and you would need to compare like if hes got armor it doesnt hurt
here i didnt test this but im just like giving a base

NPC Code:


if (!isweapon&&playerenters&&!hasweapon(-armor)) { toweapons -armor; setstring armor,100;}

if (playerhurt) {
this.armorcheck=strtofloat(#s(armor));
if (this.armorcheck>0) {
playerhearts+=.5;
this.armorcheck=abs(this.armorcheck-5);
setstring armor,#s(this.armorcheck);
}
}



considering that baddies do .5 dmg else u have to set string of the current ammount of the player health then check it over or whatever..
okay bye
__________________
LiquidIce *Owner* (UnholyNation)
-UN Website
http://www.unholynation.com
-UN Forum
http://forums.unholynation.com
-
-the thinker
-

-
onwall2 for nonp2p (i suck at onwall)
Reply With Quote