Jump to content

[Share]Set Hero, Donator and Noblesse (Stored in DB) any pack


Recommended Posts

Posted

This can be accomplished on any l2j gracia and interlude any pack xD

 

Well lets start shell we?:D

At the bottom of the post i attached the admin commands...:D

 

And first we chose a .properties file...lets say other.properties

 

# ---------------------------------

# Donator Color Name & Title Config

# ---------------------------------

# Donator Name Color Enabled?.

DonatorNameColorEnabled = false

# Donator Color Name Selection.

DonatorColorName = 00FFFF

# Donator Title Color Enabled?

DonatorTitleColorEnabled = false

# Donator Color Name Selection.

DonatorTitleColor = 00FFFF

we add this there.

 

Then in config.java we add the title color and name color of a donator ( RGB Code Color )

    /** KidZor: Name Color System of Donator enable */
    public static boolean	DONATOR_NAME_COLOR_ENABLED;
    /** KidZor: Color of donator name */
    public static int		DONATOR_NAME_COLOR;

    /** KidZor: Title Color System of Donator enable */
    public static boolean	DONATOR_TITLE_COLOR_ENABLED;
    /** KidZor: Color of donator name */
    public static int		DONATOR_TITLE_COLOR;

                /** Donator color name **/
                DONATOR_NAME_COLOR_ENABLED						= Boolean.parseBoolean(otherSettings.getProperty("DonatorNameColorEnabled", "False"));
                DONATOR_NAME_COLOR						= Integer.decode("0x" + otherSettings.getProperty("DonatorColorName", "00FFFF"));
                DONATOR_TITLE_COLOR_ENABLED						= Boolean.parseBoolean(otherSettings.getProperty("DonatorTitleColorEnabled", "False"));
                DONATOR_TITLE_COLOR							= Integer.decode("0x" + otherSettings.getProperty("DonatorTitleColor", "00FF00"));

