View Single Post
  #10  
Old 06-04-2007, 04:34 AM
MrAnonymous_P2P MrAnonymous_P2P is offline
Retired Oldbie
MrAnonymous_P2P's Avatar
Join Date: Oct 2006
Location: Cambodia
Posts: 722
MrAnonymous_P2P is an unknown quantity at this point
Ok now this is just being plain weird.
I got the script to work just fine except for one problem.

NPC 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|) {
showtext( 1, this.x+1.5, this.y-.5, "Kartika", "cb", "If you can answer this question I will give you a prize.");
sleep(5);
showtext( 1, this.x+1.5, this.y-.5, "Kartika", "cb", "What are the two nations on Niromia?");
}
}
}
//#CLIENTSIDE
function onPlayerChats()
{
if (player.chat.trim() == "test")
{
showtext( 1, this.x+1.5, this.y-.5, "Kartika", "cb", "I will now present you with this weapon.");
sleep(5);
destroy();
}
}



Now this all works except when I click on the Baddy the showtext works ok but for some reason it also gives me a sign with the previous script which said to show a sign. And it does the same thing for when the player chats test. It shows me a sign and it changes the text above the baddy. Its like the script before this one and this modified one are conjoined together. Anybody know how to fix this?
Reply With Quote