Jump to content
  • 0

[HELP] NPE Error With Hitman Event of Setekh


Question

Posted

Well , I've tried to adapt Hitman Event From Gracia Final to Interlude without any problem.

i compiled my serverpack and then i logged in to test it, i set the bounty to my 2nd char successfully , but when i tried to kill my 2nd char with my 1st char i get an NPE Error on my gs console, and IG i get no adena reward and no msg that my target was assasinated or sth.

i tried a lot of things but nothing worked.

 

something that might help :

 

NPE error on gs ( ffs ) : java.lang.NullPointerException

 

Error on .log file : 2010.06.29 13:14:44,390 SEVERE 13 net.sf.l2j.gameserver.model.L2Character java.lang.NullPointerException

 

Recommended Posts

  • 0
Posted

i got errors when i do it like this ..

 

 

but still you never cast something to itself...if you have errors its because of the whole onDeath metho in the hitman is wrong and need to be changed

  • 0
Posted

but still you never cast something to itself...if you have errors its because of the whole onDeath metho in the hitman is wrong and need to be changed

 

thats what i said before, that i got errors in onDeath method with ur way and u just came like oh i will rape you! chillout. i just need freaking help

  • 0
Posted

thats what i said before, that i got errors in onDeath method with ur way and u just came like oh i will rape you! chillout. i just need freaking help

 

well than change the method and make the killer L2Character

  • 0
Posted

well than change the method and make the killer L2Character

 

yes i did it..and i got errors

on killer.addadena

and also killer.sendMessage

 

  • 0
Posted

The method sendMessage(String) is undefined for the type L2Character

 

The method addAdena(String, int, L2PcInstance, boolean) is undefined for the type L2Character

 

 

  • 0
Posted

instead of addAdena use addItem for killer and cast it to L2PcInstance for sendMessage its defined for both l2PcInstance and L2Character so i dont know about that

  • 0
Posted

I adapted it on L2J archid (the old free one), and all is working fine, except some errors than I didn't agree with (guards kill you, you're still under bounty but the guy receive a msg like you are dead and there is no more bounty on you), but I corrected it.

 

All is working fine, I suppose you missed something.

 

			if(Config.ALLOW_HITMAN_GDE)
			Hitman.getInstance().onDeath(pk, this);

 

got it on the doDie of L2PcInstance. L2Character doDie isn't used.

 

onDeath isn't supposed to be changed, it's called from hitman.java (model/entity/...). Here it is (modded) :

 

	public void onDeath(L2PcInstance assassin, L2PcInstance target)
{
	if(_targets.containsKey(target.getObjectId()))
	{
		PlayerToAssasinate pta = _targets.get(target.getObjectId());
		String name= getOfflineData(null, pta.getClientId())[1];
		L2PcInstance client = L2World.getInstance().getPlayer(name);

		target.sendMessage("You have been assassinated. You haven't any bounties on your head now.");

		if(client != null)
		{
			client.sendMessage("Your request to kill "+target.getName()+" has been fulfilled.");
			client.setHitmanTarget(0);
		}

		assassin.sendMessage("You assassinated "+target.getName()+", his bounty will be converted in adena !");
		assassin.addAdena("Hitman", pta.getBounty(), target, true);
		removeTarget(pta.getObjectId(), true);
	}
}

 

addAdena is used on many others .java (under IL anyway), and written in L2PcInstance. It's why you got addAdena erros, when you try to change to L2Character.

 

Btw, why to change on L2Character ? The finality is to kill a player, so... L2PcInstance. I agree the killer haven't to be a L2PcInstance, as there is summons too.

 

