Graal Forums

Graal Forums (https://forums.graalonline.com/forums/index.php)
-   NPC Scripting (https://forums.graalonline.com/forums/forumdisplay.php?f=8)
-   -   First log in QUESTION (https://forums.graalonline.com/forums/showthread.php?t=134264052)

greggiles 08-01-2011 08:29 PM

First log in QUESTION
 
is there a function or a "if" statement to check if it is the first time the player has logged onto the server, or the first time logging in after reset??

fowlplay4 08-01-2011 08:45 PM

You can set a flag in their to indicate they've logged on, or base it off other data in their account.

I.e: If your server is an RPG server they probably don't have their level or stats set, so you can warp them to the right place.

I would recommend NOT resetting players on their first login, and instead scanning for conditions that would require you to reset them.

greggiles 08-01-2011 09:40 PM

ok. i understand. but how do i make the gani set to the last gani playing before the player logged off. for example. u exit while the ani is sword_idle. you log back on and the ani is just idle. how do i make anis go back to what they were before log off?

fowlplay4 08-01-2011 09:47 PM

Quote:

Originally Posted by greggiles (Post 1661117)
ok. i understand. but how do i make the gani set to the last gani playing before the player logged off. for example. u exit while the ani is sword_idle. you log back on and the ani is just idle. how do i make anis go back to what they were before log off?

That should be in a weapon that's added to the player when they login.

I.e: -System

PHP Code:

//#CLIENTSIDE
function onCreated() {
  
replaceani("idle""server_idle");



greggiles 08-01-2011 09:49 PM

what is server_idle??

Hezzy002 08-01-2011 09:55 PM

Quote:

Originally Posted by greggiles (Post 1661120)
what is server_idle??

He's only giving you an example of what a system NPC could be.

He's suggesting that you check if the player has a system NPC to see if the player needs to be reset or not.

greggiles 08-01-2011 10:57 PM

oh, i thought server_idle was a specific global.ani lol. i figured it out.
i just need to do a check on the player's weapon type and replace the gani accordingly


All times are GMT +2. The time now is 10:18 PM.

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