DISCORD :
https://discord.com/users/325653525793210378
utchiha_market
telegram :
https://t.me/utchiha_market
SELLIX STORE :
https://utchihamkt.mysellix.io/
Join our server for more products :
https://discord.gg/uthciha-services
https://campsite.bio/utchihaamkt
A small reminder for everyone browsing here - our bonus-start is active starting from today, you can already play with the new benefits! Have a good time everyone 🙂
Congratulations to the Creative alliance on the first-ever defeat of Frintezza on our server! 🏆 Your teamwork and dedication have earned you a place in history.🎉
Question
ower12
i have problem i line tiara can help me? pls
else if (command.startsWith("become_noble"))
{
NpcHtmlMessage html = new NpcHtmlMessage(getObjectId());
if (!player.isNoble())
{
//then you check for the level 78
if(player.getLevel()>=78){
//then you ask for items
if(
player.getInventory().getItemByItemId(12345/**1 item id **/).getCount()>=12345/** Is bigger or equals required item count **/
&& player.getInventory().getItemByItemId(12345/**2 item id **/).getCount()>=12345/** Is bigger or equals required item count **/
&& player.getInventory().getItemByItemId(12345/**3 item id **/).getCount()>=12345/** Is bigger or equals required item count **/
&& player.getInventory().getItemByItemId(12345/**4 item id **/).getCount()>=12345/** Is bigger or equals required item count **/
){
L2ItemInstance tiara = player.getInventory().addItem("tiara", 7694, 1, player, null);//give nobless tiara
player.getInventory().equipItemAndRecord(tiara);//equip the tiara if you want
player.setNoble(true, true);
player.sendPacket(new UserInfo(player));
html.setFile("data/html/classmaster/nobleok.htm");
}else
player.sendMessage("You don't have enough items.");
}
else
player.sendMessage("Your level must be 78 or higher.");
}
else
html.setFile("data/html/classmaster/alreadynoble.htm");
player.sendPacket(html);
//and don't forget the imports for l2iteminstance etc..
}
18 answers to this question
Recommended Posts