help with script

alsdk

Well-Known Member
the porpouse of this script is to show all regions of a given bookmark label (bm-*).

For instace, bm-1 has 5 systems in route, then this script should count those 5 regionids values for each solarsystem in route.

It isnt working atm and im unable to find a solution myself ...

hope to see ur opinions.
 

Attachments

GliderPro

Active Member
You may find this useful. :)

Code:
member:bool LowSecRoute()
{
    variable index:agentmission amIndex
    variable index:bookmark mbIndex
    variable iterator amIterator
    variable iterator mbIterator

    EVE:DoGetAgentMissions[amIndex]
    amIndex:GetIterator[amIterator]

    if ${amIterator:First(exists)}
    {
        do
        {
            if ${amIterator.Value.AgentID} == ${This.AgentID}
            {
                amIterator.Value:DoGetBookmarks[mbIndex]
                mbIndex:GetIterator[mbIterator]

                if ${mbIterator:First(exists)}
                {
                    do
                    {
                        mbIterator.Value:SetDestination
                        variable index:int ap_path
                        EVE:DoGetToDestinationPath[ap_path]
                        variable iterator ap_path_iterator
                        ap_path:GetIterator[ap_path_iterator]
                        
                        UI:UpdateConsole["obj_Agents: ${mbIterator.Value.Label} is ${ap_path.Used} jumps away."]
                        if ${ap_path_iterator:First(exists)}
                        {
                            do
                            {
                                UI:UpdateConsole["obj_Agents: ${ap_path_iterator.Value} ${Universe[${ap_path_iterator.Value}]} (${Universe[${ap_path_iterator.Value}].Security})"]
                                if ${ap_path_iterator.Value} > 0 && ${Universe[${ap_path_iterator.Value}].Security} <= 0.45
                                {   /* avoid low-sec */
                                    UI:UpdateConsole["obj_Agents: Low-Sec route found"]
                                    return TRUE
                                }
                            }
                            while ${ap_path_iterator:Next(exists)}
                        }       
                        
                    } 
                    while ${mbIterator:Next(exists)}
                }
            }
        }  
        while ${amIterator:Next(exists)}
    }       
    
    return FALSE
}
 

alsdk

Well-Known Member
i see, missing EVE:DoGetToDestinationPath and also a wait time before a SetDestination (important note).

now script is working, i will post a correction if anyone can some day think this is interesting.

greets
 

Attachments

Top Bottom