Graal Forums  

Go Back   Graal Forums > Development Forums > NPC Scripting
FAQ Members List Calendar Today's Posts

 
 
Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #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
 


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +2. The time now is 09:16 PM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2025, vBulletin Solutions Inc.
Copyright (C) 1998-2019 Toonslab All Rights Reserved.