Signup Now
Results 1 to 6 of 6

Thread: PK Guild Alert

  1. #1
    Moderator Raphael's Avatar
    Join Date
    Dec 2013
    Location
    raphseller.com
    Posts
    2,440
    Reputation
    283
    Rep Power
    27

    PK Guild Alert

    PK Guild Alert


    Description

    Sends a message on the guild chat when being attacked.


    Configuration

    Edit the message variable on the init block to specify what message should be sent. Also edit guildChat and interval variables.


    Code

    init start
    -- local SCRIPT_VERSION = '1.0.0'

    -- The message to be said. If you write ':attacker:' it will be replaced
    -- with the current attacker's name. It's recommended that you keep this
    -- string short and in all lower case, if you're not having Wind Addon's
    -- fast hotkeys enabled.
    local message = "pk :attacker: at coryms"

    -- The name of your guild, so that the bot knows which channel to send the
    -- message to. THIS HAS TO BE ALREADY OPENED OR OTHERWISE THE SCRIPT WON'T
    -- WORK AT ALL.
    local guildChat = "Guild Name"

    -- The interval between messages, in ms; this is to prevent repeatedly
    -- spamming the same message and getting you muted.
    local interval = 30000

    -- DO NOT EDIT BELOW THIS LINE --

    local lastMessage = 0
    init end

    auto(100)

    if $pattacker.id ~= 0 and $timems - lastMessage > interval then
    local realMessage = message:gsub(":attacker:", $pattacker.name:lower())

    say(guildChat, realMessage)

    if waitmessage($name, realMessage, 2000, false, guildChat) then
    lastMessage = $timems
    end
    end

    Git
    RaphSeller
    PayPal Instantaneous Reseller


    raphseller.com

  2. #2
    Free User Kostek's Avatar
    Join Date
    Dec 2013
    Posts
    706
    Reputation
    77
    Rep Power
    22
    Awesome man, thanks for making it.

  3. #3
    Moderator Raphael's Avatar
    Join Date
    Dec 2013
    Location
    raphseller.com
    Posts
    2,440
    Reputation
    283
    Rep Power
    27
    Quote Originally Posted by Kostek View Post
    Awesome man, thanks for making it.
    Let me know if you have any problems.
    RaphSeller
    PayPal Instantaneous Reseller


    raphseller.com

  4. #4
    Free User Kostek's Avatar
    Join Date
    Dec 2013
    Posts
    706
    Reputation
    77
    Rep Power
    22
    This hotkey saved my ass so many times, its awesome. The only thing I advise on changing is the spam rate to around 10~ seconds because it's hard for the bot to heal and write the text so often, other than that it works perfect. Thank you again.

  5. #5
    Free User Kostek's Avatar
    Join Date
    Dec 2013
    Posts
    706
    Reputation
    77
    Rep Power
    22
    hey @Raphael, would it be possible to change the action so that it writes the words in 3 separate lines?
    it would look like this:

    Name[55]: pk
    Name[55]: :attacker:
    Name[55]: yala

    it would make the healing for the character easier whilst under attack as the messages are short, therefore easier for him to write

  6. #6
    Moderator Raphael's Avatar
    Join Date
    Dec 2013
    Location
    raphseller.com
    Posts
    2,440
    Reputation
    283
    Rep Power
    27
    Quote Originally Posted by Kostek View Post
    This hotkey saved my ass so many times, its awesome. The only thing I advise on changing is the spam rate to around 10~ seconds because it's hard for the bot to heal and write the text so often, other than that it works perfect. Thank you again.
    The interval shouldn't be affected if you can't effectively send the message.
    It is only set if you actually send the full message. Else, it tries again every 2s.

    Quote Originally Posted by Kostek View Post
    hey @Raphael, would it be possible to change the action so that it writes the words in 3 separate lines?
    it would look like this:

    Name[55]: pk
    Name[55]: :attacker:
    Name[55]: yala

    it would make the healing for the character easier whilst under attack as the messages are short, therefore easier for him to write
    Will think about it. I do recommend you take a look at WindAddons' fast hotkeys.
    RaphSeller
    PayPal Instantaneous Reseller


    raphseller.com

 

 

Posting Permissions

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