PDA

View Full Version : Reset Bp, Resupply issues.



Warraz
06-19-2013, 11:34 PM
How can i change the amount of health/mana potions i buy?.. and how much gold i withdraw, from the already created script packages on the .lua scripts?..

really stuck, and would prefer not wirhtdrawing 14k for pots when i'm only level 25 at the moment..

popit
06-20-2013, 01:10 AM
go to documents - xenobot - scripts and find the lua there - double click it and it will show wanted health potions or mana potions just change the amounts you would like and the amount when to go back to refill and such.. it will automatically adjust to the amount of gold it will withdraw once you change those amounts..

also then when you go and load the script in tibia again, reload the lua after you make the changes then save that script :)

CGN
06-20-2013, 08:36 AM
Dont forget you need notepad++ (i'm not fimiliar with any other) to edit these settings. and it will be very straight foward where to change for potions etc.

Infernal Bolt
06-20-2013, 08:49 AM
Dont forget you need notepad++ (i'm not fimiliar with any other) to edit these settings. and it will be very straight foward where to change for potions etc.

You don't need it, you can use normal notepad or any other text editor to change the settings.

Warraz
06-20-2013, 09:47 AM
go to documents - xenobot - scripts and find the lua there - double click it and it will show wanted health potions or mana potions just change the amounts you would like and the amount when to go back to refill and such.. it will automatically adjust to the amount of gold it will withdraw once you change those amounts..

also then when you go and load the script in tibia again, reload the lua after you make the changes then save that script :)





Hey thanks, but which part of this code from the .lua file is the amount of potions?..



This script is proudly brought to you by JXScripts!
]]
local flasks = {283, 284, 285}
Module.New('vial dropper', function()
local vialIndex = -1
for i = 0, #Container.GetAll() do
local c = Container.New(i)
for s = 0, c:ItemCount() do
local item = c:GetItemData(s)
if table.contains(flasks, item.id) then
vialIndex = c:Index()
break
end
end
if vialIndex > 0 then
break
end
end
local vialBp = Container.New(vialIndex)
if Self.Cap() < 200 or vialBp:EmptySlots() < 5 then
for s = 0, vialBp:ItemCount() do
local item = vialBp:GetItemData(s)
if table.contains(flasks, item.id) then
vialBp:MoveItemToGround(s, Self.Position().x, Self.Position().y, Self.Position().z, 100)
return
end
end
end
end)

popit
06-20-2013, 09:50 AM
Hey thanks, but which part of this code from the .lua file is the amount of potions?..



This script is proudly brought to you by JXScripts!
]]
local flasks = {283, 284, 285}
Module.New('vial dropper', function()
local vialIndex = -1
for i = 0, #Container.GetAll() do
local c = Container.New(i)
for s = 0, c:ItemCount() do
local item = c:GetItemData(s)
if table.contains(flasks, item.id) then
vialIndex = c:Index()
break
end
end
if vialIndex > 0 then
break
end
end
local vialBp = Container.New(vialIndex)
if Self.Cap() < 200 or vialBp:EmptySlots() < 5 then
for s = 0, vialBp:ItemCount() do
local item = vialBp:GetItemData(s)
if table.contains(flasks, item.id) then
vialBp:MoveItemToGround(s, Self.Position().x, Self.Position().y, Self.Position().z, 100)
return
end
end
end
end)


at the very top of your lua doesn't it say for example MinManaPots= or MinHealthPots=..? something like that

Adky
06-20-2013, 10:00 AM
Hey thanks, but which part of this code from the .lua file is the amount of potions?..



That vial dropper will drop all vials if your cap is below 200 or if you have less than 5 available spots in your backpack.

You can use this instead if you don't like it:


dropVials = 6
vialIDs = {283, 284, 285}
Module.New('VialModule', function(module)
for i = 1, #vialIDs do
if Self.ItemCount(vialIDs[i]) > math.random(dropVials, dropVials+5) then
Self.DropFlasks(Self.Position().x-math.random(-1, 2), Self.Position().y-math.random(-1, 2), Self.Position().z)
module:Delay(9000,26000)
end
end
module:Delay(3000, 7000)
end
)