Discussion in 'Script Releases' started by utadaishot, May 22, 2008.

  1. utadaishot

    utadaishot Well-Known Member

    Messages:
    58
    This is the next version of the previous "Autoharvest v1.0". The major change is the move from chat triggers to getting information from the UI. The flaw in chat triggers is having to update it from zone to zone and overlapping triggers. For example, "You acquire" in one zone is the response to trapping while in another zone is a response to gathering. This shouldn't happen anymore. Give it a try and report any bugs. Thank you!

    What it does:
    - continue harvesting a node you have started until it is gone.

    What it does not do:
    - find nodes
    - begin harvesting nodes for you



    How to use it:
    - copy "autoharvest.iss" to your scripts folder (you can change the name to whatever)
    - in-game, type "/run autoharvest" (or whatever you changed the name to)
    - click a node to begin harvesting and let the script do the rest. the script will continue running in the background until you quit the game or type "endscript autoharvest" in your console


    Please send a PM regarding all bugs or questions!

    Attached Files:

  2. Jazcat

    Jazcat Active Member

    Messages:
    32
    This is great, exactly what i've been looking for. A couple of problems tho i've found...

    First one is it creates a 2nd casting window, i ended up placing it exactly on top of the existing one so i wouldn't be seeing double.

    2nd problem is more serious, if i run that script Innerspace crashes with eq2 when I /camp to change characters or try to /quit normally. I get the innerspace crash window popping up asking if i want to send the crash data. Stopping the script before camping or quiting may help (haven't tried it yet) but would be very annoying and something i wouldn't remember to keep doing.
  3. litewave

    litewave Well-Known Member

    Messages:
    39
    I haven't tried it yet, but i can come to its defense by saying i often have that crashing problem if i camp while a script is running.

    Thus i keep a hotbutton to execute a endscript *. I usually remember to click it before camping and often cuss when i don't /grin
  4. tehfeer

    tehfeer Active Member

    Messages:
    14
    I found this script works much better then the one on svn. I did notice the double casting windows though.
  5. bob_the_builder

    bob_the_builder Well-Known Member

    Messages:
    675
    Why not just use simpleharvest ?

    You don't have to 'start' the harvest either...
  6. tehfeer

    tehfeer Active Member

    Messages:
    14
    I haven't tried simple harvest. I will check it out when I get home. Really I just want something that will continue to harvest a node after I harvest it the first time.
  7. ACiDXiAN

    ACiDXiAN Active Member

    Messages:
    30
    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 (Text):

    ;******************************
    ;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 (Text):

    <?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>
     

    Attached Files:

    Last edited: May 25, 2010

Share This Page