Hi to all. What is wrong with this piece of code?
What i want is to show in the infobar, the vnum of the room that i'm in. I have everything working, but i can't make the colour to change. If the variable vnum is equal to 1205, then the text will be red, if the room is diferent, the colour will be blue.
InfoFont("FixedSys", 12, 0);
InfoColour("black");
Info("Sala: ");
if (room == 1205)
then
InfoColour ("red")
InfoFont("FixedSys", 12, 2)
Info(vnum)
else
InfoColour ("blue")
InfoFont("FixedSys", 12, 2)
Info(vnum)
end -- if
Hi. I'm trying to match the room vnum, in this case, 1205.
I already have a variable that changes when i change room. So i'm just trying to get the infobar showing when i'm in room 1205 it will be red, when i'm on any other room, it will be blue. I have that working, but in Jscript. I want this in lua. ;)
<aliases>
<alias
match="^-infobar(.*)"
enabled="y"
expand_variables="y"
regexp="y"
send_to="12"
keep_evaluating="y"
sequence="100"
>
<send>var cor; cor = "Blue"; //info font color
var back; back = "#D6D6D6"; //backgroud color
var other; other = "Red"; //other font color
var show;
if("%1"==" 0") show = 0;
else show = 1;
var wield;
var sanc;
arma_1 = world.getvariable("wield");
sanc = world.getvariable("sanc");