Jump to content
  • 0

getting the char name of a specified char id?


Question

Posted (edited)

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

6 answers to this question

Recommended Posts

Posted (edited)

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
Posted

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

Posted

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.

Posted
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;
}

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.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...