Signup Now
Results 1 to 4 of 4
  1. #1
    Wind Powered
    Join Date
    Jan 2015
    Posts
    62
    Reputation
    14
    Rep Power
    19

    Adding "safelist" to this alarm script.

    Hello, I want to bot 2 chars on the same spawn and I want to use player alarm option when hunting. Could someone add "safelist" to the script below?

    if getuseroption('PlayerAlarm') and paround(10) > 0 then
    if table.find({'Hunt', 'HuntGuards'}, $wptsection) then
    beep()
    wait(3000, 3200)
    end
    end
    Last edited by Czleq; 02-15-2016 at 07:42 PM.

  2. #2
    Free User
    Join Date
    Dec 2015
    Posts
    24
    Reputation
    10
    Rep Power
    0
    Quote Originally Posted by Czleq View Post
    Hello, I want to bot 2 chars on the same spawn and I want to use player alarm option when hunting. Could someone add "safelist" to the script below?

    if getuseroption('PlayerAlarm') and paround(10) > 0 then
    if table.find({'Hunt', 'HuntGuards'}, $wptsection) then
    beep()
    wait(3000, 3200)
    end
    end

    -- config
    init start
    local SAFELIST = {"Adamszszsz"} --- here is a nick for your safe list
    init end

    -- code
    table.lower(SAFELIST)
    local count = 0

    auto(100)
    if getuseroption("PlayerOnAlarm") then
    foreach creature p 'psx' do
    if (not table.find(SAFELIST, p.name:lower())) then
    count = count + 1
    end
    end
    if count > 0 then
    playsound('playeronscreen.wav')
    flashclient()
    wait(1000,2000)
    end
    end



    Just create new persistan like this.

  3. #3
    Wind Powered
    Join Date
    Jan 2015
    Posts
    62
    Reputation
    14
    Rep Power
    19
    Not exactly what I had in mind but I guess I can add "if table.find({'Hunt', 'HuntGuards'}, $wptsection)" and it should work, thanks.

  4. #4
    Moderator mistgun's Avatar
    Join Date
    Dec 2013
    Location
    Lodz, Poland
    Posts
    1,821
    Reputation
    220
    Rep Power
    26
    simpler

    init start
    local safeList = {'player'}
    init end

    auto(1000)
    if paroundignore(10, unpack(safeList)) > 0 and table.find({'Hunt', 'HuntGuards'}, $wptsection) then
    beep()
    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
  •