Documentation ¶
Index ¶
- type CommandTemplate
- type CommandTemplateFooter
- type CommandTemplateProvider
- type CommandTemplateThumbnail
- type ConjureSpell
- type ConjureSpellList
- type InstantSpell
- type InstantSpellList
- type Item
- type ItemAttribute
- type ItemList
- type Monster
- type MonsterAttack
- type MonsterAttackList
- type MonsterAttribute
- type MonsterDefense
- type MonsterDefenseList
- type MonsterElements
- type MonsterHealth
- type MonsterItem
- type MonsterList
- type MonsterLook
- type MonsterLootList
- type MonsterTargetChange
- type MonsterVoice
- type MonsterVoiceList
- type RuneSpell
- type RuneSpellList
- type Vocation
- type VocationList
- type VocationSkill
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CommandTemplate ¶
type CommandTemplate struct { XMLName xml.Name `xml:"template"` Title string `xml:"title"` Color int `xml:"color"` Description string `xml:"description"` Thumbnail CommandTemplateThumbnail `xml:"thumbnail,omitempty"` Provider CommandTemplateProvider `xml:"provider,omitempty"` // contains filtered or unexported fields }
CommandTemplate defines a controller template file
func ParseTemplate ¶
func ParseTemplate(tpl string) (*CommandTemplate, error)
ParseTemplate parses the given template into a struct
func (*CommandTemplate) Execute ¶
func (c *CommandTemplate) Execute(data map[string]interface{}) (*discordgo.MessageEmbed, error)
Execute executes the given command template
type CommandTemplateFooter ¶
type CommandTemplateFooter struct {}
CommandTemplateFooter defines a message embed footer
type CommandTemplateProvider ¶
CommandTemplateProvider defines a message embed provider
type CommandTemplateThumbnail ¶
type CommandTemplateThumbnail struct { URL string `xml:"url"` Width int `xml:"width"` Height int `xml:"height"` }
CommandTemplateThumbnail defines a message embed thumbnail
type ConjureSpell ¶
type ConjureSpell struct { XMLName xml.Name `xml:"conjure"` Group string `xml:"group,attr"` SpellID int `xml:"spellid,attr"` Name string `xml:"name,attr"` Level int `xml:"lvl,attr"` Mana int `xml:"mana,attr"` Soul int `xml:"soul,attr"` Words string `xml:"words,attr"` CoolDown int `xml:"cooldown,attr"` Vocations []Vocation `xml:"vocation"` }
ConjureSpell defines a server conjure spell
type ConjureSpellList ¶
type ConjureSpellList struct { XMLName xml.Name `xml:"spells"` Conjures []*ConjureSpell `xml:"conjure"` }
ConjureSpellList defines the server conjure spell list
func LoadConjureSpells ¶
func LoadConjureSpells(path string) (*ConjureSpellList, error)
LoadConjuretSpells loads the server instant spell list
func (*ConjureSpellList) CreateFuzzyClosest ¶
func (c *ConjureSpellList) CreateFuzzyClosest(s int) *closestmatch.ClosestMatch
CreateFuzzyClosest creates a conjure spell list fuzzy closest search
type InstantSpell ¶
type InstantSpell struct { XMLName xml.Name `xml:"instant"` Group string `xml:"group,attr"` SpellID int `xml:"spellid,attr"` Name string `xml:"name,attr"` Words string `xml:"words,attr"` Level int `xml:"lvl,attr"` Mana int `xml:"mana,attr"` Premium bool `xml:"prem,attr"` Range int `xml:"range,attr"` NeedTarget bool `xml:"needtarget,attr"` NeedWeapon bool `xml:"needweapon,attr"` CoolDown int `xml:"cooldown,attr"` Script string `xml:"script,attr"` Vocations []Vocation `xml:"vocation"` }
InstantSpell defines a server instant spell
type InstantSpellList ¶
type InstantSpellList struct { XMLName xml.Name `xml:"spells"` Spells []*InstantSpell `xml:"instant"` }
InstantSpellList defines the server instant spell list
func LoadInstantSpells ¶
func LoadInstantSpells(path string) (*InstantSpellList, error)
LoadInstantSpells loads the server instant spell list
func (*InstantSpellList) CreateFuzzyClosest ¶
func (c *InstantSpellList) CreateFuzzyClosest(s int) *closestmatch.ClosestMatch
CreateFuzzyClosest creates a conjure spell list fuzzy closest search
type Item ¶
type Item struct { XMLName xml.Name `xml:"item"` ID int `xml:"id,attr"` Name string `xml:"name,attr"` Article string `xml:"article,attr"` FromID int `xml:"fromid,attr"` ToID int `xml:"toid,attr"` Attributes []ItemAttribute `xml:"attribute"` }
Item defines a server item
type ItemAttribute ¶
type ItemAttribute struct { XMLName xml.Name `xml:"attribute"` Key string `xml:"key,attr"` Value string `xml:"value,attr"` }
ItemAttribute defines a server item attribute
type ItemList ¶
ItemList defines the server item list
func LoadItemList ¶
LoadItemList loads the server item list
type Monster ¶
type Monster struct { XMLName xml.Name `xml:"monster"` Name string `xml:"name,attr"` Description string `xml:"nameDescription,attr"` Race string `xml:"race,attr"` Experience int `xml:"experience,attr"` Speed int `xml:"speed,attr"` Health MonsterHealth `xml:"health"` Look MonsterLook `xml:"look"` TargetChange MonsterTargetChange `xml:"targetchange"` Attacks MonsterAttackList `xml:"attacks"` Defenses MonsterDefenseList `xml:"defenses"` Voices MonsterVoiceList `xml:"voices"` Loot MonsterLootList `xml:"loot"` Elements MonsterElements `xml:"elements>element"` }
Monster defines a server cerature
func LoadMonster ¶
LoadMonster loads the given monster xml file
type MonsterAttack ¶
type MonsterAttack struct { XMLName xml.Name `xml:"attack"` Name string `xml:"name,attr"` Interval int `xml:"interval,attr"` Range int `xml:"range,attr"` Min int `xml:"min,attr"` Max int `xml:"max,attr"` Target int `xml:"target,attr"` Attributes []MonsterAttribute `xml:"attribute"` }
MonsterAttack defines a monster attack
type MonsterAttackList ¶
type MonsterAttackList struct {
Attacks []MonsterAttack `xml:"attack"`
}
MonsterAttackList defines a list of monster attacks
type MonsterAttribute ¶
type MonsterAttribute struct { XMLName xml.Name `xml:"attribute"` Key string `xml:"key,attr"` Value string `xml:"value,attr"` }
MonsterAttribute defines a monster attribute
type MonsterDefense ¶
type MonsterDefense struct { Name string `xml:"name,attr"` Interval int `xml:"interval,attr"` Chance int `xml:"chance,attr"` Min int `xml:"min,attr"` Max int `xml:"max,attr"` Attributes []MonsterAttribute `xml:"attribute"` }
MonsterDefense defines a monster defense value
type MonsterDefenseList ¶
type MonsterDefenseList struct { Armor int `xml:"armor,attr"` Defense int `xml:"defense,attr"` Defenses []MonsterDefense `xml:"defense"` }
MonsterDefenseList defines a monster defense list
type MonsterElements ¶
type MonsterHealth ¶
type MonsterHealth struct { XMLName xml.Name `xml:"health"` Now int `xml:"now,attr"` Max int `xml:"max,attr"` }
MonsterHealth defines the monster health values
type MonsterItem ¶
type MonsterItem struct { XMLName xml.Name `xml:"item"` ID int `xml:"id,attr"` Name string `xml:"name,attr"` CountMax int `xml:"countmax,attr"` Chance int `xml:"chance,attr"` }
MonsterItem defines a monster lootable item
type MonsterList ¶
type MonsterList struct { XMLName xml.Name `xml:"monsters"` Monsters []monsterListElement `xml:"monster"` }
MonsterList defines the monsters.xml file
func LoadMonsterList ¶
func LoadMonsterList(path string) (*MonsterList, error)
LoadMonsterList loads the monsters.xml file
type MonsterLook ¶
type MonsterLook struct { XMLName xml.Name `xml:"look"` Type int `xml:"type,attr"` Corpse int `xml:"corpse,attr"` }
MonsterLook defines the monster looktype values
type MonsterLootList ¶
type MonsterLootList struct {
Loot []MonsterItem `xml:"item"`
}
MonsterLootList defines a list of monster lootable items
type MonsterTargetChange ¶
type MonsterTargetChange struct { XMLName xml.Name `xml:"targetchange"` Interval int `xml:"interval,attr"` Chance int `xml:"chance,attr"` }
MonsterTargetChange defines the monster targetting change values
type MonsterVoice ¶
MonsterVoice defines a monster sentence
type MonsterVoiceList ¶
type MonsterVoiceList struct { Interval int `xml:"interval,attr"` Chance int `xml:"chance,attr"` Voices []MonsterVoice `xml:"voice"` }
MonsterVoiceList defines a list of monster voices
type RuneSpell ¶
type RuneSpell struct { XMLName xml.Name `xml:"rune"` Group string `xml:"group,attr"` SpellID int `xml:"spellid,attr"` Name string `xml:"name,attr"` ID int `xml:"id,attr"` Level int `xml:"lvl,attr"` MagicLevel int `xml:"maglv,attr"` Aggresive bool `xml:"aggresive,attr"` GroupCooldown int `xml:"groupcooldown,attr"` Vocations []Vocation `xml:"vocation"` }
RuneSpell defines a server rune spell
type RuneSpellList ¶
RuneSpellList defines the server rune spell list
func LoadRuneSpells ¶
func LoadRuneSpells(path string) (*RuneSpellList, error)
LoadRuneSpells loads the server rune spell list
func (*RuneSpellList) CreateFuzzyClosest ¶
func (c *RuneSpellList) CreateFuzzyClosest(s int) *closestmatch.ClosestMatch
CreateFuzzyClosest creates a conjure spell list fuzzy closest search
type Vocation ¶
type Vocation struct { XMLName xml.Name `xml:"vocation"` ID int `xml:"id,attr"` Name string `xml:"name,attr"` Description string `xml:"description,attr"` GainCap int `xml:"gaincap,attr"` GainHealth int `xml:"gainhp,attr"` GainMana int `xml:"gainmana,attr"` BaseSpeed int `xml:"basespeed,attr"` }
Vocation defines a server voation
type VocationList ¶
type VocationList struct { XMLName xml.Name `xml:"vocations"` Vocations []Vocation `xml:"vocation"` }
VocationList defines a server list of vocations
func LoadVocationList ¶
func LoadVocationList(path string) (*VocationList, error)
LoadVocationList loads the server vocations.xml file
type VocationSkill ¶
VocationSkill defines a vocation skill value