I have this code in doDie method inside L2MonsterInstance.java file:
int npcId = getTemplate().getId();
switch (npcId)
{
case 150:
if (((L2PcInstance) killer).getClan() == null)
{
return false;
}
if (killer.getActingPlayer() != null)
{
((L2PcInstance) killer).getClan().addReputationScore(10, true); // Change 1 with the reputation points you want to add upon kill monster
((L2PcInstance) killer).sendMessage("Your Clan Reputation is increased by 10.");
}
final L2Summon summon = killer.getSummon();
if (summon.getOwner() != null)
{
return false;
}
}
However, when i am killing monster with ID 150 i am getting a NullPointerException. Instead if the monster is killed by a summon or a pet i am getting a ClassCasterException. How to solve it?
Kacker 😂I need this for tracking and fixing errors.
So, what's up with the hacking? You said so many words, I've been waiting for so long, and still nothing 😂. I demand results. While you're nitpicking the syntax, I'm still waiting for my server to get hacked 😂😂😂.
Maybe I should help you with that? 😂
We are certainly not an ambulance, but we will definitely cure you of blacklists and empty pockets. Live freely with SX!
Each of you will receive a trial version of SX to familiarize yourself with the product, all you have to do is post in this thread
In my opinion, if you're looking for completely open-sourced projects where you are able to contribute.
Interlude (aCis): Official Repo
High-Five (Mobius): Official Repo
Both are respectable projects, but Mobius is going to need a lot of tidying up though. If you're looking for guidance on client development, that's a little more complicated so you'd probably be better off learning that side of things once you have a better idea of specifically what you want to do.
Question
Gries
I have this code in doDie method inside L2MonsterInstance.java file:
However, when i am killing monster with ID 150 i am getting a NullPointerException. Instead if the monster is killed by a summon or a pet i am getting a ClassCasterException.
Edited by GriesHow to solve it?
10 answers to this question
Recommended Posts