Inventaire
local ble = bot.findByName("Ble")
if ble then
log("Ble: " .. ble.quantity .. " en inventaire")
end
Banque
-- Deposer tout en banque
bot.openBank(42)
bot.depositAll()
bot.closeBank()
HDV Avance (Hotel de Vente)
bot.openSell(cellId) -- ouvrir HDV vente via NPC
local price = bot.listItem(289) -- prix actuel du template
local prices = bot.itemPrices(289) -- {x1, x10, x100}
local lowest = bot.getLowestPrice(289, 1) -- prix min lot de 1
bot.updatePrice(uid, 1, 289, 500) -- uid, lotSize, templateId, newPrice
bot.removeListing(uid) -- retirer annonce
bot.buyItem(289, 10, 100) -- templateId, qty, price
bot.closeHdv()
local listings = bot.myListings() -- mes annonces
Monture Inventaire
if bot.hasMount() then
bot.toggleRide() -- monter/descendre
bot.setXpShare(30) -- 30% XP monture
bot.openMountInventory()
bot.mountPutItem(289, 10) -- vers monture
bot.mountGetItem(289, 5) -- depuis monture
local items = bot.mountInventoryItems()
bot.closeMountInventory()
end
Craft
bot.useInteractive(cellId, skillId) -- ouvrir atelier
sleep(1)
bot.putItem(289, 2) -- ingredients
bot.exchangeReady() -- valider craft
sleep(2)
bot.exchangeLeave()
Boutique PNJ / Marchand
bot.openNpcShop(42)
bot.npcShopBuy(289, 10) -- acheter 10 x template 289
bot.merchantLeave()
Craft avance
bot.openCraftStation(cellId, skillId)
bot.craftPutItem(289, 2) -- ingredients
bot.craftSetQuantity(5) -- crafter 5 fois
bot.craftCombine() -- lancer
bot.craftWaitForResult()
bot.craftLeave()
Inventaire
| Propiedad / Método | Tipo | Descripción |
|---|
| bot.getInventory() | table | Tous les items |
| bot.getItem(nameOrId) | table\ | nil | Chercher par nom ou ID |
| bot.countItem(templateId) | number | Quantite d'un item par template ID |
| bot.findByTemplate(templateId) | table\ | nil | Premier item par template ID |
| bot.findByUid(uid) | table\ | nil | Item par UID |
| bot.findByName(name) | table\ | nil | Premier item par nom exact |
| bot.findAllByName(name) | table | Items dont le nom contient la chaine |
| bot.isEquipped(uid) | boolean | Item equipe ? |
| bot.totalQuantity() | number | Quantite totale de tous les items |
| bot.itemCount() | number | Nombre d'items uniques |
| bot.getEquipment() | table | Items equipes (pos 0-8) |
| bot.useItem(uid) | void | Utiliser un item |
| bot.equipItem(uid) | void | Equiper |
| bot.unequipItem(uid) | void | Desequiper |
| bot.dropItem(uid, qty?) | void | Jeter |
| bot.deleteItem(uid, qty?) | void | Detruire |
Banque
| Propiedad / Método | Tipo | Descripción |
|---|
| bot.openBank(npcCellId) | void | Ouvrir la banque via PNJ |
| bot.depositAll() | void | Deposer tous les items |
| bot.depositItem(uid, qty) | void | Deposer un item |
| bot.withdrawItem(uid, qty) | void | Retirer un item |
| bot.closeBank() | void | Fermer la banque |
| bot.depositKamas(amount?) | void | Deposer des kamas (0=tout) |
| bot.withdrawKamas(amount) | void | Retirer des kamas |
| bot.bankItemCount() | number | Nombre d'items uniques en banque |
| bot.getBankItems() | table | Contenu de la banque |
| bot.bankItemQuantity(templateId) | number | Quantite d'un item en banque |
Hotel de Vente (HDV)
| Propiedad / Método | Tipo | Descripción |
|---|
| bot.openHdv(npcCellId?) | void | Ouvrir l'HDV |
| bot.searchHdv(typeId) | void | Rechercher par categorie |
| bot.getPrice(templateId) | void | Demander le prix moyen |
| bot.sellItem(uid, qty, price) | void | Mettre en vente |
| bot.buyItem(templateId, qty, price) | void | Acheter |
| bot.closeHdv() | void | Fermer l'HDV |
Configuration Banque
| Propiedad / Método | Tipo | Descripción |
|---|
| bot.setBankThreshold(percent) | void | Seuil pods pour aller en banque (0.0-1.0) |
| bot.getBankThreshold() | number | Seuil actuel |
| bot.addBankKeepItem(templateId, qty?) | void | Item a ne PAS deposer |
| bot.clearBankKeepItems() | void | Vider la liste keep |
| bot.addBankWithdrawItem(templateId, qty?) | void | Item a retirer automatiquement |
| bot.clearBankWithdrawItems() | void | Vider la liste withdraw |
| bot.addAutoDeleteItem(templateId, qty?) | void | Item a supprimer automatiquement |
| bot.clearAutoDeleteItems() | void | Vider la liste delete |
| bot.depositKamas(amount?) | void | Deposer kamas (0=tout) |
| bot.withdrawKamas(amount) | void | Retirer kamas |
| bot.putAllItemsExcept(exceptIds) | void | Deposer tout sauf les items specifies |
Craft
| Propiedad / Método | Tipo | Descripción |
|---|
| bot.openCraftStation(cellId, skillId?) | boolean | Ouvrir un atelier |
| bot.craftPutItem(templateId, qty?) | boolean | Ajouter un ingredient |
| bot.craftRemoveItem(templateId, qty?) | boolean | Retirer un ingredient |
| bot.craftWaitForResult(timeout?) | table\ | nil | Attendre resultat { success } |
| bot.craftOpen() | boolean | Atelier ouvert ? |
Monture Inventaire
| Propiedad / Método | Tipo | Descripción |
|---|
| bot.openMountInventory() | boolean | Ouvrir l'inventaire monture |
| bot.closeMountInventory() | void | Fermer |
| bot.mountPutItem(templateId, qty?) | boolean | Deposer item dans monture |
| bot.mountGetItem(templateId, qty?) | boolean | Retirer item de monture |
| bot.mountInventoryItems() | table | Contenu inventaire monture |
| bot.setMountXp(percent) | void | % XP monture (0-90) |
| bot.getMountId() | number | ID unique monture |
HDV Avance (Hotel de Vente)
| Propiedad / Método | Tipo | Descripción |
|---|
| bot.openSell(npcCellId?) | void | Ouvrir HDV mode vente |
| bot.openBuy(npcCellId?) | void | Ouvrir HDV mode achat |
| bot.listItem(templateId) | number | Prix moyen du marche |
| bot.itemPrices(templateId) | table | Prix par lot { x1, x10, x100 } |
| bot.getLowestPrice(templateId, lotSize?) | number | Prix minimum pour un lot |
| bot.updatePrice(uid, lotSize, templateId, newPrice) | boolean | Modifier prix d'annonce |
| bot.removeListing(uid) | void | Retirer une annonce |
| bot.myListings() | table | Mes annonces {{ uid, templateId, qty, price }} |
| bot.undercutAll(lotSize?, maxDropPercent?) | table | Sous-coter toutes les annonces |
| bot.getTax() | number | Taxe HDV actuelle (%) |
| bot.getLotSizes() | table | Tailles de lots disponibles |
| bot.autoSell() | boolean | Vente automatique de tous les items |
Boutique PNJ / Marchand
| Propiedad / Método | Tipo | Descripción |
|---|
| bot.openNpcShop(npcId) | void | Ouvrir la boutique d'un PNJ |
| bot.npcShopBuy(templateId, qty) | void | Acheter un item au PNJ |
| bot.npcShopSell(uid, qty) | void | Vendre un item au PNJ |
| bot.merchantLeave() | void | Fermer la boutique |
| bot.openPlayerShop(actorId) | void | Ouvrir la boutique d'un joueur marchand |
| bot.shopBuyItem(uid, qty) | void | Acheter dans la boutique joueur |
| bot.requestMerchantMode() | void | Activer le mode marchand |
| bot.confirmMerchantMode() | void | Confirmer le mode marchand |
Banque — Gestion kamas automatique
| Propiedad / Método | Tipo | Descripción |
|---|
| bot.setBankKamas(amount) | void | Kamas a garder en inventaire (seuil) |
| bot.getBankKamas() | number | Seuil kamas actuel |
| bot.setBankWithdrawKamas(amount) | void | Kamas a retirer auto de la banque |
| bot.getBankWithdrawKamas() | number | Montant retrait auto |
Craft avance
| Propiedad / Método | Tipo | Descripción |
|---|
| bot.craftSetQuantity(qty) | void | Definir la quantite a crafter |
| bot.craftCombine() | void | Lancer le craft |
| bot.craftLeave() | void | Fermer l'atelier |
Inventaire — Alias et utilitaires
| Propiedad / Método | Tipo | Descripción |
|---|
| bot.inventoryItems() | table | Alias getInventory |
| bot.getAllItems() | table | Tous les items (inventaire + equipes) |
| bot.itemQuantity(templateId) | number | Quantite par template ID |
| bot.openInventory() | void | Ouvrir l'inventaire |
| bot.closeInventory() | void | Fermer l'inventaire |
Banque — Alias et utilitaires
| Propiedad / Método | Tipo | Descripción |
|---|
| bot.isBankOpen() | boolean | Banque ouverte ? |
| bot.bankItems() | table | Alias getBankItems |
| bot.bankKamas() | number | Kamas en banque |
| bot.storageItems() | table | Items en banque |
| bot.storageKamas() | number | Kamas en banque |
| bot.storageItemCount() | number | Nombre d'items en banque |
| bot.storageItemQuantity(templateId) | number | Quantite item en banque |
| bot.deposit(uid, qty) | void | Deposer item |
| bot.depositAllExcept(ids) | void | Deposer tout sauf certains items |
| bot.withdraw(uid, qty) | void | Retirer item |
| bot.withdrawAll() | void | Retirer tout |
| bot.putAllItems() | void | Deposer tous les items |
| bot.enableAutoBank() | void | Activer banque auto |
| bot.disableAutoBank() | void | Desactiver banque auto |
| bot.isAutoBankEnabled() | boolean | Banque auto active ? |
Boutique PNJ — Details
| Propiedad / Método | Tipo | Descripción |
|---|
| bot.npcShopItems() | table | Items disponibles en boutique |
| bot.canSellItem(uid) | boolean | Item vendable au PNJ ? |
| bot.sellableItems() | table | Items vendables |
HDV — Alias
| Propiedad / Método | Tipo | Descripción |
|---|
| bot.myListingCount() | number | Nombre de mes annonces |
| bot.refreshMyListings() | table | Rafraichir mes annonces |
| bot.openShop(actorId) | void | Alias openPlayerShop |