• There is NO official Otland's Discord server and NO official Otland's server list. The Otland's Staff does not manage any Discord server or server list. Moderators or administrator of any Discord server or server lists have NO connection to the Otland's Staff. Do not get scammed!

Simple OTCBot (only for otcv8 currently)

Evolunia

evolunia.net
Joined
Nov 6, 2017
Messages
210
Solutions
3
Reaction score
187
Hello, I made a small simple bot for fun. I made it very quickly and the UI is bad and the code is quite messy - probably I will improve the code and clean it abit eventually. I have been trying the bot out and it has worked really well for cavebotting, and just playing with the extra auto features feels really good. You can also easily make it work on normal OTClient with few changes!

I guess best idea in future would be making use of kondrah's bot module and implementing everything from this bot to his, but I will see what I do in the future. For now there won't be that many updates since I am quite busy!

I will copy the githubs readme;

LuniaBot
A bot that provides all the basic bot features, it currently contains: waypoints with loading and saving, autotargetting, auto healing, auto haste, auto mana shield, mana training. I guess the only major thing missing is auto loot, and once that's done this bot should be fine for cavebotting.

Install
To install simply download and put it inside your otclient/modules folder.

Etc
All settings are automatically saved and stored inside your otclient config, and each character got their own config, the settings will automatically load when you log onto a character. You can also save and load waypoints, they will be stored inside otclient/modules/otcbot-master/wpts.

The code is quite messy, I just wanted to put it out there quickly, feel free to improve it - I will probably try and make it a lot cleaner once I got some time over!

s5U9GPV.png


