Difference between revisions of "OgreUtilitiesAPI"
From ISXOgre
(Created page with "== Implimenting OgreUtilities == * To use '''OgreUtilities''' you will need to load the code into your script. ** The following will load '''OgreUtilities''' into your script...") |
(→List of Methods) |
||
(9 intermediate revisions by 2 users not shown) | |||
Line 1: | Line 1: | ||
− | == | + | == Implementing OgreUtilities == |
* To use '''OgreUtilities''' you will need to load the code into your script. | * To use '''OgreUtilities''' you will need to load the code into your script. | ||
Line 26: | Line 26: | ||
* If their is a command you do not understand please feel free to ask in ogre discord and someone will explain and try to word it better here in the list | * If their is a command you do not understand please feel free to ask in ogre discord and someone will explain and try to word it better here in the list | ||
+ | |||
+ | == Advanced Navigation Options == | ||
+ | |||
+ | === Usage === | ||
+ | |||
+ | * Obj_OgreUtilities.OgreNavChecks:<MethodNameHere>[<ParametersHere>] | ||
+ | ** Example - Obj_OgreUtilities.OgreNavChecks:Set_Check_MeInCombat[FALSE] | ||
+ | |||
+ | === List of Methods === | ||
+ | |||
+ | *Below is a list of all available methods. | ||
+ | |||
+ | {| class="wikitable" | ||
+ | |- | ||
+ | !Command | ||
+ | !colspan="3"|Parameters||Example||Notes||Description | ||
+ | |- | ||
+ | |||
+ | |rowspan="2"|<center>'''Set_CheckAll'''</center> | ||
+ | |- | ||
+ | |Param 1 | ||
+ | |colspan="2"|Distance||50|| Default = 50 | ||
+ | |rowspan="2"| Sets checking group in combat, and distance to 50, sets checking if you are in combat. | ||
+ | |- | ||
+ | |||
+ | |rowspan="2"|<center>'''Set_Check_MeInCombat'''</center> | ||
+ | |- | ||
+ | |Param 1 | ||
+ | |colspan="2"|T or F||TRUE or FALSE|| Default = TRUE | ||
+ | |rowspan="2"| Sets checking if you are in combat. | ||
+ | |- | ||
+ | |||
+ | |rowspan="3"|<center>'''Set_Check_Group'''</center> | ||
+ | |- | ||
+ | |Param 1 | ||
+ | |colspan="2"|T or F||TRUE or FALSE|| Default = TRUE | ||
+ | |rowspan="3"| Sets checking the group for combat and the distance. | ||
+ | |- | ||
+ | |Param 2 | ||
+ | |colspan="2"|Distance||50|| Default = 50 | ||
+ | |- | ||
+ | |||
+ | |rowspan="2"|<center>'''Set_Check_GroupCombatOnly'''</center> | ||
+ | |- | ||
+ | |Param 1 | ||
+ | |colspan="2"|T or F||TRUE or FALSE|| Default = TRUE | ||
+ | |rowspan="2"| Sets checking if you are in combat. Will disable "Set_Check_GroupDistanceOnly" if it is enabled. | ||
+ | |- | ||
+ | |||
+ | |rowspan="3"|<center>'''Set_Check_GroupDistanceOnly'''</center> | ||
+ | |- | ||
+ | |Param 1 | ||
+ | |colspan="2"|T or F||TRUE or FALSE|| Default = TRUE | ||
+ | |rowspan="3"| Sets checking the group for combat and the distance. Will disable "Set_Check_GroupCombatOnly" if it is enabled. | ||
+ | |- | ||
+ | |Param 2 | ||
+ | |colspan="2"|Distance||50|| Default = 50 | ||
+ | |- | ||
+ | |||
+ | |rowspan="3"|<center>'''Set_Checks_GroupHealth'''</center> | ||
+ | |- | ||
+ | |Param 1 | ||
+ | |colspan="2"|T or F||TRUE or FALSE|| Default = TRUE | ||
+ | |rowspan="3"| Sets checking the group health is under specified and if so stops naving till health goes above specified. | ||
+ | |- | ||
+ | |Param 2 | ||
+ | |colspan="2"|Health||90|| Default = 90 | ||
+ | |- | ||
+ | |||
+ | |rowspan="2"|<center>'''Set_Check_NoChecks'''</center> | ||
+ | |- | ||
+ | |Param 1 | ||
+ | |colspan="2"|T or F||TRUE or FALSE|| Default = TRUE | ||
+ | |rowspan="2"| Will disable any and all Nav checks | ||
+ | |- | ||
+ | |||
+ | |rowspan="2"|<center>'''Set_Check_CampSpotMeOnCombat'''</center> | ||
+ | |- | ||
+ | |Param 1 | ||
+ | |colspan="2"|T or F||TRUE or FALSE|| Default = FALSE | ||
+ | |rowspan="2"| If you are engaged in campspot while navigating, you will campspot. Once combat is gone, a "LetsGo" for you will be issued. | ||
+ | |- | ||
+ | |||
+ | |rowspan="2"|<center>'''Set_Check_CampSpotGroupOnCombat'''</center> | ||
+ | |- | ||
+ | |Param 1 | ||
+ | |colspan="2"|T or F||TRUE or FALSE|| Default = FALSE | ||
+ | |rowspan="2"| If your group is engaged in campspot while navigating, your group will campspot. Once combat is gone, a "LetsGo" for your group will be issued. | ||
+ | |- | ||
+ | |||
+ | |rowspan="2"|<center>'''Set_CampSpot_HowClose'''</center> | ||
+ | |- | ||
+ | |Param 1 | ||
+ | |colspan="2"|HowClose||1.5|| Default = 1.5 | ||
+ | |rowspan="2"| How close you want the campspot to be to the location issued. This means within 1.5 of the campspot (which is pretty close and is the default for campspot). | ||
+ | |- | ||
+ | |||
+ | |rowspan="2"|<center>'''Set_CampSpot_HowFar'''</center> | ||
+ | |- | ||
+ | |Param 1 | ||
+ | |colspan="2"|HowFar||200|| Default = 200 | ||
+ | |rowspan="2"| How far from the campspot before it abandons trying to get there. | ||
+ | |- | ||
+ | |||
+ | |} | ||
== Methods == | == Methods == | ||
Line 237: | Line 342: | ||
Example 1 | Example 1 | ||
− | call | + | call Obj_OgreUtilities.CallToGH |
if ${Return} | if ${Return} | ||
echo Means CallToGH was successful! | echo Means CallToGH was successful! | ||
Line 360: | Line 465: | ||
|Param 2 | |Param 2 | ||
|colspan="2"|Range|| 125 || within Range. Default = 125 | |colspan="2"|Range|| 125 || within Range. Default = 125 | ||
+ | |- | ||
+ | |||
+ | |rowspan="2"|<center>'''HandleWaitForGroupDistance'''</center> | ||
+ | |- | ||
+ | |Param 1 | ||
+ | |colspan="2"|Distance|| 5 || within Disatnce. Default = 5 | ||
+ | |rowspan="2"| Waits until your entire group is within # distance of you. Good to use after you nav some where to make sure everyone is with you. | ||
|- | |- | ||
Line 396: | Line 508: | ||
|- | |- | ||
|Param 1 | |Param 1 | ||
− | |colspan="2"| | + | |colspan="2"|WaitBeforeChecking||10|| Waits this amount of time before checking, allowing campspot to be set. Default is 0 (no wait at all). Recommend use of 10 (1 second) if you JUST changed your campspot |
− | |rowspan="2"| Waits until you are dead or within range of campspot. Returns TRUE if you are at your campspot (regardless of your range), returns FALSE if you are NOT at your campspot | + | |rowspan="2"| Waits until you are dead or within range of campspot. Returns TRUE if you are at your campspot (regardless of your range), returns FALSE if you are NOT at your campspot. |
|- | |- | ||
Latest revision as of 16:30, 6 November 2019
Contents
Implementing OgreUtilities
- To use OgreUtilities you will need to load the code into your script.
- The following will load OgreUtilities into your script.
function Load_OgreUtilities() { ogre utilities wait 5 Obj_CreateOgreUtilities:CreateOgreUtilities[${Script.Filename}] ;// Returns variable: OgreUtilities Obj_CreateOgreUtilities:CreateOgreCharacterData[${Script.Filename}] ;// Returns variable: OgreCharacterData ;// Usage here. See wiki <Link here would likely be helpful, and some examples> }
- This will allow you to use all of the below Methods, Members, Functions below.
Summary
- List of Methods, Members, Functions
- pre configured Methods, Members, Functions to make coding scripts easier for people.
- If their is a command you do not understand please feel free to ask in ogre discord and someone will explain and try to word it better here in the list
Usage
- Obj_OgreUtilities.OgreNavChecks:<MethodNameHere>[<ParametersHere>]
- Example - Obj_OgreUtilities.OgreNavChecks:Set_Check_MeInCombat[FALSE]
List of Methods
- Below is a list of all available methods.
Command | Parameters | Example | Notes | Description | ||
---|---|---|---|---|---|---|
Param 1 | Distance | 50 | Default = 50 | Sets checking group in combat, and distance to 50, sets checking if you are in combat. | ||
Param 1 | T or F | TRUE or FALSE | Default = TRUE | Sets checking if you are in combat. | ||
Param 1 | T or F | TRUE or FALSE | Default = TRUE | Sets checking the group for combat and the distance. | ||
Param 2 | Distance | 50 | Default = 50 | |||
Param 1 | T or F | TRUE or FALSE | Default = TRUE | Sets checking if you are in combat. Will disable "Set_Check_GroupDistanceOnly" if it is enabled. | ||
Param 1 | T or F | TRUE or FALSE | Default = TRUE | Sets checking the group for combat and the distance. Will disable "Set_Check_GroupCombatOnly" if it is enabled. | ||
Param 2 | Distance | 50 | Default = 50 | |||
Param 1 | T or F | TRUE or FALSE | Default = TRUE | Sets checking the group health is under specified and if so stops naving till health goes above specified. | ||
Param 2 | Health | 90 | Default = 90 | |||
Param 1 | T or F | TRUE or FALSE | Default = TRUE | Will disable any and all Nav checks | ||
Param 1 | T or F | TRUE or FALSE | Default = FALSE | If you are engaged in campspot while navigating, you will campspot. Once combat is gone, a "LetsGo" for you will be issued. | ||
Param 1 | T or F | TRUE or FALSE | Default = FALSE | If your group is engaged in campspot while navigating, your group will campspot. Once combat is gone, a "LetsGo" for your group will be issued. | ||
Param 1 | HowClose | 1.5 | Default = 1.5 | How close you want the campspot to be to the location issued. This means within 1.5 of the campspot (which is pretty close and is the default for campspot). | ||
Param 1 | HowFar | 200 | Default = 200 | How far from the campspot before it abandons trying to get there. |
Methods
Usage
- Example - Obj_OgreUtilities:AcceptQuest
- Would Accept a quest if a quest window exists.
List of Methods
- Below is a list of all available methods.
Command | Parameters | Example | Notes | Description | ||
---|---|---|---|---|---|---|
Param 1 | N/A | N/A | N/A | Accepts a quest if a quest window exists. | ||
Param 1 | N/A | N/A | N/A | If enabled, accepts new quests. | ||
Param 1 | N/A | N/A | N/A | If enabled, accepts Reward windows. | ||
Param 1 | N/A | N/A | N/A | Jumps a toon. | ||
Param 1 | T or F | TRUE/FALSE | Enables (TRUE) or disables (FALSE) the EQ2_onQuestOffered event. | Turns the event on or off | ||
Param 1 | T or F | TRUE/FALSE | Enables (TRUE) or disables (FALSE) the EQ2_onRewardWindowAppeared event. | Turns the event on or off |
Members
Usage
Example 1
if ${Obj_OgreUtilities.AnyGroupMembersDead} { ;// Will return TRUE if any group members are dead False if all alive ;// Code to execute if it comes back as TRUE } Example 2
|
List of Members
- Below is a list of all available members.
Command | Parameters | Example | Notes | Description | ||
---|---|---|---|---|---|---|
Param 1 | N/A | N/A | N/A | Checks if any group members are dead. | ||
Param 1 | Input to clean | Kannkor's battle Bot | Cleans an input | Some zones, I believe such as proving grounds, you can end up with some very odd names for characters, this removes it and "cleans" the input. | ||
Param 1 | Seconds | 2500 | Seconds to convert. | Converts seconds to hour minutes seconds. | ||
Param 1 | Seconds | 2500 | Seconds to convert. | Determines how many whole hours are in the seconds. | ||
Param 1 | Seconds | 2500 | Seconds to convert. | Determines how many whole minutes are in the seconds. Return can only be 0 to 59, as any value above that would be returned in Get_Hours. | ||
Param 1 | Seconds | 2500 | Seconds to convert. | Determines how many whole seconds are in the seconds. Return can only be 0 to 59, as any value above that would be returned in Get_Hours or Get_Minutes. | ||
Param 1 | N/A | N/A | N/A | spews your current ascension class. | ||
Param 1 | ID | 483993047 | ID of ability to check. | returns TRUE if you have the ability or FALSE if you do not. | ||
Param 1 | Zone Name | "Myrist, the Great Library" | Zone name to check. | Checks if you are in specified zone name. | ||
Param 1 | Zone Name | "exp15_rgn_plane_of_knowledge" | Zone short name to check. | Checks if you are in specified zone short name. | ||
Param 1 | Item Name | "mechanical gear" | Item name to check. | Counts how many of said item you have in your inventory. Does NOT count bank. This handles counting multiple stacks. | ||
Param 1 | Loc | "737.106506,411.865784,-388.380249" | Loc to check. | Checks if you are within specified distance to specified Loc. | ||
Param 2 | Distance | 10 | how close. Default = 10 | |||
Param 1 | Distance | 30 | Distance to check. | Counts how many NPCs are within specified distance. | ||
Param 1 | Toon name | "Kannkor" | Name of toon to check. | Checks currently logged in toon name matches specified toon name. | ||
Param 1 | N/A | N/A | N/A | Returns where you are. Valid returns are: GUILDHALL, or the zone hash ( ${Zone.ShortName} ). Basically used for checking if you're in a guild hall. |
Functions
Usage
- All functions are locking. That means when you call them, they 'hold' the script and return once completed.
- Almost every single function has a return, usually bool that you can access. If TRUE, it means it believes the function was successful, if FALSE, it believes the function was not successful.
- You can access this return, by checking ${Return} immediately after the function call.
- Almost every single function has a return, usually bool that you can access. If TRUE, it means it believes the function was successful, if FALSE, it believes the function was not successful.
Example 1
call Obj_OgreUtilities.CallToGH if ${Return} echo Means CallToGH was successful!
List of Functions
- Below is a list of all available functions
Command | Parameters | Example | Notes | Description | ||
---|---|---|---|---|---|---|
Param 1 | T or F | TRUE/FALSE | Default FALSE. FALSE means if Call to Guild Hall is not available, wait for it. TRUE means if the call is not available, then don't cast it. | Calls to Guild Hall. | ||
Param 1 | ID | 106506 | ID of the ability. | Casts ability and waits specified time for ability to cast. | ||
Param 2 | Wait Time | 50 = 5 seconds | Time to wait. Default = 50 | |||
Param 1 | NotAvailableAtThisTime | NotAvailableAtThisTime | NotAvailableAtThisTime | Can't be used at this time. Requires a reference that isn't accessible yet. | ||
Param 1 | N/A | N/A | N/A | Checks you have evac totems. | ||
Param 1 | How many seconds to check for | 30 | How many seconds to check for | returns TRUE as soon as your entire group is in the same zone. Returns FALSE if at the end of the seconds to check for, if everyone is not in the same zone | ||
Param 1 | N/A | N/A | N/A | Clears the quest helper window. The in-game on-screen quest information with checkboxes that can only show like 5 quests. This just unchecks them. It does NOT delete quests. | ||
Param 1 | Numerical sequence of conversation baubles to choose | 1 1 2 3 1 | When conversing with an NPC, this example would choose option 1, then 1, then 2, then 3, then 1. | Accepts any number of conversations, and does so with a 1/2 second delay | ||
Param 1 | NPC | "Flag dude" | Name of NPC. | Hails specified NPC via Name. | ||
Param 1 | ID | 8959659794 | ID of NPC. | Hails specified NPC via ID. | ||
Param 1 | NPC | "Flag dude" | Name of NPC. | Targets NPC if withing specified Range. | ||
Param 2 | Range | 50 | within Range. Default = 40 | |||
Param 1 | Name | "Freeport" | Name of Zone/Destination. | Travels to specified destination. ( Requires Membership ) | ||
Param 2 | Exact match | TRUE/FALSE | Default = FALSE | |||
Param 1 | NotAvailableAtThisTime | NotAvailableAtThisTime | NotAvailableAtThisTime | This was never finished, it would help navigating from zone to zone automatically, through connecting zones. However the manual input and maps required map the set up extremely difficult. | ||
Param 1 | Name | "Kannkors house" | Name of house to go to. | Zones you to specified house from Guild Hall. | ||
Param 1 | Loc | "737.106506,411.865784,-388.380249" | Loc to campspot to. | Sets your campspot to the location you passed it, and waits until you are within Range of it. Example, if you set it to 100, it would return TRUE if you are within 100 meters of the campspot. | ||
Param 2 | Range | 125 | within Range. Default = 125 | |||
Param 1 | Distance | 5 | within Disatnce. Default = 5 | Waits until your entire group is within # distance of you. Good to use after you nav some where to make sure everyone is with you. | ||
Param 1 | Distance | 10 | within Disatnce. Default = 10 | Clicks special actor within disance specified. | ||
Param 1 | Name | "Mechanical gear" | Name of actor. | Clicks an actor within disance specified. | ||
Param 2 | Distance | 10 | within Disatnce. Default = 10 | |||
Param 1 | NotAvailableAtThisTime | NotAvailableAtThisTime | NotAvailableAtThisTime | Requires an object not available at this time | ||
Param 1 | Text inputs | "Where would you like to go?" "I want to get a rally flag" | Will handle chat baubles based on text input. Accepts up to 10 parameters. | Conversation baubles | ||
Param 1 | WaitBeforeChecking | 10 | Waits this amount of time before checking, allowing campspot to be set. Default is 0 (no wait at all). Recommend use of 10 (1 second) if you JUST changed your campspot | Waits until you are dead or within range of campspot. Returns TRUE if you are at your campspot (regardless of your range), returns FALSE if you are NOT at your campspot. | ||
Param 1 | wait time | 50 = 5 seconds | Time to wait. Default = 50 | Waits specified time if in combat with specified options. | ||
Param 2 | Skip | TRUE/FALSE | Skip if no mobs exist. | |||
Param 3 | Distance | 30 | Skip if no mobs exist within specified distance. | |||
Param 4 | Clear target | 40 | Clear target if distance of target over specified distance. Default = 40 | |||
Param 1 | wait time | 50 = 5 seconds | Time to wait. Default = 50 | Waits specified time if in combat with specified options. | ||
Param 2 | Skip | TRUE/FALSE | Skip if no mobs exist. | |||
Param 3 | Distance | 30 | Skip if no mobs exist within specified distance. | |||
Param 4 | Clear target | 40 | Clear target if distance of target over specified distance. Default = 40 | |||
Param 1 | NPC | "Trakanon" | Name of NPC. | Waits until combat is over. Returns TRUE if there was combat, and FALSE if there was not combat. | ||
Param 2 | Args | -TimeToWait 50 (5 seconds), -SkipIfNoMobs TRUE/FALSE, -SkipIfNoMobsWithin 30, -ClearTargetIfTargetDistanceOver 50 | Accepts any of these args in pairs. The defaults are listed. | |||
Param 1 | N/A | N/A | N/A | Handles wait for when you are Zoning. | ||
Param 1 | Wait Time | 50 | Time to wait. Default = 50 (5 seconds) | Literally just waits the specified amount of time. | ||
Param 1 | Option | 1 | Zone door option. Default = 1 | Clicks specified Zone within a List UI. | ||
Param 1 | Toon | "Kannkor" | Toon name to log in | Logs in specified toon. | ||
Param 1 | Loc | "737.106506,411.865784,-388.380249" | Loc to nav to. | Nav to specified location. | ||
Param 2 | How Close | 1.5 | Get this close to destination. Default = 1.5 | |||
Param 1 | Loc | "737.106506,411.865784,-388.380249" | Loc to nav to. | Nav to specified location by specified precision. | ||
Param 2 | Precision | 5 | Precision to destination. Default = 5 | |||
Param 1 | Location | "NPC_Loc_Main_Room" | Saved Location to nav to. | Nav to specified location by specified precision. | ||
Param 2 | Precision | 5 | Precision to destination. Default = 5 | |||
Param 1 | Seconds | 5 = 5 seconds | Amount of Time to buff. | Enters bots into Combat to force them to start casting incombat buffs/heals etc. | ||
Param 1 | N/A | N/A | N/A | Resets your camera angle on your character, so it's in 3rd person view facing forward. Super useful if it may change before conversing with an NPC. | ||
Param 1 | Option | 1 | Revive Option to use. Default = 1 | Revives at specified location. | ||
Param 1 | N/A | N/A | N/A | Puts you into First person view. | ||
Param 1 | Value | 30 | How long to hold look down for. Default = 30 (3 seconds) | Makes you "look down" for x seconds. | ||
Param 1 | Value | 30 | How long to hold look up for Default = 30 (3 seconds) | Makes you "look up" for x seconds. | ||
Param 1 | Value | 30 | Default = 30 | Does nothing - Use Set_FirstPersonView if you wish to be zoomed in. | ||
Param 1 | Value | 30 | How many zoom out clicks to do. Default = 30 | Zooms out using the mouse wheel | ||
Param 1 | Value | 30 | How long to hold the Zoom out key for. Default = 30 (3 seconds) | Holds the zoom out key for this long. | ||
Param 1 | Wait Time | 50 = 5 seconds | Time to wait. Default = 50 | Wait while you are casting a spell or specified wait time. | ||
Param 1 | How many | 60 = 6 times | Check how many times. Default = 60 | Check specified times for whole group to be in zone. | ||
Param 1 | wait time | 50 = 5 seconds | wait time. Default = 50 | Wait specified time for a lootwindow. | ||
Param 1 | % | 95 | wait for power %. Default = 95 | Wait for Power to be at or above specified %. | ||
Param 1 | Script name | "Random Script" | Script name. | Wait while specified script is running. | ||
Param 1 | Wait Time | 50 = 5 seconds | wait time. Default = 50 | Wait while zoning and specified time. | ||
Param 1 | N/A | N/A | N/A | wait while group members dead. |