Jump to content

Tokumei

Members
  • Posts

    32
  • Joined

  • Last visited

  • Days Won

    4

Tokumei last won the day on April 14 2022

Tokumei had the most liked content!

1 Follower

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

Tokumei's Achievements

5

Reputation

  1. @oualid64966 I stand corrected. All you need to do is place a "stand" wpt before the action for the same co-ordinates.
  2. I don't play ROTs, but did you guys turn on the "read map files" in the "Info and Options" tab? Not sure if this will fix your problem, but worth a shot.
  3. Tokumei

    Food?

    local foodID = 3725 -- ID of the food you want to use. (Brown Mushroom = 3725) local waitTime = 300000 -- Time you want to wait after eating before allowing the script to run again. (1000 = 1 second) if g_game.getLocalPlayer():getItemsCount(foodID) > 0 then g_game.useInventoryItem(foodID) end sleep(waitTime) auto(200,400)
  4. Is there currently a function to execute a script on kill? If not, is there another method I could use? For some context: - OT server (WAD) - I'm trying to make a script that functions as a looter by using corpses, but I've run into the problem of already looted corpse co-ordinates being added back to the table each time it runs as a persistent script. - I am aware that if the creature is skinnable, I can just skin the creature after looting and that would solve the issue. Unfortunately not all creatures are skinnable. - I would like to avoid just adding a longer period for the auto() funtion. -- Variables -- local corpseIds = {4286, 4062} -- Corpse ID's -- Functions -- function table.find(t, value) for k,v in pairs(t) do if v == value then return k end end end -- Conditions -- local tiles = g_map.getTiles() local corpses = {} for _, tile in pairs(tiles) do if tile:getPosition():getDistance(g_game.getLocalPlayer():getPosition()) <= 7 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.useMapItem(corpse:getPosition()) table.remove(corpses,1) sleep(2000) setOption("Cavebot/Enabled", "true") sleep(500) end end auto(100) EDIT: Sorry if I posted this in the wrong thread. ~ Tokumei
  5. 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.
  6. @oualid64966 It's amazing how useful the search function is. And here someone zakne11 added a system message check to it as well.
  7. 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.
  8. Why do you have the health to Cast % at 100%? Seems unnecessary, but if you wanted to have it so you only shoot at over 80%hp or something you should change that "<" sign to ">" otherwise you will only shoot the rune when you are below that HP%. local healthToCast = 80 local player = g_game.getLocalPlayer() if g_game.isAttacking() and player:getHealthPercent() >= healthToCast then g_game.useInventoryItemOnCreature(3198, g_game.getAttackingCreature()) sleep(900, 1100) end auto(100)
  9. Correct. And again I haven't tested it. I only just got the bot again yesterday and haven't had a chance to play around with it. Alternatively you could add some delays in your script.
  10. For example: local playerPos = g_game.getLocalPlayer():getPosition() local templeX = 32727 local templeY = 31627 setOption("Cavebot/Enabled", "false") if playerPos.x >= templeX and playerPos.y => templeY then gotolabel("Temple", "Training") else gotolabel("Start", "Training") end And then have an action script after your other labels that enables it again. setOption("Cavebot/Enabled", "true") Let me know if it works or not.
  11. @oualid64966You could try toggle/pause the walker at the start of the script then toggle/unpause it at the end.
  12. 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
  13. O.o Thanks! Was that in the docs and I'm just blind? - Tokumei
  14. Just thought you might like to know this information. I honestly have no idea where to post this, and didn't want to add to your already full inbox @Zelek. So, yeah please delete it if I'm in the wrong section. - Tokumei
  15. The search function is a wonderful thing. Just remove the Auto part at the bottom and put it in an action waypoint. I haven't used it personally, but I assume it works. - Tokumei
×
×
  • Create New...