Graal Forums

Graal Forums (https://forums.graalonline.com/forums/index.php)
-   NPC Scripting (https://forums.graalonline.com/forums/forumdisplay.php?f=8)
-   -   Text Color Changing (https://forums.graalonline.com/forums/showthread.php?t=9235)

Poogle 08-10-2001 05:36 AM

Text Color Changing
 
What is wrong with this and help me!
if (playertouchsme) {
toweapons *Text Coloring;
}
if (isweapon) {
if (strequals( #c, setfont white )) {
if (playerchats) {
showimg index,@Tempus Sans ITC@bold(Bold)@#c,x,y;
changeimgcolors index,1,1,1,1.99;
changeimgzoom index,1;
}
}
if (strequals( #c, setfont blue )) {
if (playerchats) {
showimg index,@Tempus Sans ITC@bold(Bold)@#c,x,y;
changeimgcolors index,0,0,1,1.99;
changeimgzoom index,1;
}
}
if (strequals( #c, setfont green )) {
if (playerchats) {
showimg index,@Tempus Sans ITC@bold(Bold)@#c,x,y;
changeimgcolors index,0,1,0,1.99;
changeimgzoom index,1;
}
}
if (strequals( #c, setfont red )) {
if (playerchats) {
showimg index,@Tempus Sans ITC@bold(Bold)@#c,x,y;
changeimgcolors index,1,0,0,1.99;
changeimgzoom index,1;
}
}
}
if (weaponfired) {
if (strequals( #c, setfont white )) {
if (playerchats) {
showimg index,@Tempus Sans ITC@bold(Bold)@#c,x,y;
changeimgcolors index,1,1,1,1.99;
changeimgzoom index,1;
}
}
if (strequals( #c, setfont blue )) {
if (playerchats) {
showimg index,@Tempus Sans ITC@bold(Bold)@#c,x,y;
changeimgcolors index,0,0,1,1.99;
changeimgzoom index,1;
}
}
if (strequals( #c, setfont green )) {
if (playerchats) {
showimg index,@Tempus Sans ITC@bold(Bold)@#c,x,y;
changeimgcolors index,0,1,0,1.99;
changeimgzoom index,1;
}
}
if (strequals( #c, setfont red )) {
if (playerchats) {
showimg index,@Tempus Sans ITC@bold(Bold)@#c,x,y;
changeimgcolors index,1,0,0,1.99;
changeimgzoom index,1;
}
}
say2 To change your font#bcolor say:#bsetfont [COLOR]#bHere are the colors:#bWhite#bRed#bBlue#bGreen;
}

BocoC 08-10-2001 06:12 AM

if (playerchats && strequals(#c,setfont white)) {

All the setfont commands should start like that.

And, not bold(Bold). Just 1 plain lowercase b

zokemon 08-10-2001 06:41 AM

no need to put it under if (weaponfired) {}

CrazedMerlin 08-10-2001 08:27 AM

Re: Text Color Changing
 
PHP Code:

if (playertouchsme) {
  
toweapons *Text Coloring;
}
if (
hasweapon(*Text Coloring)) {
  if (
playerchats&&strequals(#c,setfont white)) {
      
showimg index,@Tempus Sans ITC@bold(Bold)@#c,x,y;
      
changeimgcolors index,1,1,1,1.99;
      
changeimgzoom index,1;
    }
  }
  if (
playerchats&&strequals(#c,setfont blue)) {
      
showimg index,@Tempus Sans ITC@bold(Bold)@#c,x,y;
      
changeimgcolors index,0,0,1,1.99;
      
changeimgzoom index,1;
    }
  }
  if (
playerchats&&strequals(#c,setfont green)) {
      
showimg index,@Tempus Sans ITC@bold(Bold)@#c,x,y;
      
changeimgcolors index,0,1,0,1.99;
      
changeimgzoom index,1;
    }
  }
  if (
playerchats&&strequals(#c,setfont red)) {
      
showimg index,@Tempus Sans ITC@bold(Bold)@#c,x,y;
      
changeimgcolors index,1,0,0,1.99;
      
changeimgzoom index,1;
    }
  }
}
if (
weaponfired) {
  if (
playerchats&&strequals(#c,setfont white)) {
      
showimg index,@Tempus Sans ITC@bold(Bold)@#c,x,y;
      
changeimgcolors index,1,1,1,1.99;
      
changeimgzoom index,1;
    }
  }
  if (
playerchats&&strequals(#c,setfont blue)) {
      
showimg index,@Tempus Sans ITC@bold(Bold)@#c,x,y;
      
changeimgcolors index,0,0,1,1.99;
      
changeimgzoom index,1;
    }
  }
  if (
playerchats&&strequals(#c,setfont green)) {
      
showimg index,@Tempus Sans ITC@bold(Bold)@#c,x,y;
      
changeimgcolors index,0,1,0,1.99;
      
changeimgzoom index,1;
    }
  }
  if (
playerchats&&strequals(#c,setfont red)) {
      
showimg index,@Tempus Sans ITC@bold(Bold)@#c,x,y;
      
changeimgcolors index,1,0,0,1.99;
      
changeimgzoom index,1;
    }
  }
  
say2 To change your font#bcolor say:#bsetfont [COLOR]#bHere are the colors:#bWhite#bRed#bBlue#bGreen;


maybe

Poogle 08-10-2001 10:30 AM

They do work ^_^ but ='( they dont change the color of the players text

G_yoshi 08-10-2001 12:56 PM

Quote:

Originally posted by Poogle
They do work ^_^ but ='( they dont change the color of the players text
*smacks Nick upside the head* :p

No can do. Player chattext is the same text, font, and size as specified in options menu which is the same style used for Nicknames.

using showimg to display text is more for visual signs, not chat text, altough it could be done it is not necessary :D

The hardest part would be keeping it centered above the player's head ;)

LiquidIce00 08-10-2001 02:12 PM

Quote:

Originally posted by G_yoshi


*smacks Nick upside the head* :p

No can do. Player chattext is the same text, font, and size as specified in options menu which is the same style used for Nicknames.

using showimg to display text is more for visual signs, not chat text, altough it could be done it is not necessary :D

The hardest part would be keeping it centered above the player's head ;)

actually it would be nearly impossible since u cant get the size of the players screen + some other stuff which it needs to display the text like graal does.

G_yoshi 08-10-2001 11:26 PM

Quote:

Originally posted by LiquidIce00


actually it would be nearly impossible since u cant get the size of the players screen + some other stuff which it needs to display the text like graal does.

variables for screen sizes. Screenwidth and Screenheight.

Poogle 08-11-2001 01:23 AM

Quote:

Originally posted by LiquidIce00


actually it would be nearly impossible since u cant get the size of the players screen + some other stuff which it needs to display the text like graal does.

So I should give up?


All times are GMT +2. The time now is 10:17 AM.

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