artifactsmmo

package module
v0.0.0-...-7bfb1f8 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 4, 2025 License: GPL-3.0 Imports: 7 Imported by: 0

README

Cover Image

⚔️ Artifacts SDK in Go [WIP]

Go Report Card codecov

go-artifactsmmo is a Go SDK for interacting with the ArtifactsMMO API, a unique MMORPG where the entire game is played by programming your own client or bot to control your character. Whether you're a coding newbie or a veteran at handling APIs, this project simplifies communication with the game.

🌍 What is ArtifactsMMO?

ArtifactsMMO is a MMORPG where you code your own bot or client to play. Picture an epic quest, but instead of pushing buttons, you're writing code! Manage your character, explore, fight, and interact with the game's universe—all through API calls.

🔧 Documentation

🚀 Installation

Add go-artifactsmmo to your project:

go get github.com/0xN0x/go-artifactsmmo

📖 Usage

Here's a quick example to get you started:

package main

import (
    "fmt"
    "github.com/0xN0x/go-artifactsmmo"
)

func main() {
    client := artifactsmmo.NewClient("your-api-token", "your-character-name")
    character, err := client.GetCharacterInfo()
    if err != nil {
        fmt.Println("Error:", err)
        return
    }
    fmt.Printf("Welcome, %s (XP: %d/%d)!\n", character.Name, character.Xp, character.MaxXp)
}

⚙️ Features

  • API token authentication

📅 Todo

  • API token authentication
  • Continuous Integration
  • Movements
  • Fights management
  • Gathering ressources
  • Crafting
  • Tasks (quests) support
  • Inventory
    • Equipments
  • Bank
  • Recycling
  • Grand Exchange
  • Events
  • Safe rate limiting
  • Examples
  • Unit test (cov ~> 80%)

📚 Examples

🛠️ Work In Progress

This SDK is actively being developed! Expect frequent changes, but we're working hard to deliver a stable experience soon. 🚧

💻 Contributing

Contributions are more than welcome! If you have suggestions or patches, feel free to open a PR. Please try to follow Go best practices and aim for 80% or higher test coverage with your changes.

❤️ Contributors

⚖️ License

This project is licensed under the GPLv3 License.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ArtifactsMMO

type ArtifactsMMO struct {
	Config *client.ArtifactsConfig
	// contains filtered or unexported fields
}

func NewClient

func NewClient(token string, username string) *ArtifactsMMO

NewClient creates a new client to access the ArtifactsMMO API

func NewClientWithCustomHttpClient

func NewClientWithCustomHttpClient(token string, username string, httpClient *http.Client) *ArtifactsMMO

NewClientWithCustomHttpClient creates a new client with a custom http.Client, mainly used for testing

func (*ArtifactsMMO) AcceptNewTask

func (c *ArtifactsMMO) AcceptNewTask() (*models.TaskData, error)

Accepting a new task.

func (*ArtifactsMMO) BuyBankExpansion

func (c *ArtifactsMMO) BuyBankExpansion() (*models.BankTransaction, error)

func (*ArtifactsMMO) BuyGE

func (c *ArtifactsMMO) BuyGE(code string, quantity int, price int) (*models.GETransaction, error)

func (*ArtifactsMMO) CompleteTask

func (c *ArtifactsMMO) CompleteTask() (*models.TaskRewardData, error)

Complete a task.

func (*ArtifactsMMO) Craft

func (c *ArtifactsMMO) Craft(code string, quantity int) (*models.SkillData, error)

func (*ArtifactsMMO) DeleteItem

func (c *ArtifactsMMO) DeleteItem(code string, quantity int) (*models.ItemReponse, error)

func (*ArtifactsMMO) DepositBank

func (c *ArtifactsMMO) DepositBank(code string, quantity int) (*models.BankItemTransaction, error)

func (*ArtifactsMMO) DepositBankGold

func (c *ArtifactsMMO) DepositBankGold(quantity int) (*models.BankGoldTransaction, error)

func (*ArtifactsMMO) Equip

func (c *ArtifactsMMO) Equip(code string, slot models.Slot, quantity int) (*models.EquipRequest, error)

Equip an item on your character.

func (*ArtifactsMMO) Fight

func (c *ArtifactsMMO) Fight() (*models.CharacterFight, error)

Start a fight against a monster on the character's map.

func (*ArtifactsMMO) Gather

func (c *ArtifactsMMO) Gather() (*models.SkillData, error)

Harvest a resource on the character's map.

func (*ArtifactsMMO) GetAchievement

func (c *ArtifactsMMO) GetAchievement(code string) (*models.BaseAchievement, error)

Retrieve the details of an achievement

func (*ArtifactsMMO) GetAchievements

func (c *ArtifactsMMO) GetAchievements(ach_type models.AchievementType, page int, size int) (*[]models.BaseAchievement, error)

Retrieve the details of the achievements

func (*ArtifactsMMO) GetActiveEvents

func (c *ArtifactsMMO) GetActiveEvents(page int, size int) (*[]models.ActiveEvent, error)

func (*ArtifactsMMO) GetAllEvents

