Thread: monster examine spell

Results 1 to 4 of 4
  1. #1 monster examine spell 
    Registered Member
    Join Date
    Nov 2012
    Posts
    523
    Thanks given
    12
    Thanks received
    49
    Discord
    View profile
    Rep Power
    26
    im trying to code in monster examine spell from lunars

    i added this code in my lunars file:
    Spoiler for lunars.java:

    public static boolean MonsterExamine(Player player, NPC npc) {
    if (npc == null || npc.isDead() || npc.hasFinished())
    return false;
    WorldTasksManager.schedule(new WorldTask() {
    private int loop;

    @Override
    public void run() {
    if (npc == null || npc.isDead() || npc.hasFinished() || player == null || !player.hasStarted() || player.hasFinished()) {
    this.stop();
    return;
    }
    if (loop == 0) {
    player.getSkills().addXp(Skills.MAGIC, 61);
    player.setNextFaceEntity(npc);
    player.setNextGraphics(new Graphics(1059));
    player.setNextAnimation(new Animation(6293));
    } else if (loop == 1) {
    npc.setNextGraphics(new Graphics(736));
    player.getInterfaceManager().sendTab(player.getInt erfaceManager().hasRezizableScreen() ? 118 : 178, 522);
    player.getPackets().sendIComponentText(522, 0, "Monster Name:<br>" + npc.getDefinitions().getName());
    player.getPackets().sendIComponentText(522, 1, "Combat Level: " + npc.getCombatLevel());
    player.getPackets().sendIComponentText(522, 2, "Hitpoints: " + npc.getHitpoints() + "/" + npc.getMaxHitpoints());
    player.getPackets().sendIComponentText(522, 3, "Creature's max hit: " + npc.getMaxHit());
    player.getPackets().sendIComponentText(522, 4, "" + NPCExamines.getExamine(npc));
    player.setNextFaceEntity(null);
    this.stop();
    }
    loop++;
    }
    }, 0, 1);
    return true;
    }

    and in:
    Spoiler for magic.java:
    public static final void processLunarSpell(final Player player, final NPC npc, final int spellId) {
    player.stopAll(false);
    switch (spellId) {
    case 28:
    Lunars.MonsterExamine(player, npc);
    }
    return;
    }


    and in:
    Spoiler for Buttonhandler.java:
    } else if (interfaceId == 430) {
    if (player.getTemporaryAttributtes().get("JAGGED") == Boolean.TRUE) {
    player.getDialogueManager().startDialogue("SimpleM essage",
    "You cannot do that until you've verified this device with JAG.");
    return;
    }
    if (componentId == 5)
    player.getCombatDefinitions().switchShowCombatSpel ls();
    else if (componentId == 7)
    player.getCombatDefinitions().switchShowTeleportSk illSpells();
    else if (componentId == 9)
    player.getCombatDefinitions().switchShowMiscallane ousSpells();
    else if (componentId >= 11 & componentId <= 13)
    player.getCombatDefinitions().setSortSpellBook(com ponentId - 11);
    else if (componentId == 20)
    player.getCombatDefinitions().switchDefensiveCasti ng();
    else
    Magic.processLunarSpell(player, componentId, packetId);

    when i cast spell on npc nothing happens?
    Reply With Quote  
     

  2. #2  
    Registered Member
    Join Date
    Nov 2012
    Posts
    523
    Thanks given
    12
    Thanks received
    49
    Discord
    View profile
    Rep Power
    26
    Bump
    Reply With Quote  
     

  3. #3  
    Registered Member

    Join Date
    Feb 2013
    Posts
    4,417
    Thanks given
    59
    Thanks received
    478
    Rep Power
    138
    System.out.println

    See where it's getting stuck.
    Reply With Quote  
     

  4. #4  
    Registered Member
    Join Date
    Nov 2012
    Posts
    523
    Thanks given
    12
    Thanks received
    49
    Discord
    View profile
    Rep Power
    26
    Bump
    Reply With Quote  
     


Thread Information
Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)


User Tag List

Similar Threads

  1. Monster Examine Interface
    By George in forum Snippets
    Replies: 9
    Last Post: 03-05-2016, 09:51 AM
  2. PvM & Monster examining
    By Trivium in forum Show-off
    Replies: 7
    Last Post: 07-19-2013, 11:43 AM
  3. Monster Examine Interface
    By K4rn4ge in forum Show-off
    Replies: 16
    Last Post: 06-09-2010, 10:38 PM
  4. Monster examine
    By Pie in forum Help
    Replies: 13
    Last Post: 02-06-2009, 12:15 AM
  5. All Construction Object IDs and Examine Info
    By Jazz in forum Configuration
    Replies: 6
    Last Post: 09-14-2007, 06:18 PM
Posting Permissions
  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •