Quote:
|
Originally Posted by Stefan
There is e.g. (Graal4.exe -listscriptfunctions):
player.pmswaiting()
player.isguildpm()
player.ismasspm()
player.isadmin
|
okay, so this would be like players[i].pmswaiting()? (I'm guessing)
Quote:
|
You can overwrite the chat text of all players.
|
You make a point. I didn't really want to overwrite the chat text of all players, but override the chat text of particular players. I see how I can do that now I'm just being stupid, sorry.
Quote:
|
Shadow for showtext could be added yes, although it is more or less the same like adding two showimgs
|
Not in essence.
PHP Code:
function drawNick(obj) {
temp.objwidth = (obj in players)?2+0.5:obj.width+0.5;
temp.objheight = (obj in players)?2+1:obj.height+1;
temp.screentestx = screenx(obj.x,obj.y) in |0-16*temp.objwidth,screenwidth|;
temp.screentesty = screeny(obj.x,obj.y) in |0-16*temp.objheight,screenheight|;
temp.screentest = temp.screentestx && temp.screentesty;
if ((obj.nick || obj in players) && temp.screentest && obj.attr[10]&4 != 0) {
temp.c1 = getAlignmentColor(obj.ap);
temp.c2 = getAlignmentShadow(obj.ap);
//foreground
if ($pref::graal::limitnicknames)
temp.nick = obj.nick.substring(0,$pref::graal::nicknamelimit);
else
temp.nick = obj.nick;
if (obj.attr[10]&2 && obj in players)
temp.nick @= " (paused)";
temp.text = showtext2(this.showIndex + this.showSize,int(obj.x*16)/16+1.625,int(obj.y*16)/16+2.5,-0.5,NULL,"bc",temp.nick);
changeimgcolors(this.showIndex + this.showSize,temp.c1[0]/255,temp.c1[1]/255,temp.c1[2]/255,1);
changeimgzoom(this.showIndex + this.showSize++,$pref::graal::defaultfontsize/24);
temp.text.layer = 1;
//shadow
temp.text = showtext2(this.showIndex + this.showSize,int(obj.x*16)/16+1.6875,int(obj.y*16)/16+2.5,-0.5625,NULL,"bc",temp.nick);
changeimgcolors(this.showIndex + this.showSize,temp.c2[0]/255,temp.c2[1]/255,temp.c2[2]/255,1);
changeimgzoom(this.showIndex + this.showSize++,$pref::graal::defaultfontsize/24);
temp.text.layer = 1;
}
}
Now, this uses two showimgs. The problem with it is that the two showimgs don't always share the same layer when interacting with other showimgs or NPCs (you could have one part showing and one part hiding). Another thing is that the default nick system draws over it's own player and under every other player and NPC.