Graal Forums  

Go Back   Graal Forums > General Forums > Graal Main Forum (English)
FAQ Members List Calendar Today's Posts

Reply
 
Thread Tools Search this Thread Display Modes
  #166  
Old 08-19-2006, 01:34 AM
Skrobo2 Skrobo2 is offline
In the real world ogod.
Skrobo2's Avatar
Join Date: Dec 2005
Location: Refugio, Texas
Posts: 435
Skrobo2 is on a distinguished road
Quote:
Originally Posted by Stefan
Shadow for showtext could be added yes, although it is more or less the same like adding two showimgs
It's be nice to not have to do two showimg's. Would keep the code shorter and be a little quicker than lining up another showimg to look good as a shadow.
I sent you a forum PM about png's, if you didn't see it.
__________________


Quote:
Originally Posted by Darlene159 View Post
I would rather have dead forums.
Reply With Quote
  #167  
Old 08-19-2006, 02:10 AM
jake13jake jake13jake is offline
Former Classic Staff
jake13jake's Avatar
Join Date: Dec 2002
Location: Northwest Vermont
Posts: 1,452
jake13jake will become famous soon enough
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.yin |0-16*temp.objwidth,screenwidth|;
  
temp.screentesty screeny(obj.x,obj.yin |0-16*temp.objheight,screenheight|;
  
temp.screentest temp.screentestx && temp.screentesty;
  if ((
obj.nick || obj in players) && temp.screentest && obj.attr[10]&!= 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]&&& 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.
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +2. The time now is 04:19 AM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2025, vBulletin Solutions Inc.
Copyright (C) 1998-2019 Toonslab All Rights Reserved.