little autoharvest thingy
updated one I found, probably autoharvest, works in all the zones I have tried it in so far. If not its pretty easy to adjust it I suppose. I use it to put on a following toon and as I run around it will harvest a node as I get close since my main doesnt harvest worth shit. Good for running around and picking stuff off with one while the other harvests or whatever.
both go in a EQ2AutoHarvest foler in the scripts.
havent used it in a month or so, but shoudl still work, has a little UI for autolooting etc (dont recall why I put it in.. probably for collectibles or some shit I was doing while harvesting I dunno)
yeah probably not the most efficient code either, but really its for harvesting...
EQ2AutoHarvest.iss
Code:
;******************************
;click on a node to start harvesting, and this will continue to harvest until the node is depleted.
;
variable filepath AHPath="${LavishScript.HomeDirectory}/Scripts/EQ2AutoHarvest/"
variable bool AutoHarvest=FALSE
variable bool AutoLoot=FALSE
function init()
{
declare triggerCheckTimer int script 5
;Sundered Frontier
AddTrigger Gathering "@*@Rare Item Found!@*@"
AddTrigger Gathering "@*@You have gathered@*@"
AddTrigger Gathering "@*@Nothing found@*@"
AddTrigger Mining "@*@Rare Item Found!@*@"
AddTrigger Mining "@*@You have mined@*@"
AddTrigger Mining "@*@Nothing found@*@"
AddTrigger Foresting "@*@Rare Item Found!@*@"
AddTrigger Foresting "@*@You have logged@*@"
AddTrigger Foresting "@*@Nothing found@*@"
AddTrigger Trapping "@*@Rare Item Found!@*@"
AddTrigger Trapping "@*@You have acquired@*@"
AddTrigger Trapping "@*@Nothing found@*@"
AddTrigger Fishing "@*@Rare Item Found!@*@"
AddTrigger Fishing "@*@You have caught@*@"
AddTrigger Fishing "@*@Nothing found@*@"
}
function main()
{
call init
ui -reload "${LavishScript.HomeDirectory}/Interface/skins/eq2/EQ2.xml"
ui -reload -skin eq2 "${AHPath}EQ2AutoHarvestUI.xml"
While 1
{
if ${AutoHarvest}
{
if ${Actor[resource].Distance}<=3.8 && (!${Me.InCombat} || !${Me.ToActor.IsStealthed})
{
Actor[resource]:DoTarget
wait 10
if ${Actor[Me].IsIdle}
Target:DoubleClick
while ${Target(exists)} && ${Target.Type.Equal[Resource]}
{
if ${Actor[resource].Distance}>3.8
eq2execute /target_none
call Check_Triggers
}
}
}
elseif ${Actor[resource].Distance}<=3.8
{
while ${Target(exists)} && ${Target.Type.Equal[Resource]}
{
if ${Actor[Me].IsIdle}
Target:DoubleClick
}
}
if ${AutoLoot}
{
if ${LootWindow(exists)}
LootWindow:LootAll
;Free For All & Lottery Window
;LootWindow:DeclineLotto
;Need Before Greed Window
;LootWindow:DeclineNBG
;LootWindow:SelectNeed
;LootWindow:SelectGreed
}
}
}
function Targetting()
{
}
;THE INDIVIDUAL FUNCTIONS FOR EACH NODE TYPE
function Mining(string Line)
{
;IF TARGET IS A RESOURCE, DO THIS ABILITY ON MY TARGET
if ${Target.Type.Equal[resource]}
{
EQ2Execute /useability Mining
}
}
function Trapping(string Line)
{
if ${Target.Type.Equal[resource]}
{
EQ2Execute /useability Trapping
}
}
function Gathering(string Line)
{
if ${Target.Type.Equal[resource]}
{
EQ2Execute /useability Gathering
}
}
function Foresting(string Line)
{
if ${Target.Type.Equal[resource]}
{
EQ2Execute /useability Foresting
}
}
function Fishing(string Line)
{
if ${Target.Type.Equal[resource]}
{
EQ2Execute /useability Fishing
}
}
function Check_Triggers()
{
If ${Math.Calc[${Time.Timestamp}-${triggerTime.Timestamp}]}>=${triggerCheckTimer}
{
if ${QueuedCommands}
{
do
{
ExecuteQueued
}
while ${QueuedCommands}
}
triggerTime:Set[${Time.Timestamp}]
}
}
function atexit()
{
ui -unload "${AHPath}EQ2AutoHarvestUI.xml"
}
EQ2AutoHarvestUI.xml
Code:
<?xml version="1.0" encoding="UTF-8" ?>
<ISUI>
<Window name='EQ2AutoHarvest'>
<X>10</X>
<Y>10</Y>
<Width>110</Width>
<Height>75</Height>
<StorePosition>1</StorePosition>
<Title>EQ2AutoHarvest</Title>
<TitleBar template='window.Titlebar'>
<Children>
<Text Name='Title' Template='window.Titlebar.Title' />
<commandbutton name='Custom Close Button' Template='window.Titlebar.Close'>
<OnLeftClick>
Script[EQ2AutoHarvest]:End
radar off
</OnLeftClick>
</commandbutton>
</Children>
</TitleBar>
<Children>
<Checkbox Name='ChkBoxAutoHarvest'>
<X>10</X>
<Y>10</Y>
<Width>95%</Width>
<Height>20</Height>
<Text>Auto Harvest?</Text>
<OnLeftClick>
if ${This.Checked}
{
Script[EQ2AutoHarvest].Variable[AutoHarvest]:Set[TRUE]
}
else
{
Script[EQ2AutoHarvest].Variable[AutoHarvest]:Set[FALSE]
}
</OnLeftClick>
</Checkbox>
<Checkbox Name='ChkBoxAutoLoot'>
<X>10</X>
<Y>30</Y>
<Width>95%</Width>
<Height>20</Height>
<Text>Auto Loot?</Text>
<OnLeftClick>
if ${This.Checked}
{
Script[EQ2AutoHarvest].Variable[AutoLoot]:Set[TRUE]
}
else
{
Script[EQ2AutoHarvest].Variable[AutoLoot]:Set[FALSE]
}
</OnLeftClick>
</Checkbox>
</Children>
</Window>
</ISUI>