XenoBot Forums - Powered by vBulletin

User Tag List

Results 1 to 5 of 5

Thread: Alarm if X player on screen (Player Name)

  1. #1

    Join Date
    Nov 2012
    Posts
    332
    Mentioned
    10 Post(s)
    Tagged
    0 Thread(s)

    Alarm if X player on screen (Player Name)

    Do a script like this exist?

    Like if for example if player Eternal Oblivion enter screen, sound the alarm!

    Thanks

  2. #2
    Senior Member
    Join Date
    Sep 2012
    Posts
    1,070
    Mentioned
    18 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by jollebollen View Post
    Do a script like this exist?

    Like if for example if player Eternal Oblivion enter screen, sound the alarm!

    Thanks
    Code:
    local PlayerList = {"Orc Warlord","Demon","Kharsek","Eternal Oblivion"}
    Module.New('player alert', function(module)
    local player = Self.GetSpectators(true)
        for i =1, #player do
            if table.contains(PlayerList, player[i]:Name()) then
                alert()
                module:Delay(2000)
            end
        end
    end)

  3. #3
    ~Tziki~'s Avatar
    Join Date
    Jun 2012
    Location
    England
    Posts
    174
    Mentioned
    6 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by dinmamma View Post
    Code:
    local PlayerList = {"Orc Warlord","Demon","Kharsek","Eternal Oblivion"}
    Module.New('player alert', function(module)
    local player = Self.GetSpectators(true)
        for i =1, #player do
            if table.contains(PlayerList, player[i]:Name()) then
                alert()
                module:Delay(2000)
            end
        end
    end)
    Any way to change this so that it plays alarm if someone comes on screen EXCEPT your friend?

    Like i have a rune making farm, and want to know if someone comes on screen that isnt part of that farm.

  4. #4
    Senior Member Trykon's Avatar
    Join Date
    Nov 2014
    Location
    UK
    Posts
    952
    Mentioned
    11 Post(s)
    Tagged
    0 Thread(s)
    It is a bit different
    Local players the should be your farms
    And set "if not table.contains..."
    Should work

  5. #5

    Join Date
    Oct 2013
    Posts
    29
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Code:
    local whiteList = {
        ["CHAR NAME"] = true,
        ["CHAR NAME"] = true
    }
     
    Module.New("alarmwithwhitelist", function()
        for name, cid in Creature.iPlayers() do
            if (not whiteList[name]) then
                alert()
            end
        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
  •