Bonsoir;
J'ai besoin des avis du gens concernant le systèmes de trajets que j'utiliserais dans mon bot DT.
Il y a (actuellement) 3 choix:
Python
Cliquez pour révéler
Cliquez pour masquer
def isInMap(pos):
if isinstance(pos, int): # Si c'est une map id
return pos == 4
else: # Sinon on test pour une position x,y
return pos == str(6) + "," + str(9)
def condition1():
return True
maps = [
{ 'map': 1, 'action': 'fight', 'direction': 'left' },
{ 'map': 2, 'action': 'gather', 'direction': 'bottom' },
{ 'map': '6,8', 'direction': 'right' },
{ 'map': 4, 'direction': 'top', 'condition': condition1 }
]
def getActionToPerform():
for map in maps:
if isInMap(map['map']) and (map['condition'] is not None and map['condition']() == True):
return map
print(getActionToPerform())
LUA - MufiLike
Cliquez pour révéler
Cliquez pour masquer
MAX_PODS = 90
function condition1()
if character.level < 20 then
return true
else
return false
end
end
function move()
return {
{ map = "1,-21", changeMap = "bas", condition=condition1() },
{ map = "1,-20", changeMap = "bas" },
{ map = "2,-22", changeMap = "bas" },
{ map = "2,-21", changeMap = "bas" },
{ map = "3,-22", changeMap = "bas" },
{ map = "3,-21", changeMap = "bas" },
{ map = "3,-20", changeMap = "bas" }
}
end
function bank()
return {
{ map = "1,-21", changeMap = "bas" },
{ map = "1,-20", changeMap = "bas" },
{ map = "2,-22", changeMap = "bas" },
{ map = "2,-21", changeMap = "bas" },
{ map = "3,-22", changeMap = "bas" },
{ map = "3,-21", changeMap = "bas" },
{ map = "3,-20", changeMap = "bas" }
}
end
Trajets.txt
Cliquez pour révéler
Cliquez pour masquer
// Trajet lvl 1-50
// 1-11 : Incarnam
// 11-31 : Pious
// 31-50 : Pichons
MAX_PODS = 90;
// Incarnam
path : (character.level >= 1 && character.level < 11)
{
[-2,-3] right
1546879 right
[0,-3] right
[1,-3] top
[4,-3] right + npc.npc(1, {2, 3}) + map.moveToCell(4) + inventory.useObject(5)
[5,-3] inventory.equipObject(1, 9) + inventory.dropObject(2, 1) + inventory.deleteObject(3, 10)
[6,-3] map.useById(1) + map.useDoor(2)
[7,-3] bank() + printMessage("c'est ok") + stopScript()
}
path
{
[0,0] top
[1,-8] left
1285758 right
[3,-1] bottom
}
fightMaps : (character.level < 11)
{
[1, -2]; [1, -1]; 158796; [2, -2]
}
// Pious
path : (character.level >= 11 && character.level < 31)
{
// Sortir d'incarnam
[1,-2] bottom
[1,-3] right
[2,-3] right
[3,-3] right
[4,-3] npc.npc(1, {1, 2}) // on parle au 1er npc, on répond avec la 1ere réponse puis la deuxième
// Pious
1548578 top
[4,-17] top
[4,-18] top
[4,-19] left
}
fightMaps : (character.level >= 11 && character.level < 31)
{
[3,-19]; [2,-19]; [1,-19]; [0,-19]; [0,-20]; [1,-20]; [2,-20]; [3,-20]
[5,-20]; [4,-20]; [5,-18]; [5,-19]; [4,-18]; [3,-18]
}
fight : (character.level >= 11 && character.level < 31)
{
[3,-19] top
[2,-19] top
[1,-19] top
[0,-19] right
[0,-20] bottom
[1,-20] bottom
[2,-20] bottom
}
fightMaps
{
[3,-19]; [2,-19]; [1,-19]; [0,-19]; [0,-20]; [1,-20]; [2,-20]; [3,-20]
[5,-20]; [4,-20]; [5,-18]; [5,-19]; [4,-18]; [3,-18]
}
fight
{
[3,-19] top
[2,-19] top
[1,-19] top
[0,-19] right
[0,-20] bottom
[1,-20] bottom
[2,-20] bottom
}
// Pichons
path : (character.level >= 31 && character.level <= 50)
{
1364556 top
[4,-17] top
[4,-18] top
[4,-19] right
[5,-19] right
[6,-19] right
[7,-19] right
[8,-19] right
[9,-19] right
[10,-19] top
[10,-20] top
[10,-21] top
[10,-22] top
[10,-23] right
[11,-23] right
[12,-23] top
}
fightMaps : (character.level >= 31 && character.level <= 50)
{
[12,-24]; [12,-25]; [12,-26]; [12,-27]; [12,-28]; [11,-28]; [11,-27]
[11,-26]; [11,-25]; [10,-26]; [10,-27]; [10,-28]; [10,-29]; [9,-29]
[8,-29]; [8,-28]; [9,-28]; [9,-27];1545421;584561;[1,-2];156151;
}
// Retour en banque
bank // bank s'éxecute quand on a >= max_pods et on peut faire qu'un seul bankPath
{
[9,-26] bottom
[9,-25] bottom
[9,-24] bottom
[9,-23] bottom
[9,-22] bottom
[9,-21] bottom
[9,-20] bottom
[9,-19] left
[8,-19] left
[7,-19] left
[6,-19] left
[5,-19] left
[4,-19] bottom
[4,-18] bottom
[4,-17] bottom
[4,-16] map.useById(1)
1542187 bank() // gére lnpc de banque et tout
}
Bien sûr si quelqu'un a d'autres propositions je suis preneur.
Je cherche quelque chose de facile pour les utilisateurs, mais aussi qui rend des idées possible ^^
Merci.