Documentation ¶
Index ¶
- Variables
- func AbilityFailed(t *client.Trigger)
- func AddGetName(name string, num int, t string)
- func AddSmile(t *client.Trigger)
- func BagsFull(t string) bool
- func Begin()
- func BotAttack()
- func BotResume(t *client.Trigger)
- func BotStart(r *mapper.Room)
- func BotStop(t *client.Trigger)
- func BotTrain(t *client.Trigger)
- func BowDown(t *client.Trigger)
- func CheckBuff()
- func CombatPrompt(t *client.Trigger)
- func ComponentCount(t string, comp *Component) int
- func CraftInit(t *client.Trigger)
- func CraftItemClearCmd(t *client.Trigger)
- func CraftItemGemClassCmd(t *client.Trigger)
- func CraftItemGemCmd(t *client.Trigger)
- func CraftItemGetCmd(t *client.Trigger)
- func CraftItemMats(recipe string, fstring string, trade bool, add bool)
- func CraftItemMatsCmd(t *client.Trigger)
- func CraftItemMatsTradeAddCmd(t *client.Trigger)
- func CraftItemMatsTradeCmd(t *client.Trigger)
- func CraftItemPrimaryCmd(t *client.Trigger)
- func CraftItemRPCmd(t *client.Trigger)
- func CraftItemSecondaryCmd(t *client.Trigger)
- func CraftItemShowCmd(t *client.Trigger)
- func CraftItemSlotCmd(t *client.Trigger)
- func DamageLine(t *client.Trigger)
- func DepleteGem(t *client.Trigger)
- func DoAttack(target string, ab *Ability)
- func DoBags()
- func DoBuff(target string, ab *Ability)
- func DoCombo(target string)
- func DoPut(t string)
- func DoShoot(sa string)
- func DoStep()
- func DoTick()
- func DoTrade()
- func GemScrollAdd(t *client.Trigger)
- func GemScrollComplete(t *client.Trigger)
- func GerahfDone(t *client.Trigger)
- func GerahfHere(t *client.Trigger)
- func GerahfOffer(t *client.Trigger)
- func GetAllComponentsCmd(t *client.Trigger)
- func GetAllGemstonesCmd(t *client.Trigger)
- func GetAllScrapsCmd(t *client.Trigger)
- func GetAllType(t string)
- func GetAvailableTradeComponents() map[int][]*Component
- func GetComponentCmd(t *client.Trigger)
- func GetCounts(available map[int][]*Component) map[int]int
- func GetDone()
- func GetGemsAbove(num int) int
- func GetGemsAboveCmd(t *client.Trigger)
- func GetMats(comp *Component)
- func GetMatsCmd(t *client.Trigger)
- func GetNext()
- func GetScrapsCmd(t *client.Trigger)
- func GetTradeCost(comp *Component) int
- func GetTradeValue(comp *Component) int
- func GetTradeableScraps()
- func GiveFailed(t *client.Trigger)
- func GnomeBegin(t *client.Trigger)
- func GoTrain(t *client.Trigger)
- func IgnoreGold(t *client.Trigger)
- func InInventory(t *client.Trigger)
- func Init(c *client.Client, file string) *client.Config
- func InventoryFull(t *client.Trigger)
- func IsPrevented(buff *Ability) bool
- func IsPreventedString(name string) bool
- func MapLine(t *client.Trigger)
- func MobDead()
- func MobDeath(t *client.Trigger)
- func MobMissing(t *client.Trigger)
- func MoveComponent(t *client.Trigger)
- func NextPath()
- func NimCaught(t *client.Trigger)
- func NimDown(t *client.Trigger)
- func NimReset()
- func NimWait()
- func OpenDoor(t *client.Trigger)
- func PoolPrompt(t *client.Trigger)
- func PutAllCmd(t *client.Trigger)
- func PutComponentCmd(t *client.Trigger)
- func PutDone(t *client.Trigger)
- func PutFragmentsCmd(t *client.Trigger)
- func PutGemstoneCmd(t *client.Trigger)
- func PutScrapsCmd(t *client.Trigger)
- func Recalled(t *client.Trigger)
- func ReplyPrompt(t *client.Trigger)
- func Reset()
- func SalvageComplete(t *client.Trigger)
- func SaveComponent(comp *Component) bool
- func SawBag(t *client.Trigger)
- func SawBagFull(t *client.Trigger)
- func SawComponent(t *client.Trigger)
- func SawMob(t *client.Trigger)
- func SawPutLine()
- func SawQuest(t *client.Trigger)
- func SawTech(t *client.Trigger)
- func ScrollContinue(t *client.Trigger)
- func SetActive(t *client.Trigger)
- func SetSmileCmd(t *client.Trigger)
- func SetState(state BotState)
- func SetStateCmd(t *client.Trigger)
- func SetTickTime(t *client.Trigger)
- func ShowComp(t string)
- func ShowCompCmd(t *client.Trigger)
- func ShowCraftLevelsCmd(t *client.Trigger)
- func ShowCraftRecipesCmd(t *client.Trigger)
- func ShowCraftSlotsCmd(t *client.Trigger)
- func ShowGemCmd(t *client.Trigger)
- func ShowGetListCmd(t *client.Trigger)
- func ShowScrapCmd(t *client.Trigger)
- func SkipRoom(t *client.Trigger)
- func StacyBegin(t *client.Trigger)
- func StartCmd(t *client.Trigger)
- func StatusUpdate()
- func StepDone()
- func StepFailed(t *client.Trigger)
- func Stop()
- func TickLoop()
- func TickSet(t *client.Trigger)
- func ToggleTriggers(aname string, enabled bool)
- func TradeAddCmd(t *client.Trigger)
- func TradeClearCmd(t *client.Trigger)
- func TradeComponentCmd(t *client.Trigger)
- func TradeDone()
- func TradeJewelsCmd(t *client.Trigger)
- func TradeSalvageCmd(t *client.Trigger)
- func TradeSaveCmd(t *client.Trigger)
- func TradeScrapsCmd(t *client.Trigger)
- func TradeShowCmd(t *client.Trigger)
- func TradeShowSaveCmd(t *client.Trigger)
- func TradesLeft(t *client.Trigger)
- func WatchdogFired()
- type Ability
- type AbilityData
- type Area
- type Bag
- type BagConfig
- type BotState
- type Character
- type CharacterConfig
- type Component
- type ComponentTrade
- type CraftData
- type CraftItem
- type ItemSlot
- type Mob
- type MoveDirection
- type Position
- type Recipe
- type TradeState
Constants ¶
This section is empty.
Variables ¶
var Abilities = map[string]*Ability{} // Map of ability names to ability structs
var AbilityDown func(*client.Trigger) = func(t *client.Trigger) { if buff, ok := Abilities[t.Matches[1]]; ok { buff.IsActive = false } if Autobuff && GetState() == Stopped { client.OnEvent("OnReply", "doAutobuff", func() { CheckBuff() }, false) } }
AbilityDown handles when a buff drops, preparing it to be cast again.
var AbilityFired func(*client.Trigger) = func(t *client.Trigger) { if name, ok := Activations[t.String()]; ok { if ab, ok := Abilities[name]; ok { ab.IsActive = true if ab.Prevention != "" { Preventions[ab.Prevention] = true } if BuffAttempt == ab { BuffAttempt = nil BuffTarget = "" if DoingBuff { CheckBuff() } return } if AttackAttempt == ab { AttackAttempt = nil AttackTarget = "" } } } }
var Activations = map[string]string{} // Map of activation strings to ability name
var AdjustedSessionPPM float64 = 0
var AdjustedSessionPlat float64 = 0
var AdjustedTotalPPM float64 = 0
var AdjustedTotalPPMCount float64 = 0
var AdjustedTotalPlat float64 = 0
var Areas map[string]*Area = nil
var ArmorLevels = []int{0, 3, 6, 10, 15, 19, 23, 28, 34, 40, 46, 53, 61, 70, 80}
var AttackTarget = ""
var Autobuff = false
var BagIndex int = 0
var Bags []*Bag = []*Bag{}
var BuffTarget = ""
var Buffs = []string{}
var C *client.Client
var ClassCheck func(*Ability, string) bool = nil
var ClassConfigs = map[string]func(){
"sorcerer": initSorcerer,
"footpad": initFootpad,
"paladin": initPaladin,
"marauder": initMarauder,
"witch": initWitch,
"valkyrie": initValkyrie,
"druid": initDruid,
"ninja": initNinja,
"poliir": initPoliir,
"monk": initMonk,
"fallad": initFallad,
"nojohr": initNojohr,
}
var Combo = []string{}
var Combos = map[string][]string{}
var Config *client.Config
var DoingBuff = false
var GetList map[*Component]int = map[*Component]int{}
var GetScraps bool = false
var Initializing bool = false
var Map *mapper.Map = nil
var MobList []*Mob = []*Mob{}
var NRooms int = 0
var NextRoom *mapper.Room = nil
var PlayerSkip = true
var PreventAvailable func(*client.Trigger) = func(t *client.Trigger) { Preventions[t.Results["type"]] = false if t.Results["type"] == "run time" { My.RunPercent = 300 return } if t.Results["type"] == "run time decrement" { C.Parse("prev") return } if Autobuff && GetState() == Stopped { client.OnEvent("OnReply", "doAutobuff", func() { CheckBuff() }, false) } }
var PreventUsed func(*client.Trigger) = func(t *client.Trigger) { Preventions[t.Matches[1]] = true if DoingBuff { BuffAttempt = nil CheckBuff() return } if BuffAttempt != nil { if t.Matches[1] == BuffAttempt.Prevention { AbilityFailed(nil) return } } if AttackAttempt != nil { if t.Matches[1] == AttackAttempt.Prevention { AbilityFailed(nil) return } } }
var Preventions = map[string]bool{}
var Printer *message.Printer = message.NewPrinter(language.English)
var PutType string = ""
var RoundAccuracy float64 = 0
var RoundAverageAccuracy float64 = 0
var RoundAverageDamage = 0
var RoundCount = 0
var RoundDamage = 0
var SaveList []*Component = []*Component{}
var SawFull bool = false
var SawPlayer = false
var SawPut bool = false
var SawQuestLine = false
var Score map[*mapper.Room]int = nil
var ScrapValues = map[string]int{
"metal": 5,
"wood": 4,
"cloth": 4,
"leather": 3,
}
var SeenPreventDuration = time.Second * 0
var SeenPreventName = ""
var SessionExp float64 = 0
var SessionPPM float64 = 0
var SessionPlat float64 = 0
var SessionStart time.Time
var SessionXPM float64 = 0
var SleepOn = true
var SleepTick int = 4
var SleepTimer *time.Timer = nil
Timers
var Smiles int = 0
var Start *mapper.Room = nil
var TickTime = 59
var TimeStart time.Time
var TotalExp float64 = 0
var TotalPPM float64 = 0
var TotalPlat float64 = 0
var TotalXPM float64 = 0
var TradeList map[*Component]int = map[*Component]int{}
var TradeMaterials []*Component = []*Component{}
var TriggerMap map[*client.Trigger]*Mob
var Visited []*mapper.Room = nil
var WatchdogTimer *time.Timer = nil
var WeaponLevels = []int{0, 5, 10, 15, 19, 23, 28, 34, 40, 46, 53, 61, 70, 80, 90}
Functions ¶
func AbilityFailed ¶
func AddGetName ¶
func CombatPrompt ¶
func ComponentCount ¶
func CraftItemClearCmd ¶
func CraftItemGemClassCmd ¶
func CraftItemGemCmd ¶
func CraftItemGetCmd ¶
func CraftItemMatsCmd ¶
func CraftItemMatsTradeCmd ¶
func CraftItemPrimaryCmd ¶
func CraftItemRPCmd ¶
func CraftItemSecondaryCmd ¶
func CraftItemShowCmd ¶
func CraftItemSlotCmd ¶
func DamageLine ¶
func DepleteGem ¶
func GemScrollAdd ¶
func GemScrollComplete ¶
func GerahfDone ¶
func GerahfHere ¶
func GerahfOffer ¶
func GetAllComponentsCmd ¶
func GetAllGemstonesCmd ¶
func GetAllScrapsCmd ¶
func GetAllType ¶
func GetAllType(t string)
Messes up inventory - need to do it one bag at a time TODO one bag at a time
func GetAvailableTradeComponents ¶
Any component that isn't the max tier for that class is returned by this function, TODO add a more granular way to specify components to trade
func GetComponentCmd ¶
func GetGemsAbove ¶
func GetGemsAboveCmd ¶
func GetMatsCmd ¶
func GetScrapsCmd ¶
func GetTradeCost ¶
GetTradeCost returns the cost of the component based on whether the user has smiles or not
func GetTradeValue ¶
GetTradeValue returns the value of the component provided when used to trade for another component.
func GetTradeableScraps ¶
func GetTradeableScraps()
func GiveFailed ¶
func GnomeBegin ¶
func IgnoreGold ¶
func InInventory ¶
func InventoryFull ¶
func IsPrevented ¶
func IsPreventedString ¶
func MobMissing ¶
func MoveComponent ¶
func PoolPrompt ¶
func PutComponentCmd ¶
func PutFragmentsCmd ¶
func PutGemstoneCmd ¶
func PutScrapsCmd ¶
func ReplyPrompt ¶
func SalvageComplete ¶
func SaveComponent ¶
saveComponent returns true if the component should be saved from trading away
func SawBagFull ¶
func SawComponent ¶
func SawPutLine ¶
func SawPutLine()
func ScrollContinue ¶
func SetSmileCmd ¶
SetSmileCmd sets the number of smiles we have received.
func SetStateCmd ¶
func SetTickTime ¶
func ShowCompCmd ¶
func ShowCraftLevelsCmd ¶
func ShowCraftRecipesCmd ¶
func ShowCraftSlotsCmd ¶
func ShowGemCmd ¶
func ShowGetListCmd ¶
func ShowScrapCmd ¶
func StacyBegin ¶
func StatusUpdate ¶
func StatusUpdate()
func StepFailed ¶
func ToggleTriggers ¶
func TradeAddCmd ¶
TradeAddCmd adds a component to the trade list
func TradeClearCmd ¶
TradeClear clears the trade list and state
func TradeComponentCmd ¶
func TradeJewelsCmd ¶
func TradeSalvageCmd ¶
func TradeSaveCmd ¶
TradeSaveCmd adds a component to the SaveList so it will not be used as a component in the next trade
func TradeShowCmd ¶
TradeShowCmd shows the current list of components we want to trade to get.
func TradeShowSaveCmd ¶
TradeShowSaveCmd shows the list of components we want to avoid trading away.
func TradesLeft ¶
func WatchdogFired ¶
func WatchdogFired()
Types ¶
type Ability ¶
type Ability struct { Name string Mana int // Mana cost of ability Spirit int // Spirit cost of ability Endurance int // Endurance cost of ability Prevention string // prevention string MinAlign int // Must have at least this alignment to use MaxAlign int // Must have less than this alignment to use IsActive bool // Is the ability active? Activation []string // List of regexes that match activation strings Execute string // String to execute the ability Triggers []*client.Trigger }
type AbilityData ¶
type BotState ¶
type BotState string
const ( Walking BotState = "walking" Training BotState = "training" Trading BotState = "trading" Stopped BotState = "stopped" Recalling BotState = "recalling" Step BotState = "step" Stepping BotState = "stepping" Stepped BotState = "stepped" Attack BotState = "attack" Attacking BotState = "attacking" Attacked BotState = "attacked" )
type Character ¶
type Character struct { Name string Exp float64 Align int Gold float64 Lag int CurrentHP int MaxHP int HPP int CurrentMana int MaxMana int MPP int CurrentSpirit int MaxSpirit int SPP int CurrentEnd int MaxEnd int EPP int Salvage int PKFlag bool Tank string TankCondition string Target string TargetCondition string Position Position RunPercent int BotDefault string SalvageRoom int TrainCommand string AttackCommand string NimAttackPercent int }
var My Character
type CharacterConfig ¶
type CharacterConfig struct { Recall int SalvageRoom int Buffs []string Combos map[string][]string Class string BagConfigs []*BagConfig BotDefault string TrainCommand string AttackCommand string NimAttackPercent int }
var CC *CharacterConfig = nil
func LoadConfig ¶
func LoadConfig(name string) *CharacterConfig
type Component ¶
type Component struct { Name string Tier int ID int Material string Class string Type string Expertise bool Artistry bool }
func GetComponentByType ¶
func GetGemByClass ¶
type ComponentTrade ¶
type CraftData ¶
type CraftItem ¶
type CraftItem struct { Primary *Component Secondary *Component Gemstones map[string]*Component Slot *ItemSlot Points int }
func NewCraftItem ¶
func NewCraftItem() *CraftItem
type MoveDirection ¶
type MoveDirection string
const ( MoveGet MoveDirection = "moveget" MovePut MoveDirection = "moveput" MovePutAll MoveDirection = "moveputall" MoveGive MoveDirection = "movegive" MoveNone MoveDirection = "movenone" )
var Move MoveDirection = MoveNone
type TradeState ¶
type TradeState string
const ( TradeSalvage TradeState = "tradesalvage" TradeScraps TradeState = "tradescraps" TradeJewels TradeState = "tradejewels" TradeComponent TradeState = "tradecomponent" TradeComponentReady TradeState = "tradecomponentready" TradeNone TradeState = "tradenone" )
var Trade TradeState = TradeNone