Graal Forums

Graal Forums (https://forums.graalonline.com/forums/index.php)
-   NPC Scripting (https://forums.graalonline.com/forums/forumdisplay.php?f=8)
-   -   Flag: Created :: Value: Neato (https://forums.graalonline.com/forums/showthread.php?t=14493)

Xaviar 10-13-2001 07:26 AM

Flag: Created :: Value: Neato
 
Ok, I just realized that you can do if (created && isweapon) to check if the script was just turned into a weapon...But...I wonder if you can use the same thing to check if a player logged on to graal? or is it not "creating" the weapons in your list every time you log on?

T3CK 10-13-2001 07:31 AM

That might work although im not sure sorry =[
You would have to ask stefan for a true anwser (or Kamistu he is also very smart with current scripting)

WeirdmanI9 10-13-2001 07:46 AM

Try using the level in a string for the player and then warp the player to that level automatically if they enter the level, and use if (playerenters && isweapon) it probably won't work because I'm only stabbing at it, but it's worth a try.

toad1413 10-13-2001 08:49 AM

Quote:

Originally posted by T3CK
That might work although im not sure sorry =[
You would have to ask stefan for a true anwser (or Kamistu he is also very smart with current scripting)

Kamistu? That's another new one.

So far he's been called: Kai (by me :D ), Kammy, Kamistu, Kamina, Kaimetus and very rarely, Kaimetsu.

BocoC 10-13-2001 09:43 AM

Yes. Kaismestu:D is very good...

kyle0654 10-13-2001 09:58 AM

Re: Flag: Created :: Value: Neato
 
Quote:

Originally posted by Xaviar
Ok, I just realized that you can do if (created && isweapon) to check if the script was just turned into a weapon...But...I wonder if you can use the same thing to check if a player logged on to graal? or is it not "creating" the weapons in your list every time you log on?
The problem you run into with that is that when the player gets the weapon the first time it'll run that too. Set a flag when inside that check, and add the flag to the check, and it should work:
NPC Code:

if (created&&isweapon&&myflag) {
...
} else {
set myflag;
}



wow, first post in over a month...

T3CK 10-13-2001 07:18 PM

Re: Re: Flag: Created :: Value: Neato
 
Quote:

Originally posted by kyle0654

The problem you run into with that is that when the player gets the weapon the first time it'll run that too. Set a flag when inside that check, and add the flag to the check, and it should work:
NPC Code:

if (created&&isweapon&&myflag) {
...
} else {
set myflag;
}



wow, first post in over a month...

=)
Congrats on your first post in over a month!

Xaviar 10-14-2001 07:49 AM

Re: Re: Flag: Created :: Value: Neato
 
Quote:

Originally posted by kyle0654

The problem you run into with that is that when the player gets the weapon the first time it'll run that too. Set a flag when inside that check, and add the flag to the check, and it should work:
NPC Code:

if (created&&isweapon&&myflag) {
...
} else {
set myflag;
}



wow, first post in over a month...

So it will work to check when a player logs on then?

btedji 10-14-2001 08:04 AM

the flag created is ran every time the player logs on

Xaviar 10-14-2001 08:05 AM

Quote:

Originally posted by btedji
the flag created is ran every time the player logs on
"Neato."

btedji 10-14-2001 08:06 AM

if(created)

is the same as

if(npc was initialized)


All times are GMT +2. The time now is 02:43 PM.

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