XenoBot Forums - Powered by vBulletin

User Tag List

Results 1 to 6 of 6

Thread: Player Detected Alarm

  1. #1
    Yasuo's Avatar
    Join Date
    Mar 2014
    Location
    Ionia
    Posts
    303
    Mentioned
    64 Post(s)
    Tagged
    0 Thread(s)

    Player Detected Alarm

    Hello, I need switcher for Player Detected Alarm, I mean when my character enter spawn it will alarm when player in on the screen, but when he exit spawn and go refil it won't alarm, is it possible ?
    My trading history:
    Bought 110 EK from Thunder
    Sold 131 EK to Pokisiek
    Bought 113 MS from Surgeon Simon
    Bought 178 RP from Mastrik
    ''The story of a sword is inked in blood.''
    -- Yasuo

  2. #2
    Monthly Subscriber
    Join Date
    Jun 2012
    Posts
    185
    Mentioned
    22 Post(s)
    Tagged
    0 Thread(s)
    Set PLAER_ALARM to true whenever you want to switch it on and set it to false whenever you want to switch it off.

    lua code:

    registerNativeEventListener(WALKER_SELECTLABEL, 'onLabel')

    function onLabel(name)
    if (name == "startHunt") then
    PLAYER_ON_SCREEN_ALARM = true
    return
    end

    if (name == "leaveRespawn") then
    PLAYER_ON_SCREEN_ALARM = false
    return
    end
    end


    --[[ DO NOT EDIT ANYTHING BELOW THIS LINE ]]--

    Module.New("player-on-screen-alarm", function()
    if (Creature.iPlayers()() and PLAYER_ON_SCREEN_ALARM) then
    print("PLAYER ON SCREEN ALARM!")
    alert()
    end
    end)

  3. #3
    dean015's Avatar
    Join Date
    Nov 2015
    Posts
    119
    Mentioned
    3 Post(s)
    Tagged
    0 Thread(s)
    thanks this is really helpful the ammount of times i rush to pc to find im in dp is a lot lol

  4. #4
    Yasuo's Avatar
    Join Date
    Mar 2014
    Location
    Ionia
    Posts
    303
    Mentioned
    64 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by eldera View Post
    Set PLAER_ALARM to true whenever you want to switch it on and set it to false whenever you want to switch it off.

    lua code:

    registerNativeEventListener(WALKER_SELECTLABEL, 'onLabel')

    function onLabel(name)
    if (name == "startHunt") then
    PLAYER_ON_SCREEN_ALARM = true
    return
    end

    if (name == "leaveRespawn") then
    PLAYER_ON_SCREEN_ALARM = false
    return
    end
    end


    --[[ DO NOT EDIT ANYTHING BELOW THIS LINE ]]--

    Module.New("player-on-screen-alarm", function()
    if (Creature.iPlayers()() and PLAYER_ON_SCREEN_ALARM) then
    print("PLAYER ON SCREEN ALARM!")
    alert()
    end
    end)
    Love you man, I need to change names of labels, yeah?
    My trading history:
    Bought 110 EK from Thunder
    Sold 131 EK to Pokisiek
    Bought 113 MS from Surgeon Simon
    Bought 178 RP from Mastrik
    ''The story of a sword is inked in blood.''
    -- Yasuo

  5. #5
    Lifetime Subscriber Kociii's Avatar
    Join Date
    Apr 2013
    Location
    Sweden
    Posts
    3,586
    Mentioned
    199 Post(s)
    Tagged
    1 Thread(s)
    Quote Originally Posted by Yasuo View Post
    Love you man, I need to change names of labels, yeah?
    No you don't. You just need to change the labelname in the file =)



    Free & Open Teamspeak 3 server for everyone!




    My Spotify List



    My Tibia Life



    My Script Thread

  6. #6
    Monthly Subscriber
    Join Date
    Jun 2012
    Posts
    185
    Mentioned
    22 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by Yasuo View Post
    Love you man, I need to change names of labels, yeah?
    No, everything above --[[ DO NOT EDIT ANYTHING BELOW THIS LINE ]]-- is just an example how to use it. Basicially just use:
    lua code:
    PLAYER_ON_SCREEN_ALARM = true

    when you want to turn alarm on or use:
    lua code:
    PLAYER_ON_SCREEN_ALARM = false

    when you want to turn it off. If you still don't understand how to do it show me your lua and I will show you how to adapt it to your script.
    Last edited by eldera; 01-15-2016 at 02:09 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
  •