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?
You don’t always have to say a lot - sometimes silence speaks louder.
Sometimes it’s enough just to work steadily, fast, and without unnecessary noise.
No loud words, no promises - only results.
Website: https://vibe-sms.net/
📱 Telegram channel: https://t.me/vibe_sms
SELLING EMPTY TELEGRAM BOTS WITH AGE
Registration date: November 2024
High-quality & clean bots — no subscribers, no bans, created on fresh IPs.
y rested and reliable — perfect for:
— Telegram search ranking
— any technical or marketing tasks
Delivery options:
tdata, by phone number, ownership transfer, or via tokens.
Current price list:
From 3 pcs — $3 each
From 20 pcs — $2.5 each
From 60 pcs — $2.3 each
From 100 pcs — $2.2 each
From 400 pcs — $1.9 each
Over 15,000+ bots available — ready for instant delivery.
Contact on Telegram: @SMMTG6
Telegram Bot TOP Search Promotion | SEO Optimization for Bots |
SMMTG.PRO
We promote Telegram bots to the TOP of search results — by keywords, topics, and countries.
What’s included:
• Promotion to the TOP of Telegram search
• Bot optimization for Telegram algorithms
• Competitor analysis and keyword selection
• Testing and securing stable ranking
Delivery time:
2–3 days per bot
Pricing:
Starts from $40 per bot
(final cost depends on competition level and target country)
We work with 50+ countries:
Russia • Ukraine • USA • Israel • Uzbekistan • Turkey • China • Thailand • Europe • India
Training is also available:
Telegram bot SEO optimization
Techniques & insights for reaching TOP search positions
Real-world cases and recommendations
Contact:
Telegram — @SMMTG6
Our SMM panel: SMMTG.PRO
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