and in enterworld.java (clientpaket) this little code, its for donators when they log and the color of the title and name ( if enabled in config

        if (Config.DONATOR_NAME_COLOR_ENABLED)
        {
        	if (activeChar.isDonator())
        	{
        		activeChar.getAppearance().setNameColor(Config.DONATOR_NAME_COLOR);
        		activeChar.sendMessage("Welcome Back: " + activeChar.getName() + " to our Server!");
        		activeChar.sendMessage("Aww and btw " + activeChar.getName() + " please take time to vote ;)");
        		activeChar.sendMessage("Please, Enjoy your Stay !");
        	}
        }
        if (Config.DONATOR_TITLE_COLOR_ENABLED)
        {
        	if (activeChar.isDonator())
        	{
        		activeChar.getAppearance().setTitleColor(Config.DONATOR_TITLE_COLOR);
        	}
        }

Its good to add it on line 312

 

Now in L2PlayableInstance.java

 

/** donator System **/ 
private boolean	_donator	= false;

/**
 * Set the Donator Flag of the L2PlayableInstance.<BR><BR>
 **/
public void setDonator(boolean value)
{
	_donator = value;
}

/**
 * Return True if the L2PlayableInstance is a Donator.<BR><BR>
 **/
public boolean isDonator()
{
	return _donator;
}

put it at the end it don't matter xD

 

And now L2PcInstance.java xD

 

find private static final String RESTORE_CHARACTER

and at the end of the string tipe " ,hero,donator " this sh1t loads u hero and donator xD

 

then we go find: player.setNoble(rset.getInt("nobless")==1);

then after it add the lines:

 

			//L2J-Archid Donator and Hero Mod
			player.setHero(rset.getInt("hero")==1);
			player.setDonator(rset.getInt("donator")==1);

 

And after that find: public void leaveOlympiadObserverMode() line 8015

after the strings end put this code: ( it updates the status...changing the donator color name & title instantly when u do //setdonator xD )

public void updateNameTitleColor()
{
	// Donator Color  and title update
	// Note: this code can be used for GM's too
	if (isDonator())
		getAppearance().setNameColor(Config.DONATOR_NAME_COLOR);
		getAppearance().setTitleColor(Config.DONATOR_TITLE_COLOR);
	broadcastUserInfo();
}

 

And were almost done!

 

Now we add the the commands (The admin commands are attached at the end of the post add them in: gameserver/handler/admincommandhandlers )

After that's done we register our commands:

In l2j server or any tipe of that (L2J Archid, L2J Oneo)

net/sf/l2j/gameserver/gameserver.java

import net.sf.l2j.gameserver.handler.admincommandhandlers.AdminDonator;
import net.sf.l2j.gameserver.handler.admincommandhandlers.AdminHero;
import net.sf.l2j.gameserver.handler.admincommandhandlers.AdminNoble;

And then we add this (this register the commands xD )

        _adminCommandHandler.registerAdminCommandHandler(new AdminDonator());
        _adminCommandHandler.registerAdminCommandHandler(new AdminHero());
        _adminCommandHandler.registerAdminCommandHandler(new AdminNoble());

 

Well that's kinda all...

 

Awwwww almost forgot xD

In command-privileges.properties

Add at the end

#################
### L2JArchid ###
#################
admin_sethero = 100
admin_setnoble = 100
admin_setdonator = 100

 

Admin Comands:

Admin Commands Java

 

K now that's all xD

Aww and please tell me this is useful or not cus it think it is >.>

Awwwww and btw The //sethero is permanently and it dosent interfere with Olympiad xD good for donate...

 

Shit i forgot this:

For the Db XD

ALTER TABLE `characters` ADD `donator` decimal(1,0) NOT NULL DEFAULT 0;
ALTER TABLE `characters` ADD `hero` decimal(1,0) NOT NULL DEFAULT 0;

Run this query  in mysql..so the hero and the donator Stores xD Thx

Posted

And this for 500 post? LoL i think 100 or 150 may be but 500? u r crazy dude . . .

also is just for your pack =P its like if u where doing a guide of how to use your pack w00t

 

for those who use it well ty but i use l2j =P bbz

Posted

you can use it to other packs too but 500 posts are too much , arent they? make it 150-200 and it will be fine! good job kidzor

Posted

ye u guys are probably right this post restriction thingy stinks xD

 

ps: its not only for donate...i just did an example...its a fun thing to do:P u have endless possibilities to do anything with this codes :P

 

And this for 500 post? LoL i think 100 or 150 may be but 500? u r crazy dude . . .

also is just for your pack =P its like if u where doing a guide of how to use your pack w00t

 

for those who use it well ty but i use l2j =P bbz

 

It works on any pack ( specially perfect and tested on l2j and oneo....)

The l2j-archid thingy is for publicity xD

Posted

I have a system that's very much like, but instead, I am doing fake Nobless and fake Heroes.

 

Also, a new table for this is easier to keep track on instead of altering an excisting table.

 

You should optimize your coding, I see several flaws inside it.

Posted

Someone +1 him please...

 

Si..ce sa zic...bravo :) daca mai pune sa aleg e cel mai bun share de pe forum :)

