What is Instance Controller (IC)?

Automated zones

What is Instance Controller (IC)?

Postby Kannkor » 04 Sep 2019, 11:01

Instance Controller is a controlling script to help manage automated running of zones.

Usage:
Code: Select all
ogre ic

This will load the Instance Controller interface. From here, you can navigate folders and double click files to be run.

The Concept
Have a backend controlling script that manages the high level functions that people don't need to worry about, and have OPEN SOURCE files for the actual automation of the zones.

The Parts
Instance Controller - This manages which zones you are going to run, what your lockout timers look like, if you need to reset the zones, etc. Stuff like that. It also has a place where you can set some variables (checkboxes) so the scripter of the instances can use them if they wish, such as pausing when a shiny is found. Please note, people writing the scripts do NOT need to actually use these, but they should. Since those files are open source, you could always change them yourself.

Instance Files - The actual files that automate the zone. These are all open source. You can make a copy of these and modify them as you see fit.
Code: Select all
For example: Awuidor_The_Veiled_Precipice_Event_Heroic.iss

Contains the code to run the zone: Awuidor: The Veiled Precipice [Event Heroic]. This file must handle every aspect of the instance that you wish to be completed. Including, zoning in, zoning out, getting to each boss, killing each boss, clicking anything required, looting chests/shinies, zoning out, etc etc.

Ogre Instance Helper (OgreIH) - This is a special include inside of the Instance Files, that gives you access to a huge collection of helper functions. For example, in Chaos Descending, you could use this:
Code: Select all
call Obj_OgreIH.CD.GetIntoZone

And that would handle zoning you into the correct instance. That includes navigating from the mission area, to the zone object, clicking it, zoning you in, and waiting for your entire group to zone, all in 1 line of code!
OgreIH is generally used to control the entire group.
There's a TON of these helper functions. You can find them documented here on the wiki.

Ogre Utilities - Much like Ogre Instance Helper, it has a collection of functions to assist in automating zones. The big difference here, most of the functions inside of Ogre Utilities are for YOU only. For example.
Code: Select all
call Obj_OgreUtilities.HandleWaitForZoning

Waits for YOU to zone only, then returns control.

OgreConsole/OgreBotAPI
While not exactly part of this, these can play a large role in assisting you to complete some tasks. For example, if you needed to just pause the person running the script, you could simply do:
Code: Select all
OgreBotAPI:Pause

Other times you may want to pause your entire group, and using OgreConsole commands are by far the best approach, such as:
Code: Select all
oc !c -pause igw:${Me.Name}



I showed off Instance Controller on Twitch, showed what it is, and even coded a zone file in real time, on the stream. The entire video is 2 hours long, but you can watch just the first part to see how it works.
Instance Controller Video here!
Kannkor
 
Posts: 361
Joined: 06 Nov 2013, 11:49

Re: What is Instance Controller (IC)?

Postby Kannkor » 12 Feb 2020, 00:15

How to properly name your files
The file names must be specific, because it uses the file name to compare to the lock out window.
Be in the zone you want to code, open IC, then type the following in the console:
Code: Select all
echo ${Ogre_Instance_Controller.CleanZoneName}



Where to save your files.
You can technically save your files anywhere inside the Instance_Controller folder, however you should NOT save anything into the Default folder. This is the folder Ogre patches default files too. If you have a file here, that I later patch a file out for, you file will be overwritten.

Adding prefixes to your files.
Note: If any of this doesn't make sense, you should not do it. You will break it being able to reset the zones, and if you ask for help, I'm just going to have you remove it... :)
You still need to follow the proper naming conventions above.
However, you can now add prefixes to files that will be ignored when checking the zone for resetting. If the filename starts with an underscore (_), it will ignore everything up to the second underscore.
Example: Our normally named file is this: Echo_Caverns_Quarry_Quandary_Heroic.iss, now, if we wish, I can add/change it to this: _Kannkor_Echo_Caverns_Quarry_Quandary_Heroic.iss
When it is parsed, it sees there is an underscore at the start, so it internally knows the file name is after the second underscore, which in this case, is Echo_Caverns_Quarry_Quandary_Heroic.iss
Note: Because it goes to the second underscore, you cannot add additional underscores. Here is an example that WILL NOT WORK: _Kannkor_Made_Changes_Echo_Caverns_Quarry_Quandary_Heroic.iss
This will not work, because it goes to the second underscore, so it would look for: Made_Changes_Echo_Caverns_Quarry_Quandary_Heroic.iss, which isn't a proper zone name.
Kannkor
 
Posts: 361
Joined: 06 Nov 2013, 11:49

Re: What is Instance Controller (IC)?

Postby Kannkor » 11 Aug 2020, 12:22

How to wait inside of a zone for it to reset


Note: This is kind of in-progress.This should tell you if the zone you are in, is resettable. If it is not, then you can choose to wait, or do whatever it is you want.

Example 4 is the ONLY FUNCTIONAL way.


Example 1: Standalone script (does not load IC helpers, mostly useful for debugging).
Code: Select all
; If you want to only get the data about a specific zone, the variable that will hold the return value, MUST be a global collection:string, just like below.
; If you are going to check all the zones and scan them, you do not need this variable.
variable(global) collection:string gcsRetValue
function main(string _ZoneName="Fordel Midst: Remembrance [Raid]")
{
    ogre utilities
    wait 5
    Obj_CreateOgreUtilities:CreateOgreUtilities[${Script.Filename},Obj_OgreUtilities]
    wait 5

    ; Populate the information. This will open the zone reuse window and scan it.
    call Obj_OgreUtilities.Obj_ZoneReset.PopulateInternalMemory

    ; Pick how you want the data. Put both options in, but realistically you will only be using 1 at a time.
    call CheckASpecificZone "${_ZoneName}"
    call CheckAllZones
}
function CheckAllZones()
{
    variable int iCounter
    for ( iCounter:Set[1] ; ${iCounter} <= ${Obj_OgreUtilities.Obj_ZoneReset.Obj_ZoneReuseEntry.Used} ; iCounter:Inc )
    {
        echo ------ ${iCounter} ---------
        echo ${Obj_OgreUtilities.Obj_ZoneReset.Obj_ZoneReuseEntry[${iCounter}].ZoneName}
        echo NoData (FALSE == IsSet is true, TRUE == IsSet is false) ${Obj_OgreUtilities.Obj_ZoneReset.Obj_ZoneReuseEntry[${iCounter}].NoData}
        echo Resettable: ${Obj_OgreUtilities.Obj_ZoneReset.Obj_ZoneReuseEntry[${iCounter}].Resettable}
        echo TimeLeft: ${Obj_OgreUtilities.Obj_ZoneReset.Obj_ZoneReuseEntry[${iCounter}].TimeLeft}
        echo TextTimeLeft: ${Obj_OgreUtilities.Obj_ZoneReset.Obj_ZoneReuseEntry[${iCounter}].TextTimeLeft}
    }
}
function CheckASpecificZone(string _ZoneName)
{
    if ${Obj_OgreUtilities.Obj_ZoneReset.Get_ZoneData_GV[gcsRetValue,"${_ZoneName}"]}
    {
        echo Same zone (${_ZoneName}): ${Zone.Name.Equal["${_ZoneName}"]}
        echo IsSet ${gcsRetValue.Element["IsSet"]}
        echo Resettable ${gcsRetValue.Element["Resettable"]}
        echo TimeLeft ${gcsRetValue.Element["TimeLeft"]}
        echo TextTimeLeft ${gcsRetValue.Element["TextTimeLeft"]}
    }
    else
        echo GetZoneData was false
}
atom atexit()
{
    echo ${Time} Exited
}


Example 2: Standalone script - Using IC (loads IC helpers, mostly useful for debugging).
Code: Select all
#include "${LavishScript.HomeDirectory}/Scripts/EQ2OgreBot/InstanceController/Ogre_Instance_Include.iss"

