[EasyUO] Ugly Camping Trainer
Posted: Sun Feb 11, 2018 3:34 pm
Here's an ugly script as it spams all the time it's running and due to EasyUO's limitations of not being able to read tile data without first using the "tile init" command, it takes a good few minutes or more to initialize.
This script is made so that you can travel from tree to tree, cutting kindling and using them to train camping. It finds any trees right next to you and tries to cut them with a dagger in your main backpack. It's a very old script I happened to find when I was asked for similar lumberjacking script, which I will post during the upcoming week. Going to make it better by at least adding in an option to pause it / automatically pausing it when weight gets close to max...not really sure yet as all I was asked for, was a tree cutting script that works when you're next to a tree XD
*EDIT* Changed it a bit so it won't spam when you're not next to a tree. It will still use the kindling in your backpack until you run out. Also removed palms from the script, so you won't try to get kindling from the small palms in some forests.
This script is made so that you can travel from tree to tree, cutting kindling and using them to train camping. It finds any trees right next to you and tries to cut them with a dagger in your main backpack. It's a very old script I happened to find when I was asked for similar lumberjacking script, which I will post during the upcoming week. Going to make it better by at least adding in an option to pause it / automatically pausing it when weight gets close to max...not really sure yet as all I was asked for, was a tree cutting script that works when you're next to a tree XD
Code: Select all
tile init ; This line is mandatory for EasyUO to get the tiledata
set #lpc 100
Set %Kindling PEF
Set %Dagger WSF
CampTrainingLoop:
GoSub FindTree
if #Result = #True
{
GoSub GetTreeTarget
FindItem %Dagger C_ , #BackpackID
if #FindKind = -1
{
event exMsg #CharID 12 3 No dagger found, halting...
halt
}
set #lObjectID #FindID
event macro 17 0
target 2s
Event Macro 22 0
}
wait 10
FindItem %Kindling C_ , #BackpackID
if #FindKind <> -1
{
set #lObjectID #FindID
Event Macro 17 0
}
wait 20
goto CampTrainingLoop
sub FindTree
namespace push
namespace local ScanTree
set #lpc 1000
set !StartX #CharPosX - 1
set !StartY #CharPosY - 1
set !EndX #CharPosX + 1
set !EndY #CharPosY + 1
for !X !StartX !EndX
{
for !Y !StartY !EndY
{
tile cnt !X !Y #CursKind
for !TileKind 0 #TileCnt
{
tile get !X !Y !TileKind #CursKind
if TREE in #TileName
{
set !TreeX !X
set !TreeY !Y
set !TreeZ #TileZ
set !TreeTile #TileType
set !TreeKind 3
set #lpc 20
namespace pop
return #true
}
}
}
}
set #lpc 20
namespace pop
return #False
Sub GetTreeTarget
namespace push
namespace local ScanTree
set #lTargetX !TreeX
set #lTargetY !TreeY
set #lTargetZ !TreeZ
set #lTargetTile !TreeTile
set #lTargetKind !TreeKind
namespace pop
return