Jump to content
  • 0

VIP Npc


Question

9 answers to this question

Recommended Posts

  • 0
Posted

So you need NPC with possibility to confer the status of VIP?

 

Why python? It could be java quest based NPC aswell.

  • 0
Posted

Not tested, but should be fine, fast code:

 

package custom.VipManager;

import com.l2jserver.gameserver.model.actor.L2Npc;
import com.l2jserver.gameserver.model.actor.instance.L2PcInstance;
import com.l2jserver.gameserver.model.quest.Quest;
import com.l2jserver.gameserver.model.quest.QuestState;

/**
* @author Matim
* @version 1.0
*/
public class VipManager extends Quest
{
private final static String qn = "VipManager";

private final static int NPC = 50013;

public VipManager(int questId, String name, String descr)
{
	super(questId, name, descr);
	addFirstTalkId(NPC);
	addStartNpc(NPC);
	addTalkId(NPC);
}

@Override
public String onAdvEvent(String event, L2Npc npc, L2PcInstance player)
{
	String htmltext = "";

	String name = player.getName();

	if (event.equalsIgnoreCase("1"))
	{
		if (player.isVip()) // TODO u need this Cheack! 
		{
			htmltext = "<html><title>VIP Manager</title><head><body><center>" +
			           "<br>Sorry <font color=\"LEVEL\">" + name + "</font>, but you are already VIP!";
		}
		else
		{	
			if (player.getInventory().getItemByItemId(6630) == null)
			{
				return "error";
			}
			else
			{	
				if if (player.getLevel() < 80)
				{
					player.sendMessage("You need Level 80 or higher!");
				}
				else
				{
					player.setIsVip(true); // TODO u need this method to set VIP! 

					htmltext = "<html><title>VIP Manager</title><head><body><center>" +
			                   "<br>Congratulations <font color=\"LEVEL\">" + name + "</font>, you are VIP now!";
				}
			}
		}
	}

	else	
		htmltext = "Error, check whole NPC code!";
	return htmltext;
}

@Override
public String onFirstTalk(L2Npc npc, L2PcInstance player)
{
	String htmltext = "";
	QuestState qs = player.getQuestState(qn);
	if (qs == null)
		qs = newQuestState(player);

	htmltext = "<html><title></title><head><body><center>" +
			   "<br><img src=l2ui.bbs_lineage2 height=16 width=80>" +
			   "<font color=AAAAAA>VIP Manager</font><br>" +
                   "<img src=L2UI_CH3.herotower_deco width=256 height=32>" +
                   
                   "<button value=\"Make me VIP!\" action=\"bypass -h Quest VipManager 1\" back=\"L2UI_ch3.bigbutton_over\" fore=\"L2UI_ch3.bigbutton\" width=95 height=21><br>" +

			   "<font color=\"cc9900\"><img src=\"L2UI_CH3.herotower_deco\" width=256 height=32></font><br1></center></body></head></html>";
			   
	return htmltext;
}

public static void main(String[] args)
{
	new VipManager(-1, qn, "custom");
}
}

 

Warning, you need:

 

isVip(); boolean check (check if is/isnt Vip)

 

setIsVip(boolean b); to make player VIP

 

Maybe your pack has support for VIP engine, I guess it has since you need it.

 

I guess you know, how to install it, right?

  • 0
Posted

matim, on code you write:

				if if (player.getLevel() < 80)
				{
					player.sendMessage("You need Level 80 or higher!");
				}

i mean the double ifs :D

 

 

