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

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now


×
×
  • Create New...

AdBlock Extension Detected!

Our website is made possible by displaying online advertisements to our members.

Please disable AdBlock browser extension first, to be able to use our community.

I've Disabled AdBlock