Jump to content

Request Script


Recommended Posts

  • Replies 322
  • Created
  • Last Reply

Top Posters In This Topic

Top Posters In This Topic

Popular Posts

local idsToFind = {3031, 3035} local tiles = g_map.getTiles() for _, tile in pairs(tiles) do local topItem = tile:getTopItem() if topItem then for _, id in pairs(idsToFind) do

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

if g_game.isAttacking() then setOption("Cavebot/WalkDelay", "200") else setOption("Cavebot/WalkDelay", "25") end auto(100)  

Posted Images

On 11/16/2021 at 6:13 AM, Tokumei said:

 

Unfortunately I don't think it's currently possible to equip items. 

I could be wrong, hopefully I am, and someone else could show us how to do that.

 

- Tokumei 

There is no direct function to equip, you can however move an item to the slots position.

g_game.moveItem(item, Position.new(65535, slotID, 0), count)

Link to post
Share on other sites
On 11/20/2021 at 5:00 AM, Eixim said:

There is no direct function to equip, you can however move an item to the slots position.

g_game.moveItem(item, Position.new(65535, slotID, 0), count)

 O.o Thanks! Was that in the docs and I'm just blind?

 

- Tokumei

Edited by Tokumei
Typos
Link to post
Share on other sites
On 8/30/2021 at 3:44 PM, zakne11 said:

pairs(creatures)

 

On 8/30/2021 at 3:44 PM, zakne11 said:

creatures = g_game.getCreatures()


pairs(creatures)


 

local player
local playerhp
local playername = xxxx
local creatures = g_game.getCreatures()


for v, k in pairs(Creatures) do
        if k:getName() == "playername" and k:isPlayer() then
          player = k
          player:getHealthPercent() = playerhp
          break
        end
      end
if playerhp <= 70 then 
  g_game.talk("exura sio" playername)
end

auto(250)

 

 

 

image.thumb.png.aa3711d82c6e5dc36fc7fffe4662babb.png



What is wrong?

Edited by Cashu
Link to post
Share on other sites

playername should not be in " ". 

If it needs a string you can use    tostring(playername)

 

NOTE: I haven't tested this it's just off the top of my head looking at what you posted. Let me know if this fixes your issue. 

 

 

EDIT: Here's the script I used to use, haven't used it in a while, but I assume it still works.

--------------------------------------------
-- 			Heal Friend with Spell
--				 by Tokumei
--------------------------------------------
-- 		  Version 1.0 (21/10/2021)
--		  Version 1.1 (22/10/2021)
--		    - Minor Syntax Update
--------------------------------------------


-- Edit this part --
local friendName = "Tokumei"  	-- insert your friends name here
local healPercent = 70			-- the % of HP you want to heal your friend at (eg 70%)
local spell = 'Exura sio "'		-- Spell to use for healing your friend
local spellCD = 1000			-- what is the internal cooldown of the spell (1000 = 1second)

-- Don't edit this unless you know what you're doing --
local friend  
local friendHP
local creatures = g_game.getCreatures()

friendHeal = function(s, f)
	g_game.talk(s..f)
end

friendCheck = function(fN, m)
	for v,k in pairs(m) do
		if k:getName() == fN and k:isPlayer() then
			friend = k:getName()
			friendHP = k:getHealthPercent()
			friend = true
			break
		else
			friend = false
		end
	end
	return friend 
end

if friendCheck(friendName, creatures) then 
	if friendHP <= healPercent then 
		friendHeal(spell, friendName)
		sleep(spellCD, spellCD+100)
	end
end

auto(100,150)

 

- Tokumei

Edited by Tokumei
Added script.
  • Like 1
Link to post
Share on other sites
  • 3 weeks later...

Hi, I would need some scripts, mainly for DBLOTS

 

1: Kaioken Scrypt : When Kaioken Sie turns off due to lack of mana [when it drops below 40%] Bot will turn on kaioken again.

2: Transform Scrypt :When my transform drops due to lack of game mana, the character will have more than 40% mana. It will transform again.

3: Script for auto-turning towards the player / monster and spell wave attack

 

 

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

Hi i would need some scripts for dblots!

i need a script to use spell when character runs up to the monster ( because he is currently running and spam all the time spell)

PS. sorry for my poor english :D

Edited by darekpro1234
Link to post
Share on other sites
  • 3 weeks later...
  • 2 months later...

Hey, I'd like to have a script that shoot runes on target, the server has hotkeys for runes..

Also if someone has an avoidance script (ex: dodge dragon waves) since its not working for this server.

 

Thanks in advance!

Link to post
Share on other sites
3 hours ago, shz0r said:

Hey, I'd like to have a script that shoot runes on target, the server has hotkeys for runes..

Also if someone has an avoidance script (ex: dodge dragon waves) since its not working for this server.

 

Thanks in advance!

 

I don't have the time to mess around making a stay diagonal script atm, but here's the shoot Hotkey rune if you are attacking.

auto(100)
if not g_game.isOnline() then return end
if  g_game.isAttacking() then
	g_game.sendKey("F1")
	sleep(2000)
end

The 2000 sleep at the end is a 2second wait, you can change that to whatever the cooldown is on your server.

  • Like 1
Link to post
Share on other sites

You can cycle through the items on the ground checking for corpse ID's then use a combo of these two.

g_game.useMapItem(x = 123, y = 456, z = 7)

and the

*** : getPosition()

functions.

Link to post
Share on other sites
  • 3 weeks later...
On 10/10/2020 at 12:45 PM, Zelek said:

Turn to target:

local monstersToTurn = 1
if #g_game.getMonstersAround(1) >= monstersToTurn then
  g_game.turn(g_game.getBestTurnDirection())
end
auto(250)

 

this one doesnt work anymore

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

×
×
  • Create New...