Zelek Posted August 28, 2021 Author Share Posted August 28, 2021 local healthToCast = 75local spellToCast = "thrusting beam" local distance = 4local player = g_game.getLocalPlayer() local target = g_game.getAttackingCreature()if target and target:getPosition():distance(player:getPosition()) <= distance and player:getHealthPercent() >= healthToCast then g_game.talk(spellToCast) sleep(900, 1100)endauto(100) 3 hours ago, Sophy Moore said: How to make target spell to trigger when monster that is targetted is near 1sqm max 4 sqm from me. I mean that this script is trying to use spell even if target is 7sqm away from me. ? local healthToCast = 75 local spellToCast = "thrusting beam" local player = g_game.getLocalPlayer() if g_game.isAttacking() and player:getHealthPercent() >= healthToCast then g_game.talk(spellToCast) sleep(900, 1100) end auto(100) Link to comment Share on other sites More sharing options...
willsuetsugu Posted August 29, 2021 Share Posted August 29, 2021 Hi, could you help me? I bought your bot to use on rots and currently play dende... would like a script to regenerate my tank's health... can you help me? Link to comment Share on other sites More sharing options...
Rishi Posted August 29, 2021 Share Posted August 29, 2021 On 1/25/2021 at 7:13 AM, zakne11 said: local player local playerhp local playername = xxxx for v, k in pairs(g_game.getCreatures()) 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) When ever I try to use this it throws this error "Direct use of "pairs(g_game.getCreatures())" is prohibited." Link to comment Share on other sites More sharing options...
zakne11 Posted August 30, 2021 Share Posted August 30, 2021 14 hours ago, Rishi said: When ever I try to use this it throws this error "Direct use of "pairs(g_game.getCreatures())" is prohibited." creatures = g_game.getCreatures() pairs(creatures) Link to comment Share on other sites More sharing options...
Kuuba Posted August 31, 2021 Share Posted August 31, 2021 Hi Zelek, I wanted to use this script to lure mobs, unfortunately it does not work correctly, after luring 7 mobs cavebot is turned off and targeting is activated, after killing all mobs cavebot is still turned off, can you please check this script. Link to comment Share on other sites More sharing options...
Zelek Posted September 1, 2021 Author Share Posted September 1, 2021 On 8/31/2021 at 12:03 PM, Kuuba said: Hi Zelek, I wanted to use this script to lure mobs, unfortunately it does not work correctly, after luring 7 mobs cavebot is turned off and targeting is activated, after killing all mobs cavebot is still turned off, can you please check this script. It works correctly, you must be doing something wrong. Link to comment Share on other sites More sharing options...
hello67 Posted September 5, 2021 Share Posted September 5, 2021 Please make macro script macro(2500, "destroy boxes chairs", function() and macro(2500, "scythe wheat", function() >it should be similar because use with function i have some code from riftbot(?) but rly dont know how to edit it for otcv8 (760) server Quote local FURNITURE_IDS = {2976, 2472, 2524, 2319, 2358} -- list of items to destroy local MACHETE_ID = 3305 -- id of weapon or machete to destroy. -- DON'T EDIT BELOW Module.New("Destroy Furniture", function (mod) if Self.isConnected() then local pos = Self.Position() for x = -1, 1 do for y = -1, 1 do local item = Map.GetTopMoveItem(pos.x+x, pos.y+y, pos.z) if table.find(FURNITURE_IDS, item.id) then -- destroy item Self.UseItemWithGround(MACHETE_ID, pos.x+x, pos.y+y, pos.z, math.random(1000, 1500)) break end end end end end) or tried... Quote local FURNITURE_IDS = {2976, 2472, 2524, 2319, 2358} local MACHETE_ID = 3305 macro(2500, "Destroy Furniture", function() if g_game.isOnline() then local pos = g_game.getLocalPlayer():getPosition() for _,tile in pairs(g_map.getTiles(posz())) do local tilePosition = tile:getPosition() local found = false if tilePosition.x == pos.x + 1 and tilePosition.y < pos.y + 1 and tilePosition.y > pos.y - 1 then -- right 3 cells found = true end if tilePosition.x == pos.x - 1 and tilePosition.y < pos.y + 1 and tilePosition.y > pos.y - 1 then -- left 3 cells found = true end if tilePosition.x == pos.x and (tilePosition.y < pos.y + 1 or tilePosition.y > pos.y - 1) then -- upper and below found = true end if found then local topItem = tile:getTopThing() if table.find(FURNITURE_IDS, topItem.id) then g_game.useInventoryItemWith(MACHETE_ID, topItem) end end end end end) Link to comment Share on other sites More sharing options...
josew Posted September 8, 2021 Share Posted September 8, 2021 ALGUEM SABE SE É POSSIVEL FAZER UMA SCRIPT PARA DENDE (RETURN OF THE SAIYANS) CURAR E ENCHER A MANA DO DPS NA PARTY? Link to comment Share on other sites More sharing options...
ricardo27 Posted September 29, 2021 Share Posted September 29, 2021 (edited) Nevermind - No one ever responds to this forum thread. Edited October 4, 2021 by ricardo27 Link to comment Share on other sites More sharing options...
ricardo27 Posted October 3, 2021 Share Posted October 3, 2021 (edited) Nevermind - No one ever responds to this forum thread. Edited October 4, 2021 by ricardo27 Link to comment Share on other sites More sharing options...
AllanBoy Posted October 4, 2021 Share Posted October 4, 2021 Somebody can help me in this error? is Keep target script, Thx Link to comment Share on other sites More sharing options...
waxzoo Posted October 10, 2021 Share Posted October 10, 2021 SSA script? cant find one, only for rings and i tried messing with it but i have no clue what im doing and im just crashing the bot some how 😛 Link to comment Share on other sites More sharing options...
Anusia Posted October 16, 2021 Share Posted October 16, 2021 (edited) 😉 Edited October 16, 2021 by Anusia Link to comment Share on other sites More sharing options...
Kuuba Posted October 18, 2021 Share Posted October 18, 2021 Hi Zelek, i need a script that will fallow specifid player when no monster is targeted. Link to comment Share on other sites More sharing options...
Tokumei Posted October 21, 2021 Share Posted October 21, 2021 (edited) This is not really a script request so I'm not sure if I'm posting this in the right area, but I was wondering if it's possible to use the hotkey script function to change a variable for a persistent script. One alternative solution I thought of was to simply call one of two variations of the script through a hotkey, but not sure how to do this or if it's possible either. local variable1 = true if variable1 == true then variable1 = false else variable1 = true end if variable1 == true then -- call persistentScript1 else -- call persistentScript2 end Any advice would be appreciated - Tokumei Edited October 21, 2021 by Tokumei Link to comment Share on other sites More sharing options...
Tokumei Posted October 21, 2021 Share Posted October 21, 2021 On 10/18/2021 at 10:41 PM, Kuuba said: Hi Zelek, i need a script that will fallow specifid player when no monster is targeted. This should do the trick. I haven't tested it a lot so let me know if it works as intended. -------------------------------------------- -- Follow Player When Not Attacking -- by Tokumei -------------------------------------------- -- Version 1.0 (21/10/2021) -------------------------------------------- -- Edit this part -- local friend = "Tokumei" -- Name of player you want to follow. -- Don't edit this unless you know what you're doing -- local creature local creatures = g_game.getCreatures() for v, k in pairs(creatures) do if k:getName() == friend and k:isPlayer() then creature = k break end end if not g_game.isAttacking() and not g_game.isFollowing() and creature then g_game.follow(creature) end auto(100, 250) - Tokumei 1 Link to comment Share on other sites More sharing options...
Rise Posted October 22, 2021 Share Posted October 22, 2021 Hey can anyody write me a script that SKINS{with item} dead body? Link to comment Share on other sites More sharing options...
Tokumei Posted October 24, 2021 Share Posted October 24, 2021 (edited) On 10/22/2021 at 11:36 PM, Rise said: Hey can anyody write me a script that SKINS{with item} dead body? If you used the search function you would have found this script. I have no idea if it works or not though as I haven't tested it. - Tokumei Edited October 24, 2021 by Tokumei Spelling Link to comment Share on other sites More sharing options...
Leon Posted October 31, 2021 Share Posted October 31, 2021 HELLO !!! Hello im play in NARUTO STORY OTS and character have spell to throw sword on monster and this sword fly on floor and have id 10896 ... when im pick up " stand up on this sql floor id sword10896 " CD spell its 0. " PLEASE SCRIPT FOR THIS SPELL 🙂 im need to chracter use spell and always go stand on this id sql floor. Can u make this script for me please very very very please name spell " Hisenken " id sword on floor " 10896 " Link to comment Share on other sites More sharing options...
Msgsanta Posted November 1, 2021 Share Posted November 1, 2021 I need a script to change eq to low hp and put it back to high hp /////helm/armor/legs/belt/slot ammo/amulet Link to comment Share on other sites More sharing options...
Ruchacz Posted November 15, 2021 Share Posted November 15, 2021 Can i have script for ene ring ? Link to comment Share on other sites More sharing options...
Tokumei Posted November 16, 2021 Share Posted November 16, 2021 On 11/14/2021 at 9:18 PM, wasiex said: Could you edit this script so the values are set more randomly not only 2 values? I mean a range lets say for example from 25-50 and from 100-250 if g_game.isAttacking() then setOption("Cavebot/WalkDelay", "180") else setOption("Cavebot/WalkDelay", "25") end auto(100) 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 1 Link to comment Share on other sites More sharing options...
Tokumei Posted November 16, 2021 Share Posted November 16, 2021 21 hours ago, Ruchacz said: Can i have script for ene ring ? 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 Link to comment Share on other sites More sharing options...
Rikos1 Posted November 16, 2021 Share Posted November 16, 2021 Hi, i need script for drop items, like toput on waypoint action and then drop ID item on this sqm, anyone? Link to comment Share on other sites More sharing options...
Tokumei Posted November 17, 2021 Share Posted November 17, 2021 (edited) 20 hours ago, Rikos1 said: Hi, i need script for drop items, like toput on waypoint action and then drop ID item on this sqm, anyone? 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 Edited November 17, 2021 by Tokumei Clarification Link to comment Share on other sites More sharing options...
Recommended Posts