Jump to content

Question

Posted

Hello. I use aCis last free source.

 

I created new instance for name color change. It changes name color but when character relogins, it becomes white again. How can I manage to save it?

4 answers to this question

Recommended Posts

  • 0
Posted

Just change his color name everytime he logins from clientpackets/EnterWorld.java....So everytime he logins,he takes the color...

  • 0
Posted

Depends of the condition. If its just like that, you should store the info into db.

Is there any already done codes to share?

 

 

Just change his color name everytime he logins from clientpackets/EnterWorld.java....So everytime he logins,he takes the color...

That will not work... every vip player will have different name color.

  • 0
Posted (edited)

Since rev 350, you can use getMemos() to store/retrieve stuff. Store it under a String :

player.getMemos().set("titleColor", titleUnderStringFormat);

Retrieve it and make checks on player login (has to be made AFTER memos loading) :

player.setTitleColor(Integer.decode("0x" + player.getMemos().getString("titleColor", "FFFFFF")));

If you use free sources, you have to manage your own SQL load/save, and add a column on characters.sql.

Edited by Tryskell

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

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