Jump to content

Recommended Posts

Posted

Well here's something funny I decided to make..

It's really nothing special, it just came to my mind and I thought to make it..

Plus that a guy made a similar request, soo..

 

Anyway.

It is an item, with which you can change your name color.

The choice is random (for example it may choose red, or green, or blue, etc.). Everything is configurable though, so you don't have to worry.

There is a risk option too, in which nothing happens, so the user will be kinda unlucky xD

 

Here you are.

http://pastebin.com/2ab0xYti

 

PS: If you have activated any events in your server, I would suggest you to add a few checks at the java file.

There may be a misunderstanding between the name colors, if there are custom name colors at your events.

 

 

Good Night.

Posted

cool dude.. you mind shits a lot of imagination ^^

1 thing.. u got a lot of boolean algebra operation involving Rnd... with kinda no point ><

can i give you some advice? XD

Posted

Use switch instead of all those if's... Like

 

 switch (Rnd.get(4))
case 0:
                       activeChar.getAppearance().setNameColor(Config.NCI_COLOR_1);

                       activeChar.broadcastPacket(new SocialAction(activeChar.getObjectId(), 3));

                       activeChar.sendMessage("You are quite lucky, so your name color has changed. Have Fun!");

                       playable.destroyItem("Consume", item.getObjectId(), 1, null, false);
break;

 

P.S. Rnd.get(4) is not from 1-4, but from 0-4. You may have a unhandled value or not changing color.. :D

Posted

Use switch instead of all those if's... Like

 

 switch (Rnd.get(4))
case 0:
                       activeChar.getAppearance().setNameColor(Config.NCI_COLOR_1);

                       activeChar.broadcastPacket(new SocialAction(activeChar.getObjectId(), 3));

                       activeChar.sendMessage("You are quite lucky, so your name color has changed. Have Fun!");

                       playable.destroyItem("Consume", item.getObjectId(), 1, null, false);
break;

 

P.S. Rnd.get(4) is not from 1-4, but from 0-4. You may have a unhandled value or not changing color.. :D

 

nah, it's simple.

Just Rnd.get(3) ;]

and include case 0.

 

Anyway, remade!

Posted

I saw 1 more thing.

How exactly are you calculating the 3rd case? I don't see anywhere something that handles the risk thingie..

 

EDIT: W/e im just dumb.

Posted

I saw 1 more thing.

How exactly are you calculating the 3rd case? I don't see anywhere something that handles the risk thingie..

 

Well, the risk is nothing serious.

There is just no name color for the player, which means that he purchased it with no reason.

  • 1 month later...
Posted

i did include that code to l2jserver

but i have some bug of code at line

 

_itemHandler.registerItemHandler(new NameColorItem());

 

how i can handler register NameColorItem in GameServer.Java with l2jserver if here not support for l2jserver i am sorry to post here

 

if somebody can help for that line please tell me too

 

thank you :D this is a good cod need keep up

 

Posted

Coyote i test your code in Interlude l2jServer and i add the code perfectly without errors...i join in game to test it and i press on item and my char uses /socialvictory and in chat says "You are quite lucky, so your name color has changed. Have fun!"

but my name color it doenst change...so it didnt work...

any solutions?

ps: i test it and with admin char and with normal char and the results its the same on both characters.

 

EDIT: well no much time was passed from the time i added the code in my server and as i tell you i test it and it didnt work but when i use/remove a weapon/armor/skill then the color shows up...

any solutions?

 

please answer...thanks

Posted

Coyote i test your code in Interlude l2jServer and i add the code perfectly without errors...i join in game to test it and i press on item and my char uses /socialvictory and in chat says "You are quite lucky, so your name color has changed. Have fun!"

but my name color it doenst change...so it didnt work...

any solutions?

ps: i test it and with admin char and with normal char and the results its the same on both characters.

 

EDIT: well no much time was passed from the time i added the code in my server and as i tell you i test it and it didnt work but when i use/remove a weapon/armor/skill then the color shows up...

any solutions?

 

please answer...thanks

 

