Signup Now
Page 5 of 10 FirstFirst ... 34567 ... LastLast
Results 41 to 50 of 95

Thread: Anti Stalker

  1. #41
    Free User Harvey's Avatar
    Join Date
    Dec 2013
    Location
    Philippines
    Posts
    2,407
    Reputation
    15
    Rep Power
    25
    Quote Originally Posted by Raphael View Post
    Anti Stalker


    Description

    Attacks invisible creatures that attack you.


    Configuration

    Edit the invisCreatures variable on the init block to specify which creatures go invisible. Also, edit stuckTime to specify how many miliseconds it should be stuck before attacking the creatures and spellToUse so the bot knows which spell to use.


    Code

    init start
    -- local SCRIPT_VERSION = '1.0.1'

    local invisCreatures = {'Stalker'}
    local stuckTime = 0 -- Set to 0 to always attack
    local spellToUse = 'exori'

    -- DO NOT EDIT BELOW THIS LINE --
    table.lower(invisCreatures)
    local spellToUseInfo, spellType = spellinfo(spellToUse), 'spell'
    if spellToUseInfo.castarea == 'None' then
    spellToUseInfo, spellType = runeinfo(spellToUse), 'rune'
    end
    init end

    auto(100)

    if $standtime >= stuckTime then
    foreach newmessage m do
    if m.type == MSG_STATUSLOG then
    local _, _, name = m.content:match(REGEX_DMG_TAKEN)
    if name and table.find(invisCreatures, name:lower()) and maround(7, name:lower()) == 0 then
    if spellType == 'spell' and cancastspell(spellToUseInfo) then
    cast(spellToUseInfo.words)
    waitping()
    elseif spellType == 'rune' then
    useoncreature(spellToUseInfo.itemid, $self)
    waitping()
    end
    end
    end
    end
    end

    Git
    Rapha sorry for bothering again, just have a question

    why the code doesnt work if I change the "REGEX_DMG_TAKEN" to


    local _, _, name = m.content:match('^You lose (%d+) (%1+) due to an attack by ?a?n? (.-)%.$')


    also will it be possible that it will only detect damage 30 and above?
    really sorry to bother. just this left for my code to work properly. run out of option

  2. #42
    Moderator Raphael's Avatar
    Join Date
    Dec 2013
    Location
    raphseller.com
    Posts
    2,441
    Reputation
    309
    Rep Power
    28
    Quote Originally Posted by Harvey View Post
    Rapha sorry for bothering again, just have a question

    why the code doesnt work if I change the "REGEX_DMG_TAKEN" to


    local _, _, name = m.content:match('^You lose (%d+) (%1+) due to an attack by ?a?n? (.-)%.$')


    also will it be possible that it will only detect damage 30 and above?
    really sorry to bother. just this left for my code to work properly. run out of option
    That's because (1+) is not a valid pattern while (l+) is (notice the difference between 1 and l). But why would you even want to replace REGEX_DMG_TAKEN?

    As for your other request, I've edited the script on the first post to allow for it.

  3. #43
    Free User Harvey's Avatar
    Join Date
    Dec 2013
    Location
    Philippines
    Posts
    2,407
    Reputation
    15
    Rep Power
    25
    Quote Originally Posted by Raphael View Post
    That's because (1+) is not a valid pattern while (l+) is (notice the difference between 1 and l). But why would you even want to replace REGEX_DMG_TAKEN?

    As for your other request, I've edited the script on the first post to allow for it.
    hahaha damn i didnt notice that
    Thank you sooooo much raph

    so it can only detect damage 30 and above hehe trying to figure how to do it

  4. #44
    Moderator Raphael's Avatar
    Join Date
    Dec 2013
    Location
    raphseller.com
    Posts
    2,441
    Reputation
    309
    Rep Power
    28
    Quote Originally Posted by Harvey View Post
    so it can only detect damage 30 and above hehe trying to figure how to do it
    Quote Originally Posted by Raphael View Post
    As for your other request, I've edited the script on the first post to allow for it.
    Read it

  5. #45
    Free User Harvey's Avatar
    Join Date
    Dec 2013
    Location
    Philippines
    Posts
    2,407
    Reputation
    15
    Rep Power
    25
    Quote Originally Posted by Raphael View Post
    <div style="opacity:0;">Read it</div>
    ty much raph :* :* :*

    btw raph, there is a typo error on minDmgTaken and your local minDamageTaken :P just informing

  6. #46
    Free User Riku's Avatar
    Join Date
    Nov 2014
    Posts
    365
    Reputation
    49
    Rep Power
    19
    @Raphael

    I made something the other day for an Anti Stalker/whatever script.. Triggered by "Sorry, not possible", since i'm a tanky dude and will not take damage from those and it will just anti them if they are blocking my path. Did you think of this?

  7. #47
    Moderator Raphael's Avatar
    Join Date
    Dec 2013
    Location
    raphseller.com
    Posts
    2,441
    Reputation
    309
    Rep Power
    28
    Quote Originally Posted by Riku View Post
    @Raphael

    I made something the other day for an Anti Stalker/whatever script.. Triggered by "Sorry, not possible", since i'm a tanky dude and will not take damage from those and it will just anti them if they are blocking my path. Did you think of this?
    Not really...

  8. #48
    Free User Pukielos's Avatar
    Join Date
    Jan 2014
    Location
    Cracow, Poland
    Posts
    61
    Reputation
    10
    Rep Power
    21
    this script dont work...

  9. #49
    Moderator mistgun's Avatar
    Join Date
    Dec 2013
    Location
    Lodz, Poland
    Posts
    1,821
    Reputation
    220
    Rep Power
    26
    Quote Originally Posted by Pukielos View Post
    this script dont work...
    More info plax?

  10. #50
    Free User Pukielos's Avatar
    Join Date
    Jan 2014
    Location
    Cracow, Poland
    Posts
    61
    Reputation
    10
    Rep Power
    21
    @Edit
    work but must have in server log information to lose x hp and etc

 

 

Posting Permissions

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