Graal Forums

Graal Forums (https://forums.graalonline.com/forums/index.php)
-   NPC Scripting (https://forums.graalonline.com/forums/forumdisplay.php?f=8)
-   -   Quick question (https://forums.graalonline.com/forums/showthread.php?t=266)

Lomgren 03-17-2001 01:40 AM

How are you supposed to test if a player has a certain account name online? Offline it is impossible to do, since none of the information is available, and I would like to know, for a couple scripts I am writing

SSmutz 03-17-2001 03:14 AM

try it on one of those old gserver's i guess, if they even support it

kyle0654 03-17-2001 07:19 AM

NPC Code:

if (strequals(#a,accountname)) {


#a is the string that holds the player's account name...if you want to check a player of a certain index, use #a(index). Just remember that account names are case sensitive ;)

Fai 03-17-2001 07:59 AM

Even I knew that :]

SSmutz 03-17-2001 08:09 AM

yea, but when your offline, you dont have an account name set to yourself

kyle0654 03-17-2001 08:19 AM

actually, from past experience, I think it uses the one you have selected or used last when you go into offline mode as #a....cuz I've gotten that code to work offline for just my account before.

freddyfox 03-17-2001 08:26 AM

*Hides from Kyle's scary bad language in his Sub-Title*

Lomgren 03-17-2001 09:38 AM

Thanks Kyle, I thought it was something like that, but I wasn't sure. :D

kyle0654 03-17-2001 09:53 AM

sure, you might test with #n instead of #a and set your nickname to the account name you want to be used just to make sure things work.

*was unaware that was a bad word*

Lomgren 03-17-2001 10:01 AM

Here is another way I just thought of, and checked offline....there is a way to check to see if your account name works in an NPC offline:
Make an NPC, then put this script in it...
NPC Code:

if (playertouchsme) {setstring #a, accountname;}


that way, you can set your accountname properly, then test it out offline. When you are sure it works, you can then delete the npc that set the accountname.


All times are GMT +2. The time now is 10:51 AM.

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