Guest
This topic is now closed to further replies.


  • Posts

    • 流量套利 + SMM 面板 — 强大的增长组合. 通过社交信号加强推广活动,提高信任度和转化率,加速扩张。 为套利专员和 SMM 提供的所有工具 — 在一个地方. 有效链接: SMM 面板: 前往 – 推广您的社交媒体账户。 其他服务和产品: 数字商品商店(网站): 前往 商店 Telegram 机器人: 前往 – 通过 Telegram 信使方便访问商店。 虚拟号码服务: 前往 用于购买 Telegram Stars 的 Telegram 机器人: 前往 – 在 Telegram 中快速且优惠地购买 Stars。 SMM 面板: 前往 – 推广您的社交媒体账户。 我们想向您展示当前促销和特别优惠列表,用于购买我们服务的产品和服务: 1. 您可以在首次购买时使用促销代码:SOCNET(15% 折扣) 2. 获取 $1 商店余额或 10–20% 折扣——只需在我们网站注册后按以下模板填写您的用户名:"SEND ME BONUS, MY USERNAME IS..." ——您需要在我们的论坛主题中发布! 3. SMM 面板首次试用可获得 $1:只需在我们的网站(Support)提交主题为 “Get Trial Bonus” 的工单。 4. 我们的 Telegram 频道和 Stars 购买机器人中每周都会赠送 Telegram Stars! 新闻: ➡ Telegram 频道: https://t.me/accsforyou_shop ➡ WhatsApp 频道: https://chat.whatsapp.com/K8rBy500nA73z27PxgaJUw?mode=ems_copy_t ➡ Discord 服务器: https://discord.gg/y9AStFFsrh 联系方式和支持: ➡ Telegram: https://t.me/socnet_support ➡ WhatsApp: https://wa.me/79051904467 ➡ Discord: socnet_support ➡ ✉ Email: solomonbog@socnet.store
    • 流量套利 + SMM 面板 — 强大的增长组合. 通过社交信号加强推广活动,提高信任度和转化率,加速扩张。 为套利专员和 SMM 提供的所有工具 — 在一个地方. 有效链接: SMM 面板: 前往 – 推广您的社交媒体账户。 其他服务和产品: 数字商品商店(网站): 前往 商店 Telegram 机器人: 前往 – 通过 Telegram 信使方便访问商店。 虚拟号码服务: 前往 用于购买 Telegram Stars 的 Telegram 机器人: 前往 – 在 Telegram 中快速且优惠地购买 Stars。 SMM 面板: 前往 – 推广您的社交媒体账户。 我们想向您展示当前促销和特别优惠列表,用于购买我们服务的产品和服务: 1. 您可以在首次购买时使用促销代码:SOCNET(15% 折扣) 2. 获取 $1 商店余额或 10–20% 折扣——只需在我们网站注册后按以下模板填写您的用户名:"SEND ME BONUS, MY USERNAME IS..." ——您需要在我们的论坛主题中发布! 3. SMM 面板首次试用可获得 $1:只需在我们的网站(Support)提交主题为 “Get Trial Bonus” 的工单。 4. 我们的 Telegram 频道和 Stars 购买机器人中每周都会赠送 Telegram Stars! 新闻: ➡ Telegram 频道: https://t.me/accsforyou_shop ➡ WhatsApp 频道: https://chat.whatsapp.com/K8rBy500nA73z27PxgaJUw?mode=ems_copy_t ➡ Discord 服务器: https://discord.gg/y9AStFFsrh 联系方式和支持: ➡ Telegram: https://t.me/socnet_support ➡ WhatsApp: https://wa.me/79051904467 ➡ Discord: socnet_support ➡ ✉ Email: solomonbog@socnet.store
    • Traffic arbitrage + SMM panel — a powerful combination for growth. Strengthen campaigns with social signals, increase trust and conversion, scale faster. All tools for arbitrage specialists and SMM — in one place. Active links: SMM Panel: Go to – promotion of your social media accounts. Other services and products: 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 want 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
    • Traffic arbitrage + SMM panel — a powerful combination for growth. Strengthen campaigns with social signals, increase trust and conversion, scale faster. All tools for arbitrage specialists and SMM — in one place. Active links: SMM Panel: Go to – promotion of your social media accounts. Other services and products: 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 want 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
    • Traffic arbitrage + SMM panel — a powerful combination for growth. Strengthen campaigns with social signals, increase trust and conversion, scale faster. All tools for arbitrage specialists and SMM — in one place. Active links: SMM Panel: Go to – promotion of your social media accounts. Other services and products: 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 want 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
  • 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