pub enum Command {
Show 106 variants
Custom {
cmd_name: String,
values: Vec<String>,
},
Login {
username: String,
pw_hash: String,
login_count: u32,
},
SSOLogin {
uuid: String,
character_id: String,
bearer_token: String,
},
Register {
username: String,
password: String,
gender: Gender,
race: Race,
class: Class,
},
UpdatePlayer,
HallOfFamePage {
page: usize,
},
HallOfFameFortressPage {
page: usize,
},
ViewPlayer {
ident: String,
},
BuyBeer,
StartQuest {
quest_pos: usize,
overwrite_inv: bool,
},
CancelQuest,
FinishQuest {
skip: Option<QuestSkip>,
},
WorkStart {
hours: u8,
},
WorkCancel,
WorkFinish,
CheckNameAvailable {
name: String,
},
BuyMount {
mount: Mount,
},
IncreaseAttribute {
attribute: AttributeType,
increase_to: u32,
},
RemovePotion {
pos: usize,
},
CheckArena,
Fight {
name: String,
use_mushroom: bool,
},
CollectCalendar,
ViewGuild {
guild_ident: String,
},
GuildFound {
name: String,
},
GuildInvitePlayer {
name: String,
},
GuildKickPlayer {
name: String,
},
GuildSetLeader {
name: String,
},
GuildToggleOfficer {
name: String,
},
GuildLoadMushrooms,
GuildIncreaseSkill {
skill: GuildSkill,
current: u16,
},
GuildJoinAttack,
GuildJoinDefense,
GuildAttack {
guild: String,
},
GuildRaid,
GuildPortalBattle,
ToiletFlush,
ToiletOpen,
ToiletDrop {
inventory: InventoryType,
pos: usize,
},
PlayerPortalBattle,
BuyShop {
shop_type: ShopType,
shop_pos: usize,
inventory: InventoryType,
inventory_pos: usize,
},
SellShop {
inventory: InventoryType,
inventory_pos: usize,
shop_type: ShopType,
shop_pos: usize,
},
InventoryMove {
inventory_from: InventoryType,
inventory_from_pos: usize,
inventory_to: InventoryType,
inventory_to_pos: usize,
},
ItemMove {
from: ItemPosition,
from_pos: usize,
to: ItemPosition,
to_pos: usize,
},
MessageOpen {
index: i32,
},
MessageDelete {
index: i32,
},
ViewScrapbook,
ViewPet {
pet_index: u16,
},
UnlockFeature {
unlockable: Unlockable,
},
FightLightDungeon {
name: LightDungeon,
use_mushroom: bool,
},
FightTower {
current_level: u8,
use_mush: bool,
},
GuildSetInfo {
description: String,
emblem_code: String,
},
GambleSilver {
amount: u64,
},
GambleMushrooms {
amount: u64,
},
SendMessage {
to: String,
msg: String,
},
SetDescription {
description: String,
},
WitchDropCauldron {
inventory_t: InventoryType,
position: usize,
},
Blacksmith {
inventory_t: InventoryType,
position: u8,
action: BlacksmithAction,
},
GuildSendChat {
message: String,
},
WitchEnchant {
position: EquipmentSlot,
},
SpinWheelOfFortune {
fortune_payment: FortunePayment,
},
CollectEventTaskReward {
pos: usize,
},
CollectDailyQuestReward {
pos: usize,
},
EquipCompanion {
inventory: InventoryType,
position: u8,
equipment_slot: EquipmentSlot,
},
FortressGather {
resource: FortressResourceType,
},
FortressBuildStart {
f_type: FortressBuildingType,
},
FortressBuildCancel {
f_type: FortressBuildingType,
},
FortressBuildFinish {
f_type: FortressBuildingType,
mushrooms: u32,
},
FortressBuildUnitStart {
unit: FortressUnitType,
count: u32,
},
FortressGemStoneStart,
FortressGemStoneCancel,
FortressGemStoneFinish {
mushrooms: u32,
},
FortressAttack {
soldiers: u32,
},
FortressNewEnemy {
use_mushroom: bool,
},
FortressSetCAEnemy {
msg_id: u32,
},
Whisper {
player_name: String,
message: String,
},
UnderworldCollect {
resource: UnderWorldResourceType,
},
UnderworldUnitUpgrade {
unit: UnderworldUnitType,
},
UnderworldUpgradeStart {
building: UnderworldBuildingType,
mushrooms: u32,
},
UnderworldUpgradeCancel {
building: UnderworldUnitType,
},
UnderworldUpgradeComplete {
building: UnderworldBuildingType,
mushrooms: u32,
},
UnderworldAttack {
player_id: PlayerId,
},
RollDice {
payment: RollDiceType,
dices: [DiceType; 5],
},
PetFeed {
pet_id: u32,
fruit_idx: u32,
},
GuildPetBattle {
use_mushroom: bool,
},
IdleUpgrade {
typ: IdleBuildingType,
amount: u64,
},
IdleSacrifice,
UpgradeSkill {
attribute: AttributeType,
next_attribute: u32,
},
RefreshShop {
shop: ShopType,
},
HallOfFameGroupPage {
page: u32,
},
HallOfFameUnderworldPage {
page: u32,
},
HallOfFamePetsPage {
page: u32,
},
SwapManequin,
UpdateFlag {
flag: Option<Flag>,
},
BlockGuildInvites {
block_invites: bool,
},
ShowTips {
show_tips: bool,
},
ChangePassword {
old: String,
new: String,
},
ChangeMailAddress {
old_mail: String,
new_mail: String,
password: String,
username: String,
},
SetLanguage {
language: String,
},
SetPlayerRelation {
player_id: PlayerId,
relation: Relationship,
},
SetPortraitFrame {
portrait_id: i64,
},
SwapRunes {
from: ItemPosition,
from_pos: usize,
to: ItemPosition,
to_pos: usize,
},
ChangeItemLook {
inv: ItemPosition,
pos: usize,
raw_model_id: u16,
},
ExpeditionChooseStreet {
pos: usize,
},
ExpeditionContinue,
ExpeditionPickItem {
pos: usize,
},
ExpeditionStart {
pos: usize,
},
}
Variants§
Custom
If there is a command you somehow know/reverse engineered, or need to extend the functionality of one of the existing commands, this is the command for you
Login
Fields
Manually sends a login request to the server. WARN: The behaviour for a credentials mismatch, with the credentials in the user is undefined. Use the login method instead for a safer abstraction
SSOLogin
Fields
Manually sends a login request to the server. WARN: The behaviour for a credentials mismatch, with the credentials in the user is undefined. Use the login method instead for a safer abstraction
Register
Fields
UpdatePlayer
Updates the current state of the user. Also notifies the guild, that the player is logged in. Should therefore be send regularely
HallOfFamePage
Queries 30 Hall of Fame entries starting from the top. Starts at 0
NOTE: The server might return less then 30, if there is a “broken” player encountered. This is NOT a library bug, this is a S&F bug and will glitch out the UI, when trying to view the page in a browser.
HallOfFameFortressPage
Queries 30 Hall of Fame entries for the fortress starting from the top. Starts at 0
ViewPlayer
Looks at a specific player. Ident is either their name, or player_id
BuyBeer
Buys a beer in the tavern
StartQuest
Starts one of the 3 tavern quests. 0,1,2
CancelQuest
Cancels the currently running quest
FinishQuest
Finishes the current quest, which starts the battle. This can be used with a QuestSkip to skip the remaining time
WorkStart
Goes working for the specified amount of hours (1-10)
WorkCancel
Cancels the current guard job
WorkFinish
Collects the pay from the guard job
CheckNameAvailable
Checks if the given name is still available to register
BuyMount
Buys a mount, if the player has enough silver/mushrooms
IncreaseAttribute
Increases the given attribute to the requested number. Should be current + 1
RemovePotion
Removes the currently active potion 0,1,2
CheckArena
Queries the currently available enemies in the arena
Fight
Fights the selected enemy. This should be used for both arena fights and normal fights. Not that this actually needs the name, not just the id
CollectCalendar
Collects the current reward from the calendar
ViewGuild
Queries information about another guild
GuildFound
Founds a new guild
GuildInvitePlayer
Invites a player with the given name into the players guild
GuildKickPlayer
Kicks a player with the given name from the players guild
GuildSetLeader
Promote a player from the guild into the leader role
GuildToggleOfficer
Toggles a member between officer and normal member
GuildLoadMushrooms
Loads a mushroom into the catapult
GuildIncreaseSkill
Increases one of the guild skills by 1. Needs to know the current, not the new value for some reason
GuildJoinAttack
Joins the current ongoing attack
GuildJoinDefense
Joins the defense of the guild
GuildAttack
Starts an attack in another guild
GuildRaid
Starts the next possible raid
GuildPortalBattle
Battles the enemy in the guildportal
ToiletFlush
Flushes the toilet
ToiletOpen
Opens the toilet door for the first time.
ToiletDrop
Drops an item from one of the inventories into the toilet
PlayerPortalBattle
BuyShop
Buys an item from the shop and puts it in the inventoy slot specified
SellShop
Buys an item from the shop and puts it in the inventoy slot specified
InventoryMove
Moves an item from one inventory position to another
ItemMove
Allows moving items from any position to any other position items can be at. You should make sure, that the move makes sense (do not move items from shop to shop)
MessageOpen
Opens the message at the specified index [0-100]
MessageDelete
Deletes a single message, if you provide the index. -1 = all
ViewScrapbook
Pulls up your scrapbook to reveal more info, than normal
ViewPet
Views a specific pet. This fetches its stats
UnlockFeature
Fields
unlockable: Unlockable
Unlocks a feature
FightLightDungeon
Enters a specific dungeon
FightTower
Attacks the requested level of the tower
GuildSetInfo
Sets the guild info. Note the info about length limit from SetDescription
GambleSilver
Gambles the desired amount of silver. Picking the right thing is not actually required. That just masks the determined result
GambleMushrooms
Gambles the desired amount of mushrooms. Picking the right thing is not actually required. That just masks the determined result
SendMessage
Sends a message to another player
SetDescription
Fields
description: String
The description may only be 240 chars long, when it reaches the server. The problem is, that special chars like ‘/’ have to get escaped into two chars “$s” before getting send to the server. That means this string can be 120-240 chars long depending on the amount of escaped chars. We ‘could’ trunctate the response, but that could get weird with character boundries in UTF8 and split the escapes themself, so just make sure you provide a valid value here to begin with and be prepared for a server error
WitchDropCauldron
Blacksmith
GuildSendChat
WitchEnchant
Fields
position: EquipmentSlot
Enchants an item, if you have the scroll unlocked. Note that providing shield here is undefined
SpinWheelOfFortune
Fields
fortune_payment: FortunePayment
CollectEventTaskReward
Collects the reward for collecting points. One of [0,1,2]
CollectDailyQuestReward
Collects the reward for collecting points. One of [0,1,2]
EquipCompanion
FortressGather
Fields
resource: FortressResourceType
FortressBuildStart
Fields
f_type: FortressBuildingType
FortressBuildCancel
Fields
f_type: FortressBuildingType
FortressBuildFinish
FortressBuildUnitStart
Builds new units of the selected type
FortressGemStoneStart
Starts the search for gems
FortressGemStoneCancel
Cancles the search for gems
FortressGemStoneFinish
Finishes the gem stone search using the appropriate amount of mushrooms. The price is one mushroom per 600 sec / 10 minutes of time remaining
FortressAttack
Attacks the current fortress attack target with the provided amount of soldiers
FortressNewEnemy
Rerolls the enemy in the fortress
FortressSetCAEnemy
Sets the fortress enemy to the counterattack target of the message
Whisper
Sends a wihsper message to another player
UnderworldCollect
Fields
resource: UnderWorldResourceType
Collects the ressources of the selected type in the underworld
UnderworldUnitUpgrade
Fields
unit: UnderworldUnitType
Upgrades the selected underworld unit by one level
UnderworldUpgradeStart
Starts the upgrade of a building in the underworld
UnderworldUpgradeCancel
Fields
building: UnderworldUnitType
Cancels the upgrade of a building in the underworld
UnderworldUpgradeComplete
Finishes an upgrade after the time has run out (or before using mushrooms)
UnderworldAttack
Lures a player into the underworld
RollDice
Rolls the dice. The first round should be all rerolls, after that, either reroll again, or take some of the dice on the table
PetFeed
Feeds one of your pets
GuildPetBattle
Fights with the guild pet against the hydra
IdleUpgrade
Upgrades an idle building by the requested amount
IdleSacrifice
Sacrifice all the money in the idle game for runes
UpgradeSkill
Upgrades a skill to the requested atribute. Should probably be just current + 1 to mimic a user clicking
RefreshShop
Spend 1 mushroom to update the inventory of a shop
HallOfFameGroupPage
Fetches the HoF page for guilds
HallOfFameUnderworldPage
Crawls the HoF page for the underworld
HallOfFamePetsPage
SwapManequin
Switch equipment with the manequin, if it is unlocked
UpdateFlag
Updates your flag in the HoF
BlockGuildInvites
Changes if you can receive invites or not
ShowTips
Changes if you want to gets tips in the gui. Does nothing for the API
ChangePassword
Change your password. Note that I have not tested this and this might invalidate your session
ChangeMailAddress
Changes your mail to another address
SetLanguage
Sets the language of the character. This should be basically
irrelevant, but is still included for completeness sake. Expects a
valid county code. I have not tested all, but it should be one of:
ru,fi,ar,tr,nl,ja,it,sk,fr,ko,pl,cs,el,da,en,hr,de,zh,sv,hu,pt,es, pt-br, ro
SetPlayerRelation
Sets the relation to another player
SetPortraitFrame
I have no character with anything but the default (0) to test this with. If I had to guess, they continue sequentially
SwapRunes
Swaps the runes of two items
ChangeItemLook
Changes the look of the item to the selected raw_model_id for 10 mushrooms. Note that this is NOT the normal model id. it is the model_id + (class as usize) * 1000 if I remember correctly. Pretty sure nobody will ever uses this though, as it is only for looks.
ExpeditionChooseStreet
Continues the expedition on one of the three streets, [0,1,2]
ExpeditionContinue
Continues the expedition, if you are currently in a situation, where there is only one option. This can be starting a fighting, or starting the wait after a fight (collecting the non item reward)
ExpeditionPickItem
If there are multiple items to choose from after fighting a boss, you can choose which one to take here. [0,1,2]
ExpeditionStart
Starts one of the two expeditions [0,1]