Signup Now
Page 6 of 10 FirstFirst ... 45678 ... LastLast
Results 51 to 60 of 95

Thread: Anti Stalker

  1. #51
    Free User
    Join Date
    Dec 2014
    Posts
    2
    Reputation
    10
    Rep Power
    0
    What should I add to be safe for pvp servers?

  2. #52
    Wind Powered
    Join Date
    Apr 2015
    Posts
    154
    Reputation
    11
    Rep Power
    21
    error in Persistent script NewPersistentScript:
    [" if dmg >= minDmgTak..."]:NewPersistentScript:23 attempt to compare number with string


    init start
    -- local SCRIPT_VERSION = '1.1.1'

    local invisCreatures = {'Stalker'}
    local stuckTime = 0 -- Set to 0 to always attack
    local minDmgTaken = 0 -- Set to 0 to always attack
    local spellToUse = 'thunderstorm rune'

    -- 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 dmg, _, name = m.content:match(REGEX_DMG_TAKEN)
    if dmg >= minDmgTaken and 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


    How do I make mindmgTaken into a number?

    Could you do this:

    auto(100)
    if $standtime=>3000 && $zpos=15 && maround(7)=>3
    useoncreature("thunderstorm rune", $self)
    wait(2000)
    Last edited by Sea; 04-07-2015 at 11:33 AM.

  3. #53
    Moderator mistgun's Avatar
    Join Date
    Dec 2013
    Location
    Lodz, Poland
    Posts
    1,819
    Reputation
    220
    Rep Power
    29
    @Sea take this.

    Quote Originally Posted by Sea View Post
    error in Persistent script NewPersistentScript:
    [" if dmg >= minDmgTak..."]:NewPersistentScript:23 attempt to compare number with string

    PHP Code:
    init start
        
    -- local SCRIPT_VERSION '1.1.1'

        
    local invisCreatures = {'Stalker'}
        
    local stuckTime -- Set to 0 to always attack
        local minDmgTaken 
    -- Set to 0 to always attack
        local spellToUse 
    'thunderstorm rune'

        
    -- DO NOT EDIT BELOW THIS LINE --
        
    table.lower(invisCreatures)
        
    local spellToUseInfospellType 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 dmg
    _name m.content:match(REGEX_DMG_TAKEN)
                if 
    dmg and dmg >= minDmgTaken and name and table.find(invisCreaturesname:lower()) and maround(7name:lower()) == 0 then
                    
    if spellType == 'spell' and cancastspell(spellToUseInfothen
                        cast
    (spellToUseInfo.words)
                        
    waitping()
                    elseif 
    spellType == 'rune' then
                        useoncreature
    (spellToUseInfo.itemid$self)
                        
    waitping()
                    
    end
                end
            end
        end
    end 
    @Raphael didn't conver string to number, nooba!

    init start
    -- local SCRIPT_VERSION = '1.1.1'




    local invisCreatures = {'Stalker'}
    local stuckTime = 0 -- Set to 0 to always attack
    local minDmgTaken = 0 -- Set to 0 to always attack
    local spellToUse = 'thunderstorm rune'




    -- 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 dmg, _, name = m.content:match(REGEX_DMG_TAKEN)
    if dmg and tonumber(dmg) >= minDmgTaken and 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
    Last edited by mistgun; 04-07-2015 at 12:13 PM.

  4. #54
    Wind Powered
    Join Date
    Apr 2015
    Posts
    154
    Reputation
    11
    Rep Power
    21
    so dmg is a string and by adding tonumber(dmg) you convert the string to number?\

    xd new error: error in Persistent script NewPersistentScript:
    [" if tonumber(dmg) >=..."]:NewPersistentScript:27 attempt to compare number with nil

  5. #55
    Moderator mistgun's Avatar
    Join Date
    Dec 2013
    Location
    Lodz, Poland
    Posts
    1,819
    Reputation
    220
    Rep Power
    29
    Quote Originally Posted by Sea View Post
    so dmg is a string and by adding tonumber(dmg) you convert the string to number?\

    xd new error: error in Persistent script NewPersistentScript:
    [" if tonumber(dmg) >=..."]:NewPersistentScript:27 attempt to compare number with nil
    try now ;o

  6. #56
    Wind Powered
    Join Date
    Apr 2015
    Posts
    154
    Reputation
    11
    Rep Power
    21
    No error when enabling script will see when it works when I deposit.

    If it doesnt I will try my own pro script
    auto(200)
    if $standtime >= 7000 and $posz==15 and maround(7)>=3 and itemcount('thunderstorm rune')>=0 then
    useoncreature("thunderstorm rune", $self)
    wait(2000)
    end


    Q: What difference does 'blabla' make with "blabla"? So between single ' and double "
    Last edited by Sea; 04-07-2015 at 12:38 PM.

  7. #57
    Moderator mistgun's Avatar
    Join Date
    Dec 2013
    Location
    Lodz, Poland
    Posts
    1,819
    Reputation
    220
    Rep Power
    29
    Quote Originally Posted by Sea View Post
    No error when enabling script will see when it works when I deposit.

    If it doesnt I will try my own pro script
    auto(200)
    if $standtime >= 7000 and $posz==15 and maround(7)>=3 and itemcount('thunderstorm rune')>=0 then
    useoncreature("thunderstorm rune", $self)
    wait(2000)
    end


    Q: What difference does 'blabla' make with "blabla"? So between single ' and double "

    There's no diff like f.e in C++, only thing is that u can enclose ' ' inside double quotes f.e
    local var = "Hello 'noob' "

  8. #58
    Wind Powered
    Join Date
    Apr 2015
    Posts
    154
    Reputation
    11
    Rep Power
    21
    Hmm ok so u can include people with ' in character names. Completed demon oak on a character today gotta see if script is running good and get next char on the task.

  9. #59
    Moderator Raphael's Avatar
    Join Date
    Dec 2013
    Location
    raphseller.com
    Posts
    2,437
    Reputation
    309
    Rep Power
    31
    Quote Originally Posted by mistgun View Post
    @Sea take this.


    @Raphael didn't conver string to number, nooba!
    ...
    Oh, thanks for letting me know after 2 months.

    Quote Originally Posted by Sea View Post
    Hmm ok so u can include people with ' in character names. Completed demon oak on a character today gotta see if script is running good and get next char on the task.
    You can include ' inside strings quoted with ' too, but you gotta escape it with \:

    print('Raphael\'s da best') -- Raphael's da best
    print("She said: \"Raphael's da best\"") -- She said "Raphael's da best"

  10. #60
    Free User
    Join Date
    Feb 2015
    Posts
    1
    Reputation
    10
    Rep Power
    0
    Quote Originally Posted by mistgun View Post
    @Sea take this.


    @Raphael didn't conver string to number, nooba!

    init start
    -- local SCRIPT_VERSION = '1.1.1'




    local invisCreatures = {'Stalker'}
    local stuckTime = 0 -- Set to 0 to always attack
    local minDmgTaken = 0 -- Set to 0 to always attack
    local spellToUse = 'thunderstorm rune'




    -- 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 dmg, _, name = m.content:match(REGEX_DMG_TAKEN)
    if dmg and tonumber(dmg) >= minDmgTaken and 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
    I have copied the script above but it shoot GFB only sometimes not always when there's a stalker around. Is there anything wrong?

 

 

Posting Permissions

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