I cannot get this script to work. It is so simple yet it will not work.
The script is a baddy for a quest and as you can see it asks you a question, the player is supposed to respond with an answer.
PHP Code:
//#CLIENTSIDE
function onCreated() {
showcharacter();
head = "head47.png";
colors[ 0] = "orange";
colors[ 1] = "black";
colors[ 2] = "darkred";
colors[ 3] = "white";
colors[ 4] = "black";
shield = "no-shield.png";
body = "body18.png";
dir = 2;
setcharani("niromia2_idle",NULL);
showtext( 1, this.x+1.5, this.y-.5, "Kartika", "cb", "Click me");
}
function onMouseDown(button)
{
if (button == "left" || button == "right") {
if (mousex in | 23, 26| && mousey in | 44, 46|) {
say2("If you can answer one question...
I will aid you in your quest.
What are the 2 nations on Niromia?");
}
}
}
function onPlayerChats() {
if (player.chat == "test") {
findimg(1).text = "I will now give you this weapon.";
}
}
Anybody know what the problem is?