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 08-01-2011, 08:29 PM
greggiles greggiles is offline
Registered User
greggiles's Avatar
Join Date: Sep 2007
Posts: 149
greggiles has a spectacular aura about
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??
Reply With Quote
  #2  
Old 08-01-2011, 08:45 PM
fowlplay4 fowlplay4 is offline
team canada
fowlplay4's Avatar
Join Date: Jul 2004
Location: Canada
Posts: 5,200
fowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond repute
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.
__________________
Quote:
Reply With Quote
  #3  
Old 08-01-2011, 09:40 PM
greggiles greggiles is offline
Registered User
greggiles's Avatar
Join Date: Sep 2007
Posts: 149
greggiles has a spectacular aura about
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?
Reply With Quote
  #4  
Old 08-01-2011, 09:47 PM
fowlplay4 fowlplay4 is offline
team canada
fowlplay4's Avatar
Join Date: Jul 2004
Location: Canada
Posts: 5,200
fowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond repute
Quote:
Originally Posted by greggiles View Post
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");

__________________
Quote:
Reply With Quote
  #5  
Old 08-01-2011, 09:49 PM
greggiles greggiles is offline
Registered User
greggiles's Avatar
Join Date: Sep 2007
Posts: 149
greggiles has a spectacular aura about
what is server_idle??
Reply With Quote
  #6  
Old 08-01-2011, 09:55 PM
Hezzy002 Hezzy002 is offline
Registered User
Join Date: Jul 2011
Posts: 247
Hezzy002 is a jewel in the roughHezzy002 is a jewel in the rough
Quote:
Originally Posted by greggiles View Post
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.
Reply With Quote
  #7  
Old 08-01-2011, 10:57 PM
greggiles greggiles is offline
Registered User
greggiles's Avatar
Join Date: Sep 2007
Posts: 149
greggiles has a spectacular aura about
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
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 10:31 PM.


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