func (c *ArtifactsMMO) GetAllEvents(page int, size int) (*[]models.Event, error)

Retrieve all events

func (*ArtifactsMMO) GetCharacterInfo

func (c *ArtifactsMMO) GetCharacterInfo(name string) (*models.Character, error)

Retrieve the details of a character.

func (*ArtifactsMMO) GetGEItem

func (c *ArtifactsMMO) GetGEItem(code string) (*models.GEItems, error)

Retrieve the details of a ge item

func (*ArtifactsMMO) GetGEItems

func (c *ArtifactsMMO) GetGEItems(page int, size int) (*[]models.GEItem, error)

Retrieve the details of the grand exchange items

func (*ArtifactsMMO) GetItem

func (c *ArtifactsMMO) GetItem(code string) (*models.SingleItem, error)

Retrieve the details of an item

func (*ArtifactsMMO) GetItems

func (c *ArtifactsMMO) GetItems(craft_material string, craft_skill string, max_level int, min_level int, name string, item_type models.ItemType, page int, size int) (*[]models.Item, error)

Retrieve the details of the items

func (*ArtifactsMMO) GetMap

func (c *ArtifactsMMO) GetMap(x int, y int) (*models.MapSchema, error)

Retrieve the details of a map tile

func (*ArtifactsMMO) GetMaps

func (c *ArtifactsMMO) GetMaps(content_code string, content_type models.MapContentType, page int, size int) (*[]models.MapSchema, error)

Retrieve the details of the map

func (*ArtifactsMMO) GetMonster

func (c *ArtifactsMMO) GetMonster(code string) (*models.Monster, error)

Retrieve the details of a monster

func (*ArtifactsMMO) GetMonsters

func (c *ArtifactsMMO) GetMonsters(drop string, max_level int, min_level int, page int, size int) (*[]models.Monster, error)

Retrieve the details of the monsters

func (*ArtifactsMMO) GetMyCharactersInfo

func (c *ArtifactsMMO) GetMyCharactersInfo() (*[]models.Character, error)

Retrieve the details of all the characters.

func (*ArtifactsMMO) GetResource

func (c *ArtifactsMMO) GetResource(code string) (*models.Resource, error)

Retrieve the details of a resource

func (*ArtifactsMMO) GetResources

func (c *ArtifactsMMO) GetResources(drop string, max_level int, min_level int, skill models.SkillType, page int, size int) (*[]models.Resource, error)

Retrieve the details of the resources

func (*ArtifactsMMO) GetTask

func (c *ArtifactsMMO) GetTask(code string) (*models.TaskFull, error)

Retrieve the details of a task

func (*ArtifactsMMO) GetTaskReward

func (c *ArtifactsMMO) GetTaskReward(code string) (*models.TaskRewardFull, error)

Retrieve the details of a task reward

func (*ArtifactsMMO) GetTasks

func (c *ArtifactsMMO) GetTasks(skill models.SkillType, task_type models.TaskType, max_level int, min_level int, page int, size int) (*[]models.TaskFull, error)

Retrieve the details of the tasks

func (*ArtifactsMMO) GetTasksRewards

func (c *ArtifactsMMO) GetTasksRewards(page int, size int) (*[]models.TaskRewardFull, error)

Retrieve the details of the tasks rewards

func (*ArtifactsMMO) Move

Moves a character on the map using the map's X and Y position.

func (*ArtifactsMMO) Recycling

func (c *ArtifactsMMO) Recycling(code string, quantity int) (*models.Recycling, error)

func (*ArtifactsMMO) Rest

func (c *ArtifactsMMO) Rest() (*models.Rest, error)

func (*ArtifactsMMO) SellGE

func (c *ArtifactsMMO) SellGE(code string, quantity int, price int) (*models.GETransaction, error)

func (*ArtifactsMMO) TaskCancel

func (c *ArtifactsMMO) TaskCancel() (*models.TaskCancelled, error)

Cancel a task for 1 tasks coin.

func (*ArtifactsMMO) TaskExchange

func (c *ArtifactsMMO) TaskExchange() (*models.TaskRewardData, error)

Exchange 6 tasks coins for a random reward. Rewards are exclusive items or resources.

func (*ArtifactsMMO) TaskTrade

func (c *ArtifactsMMO) TaskTrade(code string, quantity int) (*models.TaskTradeData, error)

Trading items with a Tasks Master.

func (*ArtifactsMMO) Unequip

func (c *ArtifactsMMO) Unequip(slot models.Slot, quantity int) (*models.EquipRequest, error)

Unequip an item on your character.

func (*ArtifactsMMO) UseItem

func (c *ArtifactsMMO) UseItem(code string, quantity int) (*models.UseItem, error)

func (*ArtifactsMMO) WithdrawBank

func (c *ArtifactsMMO) WithdrawBank(code string, quantity int) (*models.BankItemTransaction, error)

func (*ArtifactsMMO) WithdrawBankGold

func (c *ArtifactsMMO) WithdrawBankGold(quantity int) (*models.BankGoldTransaction, error)

Directories

Path Synopsis
cmd
first-fight command
getting-started command
internal
api

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL