Page 1 of 2 12 LastLast
Results 1 to 10 of 11

Thread: CreatureType - Monster [HOW]

  1. #1
    Focus Group MoS's Avatar
    Join Date
    Feb 2012
    Posts
    832
    Mentioned
    15 Post(s)
    Tagged
    0 Thread(s)
    Quoted
    63 Post(s)
    Reputation
    77
    Rep Power
    6

    CreatureType - Monster [HOW]

    Battle List
    - Now its possible to know if creature is a player/monster/npc/summon. In creature object add value CreatureType.
    0 - Player
    1 - Monster
    2 - NPCs
    3 - Summon [Yours]
    4 - Summon [Others]

    where do I change that? is this helpfull for Cults cave for exemple? when they trap us with summons? (ghoul, skeleton)
    Ajudei você? ...............+REP
    -----------------------------------------
    Did I help you? ..........+REP

  2. #2
    Normal User StaR Scripts's Avatar
    Join Date
    Sep 2013
    Location
    Manchester, England
    Posts
    156
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quoted
    1 Post(s)
    Reputation
    16
    Rep Power
    4
    0 = paround < paround >= 1 then >
    1 = maround < maround("rat") >= 1 >
    2 = maround < maround("Captain StaR") >
    3/4 = Don't think there is a variable for summons but it will be under maround!

    EDIT: Just read the update and now they are all seperatly possible I am not sure of the variables yet though I will get back to here when I find out!
    Last edited by StaR Scripts; 09-18-2013 at 04:36 PM.

  3. #3
    Normal User e k x's Avatar
    Join Date
    Sep 2013
    Posts
    32
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quoted
    2 Post(s)
    Reputation
    18
    Rep Power
    4
    Code:
    local isCreatureAMonster = getcreature("Noob").CreatureType == 1
    or

    Code:
    local isCreatureAMonster = getcreature("Noob").type == 1
    type is and old property, that didn't worked in the past versions, so it's possible that Jonatas kept that property or added CreatureType to the properties. One of the above should work.

  4. #4
    Normal User
    Join Date
    Jun 2012
    Location
    Sweden
    Posts
    1,671
    Mentioned
    18 Post(s)
    Tagged
    1 Thread(s)
    Quoted
    8 Post(s)
    Reputation
    132
    Rep Power
    9
    Quote Originally Posted by StaR Scripts View Post
    0 = paround < paround >= 1 then >
    1 = maround < maround("rat") >= 1 >
    2 = maround < maround("Captain StaR") >
    3/4 = Don't think there is a variable for summons but it will be under maround!

    EDIT: Just read the update and now they are all seperatly possible I am not sure of the variables yet though I will get back to here when I find out!
    Uhm, yeah, you're wrong.
    Last edited by soder; 09-19-2013 at 06:55 AM.

  5. #5
    iBot User
    Join Date
    May 2012
    Location
    Spain
    Posts
    213
    Mentioned
    12 Post(s)
    Tagged
    0 Thread(s)
    Quoted
    15 Post(s)
    Reputation
    32
    Rep Power
    5
    I trying to do also a script with this, but for hunt hellgorak, its almost finished just need to make some changes hehe, probably I release it when its end.

    Regards,
    Regards, NWA

  6. #6
    Normal User e k x's Avatar
    Join Date
    Sep 2013
    Posts
    32
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quoted
    2 Post(s)
    Reputation
    18
    Rep Power
    4
    Quote Originally Posted by NWA View Post
    I trying to do also a script with this, but for hunt hellgorak, its almost finished just need to make some changes hehe, probably I release it when its end.

    Regards,
    I was testing this function and you should use CreatureType property instead of type.

    You can also create variations of creatures loop, sorting the best target. For example this script will return player with the lowest hp percent to the highest.

    Code:
    function getCreatures(...)
        local filter = type(arg[1]) == 'string' and arg[1] or "pmfs"
        local sort = type(arg[2]) == 'function' and arg[2] or false
    
        local cre, temp = getcreatures(filter), {}
        local i = -1
        while i < cre.count do
            temp[#temp + 1] = cre[i]
            i = i + 1
        end
        if sort then table.sort(temp, sort) end
        i = 0
        return function()
            i = i + 1
            if i <= #temp do
                return temp[i].id, temp[i]
            end
            return nil
        end
    end
    
    function sort(a, b)
        return a.hpperc < b.hpperc
    end
    
    for CreatureID, CreatureObject in getCreatures("p", sort) do
        print(string.format("[HP: %d] [Name: %s]", Creature.hpperc, CreatureObject.name))
    end

  7. #7
    Normal User
    Join Date
    Jul 2012
    Posts
    609
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quoted
    1 Post(s)
    Reputation
    37
    Rep Power
    6
    real Ekx ?
    Helped? Show respect, use reputation system!

  8. #8
    Normal User e k x's Avatar
    Join Date
    Sep 2013
    Posts
    32
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quoted
    2 Post(s)
    Reputation
    18
    Rep Power
    4
    Quote Originally Posted by Ikalos View Post
    real Ekx ?
    e k x not Ekx

  9. #9
    Focus Group MoS's Avatar
    Join Date
    Feb 2012
    Posts
    832
    Mentioned
    15 Post(s)
    Tagged
    0 Thread(s)
    Quoted
    63 Post(s)
    Reputation
    77
    Rep Power
    6
    and for exemple... a guy traps me with a ghoul/skeleton summon in cults cave - yalahar.... i dont know why... i cant move, what do I do, to walk through the summon? (OPT-PVP)

    is this new funciotn related to this? :/
    Ajudei você? ...............+REP
    -----------------------------------------
    Did I help you? ..........+REP

  10. #10
    Normal User e k x's Avatar
    Join Date
    Sep 2013
    Posts
    32
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quoted
    2 Post(s)
    Reputation
    18
    Rep Power
    4
    Quote Originally Posted by MoS View Post
    and for exemple... a guy traps me with a ghoul/skeleton summon in cults cave - yalahar.... i dont know why... i cant move, what do I do, to walk through the summon? (OPT-PVP)

    is this new funciotn related to this? :/
    The main purpose of the function is detecting what type of creature you are handling. Examples on my first post.

    You can use setpvpmode(0) to turn into Dove mode, and then use move(DIRECTION) to run from traps. Of course it needs a more skilled script to do this, but generally you'll end up using these functions.

Posting Permissions

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