/o\ /o/ /o\ will keep reporting bugs :)
Printable View
/o\ /o/ /o\ will keep reporting bugs :)
Hi, here is the bug. All script works well except 2 things:
1. I started conversion and the log said:
Warning: Access to unknown global variable: namRune
Warning: Access to unknown global variable: i
2.All script works perfectly except deposit action, it deposit items but it doesnt not move to the next waypoint.
here is the action:
reachgrounditem("depot")
wait(1000,2000)
openitem("depot")
wait(700,900)
while (windowcount("Depot Chest") == 0)
do
openitem(3502, "locker")
wait(700,900)
end
wait(1500, 2000)
while (windowcount(mainDpBp) == 0)
do
openitem(mainDpBp, "Depot Chest")
wait(700,900)
end
wait(1500, 2000)
--Deposit Jewelled Backpacks:
lastonto = 0
local specialItems = specialItemsToDeposit
local _nextiii = true
for i,j in pairs(specialItems)
do
_nextiii = true
while itemcount(specialItems[i], 'all') > 0 and _nextiii
do
_nextiii = moveitemsonto(specialItems[i], nonStackDpBp, lastonto, nil, "all", 100)
wait(400,500)
end
end
---------------
--Stack Items to Deposit:
local getStackItemsToDeposit = stackItemsToDeposit
--Non-Stack Items to Deposit:
local getNonStackItemsToDeposit = nonStackItemsToDeposit
--Number of Loot Backpacks to open:
local getAmountLootBackpacks = AmountLootBackpacks
--Engine:
for i = 1, getAmountLootBackpacks
do
depotdeposit_ib(stackDpBp, unpack(getStackItemsToDeposit))
wait(1000, 1500)
depotdeposit_ib(nonStackDpBp, unpack(getNonStackItemsToDeposit))
wait(1000, 1500)
openitem(lootBp, lootBp, false)
wait(1500, 2000)
end
thanks for attention
Exactly i dont know, it deposit items in depot except special items and the char doesnt move from there (doesnt go to next waypoint line)
If i click with right button on next line, the script works perfectly.
Maybe can be the "i" variable?
i'm trying to use an action that pick up items from the ground and it's not working!
before conversion
local DIRECTIONS = {"0","nw","n","ne","e","se","s","sw","w"}
local PICKUPITEMS = {
GOLD = {"Gold Coin"},
HEAVYLOOT = {"Plate Armor", "Steel Helmet", "Crystal Sword"},
ICECUBE = {"Ice Cube"},
OTHERS = {"Soft Boots", "Worn Soft Boots", "Draken Boots", "Boots of Haste", "Depth Calcei", "Firewalker Boots", "Golden Boots", "Guardian Boots", "Prismatic Boots", "Steel Boots", "Zaoan Shoes"},
}
local MOVEITEMS = {
GOLDBP = {"Gold Coin", "Plate Armor", "Steel Helmet"},
LOOTBP = {"Ice Cube", "Crystal Sword"},
}
if (CapToPickUpGp > 0) and (cap > CapToPickUpGp) then
for _, DIR in ipairs(DIRECTIONS) do
pickupitems(DIR, unpack(PICKUPITEMS.GOLD))
end
end
if (CapToPickUpHeavyLoot > 0) and (cap > CapToPickUpHeavyLoot) and (HeavyLoot) then
for _, DIR in ipairs(DIRECTIONS) do
pickupitems(DIR, unpack(PICKUPITEMS.HEAVYLOOT))
end
end
if (CapToPickUpIceCubes > 0) and (cap > CapToPickUpIceCubes) and (LootIceCubes) then
for _, DIR in ipairs(DIRECTIONS) do
pickupitems(DIR, unpack(PICKUPITEMS.ICECUBE))
end
end
for _, DIR in ipairs(DIRECTIONS) do
pickupitems(DIR, unpack(PICKUPITEMS.OTHERS))
end
for _, ITEM in ipairs(MOVEITEMS.GOLDBP) do
if (itemcount(ITEM, MainBP) > 0) and (wincount(GoldBP) > 0) then
local ITEM_COUNT1 = itemcount(ITEM, MainBP)
moveitems(ITEM, MainBP, GoldBP, 2000)
wait(2000)
local ITEM_COUNT2 = itemcount(ITEM, MainBP)
if (ITEM_COUNT2 < ITEM_COUNT1) then
addhudloot(ITEM,ITEM_COUNT1-ITEM_COUNT2)
end
end
end
for _, ITEM in ipairs(MOVEITEMS.LOOTBP) do
if (itemcount(ITEM, MainBP) > 0) and (wincount(LootBP) > 0) then
local ITEM_COUNT1 = itemcount(ITEM, MainBP)
moveitems(ITEM, MainBP, LootBP, 2000)
wait(2000)
local ITEM_COUNT2 = itemcount(ITEM, MainBP)
if (ITEM_COUNT2 < ITEM_COUNT1) then
addhudloot(ITEM,ITEM_COUNT1-ITEM_COUNT2)
end
end
end
after conversionauto(800, 1000)
local DIRECTIONS = {"0","nw","n","ne","e","se","s","sw","w"}
local PICKUPITEMS = {
GOLD = {"Gold Coin"},
HEAVYLOOT = {"Plate Armor", "Steel Helmet", "Crystal Sword"},
ICECUBE = {"Ice Cube"},
OTHERS = {"Soft Boots", "Worn Soft Boots", "Draken Boots", "Boots of Haste", "Depth Calcei", "Firewalker Boots", "Golden Boots", "Guardian Boots", "Prismatic Boots", "Steel Boots", "Zaoan Shoes"},
}
local MOVEITEMS = {
GOLDBP = {"Gold Coin", "Plate Armor", "Steel Helmet"},
LOOTBP = {"Ice Cube", "Crystal Sword"},
}
if (CapToPickUpGp > 0) and ($cap > CapToPickUpGp) then
for _, DIR in ipairs(DIRECTIONS) do
pickupitems(DIR, 'backpack', 100, unpack(PICKUPITEMS.GOLD))
end
end
if (CapToPickUpHeavyLoot > 0) and ($cap > CapToPickUpHeavyLoot) and (HeavyLoot) then
for _, DIR in ipairs(DIRECTIONS) do
pickupitems(DIR, 'backpack', 100, unpack(PICKUPITEMS.HEAVYLOOT))
end
end
if (CapToPickUpIceCubes > 0) and ($cap > CapToPickUpIceCubes) and (LootIceCubes) then
for _, DIR in ipairs(DIRECTIONS) do
pickupitems(DIR, 'backpack', 100, unpack(PICKUPITEMS.ICECUBE))
end
end
for _, DIR in ipairs(DIRECTIONS) do
pickupitems(DIR, 'backpack', 100, unpack(PICKUPITEMS.OTHERS))
end
for _, ITEM in ipairs(MOVEITEMS.GOLDBP) do
if (itemcount(ITEM, MainBP) > 0) and (windowcount(GoldBP) > 0) then
local ITEM_COUNT1 = itemcount(ITEM, MainBP)
moveitems(ITEM, GoldBP, MainBP, 2000)
wait(2000)
local ITEM_COUNT2 = itemcount(ITEM, MainBP)
if (ITEM_COUNT2 < ITEM_COUNT1) then
addhudloot_ib(ITEM,ITEM_COUNT1-ITEM_COUNT2)
end
end
end
for _, ITEM in ipairs(MOVEITEMS.LOOTBP) do
if (itemcount(ITEM, MainBP) > 0) and (windowcount(LootBP) > 0) then
local ITEM_COUNT1 = itemcount(ITEM, MainBP)
moveitems(ITEM, LootBP, MainBP, 2000)
wait(2000)
local ITEM_COUNT2 = itemcount(ITEM, MainBP)
if (ITEM_COUNT2 < ITEM_COUNT1) then
addhudloot_ib(ITEM,ITEM_COUNT1-ITEM_COUNT2)
end
end
end
and at conversion log:
Warning: Setting "Settings\\Refiller\\Rules\\Time Ring\\Enabled" has no WindBot equivalent!
Warning: Setting "Settings/Hud/Enabled" has no WindBot equivalent!
Warning: Setting "Settings\\Alerts\\Player\\OnScreen\\FlashClie nt" has no WindBot equivalent!
error in Persistent script Refiller_ib:
[""]:Refiller_ib:60 attempt to call a nil value
init start
-- SCRIPT_VERSION = 1.0.0
REFILLER_IB = {
['refiller0'] = { id = 3056, hprange = {0, 1000, true}, mprange = {0, 100, true}, spamrate = {500, 1000}, enabled = true, amount = {0, 1}, callbackName = 'If no amulet' },
}
local refillerFunctions = {
['no condition'] = function() return true end,
['if no ring'] = function() return $finger.id == 0 end,
['if drunken'] = function() return $drunk end,
['if not amulet'] = function() return $neck.id == 0 end,
['if no boots'] = function() return $feet.id == 0 end,
['if no manashield'] = function() return (not $manashielded or $mshieldtime < 20000) end,
['if visible'] = function() return ($outfit.id > 0 or $invistime < 15000) end,
}
local itemsInUse = {{3092, 3095}, {3091, 3094}, {3093, 3096}, {3052, 3089}, {3098, 3100}, {3097, 3099}, {3051, 3088}, {3053, 3090}, {3049, 3086}, {9593, 9593}, {9393, 9392}, {3007, 3007}, {6299, 6300}, {9585, 9585}, {3048, 3048}, {3050, 3087}, {3245, 3245}, {3006, 3006}, {349, 349}, {3004, 3004}, {6529, 3549}, {9394, 9392}, {12669, 12670}}
local slots = {
{$rhand, 'rhand'},
{$head, 'head'},
{$neck, 'neck'},
{$back, 'back'},
{$chest, 'chest'},
{$lhand, 'lhand'},
{$rhand, 'rhand'},
{$legs, 'legs'},
{$feet, 'feet'},
{$finger, 'finger'},
{$belt, 'belt'},
}
for _, j in pairs(REFILLER_IB) do
local info = iteminfo(j.id)
j.slotname = slots[info.clothslot+1][2]
j.slot = slots[info.clothslot+1][1]
local temp = table.find(itemsInUse, info.id, 1)
if temp then
j.idinuse = itemsInUse[temp][2]
else
j.idinuse = info.id
end
j.amount[1] = math.max(1, j.amount[1])
j.amount[2] = math.max(1, j.amount[2])
j.amountRandom = math.random(unpack(j.amount))
if (j.slot == $rhand or j.slot == $belt) then
setsetting('Cavebot/AutoRefillAmmo', 'yes')
end
end
itemsInUse, slots = nil, nil -- just to clean up
init end
auto(200)
for _, j in pairs(REFILLER_IB) do
local hpToCheck = tern(j.hprange[3], $hppc, $hp)
local mpToCheck = tern(j.mprange[3], $mppc, $mp)
if j.enabled and hpToCheck >= j.hprange[1] and hpToCheck <= j.hprange[2] and mpToCheck >= j.mprange[1] and mpToCheck <= j.mprange[2] and (j.slot.id ~= j.idinuse or j.slot.count <= j.amountRandom) and refillerFunctions[j.callbackName:lower()]() then
equipitem(j.id, j.slotname, 'backpack') wait(unpack(j.spamrate))
j.amountRandom = math.random(unpack(j.amount))
return
end
end
and I received these on the conversion log:
Quote:
Warning: Access to unknown global variable: SellProdcuts Warning: Access to unknown global variable: FoodToBuy
Warning: Access to unknown global variable: FoodRefiller
Warning: Access to unknown global variable: GFB
Warning: Access to unknown global variable: StaminaTime
Warning: Access to unknown global variable: pzzone
Warning: Access to unknown global variable: AmuletID
Warning: Access to unknown global variable: gfbr
Warning: Access to unknown global variable: PickToUse
Warning: Access to unknown global variable: MpName
Deepling South for MS 100% converted and working.
Thanks for reporting. I've added 3 days to your WindBot account.
Great to know! Should post the exp rate you got here: http://forums.tibiawindbot.com/showthread.php?2056
i got some problems with healing in scripts after convert when he is on low hp char dropping target and just staying still trying to heal without even attack with melee i got this problem in hive tower