Jump to content

Request Script


Recommended Posts

  • Replies 282
  • Created
  • Last Reply

Top Posters In This Topic

Top Posters In This Topic

Popular Posts

if g_game.isOnScreen("Wolf") then playSound("alarm.wav") sleep(2000) end auto(100)     I'll take a look at it

You can load the “Keep Target” script that is already included in the bot.   Keep soul at 100: local player = g_game.getLocalPlayer() if player:getSoul() ~= 100 then   g_game.talk("furie

local TextToFind = xxx local FoundMessage = false for k,v in pairs(g_game.getTextMessages()) do if v = TextToFind then return FoundMessage = true end end if FoundMessage then gotolabel("HUNTING"

Posted Images

Hi,
I need script that use item on other item. Something like upgrading item.
Something like that if i was able to use elfbot:
if [$itemcount.IDFIRST == 1] { useoninventoryitem IDFIRST IDSECOND}

 

Link to post
Share on other sites
5 hours ago, untucbre said:

I need a script to use a spell and a script to use a certain item permanently

I have using this script for spells.
 

Quote

if g_game.isAttacking() then
    if #g_game.getMonstersAround(1) >= 2 then
        g_game.talk("Area Spell")
    else
        g_game.talk("Target")
    end
end
auto(500)

It's using Target if you are attacking someone or use area spell if monsters are more then 2.

 

What you want to use? Food or something like that? I use this script. 
 

Quote

local foodId = food_ID
g_game.use(foodId)
auto(10000, 30000)

 

Link to post
Share on other sites
On 10/24/2020 at 12:02 PM, Zelek said:

if not g_game.isOnline() then return end
local leftSlot = 6
local rightSlot = 5
g_game.move(7368, {x=65535, y=leftSlot, z=0}, 100)
auto(5000)

Currently there is no way to read player's equipment to know when the weapon is gone, so it's best to just move the items every x amount of time.

I'll be adding it in the future versions.

Have arrow slot? like above leftslot

Link to post
Share on other sites
Just now, strzala said:

I need script "use item on dead monster" please help me

 

auto(100)

local corpseIds = {5362, 5362} -- ids of bodies
local itemIdToUse = 7803 -- id of the item to use on bodies

function table.find(t, value)
  for k,v in pairs(t) do
    if v == value then return k end
  end
end

local tiles = g_map.getTiles()
local corpses = {}
for _, tile in pairs(tiles) do
    if tile:getPosition():getDistance(g_game.getLocalPlayer():getPosition()) <= 1 then
        local topItem = tile:getTopItem()
        if topItem and table.find(corpseIds, topItem:getId()) then
            table.insert(corpses, topItem)
        end
    end
end

if #corpses > 0 then
    for _, corpse in pairs(corpses) do
        setOption("Cavebot/Enabled", "false")
        g_game.stop()
        g_game.useItemOnPosition(itemIdToUse, corpse:getPosition())
        sleep(1000)
    end
else
    setOption("Cavebot/Enabled", "true")
end

 

Link to post
Share on other sites
10 minutes ago, lediv said:

 

auto(100)

local corpseIds = {5362, 5362} -- ids of bodies
local itemIdToUse = 7803 -- id of the item to use on bodies

function table.find(t, value)
  for k,v in pairs(t) do
    if v == value then return k end
  end
end

local tiles = g_map.getTiles()
local corpses = {}
for _, tile in pairs(tiles) do
    if tile:getPosition():getDistance(g_game.getLocalPlayer():getPosition()) <= 1 then
        local topItem = tile:getTopItem()
        if topItem and table.find(corpseIds, topItem:getId()) then
            table.insert(corpses, topItem)
        end
    end
end

if #corpses > 0 then
    for _, corpse in pairs(corpses) do
        setOption("Cavebot/Enabled", "false")
        g_game.stop()
        g_game.useItemOnPosition(itemIdToUse, corpse:getPosition())
        sleep(1000)
    end
else
    setOption("Cavebot/Enabled", "true")
end

 

Hmmm don't  work for me i correct setup id 😞

Link to post
Share on other sites
On 4/10/2021 at 1:11 AM, strzala said:

Hmmm don't  work for me i correct setup id 😞

remember to put correct id of the item and body and enable "read map tiles" in info and options tab. It works for me

Edited by lediv
Link to post
Share on other sites
55 minutes ago, shiro785 said:

Hi i'm looking for a script that uses a spell if i'm stun by a player, or just stun. thx

use g_game.getLocalPlayer():getStates()        to find corect state number
and then add   
g_game.getLocalPlayer():hasState()  condition to cast spell

 

Link to post
Share on other sites
  • 2 weeks later...

Hi,

I'm looking for a script to use inventory item for the same item. in inventory.. I try to looking for docs : inventory item use on inventory item but i can't find ;( ... someone can help ? 

Edited by Poszep
Link to post
Share on other sites
On 4/28/2021 at 5:44 PM, Poszep said:

Hi,

I'm looking for a script to use inventory item for the same item. in inventory.. I try to looking for docs : inventory item use on inventory item but i can't find ;( ... someone can help ? 

Completly dont know if it will work, but you can try

g_game.useInventoryItemOnPosition(3031, g_game.getAttackingCreature():getPosition()

 

instead of map position, you can try to insert bp position

Link to post
Share on other sites

hi i cant find this and other script which should work with just using on ground - doesnt

can you tell me please how to make script with eating food from ground?

Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


×
×
  • Create New...