Well, it's not a problem with playerenters, since I'm not using that. Most of the scripts aren't entirely mine, but rather old maloria script, but I edited them.
The Heart display script:
PHP Code:
function onCreated() {
showimg(200, "mal_heartanim.gif", (player.x + 0.5)%64, (player.y - 2)%64);
setTimer(0.05);
}
function onTimeout() {
findimg(200).x = player.x + 0.5;
findimg(200).y = player.y - 2;
if (player.attr[8] == NULL) {
temp.healthcheck = 0;
findimg(100).x = player.x + 0.5;
findimg(100).y = player.y - 2;
temp.healthcheck = player.attr[4] * 100;
if (temp.healthcheck in |96, 100|) findimg(200).red = 0.1;
else if (temp.healthcheck in |91, 95|) findimg(200).red = 0.2;
else if (temp.healthcheck in |86, 90|) findimg(200).red = 0.3;
else if (temp.healthcheck in |81, 85|) findimg(200).red = 0.4;
else if (temp.healthcheck in |76, 80|) findimg(200).red = 0.5;
else if (temp.healthcheck in |71, 75|) findimg(200).red = 0.6;
else if (temp.healthcheck in |66, 70|) findimg(200).red = 0.7;
else if (temp.healthcheck in |61, 65|) findimg(200).red = 0.8;
else if (temp.healthcheck in |56, 60|) findimg(200).red = 0.9;
else if (temp.healthcheck in |51, 55|) findimg(200).red = 1;
else if (temp.healthcheck in |46, 50|) findimg(200).green = 0.9;
else if (temp.healthcheck in |41, 45|) findimg(200).green = 0.8;
else if (temp.healthcheck in |36, 40|) findimg(200).green = 0.7;
else if (temp.healthcheck in |31, 35|) findimg(200).green = 0.6;
else if (temp.healthcheck in |26, 30|) findimg(200).green = 0.5;
else if (temp.healthcheck in |21, 25|) findimg(200).green = 0.4;
else if (temp.healthcheck in |16, 20|) findimg(200).green = 0.3;
else if (temp.healthcheck in |11, 15|) findimg(200).green = 0.2;
else if (temp.healthcheck in |6, 10|) findimg(200).green = 0.1;
else if (temp.healthcheck in |1, 5|) findimg(200).green = 0;
}
else if (player.attr[8] == "black") {
with (findimg(200)) {
mode = red = green = blue = 0;
}
}
else if (player.attr[8] == "white") {
with (findimg(200)) {
mode = red = green = blue = 1;
}
}
setTimer(0.05);
}
player.attr[4] is hp/maxhp (ignore the part with player.attr[8], I'm probably gonna remove it)
Here's the nickname display script:
PHP Code:
function onCreated() onTimeOut();
function onTimeOut() {
if (!clientr.stealth) {
temp.nick = player.attr[10].tokenize("(");
temp.width1 = (temp.nick[0].length()*6)/16;
temp.width2 = (player.attr[11].length()*6)/16;
showtext(200, player.x+1.5-(temp.width1/2), player.y+3, "Verdana", "b", temp.nick[0]);
changeimgcolors(200, 1, 1, 1, .85);
changeimgzoom(200, .6);
showtext(201, player.x+1.5-(temp.width2/2), player.y+3.75, "Verdana", "b", player.attr[11]);
changeimgcolors(201, 1, 1, 1, .85);
changeimgzoom(201, .6);
}
else hideimgs(200, 201);
setTimer(0.05);
}
player.attr[10] is the players nickname
And then this is the chat display script. (It's quite messy, the guy who originally made it wasn't the best scripter)
PHP Code:
function onPlayerEnters() Init();
function onTimeOut() Init();
function Init() {
if (player.chat.length() > 0) {
if(this.mode != 1)
this.mode=1;
if(this.char != player.attr[16].length()) {
this.char = player.attr[16].length();
hideimgs(200,400);
}
if(this.text != player.attr[16] || this.chatx != (player.x) ||this.chaty != (player.y+2) || this.chatz != (player.z+2.5)) {
this.text = player.attr[16];
temp.tokens = wraptext(56,NULL,player.chat);
this.chatx = player.x;
this.chaty = player.y+2;
this.chatz = player.z+2.5;
for(i=0;i<temp.tokens.size();i++) {
temp.width = (temp.tokens[i].length()*4)/16;
showtext2(200+i,this.chatx-(temp.width/2),this.chaty,this.chatz+(temp.tokens.size()-1)-i,"Comic Sans","b",temp.tokens[i]);
//Temporary color
changeimgcolors(200+i,1,1,1,1);
changeimgzoom(200+i,client.textsize);
findImg(200+i).layer++;
showtext2(300+i,this.chatx+.2-(temp.width/2),this.chaty+.2,this.chatz+(temp.tokens.size()-1)-i,"Comic Sans","b",temp.tokens[i]);
changeimgcolors(300+i,0,0,0,.5);
changeimgzoom(300+i,client.textsize);
}
}
}
else {
if(this.mode == 1) {
this.mode = 0;
hideimgs(200,400);
}
}
setTimer(0.05);
}
I do, however, use onPlayerEnters() in the main system script. I do something like this:
PHP Code:
player.attr[7] = "";
player.attr[7] = "ganiname.gani";
To reset the gani script.