View Full Version : How make depositer items, depositer gold, refliter? Script 100% afk?
godgmail
09-08-2012, 04:55 PM
Hi Guys, i coming from neobot, and I no found here some example or tutorial for make scripts 100%afk, with depositor item/gold, refliter, check cap/mana potion/hp potion... Have some post talk about how make scripts 100% afk? thanks
Secret
09-09-2012, 10:35 AM
I was new to this things before also, but I learned much from downloading other scripters .lua files and took it from there. Thats how I learned to script myself. :)
Just a tip!
godgmail
09-09-2012, 02:09 PM
The problem is, in neobot you have waypoint action for put script in .LUA for depositer/refliter/check/gotolabel, in xenobot I don't see the waypoint action, how to I put one script for check for example mana potion in entrance of the cave, and continue if have mana potion or leave the cave if no have and buy more. In neobot you put in script in waypoint action in one determined SQM. In xenobot how to i make this, if I don't see the action waypoint only scripter? Thanks
Hypn0ticKi11er
09-13-2012, 03:19 AM
The problem is, in neobot you have waypoint action for put script in .LUA for depositer/refliter/check/gotolabel, in xenobot I don't see the waypoint action, how to I put one script for check for example mana potion in entrance of the cave, and continue if have mana potion or leave the cave if no have and buy more. In neobot you put in script in waypoint action in one determined SQM. In xenobot how to i make this, if I don't see the action waypoint only scripter? Thanks
You add a Label in the walker waypoints named something like: "Checker"
Then, in the lua, you make a function. EX:
(The few lines at the top are where people can set the variables to what they want, and is what the checker "checks"
I left a few extra variables in there to help you figure it out a little better =) If you need help scripting or testing any of your scripts,
just let me know and I'd be glad to help =)
----------------------------------------------------
Lua scripts in Xenobot can actually dictate what set of waypoints to go to. For example:
KeepHunting:
1,1,6
1,2,6
1,3,6
1,4,6
Checker:
Leave:
1,1,6
1,0,6
1,3,7
In the Script, once your character walks through the first waypoints (under the Label (or Section)) "Keep Hunting," It will
Have reached the "Checker Label." When the walker selects this Label, the Lua script activates the "Checker" portion
of the script. If the conditions are met, the walker will go to the "Leave" Label (or Section). If your character has not
Reached the necessary conditions to leave, the Lua Script makes the walker go to the "KeepHunting" Label (or Section)
and repeat the whole thing.
In scripts, it's helpful to put multiple checkers, etc.
To do things like banking, you'd put a stand where the character would stand to talk, and put a "Bank" Label (or Section)
And make the actions for when the character reaches that Label in the Lua Script by adding an "elseif" portion on the
"onWalkerSelectLabel" function.
Read the code below.
LeaveUponGoldAmount = true --Whether you want to leave upon reaching gold determined below.
GoldToLeave = 5000 --Amount of gold before you leave the cave.
MinCap = 0 --At what capacity do you want to leave the cave?
ManasToLeave = 45 --How many Mana Potions to leave the cave?
HealthsToLeave = 20 --How many Health Potions to leave the cave?
WantedHPS = 80 --How many Health Potions you want in your BP?
WantedMPS = 300 --How many manas to have before hunt at depot?
ManaPotID = 268 --Mana Potion ID.
ManaCost = 50 --How much each Mana Potion costs.
HealthPotID = 236 --Health Potion ID.
HealthCost = 45 --How much each Health Potion costs.
GoldID = 3031 --Gold ID
registerEventListener(WALKER_SELECTLABEL, "onWalkerSelectLabel")
function onWalkerSelectLabel(labelName)
if (labelName == "Checker") then
if (Self.Cap() < MinCap) or ((Self.ItemCount(ManaPotID) < ManasToLeave)) or ((Self.ItemCount(HealthPotID) < HealthsToLeave)) or (LeaveUponGoldAmount == true) and ((Self.ItemCount(GoldID) >= GoldToLeave)) then
gotoLabel("Leave")
else
gotoLabel("KeepHunting")
end
end
end
Powered by vBulletin® Version 4.2.5 Copyright © 2025 vBulletin Solutions Inc. All rights reserved.