PDA

View Full Version : 4 basic things that would make the bot script making-editing-opening easier!



icaro43
02-28-2013, 07:07 AM
If we wanst to get this community growing we need to make the bot easier to use and understand how it works
based on that i have few ideas that might make scripting/loading a script more easier

right click monster ->> add to targeting

Sometimes adding a bunch of monsters to targeting is annoying just because you have to make fellow steps like add > then you have to type the name in
by adding this function we would only need to right click the monster in the battle window or active tibia windows and then select "add to targeting"


right click item ->> add to looting

same thing as above. well if it is annoying with monster imagine how it would be with items!!


Store lua scripts inside the .xbst files

It would work as the same way neobot used to work, all hotkeys would be inside of the .xbst file by this way loading script would be easier for someone that doesn't know how to use the bot properly load the scripts and stuff

You could have active hotkey with a boolean propriety "active"so by this way we could turn on/off a hotkey without the needing of making a label on the walker

Scripting directly in the walker

well the current scripter embed in the walker can't do much things because it has limitation to have only 1 line.
wouldn't it be easier to have a script that actually check your's supplies instead of making a label that calls a lua function outside the xbst file?
i do think so. making scripts would be easier to ppl and the community would grow faster!!

here's a pic of how would these things look like

http://i45.tinypic.com/2qvunfl.jpg


ty for reading :)

Infernal Bolt
02-28-2013, 07:25 AM
1. it can be annoying sometimes but its alright
2. http://neobot-scripts.com/xenobot_lootlist_creator.php
3. the xbst already holds the lua files, you only need to execute the xbst file to load all the luas if you have saved your script with the lua files running.
4. you can already add short scripts to the walker, it doesnt matter that they are on the same line.
Here's a checker.

if Self.ItemCount(268) < 50 or Self.ItemCount(266) < 10 or Self.Cap() < 30 then Walker.Goto('deposit') else Walker.Goto('start') end

icaro43
02-28-2013, 07:49 AM
is there a limitation for the one line checker? because my script does:


if SoftBoots == true and LeaveNoSofts == true and self.itemcount(6529) > 0 then
if Self.Cap() > MinCap or Self.ItemCount(ManaPotID) > ManasToLeave or Self.ItemCount(HealthPotID) > HealthsToLeave then
gotoLabel("hunt")
end
elseif SoftBoots == true and LeaveNoSofts == false then
if Self.Cap() > MinCap or Self.ItemCount(ManaPotID) > ManasToLeave or Self.ItemCount(HealthPotID) > HealthsToLeave then
gotoLabel("hunt")
end
elseif SoftBoots == false then
if Self.Cap() > MinCap or Self.ItemCount(ManaPotID) > ManasToLeave or Self.ItemCount(HealthPotID) > HealthsToLeave then
gotoLabel("hunt")
end

not sure if it is possible to paste on the one line editor tho, multi line would be just awesome :)

icaro43
02-28-2013, 07:52 AM
damn i got used to neobot :( i'm afraid of using ibot many ppl gettin banned

Infernal Bolt
02-28-2013, 09:12 AM
for variables you'd have to dofile before each of the oneliners

for a script that uses softs I'd just check if you have any worn soft on you and if you do you go repair them.


dofile('yourluafile.lua') if Self.ItemCount(6530) < 1 and Self.Cap() > MinCap and Self.ItemCount(ManaPotID) > ManasToLeave and Self.ItemCount(HealthPotID) > HealthsToLeave) then gotoLabel("hunt") end


But I have to agree, having a persistent with just variables would be great, I have suggested it to darkstar before but it's not a priority since the bot works as it is right now.

Ohman
02-28-2013, 09:13 AM
All conditional stuff like checking for supps i rather put in .lua file than create a one-liner. Why do people want to use this example in a one-liner?

if Self.ItemCount(268) < 50 or Self.ItemCount(266) < 10 or Self.Cap() < 30 then Walker.Goto('deposit') else Walker.Goto('start') end
1. you can neither edit or see the whole script in walker-tab
3. if you want to change it, you have to open .xbst file -> edit it -> save -> reload settings
in a lua file:
1. you have overview of all label-actions with syntax highlightning instead of a mix with one-liners in .xbst file and multi-liners in .lua file
2. with .lua u just use initial variables where you set e.g type of manapotion, instead of hardcode them into several one-liners
2. simpler to edit, open .lua -> edit -> save -> reload .lua script

Did is miss something? I only use one-liners for e.g "Self.Step(WEST)"

Xeromex
02-28-2013, 09:19 AM
I agree with 1&2,
for 3; Open .xbst with XenoBot, execute your scripts, press Save All at Settings and it'll load scripts next time.
4. I like to script in a .lua because I can script with Notepad++ but I think some people like this idea.

Infernal Bolt
02-28-2013, 09:23 AM
You can double click one-liners to edit them.
But I prefer editing in a lua file too, so much easier to see everything instead of having to go through and change everything in oneliners.

For simple scripts that don't need any customization i.e a troll script, oneliners are just fine.
I've made several mid level (200~) with only one-liners though without any problem.

Ohman
02-28-2013, 09:37 AM
You can double click one-liners to edit them.
But I prefer editing in a lua file too, so much easier to see everything instead of having to go through and change everything in oneliners.

For simple scripts that don't need any customization i.e a troll script, oneliners are just fine.
I've made several mid level (200~) with only one-liners though without any problem.

oh well I didn't know that, still prefer .lua file since I always have notepad++ open and for much better overview of label-actions. Basically you can either double click the script in walker and change it, or use a label instead and goto notepad+, ctrl+f search for label and change code for the label.