Jump to content

Tokumei

Members
  • Posts

    32
  • Joined

  • Last visited

  • Days Won

    4

Everything posted by Tokumei

  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
  16. 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
  17. I don't think it's necessary to use here, but you could probably use the math.random() function. local randomizer01 = tostring(math.random(150,200)) -- returns a random number between 150 and 200 local randomizer02 = tostring(math.random(20,50)) -- returns a random number between 20 and 50 if g_game.isAttacking() then setOption("Cavebot/WalkDelay", randomizer01) else setOption("Cavebot/WalkDelay", randomizer02) end auto(100) I haven't tested it at all though. Let me know if it works. - Tokumei
  18. Oh that's a nice way to do it. I made one just looking for the corpse ID on floor tiles, but haven't really tested it much, but I like the sound of your approach. - Tokumei
  19. @Flatlander Ahh yes reverse phycology... totally not you... <wink> And nah man, I have no interest in getting anymore banned.
  20. The max weight you can assign to an item in the looter is 99.99oz. Possibility to get the character stuck when trying to loot something heavy such as a dragon scale mail. (114oz) - Tokumei
  21. Just a thought, but I've noticed the bot not looting sometimes as it get's stuck trying to eat from the corpse. My suggestion would be to limit the amount of tries to eat, or significantly lower it's priority. - Tokumei
  22. He plays on WAD and is smart enough to use his IGN as his handle here.
  23. I'm not sure if this was intended or not but using the function "g_game.getLocalPlayer():getItemsCount(****)" now returns the stacks of items instead of the total count. For example, if I had 423 UH's on my character it would return 5. As a side note, I did find an itemCounting script on the forums, but that only returned the count of the first stack. Using the same example as above it would return 23. EDIT: I've made my own function that works, but yeah just thought I'd post this as I'm not sure if that was how the "getItemsCount()" function was intended to work. - Tokumei
  24. Tokumei

    Exeta RES

    Not sure if this is what you're after. I have NOT tested it, so please let me know how it goes. local distance = 1 -- Distance from player to count mobs in local mobCount = 1 -- Minimum amount of mobs inside distance local spell = "exeta res" -- Spell to cast if conditions are true local globalCD = 2000 -- Global cooldown of spells/actions (1000 = 1 second) if #g_game.getMonstersAround(distance) >= mobCount then g_game.talk(spell) sleep(globalCD,globalCD+200) end auto(100,200) - Tokumei
  25. You're going to have to tell us more than just that. I've never played NarutoStory, do you want a script that just right-clicks on a stack of 100 rins (like changing gold coins to plats etc.)? - Tokumei
×
×
  • Create New...