It works perfectly, your character just needs a change on his appearance/inv so that you can see the colour.

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


  • Posts

    • Dear partners! At the moment we are in great need of the following positions: — Snapchat old and new accounts | With snapscores | Geo: Europe/USA | Full access via email/phone number — Reddit old (brute or hacked origin, self-registered) accounts with post and comment karma from 100 to 100,000+ | Full email access included — LinkedIn old accounts with real connections | Geo: Europe/USA | Full email access + active 2FA password — Instagram old accounts (2010–2023) | Full email access (possibly with active 2FA password) — Facebook old accounts (2010–2023) | Full email access (possibly with active 2FA password) | With friends or without friends | Geo: Europe/USA/Asia — Threads accounts | Full email access (possibly with active 2FA password) — TikTok/Facebook/Google ADS Agency advertising accounts — Email accounts: mail.ru, yahoo.com, gazeta.pl, gmx.ch / gmx.de / gmx.net (BUT NOT gmx.com) — Google ADS Manual Farm accounts (verified via email and phone number) | GEO: USA/Europe, mostly USA. — WhatsApp OLD Accounts — Twitter accounts with followers and posts (old accounts) Contact us via the details below. We will be glad to cooperate! We are also ready to consider other partnership and collaboration options. Active links to our projects: Digital goods store (Website): Go to Store Telegram bot: Go to – convenient access to the store via the Telegram messenger. Virtual numbers service: Go to Telegram bot for purchasing Telegram Stars: Go to – fast and profitable purchase of Stars in Telegram. SMM Panel: Go to – promotion of your social media accounts. Contacts and support: ➡ Telegram: https://t.me/socnet_support ➡ WhatsApp: https://wa.me/79051904467 ➡ Discord: socnet_support ➡ ✉ Email: solomonbog@socnet.store
    • why is he still not banned? scammer
    • Complete verification on the services you need and unlock new earning opportunities. Use our newest service in the store: Learn more Active links: Digital goods store (Website): Go to Store Telegram bot: Go to – convenient access to the store via the Telegram messenger. Virtual numbers service: Go to Telegram bot for purchasing Telegram Stars: Go to – fast and profitable purchase of Stars in Telegram. SMM Panel: Go to – promotion of your social media accounts. We would like to present to you the current list of promotions and special offers for purchasing products and services of our service: 1. You can use a promo code for your first purchase: SOCNET (15% discount) 2. Get $1 on your store balance or a 10–20% discount — just write your username after registering on our website using the following template: "SEND ME BONUS, MY USERNAME IS..." – you need to post this in our forum thread! 3. Get $1 for the first trial launch of the SMM Panel: just open a ticket with the subject “Get Trial Bonus” on our website (Support). 4. Weekly Telegram Stars giveaways in our Telegram channel and in our bot for purchasing stars! News: ➡ Telegram channel: https://t.me/accsforyou_shop ➡ WhatsApp channel: https://chat.whatsapp.com/K8rBy500nA73z27PxgaJUw?mode=ems_copy_t ➡ Discord server: https://discord.gg/y9AStFFsrh Contacts and support: ➡ Telegram: https://t.me/socnet_support ➡ WhatsApp: https://wa.me/79051904467 ➡ Discord: socnet_support ➡ ✉ Email: solomonbog@socnet.store
    • Complete verification on the services you need and unlock new earning opportunities. Use our newest service in the store: Learn more Active links: Digital goods store (Website): Go to Store Telegram bot: Go to – convenient access to the store via the Telegram messenger. Virtual numbers service: Go to Telegram bot for purchasing Telegram Stars: Go to – fast and profitable purchase of Stars in Telegram. SMM Panel: Go to – promotion of your social media accounts. We would like to present to you the current list of promotions and special offers for purchasing products and services of our service: 1. You can use a promo code for your first purchase: SOCNET (15% discount) 2. Get $1 on your store balance or a 10–20% discount — just write your username after registering on our website using the following template: "SEND ME BONUS, MY USERNAME IS..." – you need to post this in our forum thread! 3. Get $1 for the first trial launch of the SMM Panel: just open a ticket with the subject “Get Trial Bonus” on our website (Support). 4. Weekly Telegram Stars giveaways in our Telegram channel and in our bot for purchasing stars! News: ➡ Telegram channel: https://t.me/accsforyou_shop ➡ WhatsApp channel: https://chat.whatsapp.com/K8rBy500nA73z27PxgaJUw?mode=ems_copy_t ➡ Discord server: https://discord.gg/y9AStFFsrh Contacts and support: ➡ Telegram: https://t.me/socnet_support ➡ WhatsApp: https://wa.me/79051904467 ➡ Discord: socnet_support ➡ ✉ Email: solomonbog@socnet.store
    • Had some luck checking out resources on luckybrand.cz—their guides helped me structure pages so search engines picked up relevance better. Even simple tweaks made a noticeable difference over random premium backlinks.
  • Topics

×
×
  • 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