Thread: Kree'ara Teleporting players

Results 1 to 3 of 3
  1. #1 Kree'ara Teleporting players 
    Registered Member
    Join Date
    Jan 2019
    Posts
    9
    Thanks given
    0
    Thanks received
    0
    Rep Power
    0
    does anyone know wich code causes the boss to teleport the player? it teleports them also out of the room

    combatscript:


    package com.rs.game.npc.combat.impl;

    import com.rs.game.Animation;
    import com.rs.game.Entity;
    import com.rs.game.Graphics;
    import com.rs.game.World;
    import com.rs.game.WorldTile;
    import com.rs.game.npc.NPC;
    import com.rs.game.npc.combat.CombatScript;
    import com.rs.game.npc.combat.NPCCombatDefinitions;
    import com.rs.utils.Utils;

    public class Kreearra extends CombatScript {

    @Override
    public int attack(NPC npc, Entity target) {
    final NPCCombatDefinitions defs = npc.getCombatDefinitions();
    if (!npc.isUnderCombat()) {
    npc.setNextAnimation(new Animation(17396));
    delayHit(
    npc,
    1,
    target,
    getMeleeHit(
    npc,
    getRandomMaxHit(npc, 260,
    NPCCombatDefinitions.MELEE, target)));
    return defs.getAttackDelay();
    }
    npc.setNextAnimation(new Animation(17397));
    for (Entity t : npc.getPossibleTargets()) {
    if (Utils.getRandom(2) == 0)
    sendMagicAttack(npc, t);
    else {
    delayHit(
    npc,
    1,
    t,
    getRangeHit(
    npc,
    getRandomMaxHit(npc, 720,
    NPCCombatDefinitions.RANGE, t)));
    World.sendProjectile(npc, t, 1197, 41, 16, 41, 35, 16, 0);
    WorldTile teleTile = t;
    for (int trycount = 0; trycount < 10; trycount++) {
    teleTile = new WorldTile(t, 2);
    if (World.canMoveNPC(t.getPlane(), teleTile.getX(),
    teleTile.getY(), t.getSize()))
    break;
    }
    t.setNextWorldTile(teleTile);
    }
    }
    return defs.getAttackDelay();
    }

    @Override
    public Object[] getKeys() {
    return new Object[] { 6222 };
    }

    private void sendMagicAttack(NPC npc, Entity target) {
    npc.setNextAnimation(new Animation(17397));
    for (Entity t : npc.getPossibleTargets()) {
    delayHit(
    npc,
    1,
    t,
    getMagicHit(
    npc,
    getRandomMaxHit(npc, 210,
    NPCCombatDefinitions.MAGE, t)));
    World.sendProjectile(npc, t, 1198, 41, 16, 41, 35, 16, 0);
    target.setNextGraphics(new Graphics(1196));
    }
    }
    }
    Reply With Quote  
     

  2. #2  
    van 't stad

    Shnek's Avatar
    Join Date
    Oct 2013
    Posts
    1,007
    Thanks given
    307
    Thanks received
    238
    Rep Power
    81
    Code:
     
    t.setNextWorldTile(teleTile);


    Do not use the vps from ovh, blocking vps without reason and no customer support
    Reply With Quote  
     

  3. #3  
    Registered Member
    Join Date
    Jan 2019
    Posts
    9
    Thanks given
    0
    Thanks received
    0
    Rep Power
    0
    Quote Originally Posted by Shnek View Post
    Code:
     
    t.setNextWorldTile(teleTile);
    thanks bro didnt see that
    Reply With Quote  
     


Thread Information
Users Browsing this Thread

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

Similar Threads

  1. [PI] NPC that teleports players [Simple]
    By Trek in forum Snippets
    Replies: 12
    Last Post: 12-22-2013, 01:24 AM
  2. Npc's Maxhit.. Kree ara etc
    By lilchicken77 in forum Help
    Replies: 5
    Last Post: 12-03-2010, 07:00 AM
  3. NPC teleporting players
    By death shock in forum Requests
    Replies: 1
    Last Post: 05-04-2009, 04:02 AM
  4. Kree'ara Model
    By AcHoZeN™ in forum Models
    Replies: 5
    Last Post: 02-14-2009, 04:10 AM
  5. 317 Kree'ara
    By Dr3ad3d Str in forum Requests
    Replies: 1
    Last Post: 12-25-2008, 10:03 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
  •