# Structure des trajets

# 📂Structure des fichiers

ELEMENTS_TO_GATHER = { 1, 254 } -- Frêne, Ortie
MAX_PODS = 90 -- 90% de pods

function move()
    return {
        { map = "5,-18", path = "bottom", gather = false, fight = false },
        { map = "5,-17", path = "bottom", gather = false, fight = false },
        { map = "5,-16", path = "bottom", gather = false, fight = false },
        { map = "5,-15", path = "left", gather = false, fight = false },
        { map = "4,-15", path = "left", gather = false, fight = false },
        { map = "3,-15", path = "left", gather = false, fight = false },
        { map = "2,-15", path = "left", gather = false, fight = false },
        { map = "1,-15", path = "left", gather = true, fight = false },
        { map = "0,-15", path = "left", gather = true, fight = false },
        { map = "-1,-15", path = "left", gather = true, fight = false },
        { map = "-2,-15", path = "left", gather = true, fight = false },
        { map = "-3,-15", path = "top", gather = true, fight = false },
        { map = "-3,-16", path = "right", gather = true, fight = false },
        { map = "-2,-16", path = "right", gather = true, fight = false },
        { map = "-1,-16", path = "right", gather = true, fight = false },
        { map = "0,-16", path = "right", gather = true, fight = false },
        { map = "1,-16", path = "top", gather = true, fight = false },
        { map = "1,-17", path = "left", gather = true, fight = false },
        { map = "0,-17", path = "left", gather = true, fight = false },
        { map = "-1,-17", path = "left", gather = true, fight = false },
        { map = "-2,-17", path = "left", gather = true, fight = false },
        { map = "-3,-17", path = "top", gather = true, fight = false },
        { map = "-3,-18", path = "right", gather = true, fight = false },
        { map = "-2,-18", path = "right", gather = true, fight = false },
        { map = "-1,-18", path = "right", gather = true, fight = false },
        { map = "0,-18", path = "right", gather = true, fight = false },
        { map = "1,-18", path = "top", gather = true, fight = false },
        { map = "1,-19", path = "left", gather = true, fight = false },
        { map = "0,-19", path = "left", gather = true, fight = false },
        { map = "-1,-19", path = "left", gather = true, fight = false },
        { map = "-2,-19", path = "left", gather = true, fight = false },
        { map = "-3,-19", path = "top", gather = true, fight = false },
        { map = "-3,-20", path = "right", gather = true, fight = false },
        { map = "-2,-20", path = "right", gather = true, fight = false },
        { map = "-1,-20", path = "right", gather = true, fight = false },
        { map = "0,-20", path = "right", gather = true, fight = false },
        { map = "1,-20", path = "right", gather = true, fight = false },
        { map = "2,-20", path = "top", gather = true, fight = false },
        { map = "2,-21", path = "left", gather = true, fight = false },
        { map = "1,-21", path = "left", gather = true, fight = false },
        { map = "0,-21", path = "left", gather = true, fight = false },
        { map = "-1,-21", path = "left", gather = true, fight = false },
        { map = "-2,-21", path = "left", gather = true, fight = false },
        { map = "-3,-21", path = "top", gather = true, fight = false },
        { map = "-3,-22", path = "right", gather = true, fight = false },
        { map = "-2,-22", path = "right", gather = true, fight = false },
        { map = "-1,-22", path = "right", gather = true, fight = false },
        { map = "0,-22", path = "right", gather = true, fight = false },
        { map = "1,-22", path = "right", gather = true, fight = false },
        { map = "2,-22", path = "top", gather = true, fight = false },
        { map = "2,-23", path = "left", gather = true, fight = false },
        { map = "1,-23", path = "left", gather = true, fight = false },
        { map = "0,-23", path = "left", gather = true, fight = false },
        { map = "-1,-23", path = "left", gather = true, fight = false },
        { map = "-2,-23", path = "top", gather = true, fight = false },
        { map = "-2,-24", path = "right", gather = true, fight = false },
        { map = "-1,-24", path = "right", gather = true, fight = false },
        { map = "0,-24", path = "right", gather = true, fight = false },
        { map = "1,-24", path = "right", gather = true, fight = false },
        { map = "2,-24", path = "top", gather = true, fight = false },
        { map = "2,-25", path = "left", gather = true, fight = false },
        { map = "1,-25", path = "left", gather = true, fight = false },
        { map = "0,-25", path = "left", gather = true, fight = false },
        { map = "-1,-25", path = "left", gather = true, fight = false },
        { map = "-2,-25", path = "top", gather = true, fight = false },
        { map = "-2,-26", path = "right", gather = true, fight = false },
        { map = "-1,-26", path = "right", gather = true, fight = false },
        { map = "0,-26", path = "right", gather = true, fight = false },
        { map = "1,-26", path = "right", gather = true, fight = false },
        { map = "2,-26", path = "top", gather = true, fight = false },
        { map = "2,-27", path = "left", gather = true, fight = false },
        { map = "1,-27", path = "left", gather = true, fight = false },
        { map = "0,-27", path = "left", gather = true, fight = false },
        { map = "-1,-27", path = "left", gather = true, fight = false },
        { map = "-2,-27", path = "top", gather = true, fight = false },
        { map = "-2,-28", path = "right", gather = true, fight = false },
        { map = "-1,-28", path = "right", gather = true, fight = false },
        { map = "0,-28", path = "right", gather = true, fight = false },
        { map = "1,-28", path = "right", gather = true, fight = false },
        { map = "2,-28", path = "top", gather = true, fight = false },
    }
