XenoBot Forums - Powered by vBulletin

User Tag List

Results 1 to 9 of 9

Thread: Advanced player detection

  1. #1

    Join Date
    Jun 2012
    Posts
    142
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Advanced player detection

    I would like Advanced player detection implanted in xeno. This would make you write the name you want the alarm to go off to, lets say you know some ppl that usually go to your spawn, or people who you know go to your spawn to lure monsters. This will make it easier to have the player detected alarm on without it going off everytime you go to dp.

    Thanks

    //Swepwn
    Last edited by swepwn; 10-27-2012 at 11:04 PM.

  2. #2
    Senior Member Shadow Wolf's Avatar
    Join Date
    Jan 2012
    Location
    ⊰ New Zealand ⊱
    Posts
    657
    Mentioned
    3 Post(s)
    Tagged
    0 Thread(s)
    That would actually be very usefull.
    SIGNED.
    ~ Shadow Wolf

    ~ A friend will bail you out of jail, but a true friend would be right there beside you saying: "DAMN that was fun!" ~


  3. #3
    Administrator
    Join Date
    Dec 2010
    Posts
    2,565
    Mentioned
    228 Post(s)
    Tagged
    1 Thread(s)
    Didn't test it.

    lua code:

    local playerList = {"Spectrus", "Eternal Oblivion", "DarkstaR"}
    local whiteList = true --if true, playerList will not trigger alarm and all other players will, if false, any name on playerList will trigger alarm but other players won't.

    registerEventListener(TIMER_TICK, "onTick")
    function onTick()
    for i = CREATURES_LOW, CREATURES_HIGH do
    local c = Creature.GetFromIndex(i)
    if c:isOnScreen() and c:isPlayer() then
    if (not whiteList and table.find(playerList, c:Name())) or (whiteList and not table.find(playerList, c:Name())) then
    alert()
    return
    end
    end
    end
    end
    Last edited by Syntax; 11-30-2015 at 05:08 AM. Reason: syntax bbcode

  4. #4
    Banned
    Join Date
    May 2012
    Location
    England
    Posts
    203
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Spectrus you legend

  5. #5
    Administrator
    Join Date
    Dec 2010
    Posts
    2,565
    Mentioned
    228 Post(s)
    Tagged
    1 Thread(s)
    Quote Originally Posted by BradooDeletion View Post
    Spectrus you legend
    Thanks for reminding me about this. Needed a quick edit, had GetByIndex instead of GetFromIndex, it works now. Make sure to include your name on whiteList.

  6. #6

    Join Date
    Jun 2012
    Posts
    142
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Wow thanks spec! Do i just implant this at the end/beginning of the original lua, or do i make a separate lua just for the player detection?
    Last edited by swepwn; 10-28-2012 at 11:34 AM.

  7. #7

    Join Date
    Jan 2015
    Posts
    9
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by Spectrus View Post
    Didn't test it.

    lua code:

    local playerList = {"Spectrus", "Eternal Oblivion", "DarkstaR"}
    local whiteList = true --if true, playerList will not trigger alarm and all other players will, if false, any name on playerList will trigger alarm but other players won't.

    registerEventListener(TIMER_TICK, "onTick")
    function onTick()
    for i = CREATURES_LOW, CREATURES_HIGH do
    local c = Creature.GetFromIndex(i)
    if c:isOnScreen() and c:isPlayer() then
    if (not whiteList and table.find(playerList, c:Name())) or (whiteList and not table.find(playerList, c:Name())) then
    alert()
    return
    end
    end
    end
    end
    when i use it it just keeps alerting tho no one is there
    Last edited by Syntax; 11-30-2015 at 05:08 AM. Reason: syntax bbcode

  8. #8
    Moderator Elvang's Avatar
    Join Date
    Dec 2010
    Location
    B.C. Canada
    Posts
    1,365
    Mentioned
    104 Post(s)
    Tagged
    1 Thread(s)
    Quote Originally Posted by mo_rateb View Post
    when i use it it just keeps alerting tho no one is there
    Add your name to the whitelist.

  9. #9
    Whiplash's Avatar
    Join Date
    Sep 2011
    Location
    Western Australia
    Posts
    65
    Mentioned
    6 Post(s)
    Tagged
    0 Thread(s)
    It would be handy to be able to enable/disable the player detected alarm when not in spawn.

    I imagine it qould be quite simple
    While inspawn
    Enable player detection alarm
    When leaving spawn, disable

Posting Permissions

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