Jump to content
  • 0

[Request] hero for a week or a month


Question

Posted

Hello again guys.

 

I apply Coyote code for making a player "hero" with skills untill restart,by hitting one button to a specific npc.

 

I just want when a player try to hit "Hero" button ,need to have one coin of my choice.

How i will do that?

 

Recommended Posts

  • 0
Posted

You can choose between java and python but java is better.

 

so???? with java what need to apply?

  • 0
Posted

L2NpcInstance

 

else if (command.startsWith("heroUntilRestart"))

{

activeChar.setHero(true);

activeChar.broadcastUserInfo();

}

 

 

<a action="bypass -h npc_%objectId%_heroUntilRestart">Hero until restart</a><br>

  • 0
Posted

why u dont use "hero with one item until restart" just sell the item or set it as drop anywhere and its the same...

 

somethings like that:

http://www.maxcheaters.com/forum/index.php?topic=34266.0

 

thx for that man.It is for l2jfree.

Can someone remake it for l2j server ?

 

L2NpcInstance

 

else if (command.startsWith("heroUntilRestart"))

{

activeChar.setHero(true);

activeChar.broadcastUserInfo();

}

 

 

<a action="bypass -h npc_%objectId%_heroUntilRestart">Hero until restart</a><br>

 

Do it specify somewhere to sell any item in order to become hero?

 

 

  • 0
Posted

L2NpcInstance

 

else if (command.startsWith("heroUntilRestart"))

{

int itemId = 5575;

if (player.getInventory().getInventoryItemCount(itemId, 0) >= 1)

{

InventoryUpdate iu = new InventoryUpdate();

player.destroyItemByItemId("Consume", itemId, 1, player, null))

player.getInventory().updateDatabase();

player.sendPacket(iu);

player.setHero(true);

player.broadcastUserInfo();

player.sendMessage("blablalblalbababa");

}

else

{

activeChar.sendMessage("You don't have necesary item.");

}

}

 

 

<a action="bypass -h npc_%objectId%_heroUntilRestart">Hero until restart</a><br>

 

You're so lazy to put a check

  • 0
Posted

lazy not ,pro not ........ just a guy who want to learn .

And this code need to put it somewhere exactly in npcinstance ?

  • 0
Posted

onBypassFeedback method after

 

            else if (command.startsWith("ExitRift"))

            {

                if(player.isInParty() && player.getParty().isInDimensionalRift())

                {

                    player.getParty().getDimensionalRift().manualExitRift(player, this);

                }

                else

                {

                    DimensionalRiftManager.getInstance().handleCheat(player, this);

                }

}

 

 

 

  • 0
Posted
L2NpcInstance

 

else if (command.startsWith("heroUntilRestart"))

{

  int itemId = 5575;

  if (player.getInventory().getInventoryItemCount(itemId, 0) >= 1)

  {

      InventoryUpdate iu = new InventoryUpdate();

      player.destroyItemByItemId("Consume", itemId, 1, player, null))

      player.getInventory().updateDatabase();

      player.sendPacket(iu);

      player.setHero(true);

      player.broadcastUserInfo();

      player.sendMessage("blablalblalbababa");

  }

  else

  {

      activeChar.sendMessage("You don't have necesary item.");

  }

}

 

 

<a action="bypass -h npc_%objectId%_heroUntilRestart">Hero until restart</a><br>

 

This code finally goes for IL .

I use l2jserver epilogue.

Can someone help me plz? :/

 

Give me exactly the code and where to place it.

  • 0
Posted

Replace onBypassFeedback method with yours from L2Npc

 


public void onBypassFeedback(L2PcInstance player, String command)
{
	//if (canInteract(player))
	{
		if (isBusy() && getBusyMessage().length() > 0)
		{
			player.sendPacket(ActionFailed.STATIC_PACKET);

			NpcHtmlMessage html = new NpcHtmlMessage(getObjectId());
			html.setFile(player.getHtmlPrefix(), "data/html/npcbusy.htm");
			html.replace("%busymessage%", getBusyMessage());
			html.replace("%npcname%", getName());
			html.replace("%playername%", player.getName());
			player.sendPacket(html);
		}
		else if (command.startsWith("heroUntilRestart"))
		{
		   int itemId = 5575;
		   if (player.getInventory().getInventoryItemCount(itemId, 0) >= 1)
		   {
			  InventoryUpdate iu = new InventoryUpdate();
			  player.destroyItemByItemId("Consume", itemId, 1, player, null))
			  player.getInventory().updateDatabase();
			  player.sendPacket(iu);
			  player.setHero(true);
			  player.broadcastUserInfo();
			  player.sendMessage("blablalblalbababa");
		   }
		   else
		   {
			  activeChar.sendMessage("You don't have necesary item.");
		   }
		}
		else 
		{
			IBypassHandler handler = BypassHandler.getInstance().getBypassHandler(command);
			if (handler != null)
				handler.useBypass(command, player, this);
			else
				_log.info(getClass().getSimpleName()+": Unknown NPC bypass: \""+command+"\" NpcId: "+getNpcId());
		}
	}
}

  • 0
Posted

thx for the code add.

I apply it and it gives some errors.Some of them i fixed them alone but some not.

These are :

 

1) The method destroyItemByItemId(String, int, long, L2Object, boolean) in the type L2PcInstance is not applicable for the arguments (String, int, int, L2PcInstance, null)

 

2) activeChar cannot be resolved

 

3) InventoryUpdate cannot be resolved

 

Can you help me to fix them?

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

    • what do u mean i want to change the normal weapons some weapons are working perftect some not getting th effect and the arcana has the effect above the weapons as u see ... i dont what is the probkenm
    • Stop paying for files that are already public and free. Here you can download a fully working Interlude server with C4-like gameplay, including source code so you can compile it yourself and verify everything. People will try to convince you that free releases are “broken”, “full of backdoors”, etc. That’s exactly why I’m also providing the SVN with the full source – so you can: Review the code yourself Remove / modify whatever you don’t like Compile your own binaries What’s included GX-EXT Interlude server (C4-style gameplay) – L2Off Client Interlude tweaked for C4 gameplay Public SVN with source code Downloads: Server GX-EXT: https://www.mediafire.com/file/q5ipkjd36tnhfxv/L2OFF_C4_C4_ACU_GXEXT.rar/file Client Interlude C4 Gameplay: https://www.mediafire.com/file/rdkfc8wwau042oh/Cliente_Interlude_Jugabilidad_C4.rar/file SVN (source code, delayed a couple of months to avoid reselling fresh work): https://svn.l2servers.com.ar/!/#GX-EXT_INTERLUDE User: gx Pass: gx How to compile To compile the source you will need: Visual Studio 2005 (x64 toolset) (Classic L2Off toolchain – yes, it’s old, but that’s what the original server uses.) Use this as you want: learn, test, open your own server, or just audit the code. But please, stop buying the same leaked/resold files over and over when you can get them here for free, with source, and actually know what you’re running.  
    • @GX-Ext Please reupload the pack+web+client because all the links inside that post or in the https://l2servers.com.ar/ are dead
    • Weapon dat is not the same for all, since you have custom things for sure no. You can contact @NevesOma
    • hello guys im facing a problem with the weapons .. i want to add hero glow on s weapons arcana ,dragonic bow etc.. some weapons are work peftect .. some not for example i add the line  LineageEffect.e_u092_h for fists and didnt work didnt even get the hero glow.. and the arcana the glow is on the top of weapon not down side like hero zeus mace any ideas?.. or does anybody has the weapongrp.dat file ready ?
  • 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