Jump to content

Request Script


Recommended Posts

  • Replies 270
  • 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

On 5/12/2021 at 2:41 PM, gynek said:

hello i need scripts fo attack brolly every tranform

if g_game.isOnScreen("Brolly") then
	g_game.sendKey("F1")  
end
auto(1000)

 

Link to post
Share on other sites

Hello,

I needed a script where I would NOT target any creature with the name "Pet" in it.

For example, there is a creature called "Ricardo's Pet". When I have my targetting set to attack all monsters, it would NOT target the monster with "pet" in it.

Thank you so much in advance for all the help!

Link to post
Share on other sites
Posted (edited)
2 hours ago, ricardo27 said:

Hello,

I needed a script where I would NOT target any creature with the name "Pet" in it.

For example, there is a creature called "Ricardo's Pet". When I have my targetting set to attack all monsters, it would NOT target the monster with "pet" in it.

Thank you so much in advance for all the help!

if not g_game.isAttacking() then 
  for _, creature in pairs(g_game.getCreatures()) do
    if creature:isMonster() and not string.match(creature:getName()), "Pet") then
      g_game.attack(creature)
    end
  end
end

 

Edited by zakne11
Link to post
Share on other sites
Posted (edited)
3 hours ago, zakne11 said:


if not g_game.isAttacking() then 
  for _, creature in pairs(g_game.getCreatures()) do
    if creature:isMonster() and not string.match(creature:getName()), "Pet") then
      g_game.attack(creature)
    end
  end
end

 

It didn't work unfortunately.

It says "LUA ERROR: Direct use of "pairs(g_game.getCreatures())" is prohibited."

Thank you so much in advance for the help. Wasn't sure how to fix this LUA error.

Edited by ricardo27
Link to post
Share on other sites
15 hours ago, ricardo27 said:

It didn't work unfortunately.

It says "LUA ERROR: Direct use of "pairs(g_game.getCreatures())" is prohibited."

Thank you so much in advance for the help. Wasn't sure how to fix this LUA error.

 

local allcreatures = g_game.getCreatures()
if not g_game.isAttacking() then 
  for _, creature in pairs(allcreatures) do
    if creature:isMonster() and not string.match(creature:getName()), "Pet") then
      g_game.attack(creature)
    end
  end
end

 

Link to post
Share on other sites
15 minutes ago, zakne11 said:

 


local allcreatures = g_game.getCreatures()
if not g_game.isAttacking() then 
  for _, creature in pairs(allcreatures) do
    if creature:isMonster() and not string.match(creature:getName()), "Pet") then
      g_game.attack(creature)
    end
  end
end

 

Sorry still not working.

Error: [string "Require libs/main"..."]5: 'then' expected near ','

Thank you again for all the help!
 

Link to post
Share on other sites
7 hours ago, shirako said:

Hello, 

i am looking for spells that can use for targetting that could be customizable

like exori, exori min, exori gran on multiple monsters

and single target when 1

that are just simple condition like, #g_game.getMonstersAround(x) >= y

for more complicated things you can use functions like

  • g_game.getBestAreaTurnDirection

  • g_game.getCreaturesInArea

Link to post
Share on other sites
4 hours ago, zaphod1337 said:

Need single target and aoe spell, when not on cooldown. so it ues whenever its off cooldown, prefferably 2 different UEs so i can make it spawn mas flam and mas vis

There is no cooldown flag applied for bot,  you have to do your self countdown system

Link to post
Share on other sites
On 5/25/2021 at 7:31 PM, tawr said:

can someone write script to turn off targeting if there are 0 monsters near character and turn on targeting with 5+ monsters on screen?

 

 

Please search the forum before posting.

Link to post
Share on other sites
On 5/20/2021 at 8:47 PM, ricardo27 said:

Sorry still not working.

Error: [string "Require libs/main"..."]5: 'then' expected near ','

Thank you again for all the help!
 

did you find a solution for this need this also

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

can i have an script for Valoria ot, its an otserver whit 7.6 rules, so i need to usewith mana fluid and then throw it to me, like old times, and if you could make an script just like that but for throwing sd at target that would be the greatest thing ever and i would be so thankfull, thank you

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

ADD for this script "range" and "HP" Please

 

 

local manaToCast = 60 local spellToCast = "Spirit Cannon" local player = g_game.getLocalPlayer() if g_game.isAttacking() and player:getManaPercent() >= manaToCast then g_game.talk(spellToCast) sleep(700, 1000) end auto(100)

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...