Jump to content
  • 0

getting the char name of a specified char id?


Wise

Question


  • Group:  Members
  • Topic Count:  46
  • Topics Per Day:  0.01
  • Content Count:  147
  • Reputation:   26
  • Joined:  11/19/11
  • Last Seen:  

rachel,172,93,4 script Test 85,{
set testID,getcharid(0);
mes strcharinfo(0)+" is my name";
mes getcharid(0)+" is my ID";
mes $testID+" is the target ID";
mes "Getting target's name...";
set myNam$,rid2name(testID);
mes myNam$;
close;
}

edit:

it returns null =\

Edited by Mavis
Link to comment
Share on other sites

6 answers to this question

Recommended Posts


  • Group:  Members
  • Topic Count:  19
  • Topics Per Day:  0.00
  • Content Count:  713
  • Reputation:   70
  • Joined:  11/08/11
  • Last Seen:  

maybe this?

query_sql("SELECT `name` from `char` WHERE `char_id` = "+$testID+"",.@names$);
mes "the name is "+.@names$;

written on the fly, may not work lol

Edited by EvilPuncker
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  26
  • Topics Per Day:  0.01
  • Content Count:  331
  • Reputation:   63
  • Joined:  11/29/11
  • Last Seen:  

Alternate Way.

rid2name($testID)

But Target should be online.

Kinda Late.

Use EvilPuncker Way

query_sql("SELECT `name` from `char` WHERE `char_id` = "+$testID+"",@names$);
mes "the name is "+@names$;

@EvilPuncker

Edited by Dastgir Pojee
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  46
  • Topics Per Day:  0.01
  • Content Count:  147
  • Reputation:   26
  • Joined:  11/19/11
  • Last Seen:  

thanks but i just solved it again by using RID instead of GID xD

but just kinda confused with RID and GID though..

isnt RID the account ID and GID is the game ID?

then for RID, why cant i use set @RID,getcharid(0) instead of getcharid(3) because 150003 is my target character ID and not the account ID which is something like 2000001

and it wouldnt make any sense for rid2name because there's like 9 characters for each account and it will translate the account ID to character name >_<

but anyways it worked so thanks for the time though XD

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  26
  • Topics Per Day:  0.01
  • Content Count:  331
  • Reputation:   63
  • Joined:  11/29/11
  • Last Seen:  

thanks but i just solved it again by using RID instead of GID xD

but just kinda confused with RID and GID though..

isnt RID the account ID and GID is the game ID?

then for RID, why cant i use set @RID,getcharid(0) instead of getcharid(3) because 150003 is my target character ID and not the account ID which is something like 2000001

and it wouldnt make any sense for rid2name because there's like 9 characters for each account and it will translate the account ID to character name >_<

but anyways it worked so thanks for the time though XD

That's why i said "But Target should be online."

Because that command search target with that account_id and then gives the name.

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  18
  • Topics Per Day:  0.00
  • Content Count:  2044
  • Reputation:   682
  • Joined:  10/09/12
  • Last Seen:  

and it wouldnt make any sense for rid2name because there's like 9 characters for each account and it will translate the account ID to character name >_<
because we can only online 1 character per account in each time

there's no way to online multiple characters in same account at the same time ... isn't it ?

prontera,154,184,4	script	Test	85,{
.@testID = getcharid(3);
mes strcharinfo(0) +" is my name";
mes getcharid(3) +" is my ID";
mes .@testID +" is target ID";
mes rid2name(.@testID) +" is the target name ...";
close;
}

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  0
  • Topics Per Day:  0
  • Content Count:  205
  • Reputation:   19
  • Joined:  10/12/12
  • Last Seen:  

because we can only online 1 character per account in each time

there's no way to online multiple characters in same account at the same time ... isn't it ?

Correct.

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...