XenoBot Forums - Powered by vBulletin

User Tag List

Results 1 to 10 of 51

Thread: [Discussion] Scripter: Variables, Functions, and Events

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #11

    Join Date
    Dec 2011
    Posts
    164
    Mentioned
    7 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by sirmate View Post
    Make them by yourself... lazy...
    Code:
    local self = Creature.GetByID(getSelfID())
    local target = Creature.GetByID(getSelfTargetID())
    local followed = Creature.GetByID(getSelfFollowID())
    There is no fkn GetSelfId() or GetTargetId().
    noob


    Quote Originally Posted by Efren View Post
    If I'm not mistaken they already exist.

    this are the relational properties. (can be found on the Creature.lua or Jo3 post)
    Code:
    Creature:isSelf()
    Creature:isTarget()
    Creature:isFollowed()
    an example of using this variables would be.. (using Jo3 example)
    Again if im not mistaken.
    Code:
    local creature = Creature.GetByName("Jo3Bingham")
    
    if (creature:ID() ~= 0) then
        if (creature:isTarget() and creature:WarIcon()) then
            ----use spell or rune
        end
    end
    If everything is fine then Jo3 will die.
    No dude, this only checks if the creature pointer you have, is the target or you. If you wanted to find the target's pointer, you'd have to either loop through all creatures and check if isTarget() or have a pre-defined pointer assigned to it, which is what I'm asking for.
    Last edited by Raphael; 01-05-2012 at 04:24 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
  •