; If you want to only get the data about a specific zone, the variable that will hold the return value, MUST be a global collection:string, just like below.
; If you are going to check all the zones and scan them, you do not need this variable.
variable(global) collection:string gcsRetValue
function main(string _ZoneName="Fordel Midst: Remembrance [Raid]")
{
    ; The "-NoIC" tells the loader to just load all the modules then come back here and don't try to actually run IC.
    call function_Handle_Startup_Process "-NoAutoLoadMapOnZone" "-NoIC"

    ; Populate the information. This will open the zone reuse window and scan it.
    call Obj_OgreUtilities.Obj_ZoneReset.PopulateInternalMemory

    ; Pick how you want the data. Put both options in, but realistically you will only be using 1 at a time.
    call CheckASpecificZone "${_ZoneName}"
    call CheckAllZones
}
function CheckAllZones()
{
    variable int iCounter
    for ( iCounter:Set[1] ; ${iCounter} <= ${Obj_OgreUtilities.Obj_ZoneReset.Obj_ZoneReuseEntry.Used} ; iCounter:Inc )
    {
        echo ------ ${iCounter} ---------
        echo ${Obj_OgreUtilities.Obj_ZoneReset.Obj_ZoneReuseEntry[${iCounter}].ZoneName}
        echo NoData (FALSE == IsSet is true, TRUE == IsSet is false) ${Obj_OgreUtilities.Obj_ZoneReset.Obj_ZoneReuseEntry[${iCounter}].NoData}
        echo Resettable: ${Obj_OgreUtilities.Obj_ZoneReset.Obj_ZoneReuseEntry[${iCounter}].Resettable}
        echo TimeLeft: ${Obj_OgreUtilities.Obj_ZoneReset.Obj_ZoneReuseEntry[${iCounter}].TimeLeft}
        echo TextTimeLeft: ${Obj_OgreUtilities.Obj_ZoneReset.Obj_ZoneReuseEntry[${iCounter}].TextTimeLeft}
    }
}
function CheckASpecificZone(string _ZoneName)
{
    if ${Obj_OgreUtilities.Obj_ZoneReset.Get_ZoneData_GV[gcsRetValue,"${_ZoneName}"]}
    {
        echo Same zone (${_ZoneName}): ${Zone.Name.Equal["${_ZoneName}"]}
        echo IsSet ${gcsRetValue.Element["IsSet"]}
        echo Resettable ${gcsRetValue.Element["Resettable"]}
        echo TimeLeft ${gcsRetValue.Element["TimeLeft"]}
        echo TextTimeLeft ${gcsRetValue.Element["TextTimeLeft"]}
    }
    else
        echo GetZoneData was false
}
atom atexit()
{
    echo ${Time} Exited
}


Example 3: Using IC
Code: Select all
variable string sZoneShortName="exp16_dun_ssraeshza_mines"
; If you want to only get the data about a specific zone, the variable that will hold the return value, MUST be a global collection:string, just like below.
; If you are going to check all the zones and scan them, you do not need this variable.
variable(global) collection:string gcsRetValue

#include "${LavishScript.HomeDirectory}/Scripts/EQ2OgreBot/InstanceController/Ogre_Instance_Include.iss"

function main(int _StartingPoint=0)
{
   call function_Handle_Startup_Process
}
atom atexit()
{
   echo ${Time}: ${Script.Filename} done
}

