bringing to you a somewhat useful function, It has a complex usage but it also supports all kinds of ingame message printing I can think of!
Behold.... gameText!
Code: Select all
USAGE: gameText(msg[,kind,channel,color,item])
note: unlike all other args, kind must be passed in caps.
Bear in mind this was designed for both simplicity AND functionality, so I'll provide examples from the simplest to msot functional.
Code: Select all
gameText("Hello World")
Code: Select all
gameText("Goodbye Cruel World","WHISPER","[GM]Bothater")
Code: Select all
gameText("Mass Suicide Anyone?","CHANNEL",1)
Code: Select all
gameText("This is a sad day!","ZONE",nil,"gold")
Code: Select all
colors = {
white = "ffffff",
green = "00ff00",
blue = "0072bc",
purple = "a864a8",
orange = "f68e56",
gold = "a37d50",
yellow = "ffff00",
red = "ff0000",
};
You can also use Item Links inside the message with ANY kind of message! at the moment it is limited to 1 link, to do so just include "ITEM" in your message:
Code: Select all
gameText("My armor is sweet!--> ITEM right?","WORLD",nil,"red","God's Breasts")
Code: Select all
gameText("My armor is sweet!--> ITEM right?","WORLD",nil,"red",inventory:findItem("God's Breasts"))
RAID and PARTY kinds are the same also and are used like ZONE or WORLD.
The SYSTEM and WARNING print an onscreen message, unlike the other kinds the message is displayed in the middle of the screen instead of chat box. work with different colors and itemlink and the default to yellow and red colors respectively.
The SYSCHAT kind prints a system-like message to the chat box, as far as I can tell It is only different from MSG in it's default color, which is orange.
Enjoy!!!
EDIT: if anyone has any suggestion as for CHANNEL problem I'm glad to take it, I think we have to be channel managers :S