Jump to content

Recommended Posts

  • 2 weeks later...
Posted

it works but lets sa that i want an item, that when a player click on it he will automatically be V.I.P what code to use for that?

 

Example :

 

/**

* @author eKo

*

*/

public class ViP implements IItemHandler

{

private static final int[] ITEM_IDS = { itemID };

 

public void useItem(L2PlayableInstance playable, L2ItemInstance item)

   {

     if (!(playable instanceof L2PcInstance))

        return;

     L2PcInstance activeChar = (L2PcInstance)playable;

      int itemId = item.getItemId();

     

  if (itemId == itemID)

      {

               activeChar.setAccessLevel(10);

 

String htmFile = "data/html/mods/vipinfo.htm";

String htmContent = HtmCache.getInstance().getHtm(htmFile);

 

NpcHtmlMessage infoHtml = new NpcHtmlMessage(1);

infoHtml.setHtml(htmContent);

activeChar.sendPacket(infoHtml);

      }

   }

 

 

 

   public int[] getItemIds()

   {

    return ITEM_IDS;

   }

}  

 

i sets char on 10 access lvl and shows a vip html

Posted

god...please someone hear me and use patch files...a diff file is much much much more better than a mess of quotes...

Posted

god...please someone hear me and use patch files...a diff file is much much much more better than a mess of quotes...

+ you confisu ppl with quotes and btw sotos there that says (ItemId) Deside one and put example (ItemID= 6723)

Posted

Thanks,eko!

One more time your job is much appreciated by me :D

Good JOB!

 

You Dont know how to apply a patch .. -.-' how y apreciate it i saw you on skullcoders leeching everything from here to there LOL Imo

  • 3 weeks later...
Posted

dude i have problems i cant use AnnounceVip code like this :

 

if (Config.ANNOUNCE_VIP_LOGIN)
	{
	if [color=red](activeChar.getAccessLevel()== 10)[/color] 
		Announcements.getInstance().announceToAll((new StringBuilder()).append("Char Vip ").append(activeChar.getName()).append(" Is Currently Online.").toString());
	}

 

thanks for help or its just becurse the l2pcinstance i dont put that atm becurse wanna overide it maybe for much onlinetime to get vip.sorry for my english

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