Graal Forums

Graal Forums (https://forums.graalonline.com/forums/index.php)
-   NPC Scripting (https://forums.graalonline.com/forums/forumdisplay.php?f=8)
-   -   reconizing everyone (https://forums.graalonline.com/forums/showthread.php?t=6097)

lord blade 06-30-2001 01:06 AM

reconizing everyone
 
how can i a npc(or rather a command) that only reconizes the leader(first to enter the level) to reconize everyone?

BocoC 06-30-2001 01:40 AM

What do you want this NPC to do?

ArmadeusWarlock 06-30-2001 01:42 AM

yea, thats really simple, we just hafta know what ya want the npc ta do =/
:D

Poogle 06-30-2001 04:45 AM

Hrm...
 
You want the NPC to say the name of the players that are in the room?

Slaktmaster 06-30-2001 04:56 AM

LOL!
if (playerenters&&isleader) {
do schtuffz;
}

Tyhm 06-30-2001 07:33 AM

Ordinary:
if(playerenters||timeout){
shootball;
timeout=5;
}

There will only be one timeout running, and that only for the first to enter the level (he sets the timeout, everyone else's setting is ignored).

Multiplayer:
if(playerenters||timeout){
shootball;
timereverywhere;
timeout=5;
}

Timereverywhere makes a seperate instance of the timer for everyone who enters the level. So player 1 has his timeout, etc.

lord blade 06-30-2001 07:51 AM

k...
 
its not an issue of timeouts or i would have dont the timereverywhere.. i'm detecting people saying things(ifplayerchats then checking the #c for a certain word) but its only working for the first person to enter the level here is the script

if (playerchats&&strequals(#c,done)&&(strequals(#g,Ev ents Team)){
show;
message Staff say start to begin;
}

BocoC 06-30-2001 08:57 AM

Ah ha!
NPC Code:

if (playerchats&&strequals(#c,done)&&(strequals(#g,Ev ents Team)){
show;
message Staff say start to begin;
}


The problem is that you are missing a parenthesis. There should be 3 parenthesis ending the if command. Try this:

NPC Code:

if (playerchats && strequals(#c,done) && (strequals(#g,Events Team))) {
show;
message Staff say start to begin;
}


In fact, you don't need the parenthesis in front of the second strequals.

NPC Code:

if (playerchats && strequals(#c,done) && strequals(#g,Events Team)) {
show;
message Staff say start to begin;
}


That should work.

lord blade 06-30-2001 10:08 AM

nope
 
thats not the problem actually i have the right amount of closing i just copied it wrong

T-Squad 06-30-2001 10:22 AM

Quote:

Originally posted by BocoC
Ah ha!
NPC Code:

if (playerchats&&strequals(#c,done)&&(strequals(#g,Ev ents Team)){
show;
message Staff say start to begin;
}


The problem is that you are missing a parenthesis. There should be 3 parenthesis ending the if command. Try this:

NPC Code:

if (playerchats && strequals(#c,done) && (strequals(#g,Events Team))) {
show;
message Staff say start to begin;
}


In fact, you don't need the parenthesis in front of the second strequals.

NPC Code:

if (playerchats && strequals(#c,done) && strequals(#g,Events Team)) {
show;
message Staff say start to begin;
}


That should work.

Boco is officially the script idiot! Nice work!

lord blade 06-30-2001 11:20 AM

hehe
 
LOL.. i think i might have figured out the problem actually i only copied one part of the command and the npc also uses sleeps.. i found out that it actually is reconizing all the people but when it gets to the sleep part it just stops if the leader isn't using it. i tried using timereverywhere and its still not working though =\

lord blade 06-30-2001 11:46 AM

its fixed, twas a dumb mistake on my part


All times are GMT +2. The time now is 08:19 PM.

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