View Single Post
  #1  
Old 08-25-2002, 11:48 PM
Spark910 Spark910 is offline
Ex-Graal Global
Spark910's Avatar
Join Date: Oct 2001
Location: England
Posts: 10,892
Spark910 has a spectacular aura about
Any ideas why it does not work.

Explain where I went wrong and why it doenst work, dont just give me a new code, also please explain your code, As I am only learning NPC Gscript,

Code In 1 NPC
NPC Code:

// NPC made by Spark911
if (created) {
x=27;
y=37;
}
if (playerenters) {
x=27;
y=37;
timeout=.05;
}
if (timeout) {
if (mousex=>27&&mousex=<28&&mousey=>37&&mousey=<38) {
setstring server.npc,One;
timeout=.05;
}
else {
setstring server.npc,;
unset string;
}
timeout=.05;
}



Code in 2nd NPC

NPC Code:


// NPC made by Spark911
if (created) {
x=31;
y=37;
}
if (playerenters) {
x=31;
y=37;
timeout=.05;
}
if (timeout) {
if (mousex=>31&&mousex=<32&&mousey=>37&&mousey=<38) {
setstring server.npc,Two;
timeout=.05;
}
else {
setstring server.npc,;
unset string;
}
timeout=.05;
}




Code in NPC that displays which NPC you are over:

NPC Code:

// NPC made by Spark911
if (playerenters) {
x=31.5;
y=58.25;
timeout=.05;
}

if (timeout) {
message #s(server.npc);
timeout=.05;
}



One works fine, Nothing happens when your mouse is over 2, If there is an Easier way for me to do the script please say so and explain what you are doing and how it works =)
Reply With Quote