Results 1 to 2 of 2

Thread: Attack certain creature command?

  1. #1
    Normal User
    Join Date
    Sep 2013
    Posts
    5
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quoted
    0 Post(s)
    Reputation
    10
    Rep Power
    4

    Attack certain creature command?

    I need the function to attack a certain creature ID that is found by getcreatures() or similar. Im trying to make a monk trainer, thats why. Or can I use the targeting to attack summoned creatures too?

  2. #2
    iBot User
    Join Date
    Jun 2012
    Posts
    517
    Mentioned
    11 Post(s)
    Tagged
    0 Thread(s)
    Quoted
    4 Post(s)
    Reputation
    132
    Rep Power
    7
    PHP Code:
    MonstersToAttack = {"monk""ghoul"} --- Table with monster names,

    for 
    CREATURE in Creature.GetAll("ms") do
        if 
    table.find(MonstersToAttackCREATURE:Name()) and CREATURE:isReachable() then
            attack
    (CREATURE:ID())
        
    end
    end 

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •