Destinations on your computer
Parts of Xenobot settings
Parts of Xenobot scripts
Section
Important
Tutorial
Explanation (worth reading)
Preparations
1. You will need Syntax Lua Library. Since many people seem to have problem with saving the original as a .lua file, I decided to upload it as a .lua file.
Donwload here
2. Move the file to /documents/xenobot/scripts
Waypoints and labels
First of all, let me start by saying that script is NOT a part of the setting and waypoints. Settings and scripts are located in separate locations.
To access them, go to /documents/xenobot.
1. Create waypoints, they can spread across many floor, as long as it ends up as a loop. As show below.
6. Create label called "Deposit".
7. Make waypoints back to your hunting places, as shown above, just opposite.
Your waypoints should look something like this:
Script and editing
For this tutorial, I will the following script:
1. Open Notepad, copy and paste the script shown above.
These waypoints start with the first node, by 4th node, the circle is complete. The bot then goes to:
Which is the label we named Check, when the Walker encounters it, the script we saved in step one will check how much gold you have:
Preparations
1. You will need Syntax Lua Library. Since many people seem to have problem with saving the original as a .lua file, I decided to upload it as a .lua file.
Donwload here
2. Move the file to /documents/xenobot/scripts
Waypoints and labels
First of all, let me start by saying that script is NOT a part of the setting and waypoints. Settings and scripts are located in separate locations.
To access them, go to /documents/xenobot.
1. Create waypoints, they can spread across many floor, as long as it ends up as a loop. As show below.
2. Your waypoints should look something like this.
node1
node2
node3
node4
node5
node6
node7
When the bot reaches node7 it will go back to node1.
3. Add label and call it "Check"
4. Add another label and call it "Gobank".
5. After "Gobank", start setting up waypoints, leading from node7, to the bank. As shown below.
Waypoints in red are the waypoints after label Gobank.
6. Create label called "Deposit".
7. Make waypoints back to your hunting places, as shown above, just opposite.
Your waypoints should look something like this:
node1
node2
node3
node4
node5
node6
node7
Check
Gobank
Node
Stand
Node
Node
Stand
Deposit
Node
Node
Stand
Script and editing
For this tutorial, I will the following script:
registerEventListener(WALKER_SELECTLABEL, "onWalkerSelectLabel")
dofile("SyntaxLuaLib.lua")
function onWalkerSelectLabel(labelName)
if (labelName == "Check") then
delayWalker(3000)
if count(3031) >= 1500 then
gotoLabel("Gobank")
else
gotoLabel("Start")
end
elseif (labelName == "Deposit") then
delayWalker(3000)
Self.Say("Hi")
sleep(math.random(700, 1400))
Self.SayToNpc("Deposit all")
sleep(math.random(700, 1400))
Self.SayToNpc("Yes")
elseif (labelName == "End") then
delayWalker(3000)
gotoLabel("Start")
end
end
1. Open Notepad, copy and paste the script shown above.
- Save as
- Choose All files
- Add .lua to file name
- Save in /documents/xenobot/scripts
2. Open your settings file with waypoints you made. Below are waypoints I made (not in North Thais), to shorten it I removed many nodes so it doesn't work very well.
<item text="Node (33121, 32459, 9)" tag="0"/>Your waypoints should look very similar (the number of nodes, ropes, stands, doesn't matter)
<item text="Node (33107, 32422, 9)" tag="0"/>
<item text="Node (33177, 32473, 9)" tag="0"/>
<item text="Node (33136, 32470, 9)" tag="0"/>
<item text="Check:" tag="255"/>
<item text="Gobank:" tag="255"/>
<item text="Rope (33121, 32459, 9)" tag="3"/>
<item text="Rope (33114, 32454, 8)" tag="3"/>
<item text="Node (33144, 32452, 7)" tag="0"/>
<item text="Node (33216, 32424, 7)" tag="0"/>
<item text="Stand (33220, 32387, 7)" tag="1"/>
<item text="Deposit:" tag="255"/>
<item text="Node (33188, 32439, 7)" tag="0"/>
<item text="Node (33123, 32447, 7)" tag="0"/>
<item text="Hole (33114, 32454, 7)" tag="4"/>
<item text="Stand (33121, 32459, 8)" tag="1"/>
These waypoints start with the first node, by 4th node, the circle is complete. The bot then goes to:
<item text="Check:" tag="255"/>
Which is the label we named Check, when the Walker encounters it, the script we saved in step one will check how much gold you have:
if (labelName == "Check") then
delayWalker(3000)
if count(3031) >= 1500 then
If your character has more than 1500 gold (you can change the number to whatever you want), the bot will go to the bank:
If your character has less than that, the bot will continue walking around the nodes you've given it until it has 1500 gold.gotoLabel("Gobank")
But for that can happen, we need another label at the very beginning of the waypoints, it is very easy to create it.else
gotoLabel("Start")
- Copy existing label such as "<item text="Gobank:" tag="255"/>"
- Place it at the beginning of the waypoints.
- Press tab 2 times for clarity.
- Erase Gobank.
- Replace it with Start.
- Make sure you didn't erase the colon - :
Add label named End at the end of the waypoints.
Once your character reaches the stand point next to the banker, it will say:
Then it is going to follow the waypoints you've give it, back to the hunting place. Once the place is reached, the bot will go to the beginning of the waypoints:
elseif (labelName == "Deposit") then
delayWalker(3000)
Self.Say("Hi")
sleep(math.random(700, 1400))
Self.SayToNpc("Deposit all")
sleep(math.random(700, 1400))
Self.SayToNpc("Yes")
Your final waypoints should look something like this:
elseif (labelName == "End") then
delayWalker(3000)
gotoLabel("start")
<item text="Start:" tag="255"/>
<item text="Node (33121, 32459, 9)" tag="0"/>
<item text="Node (33107, 32422, 9)" tag="0"/>
<item text="Node (33177, 32473, 9)" tag="0"/>
<item text="Node (33136, 32470, 9)" tag="0"/>
<item text="Check:" tag="255"/>
<item text="Gobank:" tag="255"/>
<item text="Rope (33121, 32459, 9)" tag="3"/>
<item text="Rope (33114, 32454, 8)" tag="3"/>
<item text="Node (33144, 32452, 7)" tag="0"/>
<item text="Node (33216, 32424, 7)" tag="0"/>
<item text="Stand (33220, 32387, 7)" tag="1"/>
<item text="Deposit:" tag="255"/>
<item text="Node (33188, 32439, 7)" tag="0"/>
<item text="Node (33123, 32447, 7)" tag="0"/>
<item text="Hole (33114, 32454, 7)" tag="4"/>
<item text="Stand (33121, 32459, 8)" tag="1"/>
<item text="End:" tag="255"/>
Run your looter, walker, targeter, and script.
There is a problem when you arrive to the bank, it doesnt deposit the money. Im sure that I do all you say.
ReplyDeleteplease fix