GITHUB & download: strndi/otcbot (https://github.com/strndi/otcbot)
 
thanks a lot!! it is very helpful at the moment i see all is working good =P by the way, it is possible to add an option to eat food automatically? i'll try by having food as mana restore item.. maybe that will work

edit// saw other thing, the Load button is not working and waypoints are not getting saved on /wpts folder in order to make player get upstairs/downstairs

edit2/ just rename otclient_xxxxx folder to otclient and create wpts folder manually and everything will work

 
Last edited:
If you are taking requests/suggestions:

  • auto-target list
  • spell to use if X creatures attacking
 
If you are taking requests/suggestions:

  • auto-target list
  • spell to use if X creatures attacking
yeah you can request stuff, i will probably add these things next time i work on it

@ralke
now the wpts folder is included.
and yeah you can't go upstairs currently, i will add more waypoint options in the future.
 
Good job, but imho you should move to OTCV8 bot, and help improving it.
Like adding new functions: OTCv8/otclientv8 (https://github.com/OTCv8/otclientv8/tree/master/modules/game_bot/functions)
Or new UI: OTCv8/otclientv8 (https://github.com/OTCv8/otclientv8/tree/master/modules/game_bot/panels)

If you want to add something, just make make pull request on github.
But if you want to keep working on this bot, that's fine, if you need help feel free to contact with me.

Currently it look like this:

Script used:
Code:
--Version 0.999

--#main

Panels.Haste()
Panels.ManaShield()
Panels.Health()
Panels.HealthItem()
Panels.ManaItem()
Panels.ManaItem()
Panels.AntiParalyze()

local tab2 = addTab("Another Tab")
addButton("button1", "test button on 2nd tab", nil, tab2)

local tab3 = addTab("3th tab")
addLabel("label1", "Label on 3th tab", tab3)
Panels.Turning(tab3)

--#macros

local helloLabel = addLabel("helloLabel", "", tab2)

macro(1000, "example macro (time)", nil, function()
  helloLabel:setText("Time from start: " .. now)
end, tab2)
--#hotkeys

hotkey("f5", "example hotkey", function()
  info("Wow, you clicked f5 hotkey")
end)

singlehotkey("f6", "example hotkey2", function()
  info("Wow, you clicked f6 singlehotkey")
end)
--#callbacks

local positionLabel = addLabel("positionLabel", "")
onPlayerPositionChange(function()
  positionLabel:setText("Pos: " .. posx() .. "," .. posy() .. "," .. posz())
end)
--#other
 
Good job, but imho you should move to OTCV8 bot, and help improving it.
Like adding new functions: OTCv8/otclientv8 (https://github.com/OTCv8/otclientv8/tree/master/modules/game_bot/functions)
Or new UI: OTCv8/otclientv8 (https://github.com/OTCv8/otclientv8/tree/master/modules/game_bot/panels)

If you want to add something, just make make pull request on github.
But if you want to keep working on this bot, that's fine, if you need help feel free to contact with me.

yeah i realized that after u showed first example of auto heal xD
if i do changes in future i will probably try make it based on your bot
 
Last edited:
made some improvements last days;
added luring mode
fixed bot lagging when you were too far away from waypoint
added autobuffing
minor fixes

i've added otcv8 as an option on my server now, and I am using this bot + using kondrah's bot module for macros. i've added some tracking to see which players are using this client and my bot, and it seems to be working great for those that are using it

in future i will probably make a config out of kondra's bot, i want it to be more clean and simple for players to use
 
Evolunia, is it possible to make it a part of OTClient?
If yes, could you tell which functions we need to write to make it compatible with OTClient v0.6.6?

It is possible that in my free time I would take care of it.
 
i wonder if id be able to make a ring equip script? like equips E Ring at certain % of HP and remove/ if 20% mana . thanks for the bot really works good! and your server is great.
 
my lunia bot keeps coming out all smushed together!? i cant really see the top part of the top and when I go to adjust or move the lunia bot window it just smashes all up even more. does anybody know how to fix it?
 
my lunia bot keeps coming out all smushed together!? i cant really see the top part of the top and when I go to adjust or move the lunia bot window it just smashes all up even more. does anybody know how to fix it?

Hello, are you using otcv8? It probably got broken due to all updates made to otcv8. I haven't kept the repository updated, but I got a more updated version for my server which you can download here:
 

Attachments

Hello, are you using otcv8? It probably got broken due to all updates made to otcv8. I haven't kept the repository updated, but I got a more updated version for my server which you can download here:
Thanks a million, buddy! Got it to work perfectly now!
Hated that I could not use the auto-attack!
Hey if you can add a click reuse feature !!!???
That's the only thing missing on this bot really!
keep up the good work!
 
Last edited:
u need to revert this: OTCv8/otclientv8 (https://github.com/OTCv8/otclientv8/blob/master/tutorials/OTML.md)
so for example
buffButton = luniaBotWindow.AutoBuff
should be
buffButton = luniaBotWindow:getChildById('AutoBuff')

i think u just need to change all those things to get childbyid and it will work
Hi @Evolunia I know it's a late reply for an old topic, but I only need to change this to work with OTClient?
Code:
    luniaBotWindow = g_ui.displayUI('luniabot')
    player = g_game.getLocalPlayer()
    waypointList = luniaBotWindow:getChildById('waypoints')
    luniaBotWindow:hide() 
    luniaBotButton = modules.client_topmenu.addLeftGameButton('luniaBotButton', tr('LuniaBot'), '/otcbot-master/luniabot', toggle)
    atkButton = luniaBotWindow:getChildById('autoAttack')
    walkButton = luniaBotWindow:getChildById('walking')
    healthSpellButton = luniaBotWindow:getChildById('AutoHealSpell')
    healthItemButton = luniaBotWindow:getChildById('AutoHealItem')
    manaRestoreButton = luniaBotWindow:getChildById('AutoMana')
    atkSpellButton = luniaBotWindow:getChildById('AtkSpell')
    manaTrainButton = luniaBotWindow:getChildById('ManaTrain')
    hasteButton = luniaBotWindow:getChildById('AutoHaste')
    buffButton = luniaBotWindow:getChildById('AutoBuff')
    lureButton = luniaBotWindow:getChildById('LureMonsters')
    manaShieldButton = luniaBotWindow:getChildById('AutoManaShield')
    healthItemButton.onCheckChange = autoHealPotion
    manaRestoreButton.onCheckChange = autoManaPotion
    luniaBotWindow:getChildById('AtkSpellText.onTextChange = saveBotText')
    luniaBotWindow:getChildById('HealSpellText.onTextChange = saveBotText')
    luniaBotWindow:getChildById('HealthSpellPercent.onTextChange = saveBotText')
    luniaBotWindow:getChildById('HealItem.onTextChange = saveBotText')
    luniaBotWindow:getChildById('HealItemPercent.onTextChange = saveBotText')
    luniaBotWindow:getChildById('ManaItem.onTextChange = saveBotText')
    luniaBotWindow:getChildById('ManaPercent.onTextChange = saveBotText')
    luniaBotWindow:getChildById('WptName.onTextChange = saveBotText')
    luniaBotWindow:getChildById('ManaSpellText.onTextChange = saveBotText')
    luniaBotWindow:getChildById('ManaTrainPercent.onTextChange = saveBotText')
    luniaBotWindow:getChildById('HasteText.onTextChange = saveBotText')
    luniaBotWindow:getChildById('BuffText.onTextChange = saveBotText')
    luniaBotWindow:getChildById('LureMinimum.onTextChange = saveBotText')
    luniaBotWindow:getChildById('LureMaximum.onTextChange = saveBotText')

Or I need to change the luniaBotWindow that are below too?
Another question, how can I save the bot settings in %appdata% instead of otclient/modules/otcbot-master/wpts, if I have the client compressed with "winebottle/others".

Regards!
 
Hi @Evolunia I know it's a late reply for an old topic, but I only need to change this to work with OTClient?

Yes, but some things you changed incorrectly. For example:
Code:
luniaBotWindow:getChildById('AtkSpellText.onTextChange = saveBotText')
should probably be
Code:
luniaBotWindow:getChildById('AtkSpellText').onTextChange = saveBotText

And those things are the only things it is using from Otclientv8, so if you change them correctly it should in theory work on normal OTCLient. (I haven't tested it though)

Another question, how can I save the bot settings in %appdata% instead of otclient/modules/otcbot-master/wpts, if I have the client compressed with "winebottle/others".

I don't know about how to fix that sorry!


Anyways, this bot had worked great for my server! I know otclientv8 has released a better bot, but I much prefer how simple this one is to use for new users, and this bot has enough features for my server
 
Evolunia said:
Anyways, this bot had worked great for my server! I know otclientv8 has released a better bot, but I much prefer how simple this one is to use for new users, and this bot has enough features for my server
@Evolunia I've tested this on OTCv8 time ago and I liked it a lot. Please consider doing a git repo of this bot for OTClient (edubard/mehah) the only one I could found was this one BenDol/otclient-candybot (https://github.com/BenDol/otclient-candybot) but I like yours, did the changes you mentioned but it still not working if you wish contact me for testing I'll be glad to help felipe23#1113

Regards!
 
@Evolunia I've tested this on OTCv8 time ago and I liked it a lot. Please consider doing a repo for OTClient (edubard/mehah) the only one I could found was this one BenDol/otclient-candybot (https://github.com/BenDol/otclient-candybot) but I like yours, did the changes you mentioned but it still not working if you wish contact me for testing I'll be glad to help felipe23#1113

Regards!

currently I am a bit busy, but I can take the time to make it work for regular otclient soon. I will try to add such version here next weekend.
 
Back
Top