Results 1 to 3 of 3

Thread: [challenge for good scripters] looking for perfect exori/gran and exori hur/ico hkey

  1. #1
    Focus Group kamil123's Avatar
    Join Date
    Apr 2012
    Location
    Poland
    Posts
    341
    Mentioned
    15 Post(s)
    Tagged
    0 Thread(s)
    Quoted
    18 Post(s)
    Reputation
    106
    Rep Power
    6

    [challenge for good scripters] looking for perfect exori/gran and exori hur/ico hkey

    hello, currently I use sirmate's hotkey for both 4 spells. but that's not too good, sometimes bot uses only hur/ico when it could use exori/gran (there are obviously no people on screen and another floors).

    also when there's only one monster, bot sucks at attacking it with exori hur / exori ico. due to cooldown of this spells the action looks like this:
    Code:
    melee hit + exori ico
    melee hit + exori hur
    [cooldown like 1s or less]
    exori ico + melee hit
    sometimes it goes like:
    Code:
    melee hit
    [nothing]
    after 2s instead of next melee hit bot uses exori hur

    and the proper action should look like this
    Code:
    melee + immediately exori hur after that
    melee + immediately exori ico after that
    melee
    melee + immediately exori hur after that
    melee + immediately exori ico after that
    melee
    in current hotkeys there's big waste of potential melee hits which are replaced by exori hur/ico spells.


    If i remember good, in neobot forums user Sahar released perfect exori ico / exori hur script (or he was just using it?)


    and as I remember in neobot I was using this hotkey for exori / exori gran (but in neobot I could easily set priority - higher to exori gran hotkey) [I also removed front sweep aka exori min, cause it made me lagging]:
    Code:
    init start
        local monsters = {'nightmare', 'destroyer'}
        local playersetup = {checkplayers = true, checkonlyonfloor = true, maxplayerdist = 7, safelist = {'Bubble', 'Eternal Oblivion'}}
        local spells = {
                        {name = 'fierce berserk', monsteramount = 3},
                        {name = 'berserk', monsteramount = 3},
                        {name = 'groundshaker', monsteramount = 5},
                       }
        --dont change things below
        local searchtype = 'p'
        if playersetup.checkonlyfloor then searchtype = 'pf' end
        table.lower(playersetup.safelist)
        table.lower(monsters)
        for i,j in ipairs(spells) do
            if spells[i].name ~= 'strike' and spells[i].name ~= 'strong strike' then
                spells[i].info = spellinfo(j.name)
                if not spells[i].info then
                    table.remove(spells,i)
                end
            end
            if spells[i].info and table.find({'front', 'bigbeam','smallbeam','bigwave','smallwave','strike'},spells[i].info.condition) then
                spells[i].needdir = true
            else
                spells[i].needdir = false
            end
        end
        local function haveplayer()
            if playersetup.checkplayers then
                foreach creature p searchtype do
                    if p ~= $self and p.dist <= playersetup.maxplayerdist and not table.find(playersetup.safelist,p.name:lower()) then
                        return true
                    end
                end
            end
            return false
        end
    init end
     
    auto(100)
    for i,j in ipairs(spells) do
        if (j.info and cancastspell(j.info)) or cancastspell(j.name,$attacked) then
            if not haveplayer() and j.monsteramount then
                local highest,bestdir = 0
                if j.needdir then
                    highest, bestdir = 0
                    local dirs = {w = 0, e = 0, n = 0, s = 0}
                    for a,b in pairs(dirs) do
                        b = maroundspell(j.info.condition, a, table.unpack(monsters))
                        if b > highest or (b >= highest and a == $self.dir) then
                            highest = b
                            bestdir = a
                        end
                    end
                else
                    highest = maroundspell(j.info.condition, table.unpack(monsters))
                    bestdir = $self.dir
                end
                if highest >= j.monsteramount then
                    if $self.dir ~= bestdir then turn(bestdir) wait(50,70) end
                    cast(j.info.words)
                    wait(cooldown('attack'))
                end
            elseif j.targethp and $attacked.id ~= 0 and $attacked.hppc <= j.targethp and cancastspell(j.info,$attacked) then
                cast(j.info.words)
                wait(cooldown('attack'))
            end
        end
    end
        yes
       
    Last edited by kamil123; 01-14-2013 at 07:30 PM.

  2. #2
    Normal User Delking's Avatar
    Join Date
    Jun 2012
    Location
    Sweden
    Posts
    247
    Mentioned
    6 Post(s)
    Tagged
    0 Thread(s)
    Quoted
    3 Post(s)
    Reputation
    19
    Rep Power
    5
    I am using 2 hotkeys, 1 for exori gran/exori/exori min and one for exori ico/hur to set the gran spells as priorities. They will however not sync spells, but its an improvement from what you use atm.

    Here you go:
    PHP Code:
    --Global Variables
         AmountToIcoandHur 
    -- How many to shoot Exori Ico/Hur?
         
    AmountToEGran -- How many monsters to shoot E-Gran?
         
    AmountToExori -- How many monsters to use Exori?
         
    AmountToEMin -- How many monsters to use Exori Min?
         
    Player_Safe true -- Stop shooting Exori spells if player

    PHP Code:
    --Exori hur/ico
    wa 
    0
    wb 
    0
    wc 
    0
    if iscreatureontile(posx-1,posy-1,poszthen wa 1 end
    if iscreatureontile(posx-1,posy,poszthen wb 1 end
    if iscreatureontile(posx-1,posy+1,poszthen wc 1 end
    west 
    wa+wb+wc
    na 
    0
    nb 
    0
    nc 
    0
    if iscreatureontile(posx-1,posy-1,poszthen na 1 end 
    if iscreatureontile(posx,posy-1,poszthen nb 1 end
    if iscreatureontile(posx+1,posy-1,poszthen nc 1 end
    north 
    na+nb+nc
    ea 
    0
    eb 
    0
    ec 
    0
    if iscreatureontile(posx+1,posy-1,poszthen ea 1 end
    if iscreatureontile(posx+1,posy,poszthen eb 1 end
    if iscreatureontile(posx+1,posy+1,poszthen ec 1 end
    east 
    ea+eb+ec
    sa 
    0
    sb 
    0
    sc 
    0
    if iscreatureontile(posx-1,posy+1,poszthen sa 1 end
    if iscreatureontile(posx,posy+1,poszthen sb 1 end
    if iscreatureontile(posx+1,posy+1,poszthen sc 1 end
    south 
    sa+sb+sc


    if ((south AmountToEMin and east AmountToEMin and west AmountToEMin and north AmountToEMin) or cancast("exori min") == false or (paround(10true) >= and Safe_Player)) and ((maround(1) < AmountToExori or cancast("exori") == false) or (paround(7true) >= and Player_Safe)) and ((maround(1) < AmountToEGran or cancast("exori gran") == false) or (paround(7true) >= and Player_Safe)) and maround(7) >= AmountToIcoandHur and target.id ~= and cancast("exori hur"then
    cast
    ("exori hur")
    end

    if ((south AmountToEMin and east AmountToEMin and west AmountToEMin and north AmountToEMin) or cancast("exori min") == false or (paround(10true) >= and Safe_Player)) and ((maround(1) < AmountToExori or cancast("exori") == false) or (paround(7true) >= and Player_Safe)) and ((maround(1) < AmountToEGran or cancast("exori gran") == false) or (paround(7true) >= and Player_Safe)) and maround(7) >= AmountToIcoandHur and target.id ~= and cancast("exori ico") and cancast("exori hur") == false and target.dist == 1 then
    cast
    ("exori ico")
    end 


    PHP Code:
    --Sirmates exori hotkey
    -- [[ INIT START ]] --
        
    local CONFIG = {
            
    CREATURES = {"Vampire Bride""Werewolf""Hellspawn""Vampire""Mutated Bat""Vampire Bride""Priestess""Banshee""Nightmare""Fury""Dark Torturer""Nightstalker""Bonebeast""Nightmare Scion""Spectre""Gargoyle""Crypt Shambler""Demon Skeleton""Haunted Treeling""Slime""War wolf"},
            
            
    PLAYERS = {
                
    ENABLED Player_Safe,
                
    DISTANCE 7,
                
    FLOOR_DIFFERENCE 1,
                
    SAFE_LIST = {"Bubble""Eternal Oblivion"},
            },
            
            
    SPELLS = {
                --{
    NAME "groundshaker"AMOUNT 6},
                {
    NAME "fierce berserk"AMOUNT AmountToEGran},
                {
    NAME "berserk"AMOUNT AmountToExori},
                {
    NAME "front sweep"AMOUNT AmountToEMin},
                --{
    NAME "annihilation"HP_PC 45},
                --{
    NAME "brutal strike"HP_PC 10},
               --{
    NAME "whirlwind throw"HP_PC 10},
            },
        }

        -- [[ DO 
    NOT CHANGE ANYTHING BELOW THIS LINE. ]] --

        
    SPELLS_CONFIG SPELLS_CONFIG or {}
        
    LAST_FLOOR LAST_FLOOR or Self.PositionZ()
        
    ATTACK_EXHAUST ATTACK_EXHAUST or 0
        
        table
    .lower(CONFIG.CREATURES)
        
        
    local RESET_SPELLS_CONFIG #CONFIG.SPELLS ~= #SPELLS_CONFIG
        
        
    if (not RESET_SPELLS_CONFIGthen
            
    for INDEXSPELL_ENTRY in ipairs(CONFIG.SPELLS) do
                if (
    SPELL_ENTRY.NAME ~= SPELLS_CONFIG[INDEX].NAME or ((SPELL_ENTRY.AMOUNT and SPELL_ENTRY.AMOUNT ~= SPELLS_CONFIG[INDEX].AMOUNT) or (SPELL_ENTRY.HP_PC and SPELL_ENTRY.HP_PC ~= SPELLS_CONFIG[INDEX].HP_PC))) then
                    RESET_SPELLS_CONFIG 
    true
                    
    break
                
    end
            end
        end
        
        
    if (RESET_SPELLS_CONFIGthen
            SPELLS_CONFIG 
    = {}
            
            
    local CURRENT_INDEX 1
            
            
    while (#CONFIG.SPELLS >= CURRENT_INDEX) do
                
    CONFIG.SPELLS[CURRENT_INDEX].INFO Spell.GetByWordsOrName(CONFIG.SPELLS[CURRENT_INDEX].NAME)
                
                if (
    not CONFIG.SPELLS[CURRENT_INDEX].INFO:isValid()) then
                    table
    .remove(CONFIG.SPELLSCURRENT_INDEX)
                else
                    if (
    #CONFIG.SPELLS[CURRENT_INDEX].INFO:Condition() > 0 and table.find({"BIG_BEAM", "BIG_WAVE", "FRONT", "SMALL_BEAM", "SMALL_WAVE", "STRIKE"}, CONFIG.SPELLS[CURRENT_INDEX].INFO:Condition())) then
                        
    CONFIG.SPELLS[CURRENT_INDEX].NEED_DIRECTION true
                    
    else
                        
    CONFIG.SPELLS[CURRENT_INDEX].NEED_DIRECTION false
                    end
                    
                    CURRENT_INDEX 
    CURRENT_INDEX 1
                end
            end
        end
    -- [[ INIT END ]] --

    if (
    Self.PositionZ() ~= LAST_FLOORthen
        LAST_FLOOR
    ATTACK_EXHAUST Self.PositionZ(), System.TimeMilliseconds() + 2000
        
    return
    end

    if (System.TimeMilliseconds() > ATTACK_EXHAUSTthen
        
    for _SPELL_ENTRY in ipairs(CONFIG.SPELLS) do
            if (
    SPELL_ENTRY.INFO:isAbleToCast(nilfalse)) then
                local ATTACKED 
    Creature.GetAttacked()
                
                if (
    SPELL_ENTRY.AMOUNT and (not CONFIG.PLAYERS.ENABLED or Self.PlayersAroundFloorIgnore(CONFIG.PLAYERS.DISTANCECONFIG.PLAYERS.FLOOR_DIFFERENCEunpack(CONFIG.PLAYERS.SAFE_LIST)) == 0)) then
                    local HIGHEST_AMOUNT
    BEST_DIRECTION 0Self.LookDirection()
                                
                    if (
    SPELL_ENTRY.NEED_DIRECTIONthen
                        
    for DIRECTIONCREATURES_AMOUNT in pairs({[DIRECTION_NORTH] = 0, [DIRECTION_EAST] = 0, [DIRECTION_SOUTH] = 0, [DIRECTION_WEST] = 0}) do
                            
    CREATURES_AMOUNT Self.MonstersAroundSpell(SPELL_ENTRY.INFO:Condition(), DIRECTIONunpack(CONFIG.CREATURES))
                            
                            if (
    CREATURES_AMOUNT HIGHEST_AMOUNT or (CREATURES_AMOUNT >= HIGHEST_AMOUNT and DIRECTION == Self.LookDirection())) then
                                HIGHEST_AMOUNT
    BEST_DIRECTION CREATURES_AMOUNTDIRECTION
                            end
                        end
                    
    else
                        
    HIGHEST_AMOUNTBEST_DIRECTION Self.MonstersAroundSpell(SPELL_ENTRY.INFO:Condition(), Self.LookDirection(), unpack(CONFIG.CREATURES)), Self.LookDirection()
                    
    end
                    
                    
    if (HIGHEST_AMOUNT >= SPELL_ENTRY.AMOUNTthen
                        
    while (Self.LookDirection() ~= BEST_DIRECTION) do
                            
    Self.Turn(BEST_DIRECTION)
                            
    System.Wait(2575)
                        
    end
                        
                        
    if (SPELL_ENTRY.INFO:CastSpell()) then
                            System
    .Wait(Self.CoolDown(SPELL_GROUP_ATTACK))
                        
    end
                    end
                
    elseif (SPELL_ENTRY.HP_PC and SPELL_ENTRY.INFO:isAbleToCast(ATTACKEDfalse) and table.find(CONFIG.CREATURESATTACKED:Name():lower()) and SPELL_ENTRY.HP_PC >= ATTACKED:HealthPercent()) then
                    
    if (SPELL_ENTRY.INFO:CastSpell(ATTACKED)) then
                        System
    .Wait(Self.CoolDown(SPELL_GROUP_ATTACK))
                    
    end
                end
            end
        end
    end 

  3. #3
    Focus Group kamil123's Avatar
    Join Date
    Apr 2012
    Location
    Poland
    Posts
    341
    Mentioned
    15 Post(s)
    Tagged
    0 Thread(s)
    Quoted
    18 Post(s)
    Reputation
    106
    Rep Power
    6
    @delking
    thanks, i'll try it for now.
    but still would be nice if someone would try to do perfect exori script with priorities and cooldown case included

Posting Permissions

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