Jump to content
  • 0

Script help


Leehalt

Question


  • Group:  Members
  • Topic Count:  11
  • Topics Per Day:  0.00
  • Content Count:  44
  • Reputation:   0
  • Joined:  04/26/12
  • Last Seen:  

- First off, hello everyone, I'm Leehalt, I'm new here at rAthena. Nice to meet you.

- Anyways, I wanted to know if the anyone knew if there was a something we can you in the script to check for account id instead of character id. Like for

example:

function script ryx1 {
set @chnam$,strcharinfo(0);
if (@chnam$ == "GM%%%") goto L_TEA;
end;
L_TEA: [insert desired effect here]

- I wanna know if there are some other variables we can use to replace strcharinfo(0) to get account id (user name or the id itself, persay 2000005 or whatever)

- Would changing the value to 1 or 2 do anything? [ strcharinfo(0) ---> strcharinfo(1) ]

==================================================================================================================================

- Edited! Thanks for anyone that saw this and tried to look it up but I solved my own problem.

Case Problem 1: Replacement for strcharinfo

*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

Case Problem 2: strcharinfo value

*strcharinfo(<type>)
This function will return either the name, party name or guild name for the
invoking character. Whatever it returns is determined by type.
0 - Character's name.
1 - The name of the party they're in if any.
2 - The name of the guild they're in if any.
3 - The name of the map the character is in.

If a character is not a member of any party or guild, an empty string will be
returned when requesting that information.

- This was actually in the scripting manual, Its nice and useful. You will find it at

rAthena/doc/script_commands

Edited by Leehalt
Link to comment
Share on other sites

1 answer to this question

Recommended Posts


  • Group:  Members
  • Topic Count:  4
  • Topics Per Day:  0.00
  • Content Count:  55
  • Reputation:   2
  • Joined:  12/29/11
  • Last Seen:  

strcharinfo(1) will return party name while 2 will return the guild name.

getting account id will require sql query.

oops! there is getcharid(3) for account id

Edited by SilverMayCry
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...