edit: sorry i didn't see date

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

    • 🔥 HF Rework Multi-Proff x10 is coming! ⚔️ New Samurai Crow Client ⚔️ Reworked Systems & Progression ⚔️ Updated Instances ⚔️ Classic Multeria Atmosphere 🧪 Pre-OBT is already live! 📅 Official OBT: June 29 🚀 Launch: July 3 🐞 Report bugs during testing and earn valuable rewards at launch! See you on the battlefield! https://rework.multeria.world/
    • PlayCMS - это удобная система управления веб-сайтом, разработанная специально для игровых проектов Lineage 2. CMS позволяет быстро запустить полнофункциональный серверный сайт с регистрацией игроков, личным кабинетом, новостями, рейтингами, магазином, модулями и гибкой панелью администратора. Система ориентирована на владельцев серверов Lineage 2, которым нужен красивый, функциональный и понятный сайт без лишних сложностей.  PlayCMS уже предоставляет базовые функции для управления проектами, такие как публикация новостей, настройка страниц, работа с пользователями, подключение шаблонов, а также установка модулей и плагинов. Ключевые особенности PlayCMS: — удобная административная панель; — регистрация и авторизация игроков; — учетная запись пользователя; — новостные и информационные страницы; — рейтинги игроков и кланов; — поддержка шаблонов дизайна; — установка модулей и плагинов через административную панель; — магазин цифровых продуктов; — категории продуктов; — возможность добавить фавикон; — защита лицензии для административной панели; — адаптация для игровых проектов Lineage 2; — возможность расширения функционала в соответствии с потребностями сервера. PlayCMS подходит как для новых игровых проектов, так и для существующих серверов, которым нужен удобный сайт с современным дизайном и интуитивно понятным управлением. Система проста в настройке и поддерживает индивидуальные шаблоны, дополнительные плагины и модули, что позволяет вам развивать свой сайт параллельно с развитием сервера. PlayCMS — это готовое решение для владельцев серверов Lineage 2, которым нужен красивый, быстрый и функциональный сайт. Демоверсия —  https://demo.playcms.ru/ Я разработчик этого чуда. Я готов выслушать конструктивную критику, а также ваши предложения по улучшению движка. Кроме того, я пишу модули любой сложности для этой CMS. Свяжитесь со мной: Telegram — @playcms       EN   PlayCMS is a user-friendly website management system designed specifically for Lineage 2 gaming projects. The CMS allows you to quickly launch a fully functional server website with player registration, personal account, news, ratings, a store, modules, and a flexible admin panel. The system is focused on Lineage 2 server owners who need a beautiful, functional, and clear website without unnecessary complexity. PlayCMS already provides basic features for project management, such as publishing news, customizing pages, working with users, connecting templates, and installing modules and plugins. Key Features of PlayCMS: — a convenient administrative panel; — player registration and authorization; — user account; — news and information pages; — player and clan ratings; — support for design templates; — installation of modules and plugins through the admin panel; — digital product store; — product categories; — ability to add a favicon; — license protection for the admin panel; — adaptation for Lineage 2 game projects; — the ability to expand functionality to meet the needs of the server. PlayCMS is suitable for both new gaming projects and existing servers that require a user-friendly website with a modern appearance and intuitive management. The system is easy to configure and supports individual templates, additional plugins, and modules, allowing you to develop your website alongside your server. PlayCMS is a ready-made solution for Lineage 2 server owners who need a beautiful, fast, and functional website. Demo - https://demo.playcms.ru/ I am the developer of this miracle. I am ready to listen to constructive criticism, as well as your suggestions for improving the engine. I also write modules of any complexity for this cms. Contact me: Telegram - @playcms   Скачать\Download : https://drive.google.com/file/d/15Az9WVDD4SQNyOPAsXMU4-mGHOiA_U_d/view     Added a new module "Wheel of Fortune" to the demo version.  PlayCMS Fortune Wheel - module "Wheel of Fortune" for Play CMS Purpose: - adds a Lineage 2-style wheel of fortune to the user's personal account; - displays in the personal account on top of the balance and warehouse block; - supports prizes: Adena, Coin of Luck, premium account, common items, empty slots; - before submitting the form, shows the animation of the wheel spinning; - if there are no attempts, it displays the "No attempts" modal window; - the won gift is automatically added to the user's inventory; - adds a separate "Wheel of Fortune" section to the admin panel; - in the admin panel, you can edit slots, Item ID, quantity, drop chance, attempts, and the price of purchasing attempts using your balance.
    • To increase visibility and make sure your offer reaches the right audience, I'd recommend exploring the tools at CS2WH. They have a Deals Bot that might help you track market prices and adjust your strategy on the fly. I'm finding their resources super helpful for keeping tabs on the trading scene. Plus, they emphasize safety and provide insights on legal skin trading, which is crucial for maintaining credibility.
    • I'm also trying to contact them, and I only have their Telegram contact, probably the same one as yours, and I haven't received a response in months.
  • Topics

×
×
  • Create New...

Important Information

This community uses essential cookies to function properly. Non-essential cookies and third-party services are used only with your consent. Read our Privacy Policy and We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue..