Thread: 200 Mp
View Single Post
  #21  
Old 07-17-2001, 11:40 PM
T-Squad T-Squad is offline
Banned
T-Squad's Avatar
Join Date: Mar 2001
Location: United States of America
Posts: 1,733
T-Squad is on a distinguished road
Re: 200 MP

Quote:
Originally posted by SkooL
I am trying to create an NPCw to make it seem as though the player has 200 MP. It will be an item the player may purchase. Anyways, I was wondering if anyone could figure out why this doesn't work...
NPC Code:
if (created) {
this.playermagic=playermp;
}
if (playerenters) {
toweapons -200MP;
}
if (this.playermagic>playermp) {
playermp+=int(this.playermagic-playermp/2);
this.playermagic=playermp;
}

try somethign like

if (playerenters) {
toweapons -200MP;
}
while (this.magic != playermp) {
if (this.magic>playermp) {
playermp = int((this.magic-playermp)/2+playermp);
}else{
this.magic = playermp;
}
}
Reply With Quote