Jump to content
Sign in to follow this  

Crumble the Undead [PI] - 100%

Recommended Posts

I don't know if this has been released. If it has I'm sorry but I didn't see any so I thought I'd release this one I created.

In Config.java place

[CODE]public static final String[] UNDEAD = {
"armoured zombie", "ankou", "banshee", "crawling hand", "dried zombie", "ghost", "ghostly warrior", "ghast",
"mummy", "mighty banshee", "revenant imp", "revenant goblin", "revenant icefiend", "revenant pyrefiend",
"revenant hobgoblin", "revenant vampyre", "revenant werewolf", "revenant cyclops", "revenant darkbeast",
"revenant demon", "revenant ork", "revenant hellhound", "revenant knight", "revenant dragon",
"shade", "skeleton", "skeleton brute", "skeleton thug", "skeleton warlord", "summoned zombie",
"skorge", "tortured soul", "undead chicken", "undead cow", "undead one", "undead troll",
"zombie", "zombie rat", "zogre"

In your AttackNpc method search for

[CODE]"You must use bolts with a crossbow"[/CODE]

Under that if statement place

[CODE]if (c.usingMagic && c.MAGIC_SPELLS[c.spellId][0] == 1171) {
if (!NPCHandler.isUndead(i)) {
c.sendMessage("This spell only affects skeletons, zombies, ghosts and shades.");
c.npcIndex = 0;

In your AttackPlayer method add:
if (c.usingMagic && c.MAGIC_SPELLS[c.spellId][0] == 1171) {
c.sendMessage("This spell only affects skeletons, zombies, ghosts and shades, not humans.");

In your NPCHandler place the following

[CODE]public static boolean isUndead(int index) {
String name = NPCHandler.getNpcListName(npcs[index].npcType);
for(String s : Config.UNDEAD)
return true;
return false;

If you don't have the Spell Itself here it is

[CODE]{1171,39,724,145,146,147,15,25,556,2,557,2,562,1,0,0}, // crumble undead[/CODE]

[COLOR="#FF0000"]Don't forget to add imports to combatassistant.java for NPChandler.java

Also make sure public static String getNpcListName is static.[/COLOR]

Any errors please post below and I will help and if it's an error with my coding I will edit it ASAP!


80% to Me
20% to Jason for helping me with an Error on retreiving the NPC Names

Share this post

Link to post
Share on other sites
Sign in to follow this