Just give a decent error ^_^", with non modified code.

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

    • A modern game panel rebuilt from scratch for Lineage 2 private servers What is L2jWeb V3? L2jWeb V3 is the new version of the panel, fully refactored from scratch. This is not a small update on top of the old V2 code. The whole structure has been redesigned with cleaner logic, better separation between the web panel and the game database, improved security, and a much better way to support different L2J sources. The goal is simple. Server owners should be able to manage their project, users, donations, shops, game accounts, characters, and multiple servers from one panel without having to fight with hardcoded database logic every time they use a different source. Refactored From Scratch The new implementation was built again from the ground up. The old approach worked, but over time it became harder to maintain because every L2J source has its own database structure, table names, columns, and custom changes. V3 solves this in a cleaner way. Instead of mixing source specific queries all over the panel, the system now uses a proper mapping layer for the game database. Correct L2J Source Database Mapping One of the biggest improvements in L2jWeb V3 is the new database mapping system for different L2J sources. Every important game object is bound to an interface contract. Accounts, characters, items, services, rewards, and other source related actions are not hardcoded directly into the panel anymore. The panel works with contracts, and each L2J source has its own implementation behind those contracts. In simple words, the panel knows what it wants to do, and the selected source knows how to do it in its own database. This makes the project much easier to maintain, easier to extend, and much safer when adding support for more L2J sources in the future. Multi Server Support L2jWeb V3 supports multiple game servers from the same installation. You can add and manage different servers from the admin panel. Each server can have its own database connection, source type, settings, shop products, and services. This is useful if you run more than one realm, different chronicles, seasonal servers, test servers, or multiple projects from the same community. x402 Wallet Crypto Payments L2jWeb V3 also adds support for the x402 protocol. This is a very important feature for modern payments because it allows wallet to wallet payments without a traditional middleman holding the money. With normal payment gateways, the payment usually goes through a company that controls the flow, keeps custody for part of the process, applies rules, and may block or delay things. With x402, the user pays directly from their wallet and the server owner receives the payment directly to their wallet. The facilitator helps the application verify the payment. It checks the payment proof and confirms that the request has been paid correctly, so the panel can safely continue with the donation or balance update. The important part is that the facilitator is not the same as a classic payment processor. It helps with verification and coordination, but the funds move wallet to wallet. For server owners, this gives a more direct payment option and reduces dependency on traditional third party platforms. In order to learn more for x402 protocol click here Donation System L2jWeb V3 includes a complete donation system. Supported payment options can include: Stripe PayPal x402 wallet to wallet crypto payments Donations can be stored in the user's master account balance and then used inside the panel for shop purchases, services, or other features depending on your setup. Master Account System Players use one master account to manage their game accounts and characters. This makes things easier for the player because they do not need to remember every detail separately. From the user panel, they can create game accounts, manage existing accounts, recover details, and access available services. Game Account Control Players can manage their game accounts directly from the panel. Available features can include: Create game accounts Manage existing game accounts Reset or recover credentials View linked characters Use account related services Receive game account details by email if enabled Character Menu And Services The character menu gives players quick access to useful character actions from the web panel. For example, if a character gets stuck, the player can use the unstuck option and send the character back to town without waiting for staff support. More services can be configured depending on the server setup. Shop And Services The shop is fully manageable from the admin panel. You can add products, edit prices, enable or disable products, and choose which server each product is available for. This makes it easier to monetize your server while keeping control over what each server can sell. For example, one server can have different products or prices than another server. Fully Customizable Theme The panel is fully customizable through theme settings. You can change logos, icons, and all main colors directly from the panel, so the website can match your server's branding without editing the code manually. Admin Panel L2jWeb V3 includes a powerful admin panel for managing your project. Admin features include: Server management User management Donation logs Shop management Panel settings Theme settings for logos, icons, and colors Social login settings Security options Game source configuration Most important settings are configurable directly from the panel, so you do not need to edit files manually for every small change. Security Features Security was also improved in the new implementation. Available security features include: Two factor authentication Email verification Cloudflare Turnstile protection against bots Rate limiting per guest IP or authenticated user CSRF protection XSS protection Security headers HTTPS only protection Password confirmation for sensitive actions Social login support Social Login The panel can support social login providers such as Google and Discord. This gives players a faster way to register and log in, while still keeping the account system controlled from the panel. Other Features Database cache system Server status Multi source support Optional email verification Optional account details email after registration Cloudflare Turnstile bot protection Modern user dashboard Modern admin dashboard Clean Laravel based implementation Demo demo.l2jweb.com Some features may be disabled in the demo version or may not work exactly like a live installation. Contact Discord: Contact me Pricing Price is 150 euro flat, the same as Version 2. Existing customers get a 50 euro discount. Custom Work If you need custom features, source adaptations, special services, design changes, or extra integrations, you can contact me and we can discuss your request. Extra custom work is not included by default and must be paid separately. Test And Payment Files are not delivered before payment. If you want to test the panel first, a demo link can be provided.
    • Well, it turns out 100 characters really wasn’t enough for a proper test. Here’s a simulation of 1,500 players in a single location — each one is randomly equipped, running around randomly, and casting skills.    
  • 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..