Jump to content
  • 0
JHONDOMINIC

How to know char_id after add it to item?

Question

I try to add char_id to item by

getitem2 1201,1,1,0,0,254,0,getcharid(0)&0xffff,(getcharid(0)>>16)&0xffff;

after try to getequipcradid get back like this

Card 0 = 254
Card 1 = 0
Card 2 = 18935
Card 3 = 2

My char_id is 150007. Have any ways to convert id from card 2 to char_id by script?

 

Thank you and sorry about my english.

Link to comment
Share on other sites

3 answers to this question

Recommended Posts

  • 0

If you want to compare owner you can try something like this.

image.png.664d9b5aa1b67103dea9cf643929a970.png

if(.@card2 == (getcharid(0)&0xffff))
dispbottom "You're creator of this item";
else
dispbottom "You're not creator of this item";

But if you want to convert it back please wait for other people.

 

//

 

There are another option.

1.) Create array that contain database for char_id

ex. Some people name their item. -> Call add to array func -> Loop array -> Not found -> Add converted char_id to array 1 add char_name to array 2

then you will have

array1[0] = 18935

array2[0] = "Jhon"

 

Or play around with getd command instead of array.

Set set getd("c"+card2),"Jhon";

Get mes "Owner " + getd("c"+card2);

Edited by Start_
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...