Golem1988 Posted October 3, 2012 Group: Members Topic Count: 57 Topics Per Day: 0.01 Content Count: 162 Reputation: 1 Joined: 08/08/12 Last Seen: December 10, 2023 Share Posted October 3, 2012 Need some help or support answering the next question: How to make npc to look for login id? For example if(strcharinfo() >= 2000000 && strcharinfo() <= 2000099 ) { by strcharinfo() I mean this function detects login ID... And if login ID gets into the selected range, script will work for this account. So, what should I put instead of strcharinfo() to get things happen? Many thanks for support. Quote Link to comment Share on other sites More sharing options...
Bin4ry Posted October 3, 2012 Group: Members Topic Count: 30 Topics Per Day: 0.01 Content Count: 782 Reputation: 82 Joined: 01/01/12 Last Seen: September 21, 2015 Share Posted October 3, 2012 This maybe? *getcharid(<type>{,"<character name>"}) This function will return a unique ID number of the invoking character, or, if a character name is specified, of that character. Type is the kind of associated ID number required: 0 - Character ID number. 1 - Party ID number. 2 - Guild ID number. 3 - Account ID number. 4 - Battle ground ID For most purposes other than printing it, a number is better to have than a name (people do horrifying things to their character names). If the character is not in a party or not in a guild, the function will return 0 if guild or party number is requested. If a name is specified and the character is not found, 0 is returned. If getcharid(0) returns a zero, the script got called not by a character and doesn't have an attached RID. Note that this will cause the map server to print "player not attached!" error messages, so it is preferred to use "playerattached" to check for the character attached to the script. if( getcharid(2) == 0 ) mes "Only members of a guild are allowed here!"; Quote Link to comment Share on other sites More sharing options...
Golem1988 Posted October 3, 2012 Group: Members Topic Count: 57 Topics Per Day: 0.01 Content Count: 162 Reputation: 1 Joined: 08/08/12 Last Seen: December 10, 2023 Author Share Posted October 3, 2012 Yeah, thanks... Im a little lame, I have posted this and opened wiki.. and found "getcharid(3)" will return account id And many thanks to darristan, that's what I was looking for Thanks, problem and request solved Quote Link to comment Share on other sites More sharing options...
Question
Golem1988
Need some help or support answering the next question:
How to make npc to look for login id?
For example
by strcharinfo() I mean this function detects login ID... And if login ID gets into the selected range, script will work for this account.
So, what should I put instead of strcharinfo() to get things happen?
Many thanks for support.
Link to comment
Share on other sites
2 answers to this question
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.