objectdef Object_Instance
{
   function:bool RunInstance(int _StartingPoint=0)
   {
        ;// Start coding!
        ;// _StartingPoint is how we keep track of what named we are on. You're free to use a different method if you prefer.
        ;// 0 = Get into zone.
        ;// 1-# are each named, in order
        ;// Then the last number is to zone out.

        ;// While you can do anything you want here, this will handle getting into any zone from beside the portal. If you'd like to customize it, you're free to do so!
      if ${_StartingPoint} == 0
      {
                      ; Realistically here is when you run the zone.. but we'll just pretend you already did, and you're just wanting to check  if the timer is reset.




                     ; Populate the information. This will open the zone reuse window and scan it.
                     call Obj_OgreUtilities.Obj_ZoneReset.PopulateInternalMemory

                     ; Pick how you want the data. Put both options in, but realistically you will only be using 1 at a time.
                     call CheckASpecificZone "${sZoneName}"
                     call CheckAllZones
               }
       }
}
function CheckAllZones()
{
    variable int iCounter
    for ( iCounter:Set[1] ; ${iCounter} <= ${Obj_OgreUtilities.Obj_ZoneReset.Obj_ZoneReuseEntry.Used} ; iCounter:Inc )
    {
        echo ------ ${iCounter} ---------
        echo ${Obj_OgreUtilities.Obj_ZoneReset.Obj_ZoneReuseEntry[${iCounter}].ZoneName}
        echo NoData (FALSE == IsSet is true, TRUE == IsSet is false) ${Obj_OgreUtilities.Obj_ZoneReset.Obj_ZoneReuseEntry[${iCounter}].NoData}
        echo Resettable: ${Obj_OgreUtilities.Obj_ZoneReset.Obj_ZoneReuseEntry[${iCounter}].Resettable}
        echo TimeLeft: ${Obj_OgreUtilities.Obj_ZoneReset.Obj_ZoneReuseEntry[${iCounter}].TimeLeft}
        echo TextTimeLeft: ${Obj_OgreUtilities.Obj_ZoneReset.Obj_ZoneReuseEntry[${iCounter}].TextTimeLeft}
    }
}
function CheckASpecificZone(string _ZoneName)
{
    if ${Obj_OgreUtilities.Obj_ZoneReset.Get_ZoneData_GV[gcsRetValue,"${_ZoneName}"]}
    {
        echo Same zone (${_ZoneName}): ${Zone.Name.Equal["${_ZoneName}"]}
        echo IsSet ${gcsRetValue.Element["IsSet"]}
        echo Resettable ${gcsRetValue.Element["Resettable"]}
        echo TimeLeft ${gcsRetValue.Element["TimeLeft"]}
        echo TextTimeLeft ${gcsRetValue.Element["TextTimeLeft"]}
    }
    else
        echo GetZoneData was false
}


Example 4: This may be the only functional way of checking. I don't have time to review the other ways, but this way should replace all of them anyways.
Code: Select all
variable string sZoneShortName="exp16_dun_ssraeshza_mines"
variable string sZoneName="The Fabled Plane of War [Raid]"
; If you want to only get the data about a specific zone, the variable that will hold the return value, MUST be a global collection:string, just like below.
; If you are going to check all the zones and scan them, you do not need this variable.
variable(global) collection:string gcsRetValue

#include "${LavishScript.HomeDirectory}/Scripts/EQ2OgreBot/InstanceController/Ogre_Instance_Include.iss"

function main(int _StartingPoint=0)
{
   call function_Handle_Startup_Process
}
atom atexit()
{
   echo ${Time}: ${Script.Filename} done
}

objectdef Object_Instance
{
   function:bool RunInstance(int _StartingPoint=0)
   {
        if ${_StartingPoint} == 0
        {
            ; Realistically here is when you run the zone.. but we'll just pretend you already did, and you're just wanting to check  if the timer is reset.

            ; Load Ogre Instance Controller Assister - it handles the internal stuff.
            ogre ica
            wait 2
            ; Populate the information. This will open the zone reuse window and scan it.
            Ogre_Instance_Controller_Assister:PopulateInternalMemory
            wait 2
            while ${Ogre_Instance_Controller_Assister.bPopulateInternalMemoryRunning}
            wait 2
           
            ; Pick how you want the data. Put both options in, but realistically you will only be using 1 at a time.
            call CheckASpecificZone "${sZoneName}"
            call CheckAllZones
        }
    }
}
function CheckAllZones()
{
    ; Use a reference to shorten the typing!
    variable persistentref ICARef
    ICARef:SetReference["Script[${OgreInstanceControllerAssisterScriptName}].VariableScope.Obj_OgreUtilities.Obj_ZoneReset.Obj_ZoneReuseEntry"]
    variable int iCounter
    for ( iCounter:Set[1] ; ${iCounter} <= ${ICARef.Used} ; iCounter:Inc )
    {
        echo ------ ${iCounter} ---------
        echo ${ICARef[${iCounter}].ZoneName}
        echo NoData (FALSE == IsSet is true, TRUE == IsSet is false) ${ICARef[${iCounter}].NoData}
        echo Resettable: ${ICARef[${iCounter}].Resettable}
        echo TimeLeft: ${ICARef[${iCounter}].TimeLeft}
        echo TextTimeLeft: ${ICARef[${iCounter}].TextTimeLeft}
    }
}
function CheckASpecificZone(string _ZoneName)
{
    ; Use a reference to shorten the typing!
    variable persistentref ICARef
    ICARef:SetReference["Script[${OgreInstanceControllerAssisterScriptName}].VariableScope.Obj_OgreUtilities.Obj_ZoneReset"]

    if ${ICARef.Get_ZoneData_GV[gcsRetValue,"${_ZoneName}"]}
    {
        echo Same zone (${_ZoneName}): ${Zone.Name.Equal["${_ZoneName}"]}
        echo IsSet ${gcsRetValue.Element["IsSet"]}
        echo Resettable ${gcsRetValue.Element["Resettable"]}
        echo TimeLeft ${gcsRetValue.Element["TimeLeft"]}
        echo TextTimeLeft ${gcsRetValue.Element["TextTimeLeft"]}
    }
    else
        echo GetZoneData was false
}
Kannkor
 
