Signup Now
Results 1 to 2 of 2
  1. #1
    Free User
    Join Date
    Jun 2014
    Posts
    67
    Reputation
    10
    Rep Power
    20

    PM Friend when PK using Vip List

    Hello guys,

    I wanted to create a script which will message a friend with specific vip icon if someone is attacking me.

    So I did something like this:
    --- Ultimate PK Friends Messenger by Mlask 1.0.0 ---

    init start

    local vipGuildIcon = 0 -- vip icon of guild members, 0 = no icon, 1 = heart, 2 = skull, and so on...
    local huntspot = "Hunt Name" -- place where you hunt (ex: Ratwoorms Edron)
    local waittime = 60000 -- time in ms between msgs (defalut 1 min)
    -- dont change anything below this line
    local friendsToMsg = {}
    init end

    foreach vipentry v do
    if v.isonline and v.icon == vipGuildIcon then
    table.insert(friendsToMsg, v.name)
    end
    end

    auto(300)
    if $pattacker.id ~= 0 then
    for _, name in ipairs(friendsToMsg) do
    say('*' .. name .. '*' .. $pattacker.name .. ' is attacking me in ' .. huntspot)
    wait(200,500)
    end
    wait(waittime]


    So the problem is that there are two issues:
    1. Windbot is messaging my friend all the time like every 1 minute, no matter if he is attacked by someone or not - and it should message only when he's attacked
    2. Windbot is messaging only one person from my vip list with specific icon and not all other persons.

    Could u help me where did I make a mistake? Thank You very much!

  2. #2
    Free User Balbek's Avatar
    Join Date
    Dec 2013
    Posts
    167
    Reputation
    31
    Rep Power
    21
    I edited your code a bit and it seems to be working fine, but only if you use windaddons and fast hotkeys are enabled.


    init start

    local vipGuildIcon = 0 -- vip icon of guild members, 0 = no icon, 1 = heart, 2 = skull, and so on...
    local huntspot = "Yalahar Nightmares" -- place where you hunt (ex: Ratwoorms Edron)
    local waittime = {30000, 60000} -- time in ms between msgs (defalut between 30 and 60 seconds)
    local friendsToMsg = {}

    init end

    auto(700, 2000)

    foreach vipentry v do
    if v.isonline and v.icon == vipGuildIcon and not table.find(friendsToMsg, v.name) then
    table.insert(friendsToMsg, v.name)
    end
    end

    if $pattacker.id ~= 0 then
    local PKname = $pattacker.name

    for _, name in ipairs(friendsToMsg) do
    say('*' .. name .. '*' .. PKname .. ' is attacking me in ' .. huntspot)
    wait(2000, 5000)
    end

    wait(waittime[1], waittime[2])
    end
    Last edited by Balbek; 09-28-2014 at 04:46 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
  •