end

function bank()
    return {
        { map = "192415750", npcBank = true } -- Mapid de la banque
    }
end

Afin de gérer au mieux le comportement du bot, vous avez à votre disposition plusieurs variables globales :

Nom de la variable Description Valeurs possibles
FIGHT_LOCK_SPEC Verrouiller le mode spectateur lors des combats true / false
FIGHT_LOCK_JOIN Verrouiller la possibilité de rejoindre lors des combats true / false
FIGHT_LOCK_PARTY Restreindre la possibilité de rejoindre lors des combats uniquement au groupe true / false
MIN_MONSTERS Nombre minimum de monstres à combattre 1
MAX_MONSTERS Nombre maximum de monstres à combattre 8
ELEMENTS_TO_GATHER Liste des ressources à récolter sur la carte { 1, 254 }
AUTO_DELETE Liste des objets à supprimer lors du retour en banque. Il est à noter que la suppression s'effectue avant la fonction bank, si après suppression le bot est en dessous du MAX_PODS, il reprend le script { 666, 420, 1337 }
MAX_PODS Pourcentage de pods à atteindre pour déclencher le retour en banque 90

Pour pouvoir se déplacer, le bot a besoin qu'on lui dise où aller et que faire sur telle ou telle carte, voici comment faire :

function move()
    return {
        -- Exemples possibles avec map
        { map = "-3,-18", path = "right", gather = true, fight = false },
        { map = 212601350, path = "right", gather = true, fight = false },

        -- Exemples simples possibles avec path
        { map = "-3,-18", path = "right", gather = true, fight = false },
        { map = "-3,-18", path = "bottom", gather = true, fight = false },
        { map = "-3,-18", path = "left", gather = true, fight = false },
        { map = "-3,-18", path = "top", gather = true, fight = false },
        { map = "-3,-18", path = "-3,-18", gather = true, fight = false },
        { map = "-3,-18", path = "212601350", gather = true, fight = false },


        -- Exemples avancés possibles avec path
        { map = "-3,-18", cell = "61", gather = true, fight = false },

        -- Exemples possibles avec gather
        { map = "-3,-18", path = "right", gather = true, fight = false },
        { map = "-3,-18", path = "right", gather = false, fight = false },

        -- Exemples possibles avec fight
        { map = "-3,-18", path = "right", gather = true, fight = true },
        { map = "-3,-18", path = "right", gather = true, fight = false },
    }
end

# 📋 Paramètres

Nom du paramètre Description Valeurs possibles Paramètre optionnel
map Cordonnée de la position par position 31,-56 Non
map Cordonnée de la position par map id 212600323 Non
cell Changement de map par cell ID 123 Non
path Changement de map par coordonnées 31,-56 Non
path Changement de map par map id 212600323 Non
path Changement de map par direction simple top
bottom right left Non
path Rejoindre le zaap zaap(ID du Zaap) Non
gather Le bot doit-il récolter sur la carte true false
Oui
fight Le bot doit-il gérer les combats true false
Oui
custom Fonction custom à exécuter sur la carte true false

# Retour en banque simple

Le bot peut gérer le retour en banque, il vous suffit de lui indiquer la mapid de la banque dans la fonction bank(), voici un exemple :

function bank()
    return {
        { map = "192415750", npcBank = true } -- Mapid de la banque, npcBank va déposer tout l'inventaire en banque
    }
end

Pour ne déposer que les objets déjà présents dans la banque, il vous suffit d'utiliser la fonction putExistingItems() dans la fonction bank()

function bank()
    return {
        { map = "192415750",custom=vidageBanque } -- Mapid de la banque
    }
end

function vidageBanque()
    putExistingItems() -- Dépose uniquement les objets déjà présents dans la banque
end

# Retour en banque avancé

Le bot peut gérer le retour en maison

function bank()
    return {
        { map = "XXX", lockedHouse = "pseudoJoeuur|code" },
        { map = "XXX", lockedStorage = "cellidDucoffre|code" },
    }
end