Posts: 361
Joined: 06 Nov 2013, 11:49

Re: What is Instance Controller (IC)?

Postby Kannkor » 11 Sep 2020, 08:26

Getting more details about what IC is doing

This is not for beginners. It's for people who wish to have a bit more information about what IC is doing, such as for knowing which zones are next, which zone was just previously run etc.
If you have any problems with the below, show me your code and explain what you are trying to do, and what the output is, and what is happening.

Code: Select all
function main()
{
    variable int iCounter
    variable int Instance_Path_Info_Index
    variable persistentref PathInfo

    ; Just makes it easier to avoid copy/pasting a really long variable just to access it.
    PathInfo:SetReference["Script[${OgreInstanceControllerScriptName}].VariableScope.Obj_Instance_Path_Information"]

    ; Read the UI of IC to read the "Zones to Run" and output them.
    for ( iCounter:Set[1] ; ${iCounter} <= ${UIElement[${OICUI_list_instances_listbox}].Items} ; iCounter:Inc )
    {
        Instance_Path_Info_Index:Set[${UIElement[${OICUI_list_instances_listbox}].OrderedItem[${iCounter}].Value}]

        echo [${iCounter}] Zone name: "${PathInfo.Get[${Instance_Path_Info_Index}].sZoneName}"
        echo [${iCounter}] Value (used below): ${Instance_Path_Info_Index}
        echo [${iCounter}] Path: "${PathInfo.Get[${Instance_Path_Info_Index}].sPath}"
        echo [${iCounter}] File name: "${PathInfo.Get[${Instance_Path_Info_Index}].sFileName}"
       
    }

    ; Get_CurrentInstanceIndex will give you the index (value from above) for the current instance that is running. This will be 0 if an instance is not currently being run.
    ; Get_LastInstanceIndex will return 0 if no instances have ever been run in this session, or the index of the last instance run. Once changed to a non 0, will never return to 0 again
    ; Note: These values can be misleading if the Zones to Run is modified. For example, if you just ran Maidens Eye and it was index 1, then you went and removed it from the Zones to Run, it becomes messy.
    echo IC's current file: ${Ogre_Instance_Controller.Get_CurrentInstanceIndex} * Last Run: ${Ogre_Instance_Controller.Get_LastInstanceIndex}
    ; Last Run Script - Gives the zone name of the last run script, for example: Sanctus_Seru_Echelon_of_Order_Solo
    echo IC's details: Last run script: ${Ogre_Instance_Controller.Get_LastRanScript}

    ; Gives the status for IC. There's a lot of them, just capture them to see what they are, here's a short list:
    echo IC's status: ${Ogre_Instance_Controller.Get_Status}
    /*
        Loading
        Idle_NotRunning
        ScanningInstances
        Idle_WaitingForAnAvailableInstance
        RunningInstance_<ScriptNameHere>
            This will be ${Ogre_Instance_Controller.Get_LastRanScript}, exmaple: RunningInstance_Sanctus_Seru_Echelon_of_Order_Solo
        FinishedInstance__<ScriptNameHere>
            This will be ${Ogre_Instance_Controller.Get_LastRanScript}, exmaple: FinishedInstance_Sanctus_Seru_Echelon_of_Order_Solo
    */
}
Kannkor
 
Posts: 361
Joined: 06 Nov 2013, 11:49

Re: What is Instance Controller (IC)?

Postby Kannkor » 09 Oct 2020, 14:49

How to navigate folders, add files, modify checkboxes via code

This is for people wanting to script various parts, such as pre-loading ethereals, running some expert zones and some heroic zones etc.

Code: Select all
function main()
{
   ogre ic

   ; Just some way to know that IC is fully loaded and we can interact with  it
   while ( !${Ogre_Instance_Controller(exists)} || ${Ogre_Instance_Controller.Get_Status.NotEqual["Idle_NotRunning"]} )
      wait 5

   ; Directory sturcture is made up of two parts. The base directory, and the path to the current directory.
   ; If our full path is this: C:/Games/Innerspace/Scripts/EQ2OgreBot/InstanceController/Instance_Files/Default/Blood_of_Luclin/Solo
   ; It's actually broken into two parts. The base directory, and the path to the current directory.
   ; This is the base directory: C:/Games/Innerspace/Scripts/EQ2OgreBot/InstanceController/Instance_Files
   ; This is the path to the current directory: Default/Blood_of_Luclin/Solo
   ; The UI/searching will only go back as far as the base directory, and not up any further.

   ; Lets check the base directory.
   echo Get_BaseDirectory1: ${Ogre_Instance_Controller.Get_BaseDirectory}
   ; Results: Get_BaseDirectory1: C:/Games/Innerspace/Scripts/EQ2OgreBot/InstanceController/Instance_Files
   ; Not that we should ever have a reason to change this... but lets assume for some reason you want to change the base directory.
   Ogre_Instance_Controller:Set_BaseDirectory["${LavishScript.HomeDirectory}/Scripts/EQ2OgreBot/InstanceController/Instance_Files/Kannkor/ThisIsABadIdea"]
   echo Get_BaseDirectory2: ${Ogre_Instance_Controller.Get_BaseDirectory}
   ; Results: Get_BaseDirectory2: Get_BaseDirectory: C:/Games/Innerspace/Scripts/EQ2OgreBot/InstanceController/Instance_Files/Kannkor/ThisIsABadIdea/
   ; This means if you want to change directories at all now, it can only be done from within this directory and forward, the UI will now allow you to advance further.
   ; Going to reset this back to default now:
   Ogre_Instance_Controller:Set_BaseDirectory["${LavishScript.HomeDirectory}/Scripts/EQ2OgreBot/InstanceController/Instance_Files"]
   echo Get_BaseDirectory3: ${Ogre_Instance_Controller.Get_BaseDirectory}
   ; Results: Get_BaseDirectory3: C:/Games/Innerspace/Scripts/EQ2OgreBot/InstanceController/Instance_Files

   ; Lets check the path to the current directory
   echo Get_CurrentDirectory1: ${Ogre_Instance_Controller.Get_CurrentDirectory}
   ; Results: Get_CurrentDirectory1: Default/Blood_of_Luclin/Solo
   ; Lets change it to Heroic instead of solo. Because we are setting the entire path, we need to include all of it, from the base directory.
   Ogre_Instance_Controller:Set_CurrentDirectory["Default/Blood_of_Luclin/Heroic"]
   echo Get_CurrentDirectory2: ${Ogre_Instance_Controller.Get_CurrentDirectory}
   ; Results: Get_CurrentDirectory2: Default/Blood_of_Luclin/Heroic
   ; We can also blank it out, so we only have the base directory with ""
   Ogre_Instance_Controller:Set_CurrentDirectory[""]
   echo Get_CurrentDirectory3: ${Ogre_Instance_Controller.Get_CurrentDirectory}
   ; Results: Get_CurrentDirectory3:
   ; This means we're at the base directory.
   
   ; Lets navigate the directory 1 folder at a time.
   Ogre_Instance_Controller:Change_CurrentDirectory["Default"]
   echo Get_CurrentDirectory4: ${Ogre_Instance_Controller.Get_CurrentDirectory}
   ; Results: Get_CurrentDirectory4: Default
   Ogre_Instance_Controller:Change_CurrentDirectory["Chaos_Descending"]
   echo Get_CurrentDirectory5: ${Ogre_Instance_Controller.Get_CurrentDirectory}
   ; Results: Get_CurrentDirectory5:  Default/Chaos_Descending
   ; We can go up levels too, with UpOneLevel_CurrentDirectory
   Ogre_Instance_Controller:UpOneLevel_CurrentDirectory
   echo Get_CurrentDirectory6: ${Ogre_Instance_Controller.Get_CurrentDirectory}
   ; Results: Get_CurrentDirectory6:  Default
   ; We can go multiple levels at once
   Ogre_Instance_Controller:Change_CurrentDirectory["Chaos_Descending/Solo"]
   echo Get_CurrentDirectory7: ${Ogre_Instance_Controller.Get_CurrentDirectory}
   ; Results: Get_CurrentDirectory7:  Default/Chaos_Descending/Solo

   ; We can view our full path if we wish. This is the base path plus the path to current directory.
   echo Get_FullPath: ${Ogre_Instance_Controller.Get_FullPath}
   ; Results: Get_FullPath C:/Games/Innerspace/Scripts/EQ2OgreBot/InstanceController/Instance_Files/Default/Chaos_Descending/Solo

   ; We can add in some zones now. NOTE: These must be EXACT matches (but not case sensitive), including the extension (.iss)
   Ogre_Instance_Controller:AddInstance_ViaCode_ViaName["Doomfire_elements_of_Rage_Solo.iss"]
   Ogre_Instance_Controller:AddInstance_ViaCode_ViaName["Just_An_Example_To_Show_It_Will_Not_Show_Up.iss"]
   Ogre_Instance_Controller:AddInstance_ViaCode_ViaName["Vegarlson_Ruins_Of_Rathe_Solo.iss"]

   ; Random wait so you can see it worked, before we go ahead and clear them.
   wait 20

   ; We can clear out the  Zones to Run listbox too if we need.
   Ogre_Instance_Controller:Clear_ZonesToRun
   
   ; We can modify any checkbox on the UI also. You need to know the "name" of the checkbox. To get the name, open up the file:
   ; -> /Scripts/EQ2OgreBot/InstanceController/InstanceControllerXML.xml
   ; Find the checkbox you want to modify. In this example, we will use [x] Skip Shinies.
   ; In that file, you will find this element..
   /*
      <checkbox Name='skip_shinies_checkbox' template='OICUI_Checkbox'>
         <X>180</X>
         <Y>240</Y>
         <Visible>1</Visible>
         <Text>Skip shinies</Text>
         <OnLeftClick>
               Obj_InstanceControllerXML:UIOptionUpdated[${This.ID}]
         </OnLeftClick>
      </checkbox>
   */
   ; We really only care about the first line, where it has the name. This: <checkbox Name='skip_shinies_checkbox' template='OICUI_Checkbox'>
   ; More specifically this: Name='skip_shinies_checkbox' which is telling us the name is skip_shinies_checkbox
   ; Ogre_Instance_Controller:ChangeUIOptionViaCode["UIElement name", Value] Value = TRUE for checked, FALSE for unchecked
   Ogre_Instance_Controller:ChangeUIOptionViaCode["skip_shinies_checkbox", TRUE]

   ; The other one most would likely be interested in, is this one: <checkbox Name='run_instances_checkbox' template='OICUI_Checkbox'>
}
Kannkor
 
Posts: 361
Joined: 06 Nov 2013, 11:49


Return to Instance Controller (IC)

Who is online

Users browsing this forum: No registered users and 1 guest

cron