Graal Forums  

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

Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old 05-21-2002, 10:46 PM
Saga2001 Saga2001 is offline
Wishing he had 3 feet
Join Date: Aug 2001
Location: Basement
Posts: 1,565
Saga2001 is on a distinguished road
Send a message via ICQ to Saga2001 Send a message via AIM to Saga2001 Send a message via Yahoo to Saga2001
I wouldn't have either. Also a note to screen name, its else if not elseif, though I am not sure it matters...
Also you should try to only test something once in a script, unless you have statements where you test if its not true and playertouchsme and you test if it is true and playertouchs me, otherwise both or one probably not the one you want will be executed.
For example:
NPC Code:

// way one:
if (playertouchsme && thisistrue) unset thisistrue;
if (playertouchsme && !thisistrue) set thisistrue;
sleep .05;
// way two:
if (playertouchsme) {
if (thisistrue) unset thisistrue;
else set thisistrue;
sleep .05;
}
// way three:
if (playertouchsme) {
if (thisistrue) unset thisistrue;
if (!thisistrue) set thisistrue;
sleep .05;
}
// way four and the most complicated way:
if (created)
setstring this.displays,"Hello Message A","Hello Message B";
if (playertouchsme) {
this.disp = (thisistrue ? 1 : 0);
showMessage();
sleep .05;
}
function showMessage()
say2 #I(this.displays, this.disp);



See there are many sides of one coin.
__________________

!Wan ( 11:27:55 AM):
can i c ur scripts please?
Zorg (RC): If I hear NPC Server call Ne0, Past Austin or Brent sexy one more time im disconnecting it
Reply With Quote
Reply


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 12:39 AM.


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