shamdis
02-03-2014, 03:34 PM
Hey so i just made a script for myself, the .Xbst file works perfect but when i try to execute the lua file it wont work it just kill the script automatically. if you wanna look at the script i could send it
//SammeDjinn
Xemudik
02-04-2014, 12:14 PM
Hey man,
actually it would be easier if you would post your Error Massage you get by executing the lua fileand the related part of your script. Furthermore you sould post this request in Requests&Support.
shamdis
02-04-2014, 05:41 PM
Hey man,
actually it would be easier if you would post your Error Massage you get by executing the lua fileand the related part of your script. Furthermore you sould post this request in Requests&Support.
there is no error message it just kill the script by itself for no reason... alright thx
Spectrus
02-08-2014, 09:42 PM
You'd get a quicker response by posting the full script in the thread.
shamdis
02-11-2014, 10:35 AM
-- Refill Settings:
local LeaveMana = 30 -- Leave spawn when under =
local BringMana = 170 -- How many manas would u like to bring?
local ManaPotID = 268 -- Mana Potion ID
local ManaCost = 50 -- Cost of Mana Potion //EA
local LeaveHealth = 5 -- Leave spawn when under =
local BringHealth = 30 -- How many Hp would u like to bring?
local HealthPotID = 266 -- Health Potion ID
local HealthCost = 45 -- Cost of Health Potion //EA
-- Other Settings --
-- True = Yes, False = No --
local LeaveCap = 10 -- Leave spawn when under =
local GoldBP = 2866 -- Item ID of your gold backpack.
local HideEquipment = true -- Hide your Equipment
local LogoutStamina = false -- would u like to logout at 16h stamina? (inside Depot)
---------------------------------------------------------------------------------------
---------------------------------------------------------------------------------------
---------------------------------------------------------------------------------------
local info = [[
Hidden Pirates Carlin[SammeSkog] ]]
wait(5000)
print([[
Hidden Pirates Carlin[SammeSkog] ]])
wait(5000)
---------------------------------------------------------------------------------
function onWalkerSelectLabel(labelName)
if (labelName == "Checker") then
if (Self.ItemCount(ManaPotID) <= LeaveMana) or (Self.Cap() < LeaveCap) then
gotoLabel("Leave")
else
gotoLabel("Hunt")
end
elseif (labelName == "Check") then
if (Self.ItemCount(ManaPotID) < BringMana) then
gotoLabel("Refill")
else
gotoLabel("Go Hunt")
end
elseif (labelName == "Deposit") then
setWalkerEnabled(false)
Self.ReachDepot()
Self.DepositItems(6126, 6098, 6097, 5926, 6095, 5706, 3052)
Self.DepositItems({3371, 1}, {3370, 1}, {3055, 1}, {7437, 1}, {829, 1}, {3284, 1})
Self.DepositItems({3053, 2})
wait(1500,1900)
elseif (labelName == "Bank") then
setWalkerEnabled(false)
delayWalker(5000)
Self.Say("hi")
sleep(math.random(700, 1400))
Self.SayToNpc("deposit all")
sleep(math.random(300, 1000))
Self.SayToNpc("yes")
sleep(math.random(300, 1000))
Self.WithdrawMoney((ManaCost*(BringMana-Self.ItemCount(ManaPotID)))+200)
sleep(math.random(300, 1000))
Self.SayToNpc("yes")
sleep(math.random(300, 1000))
Self.SayToNpc("balance")
setWalkerEnabled(true)
elseif (labelName == "Potions") then
setWalkerEnabled(false)
delayWalker(10000)
Self.SayToNpc("hi")
sleep(math.random(800, 1700))
Self.SayToNpc({"Hi", "flasks", "yes", "yes", "yes", "Trade"}, 65)
sleep(math.random(800, 1700))
Self.SayToNpc("trade")
sleep(math.random(2000, 2400))
Self.ShopBuyItem(ManaPotID, (BringMana-Self.ItemCount(ManaPotID)))
sleep(math.random(800, 1700))
setWalkerEnabled(true)
elseif (labelName == "resetbp") then
Walker.Stop()
Container.Close(GoldBP)
wait(1000)
Container.GetFirst():OpenChildren(GoldBP)
wait(1000)
Container.GetByName(GoldBP):Minimize()
if (HideEquipment) then
Client.HideEquipment()
wait(1000)
end
Walker.Start()
end
if (labelName == "door") then
setWalkerEnabled(false)
delayWalker(3000)
Self.OpenDoor(x, y, z)
wait(500, 1000)
setWalkerEnabled(true)
end
if (labelName == "door2") then
setWalkerEnabled(false)
delayWalker(3000)
Self.OpenDoor(x, y, z)
wait(500, 1000)
setWalkerEnabled(true)
end
end
---------------------------------------------------------------------------------------
function SellItems(item)
wait(300, 1700)
Self.ShopSellItem(item, Self.ShopGetItemSaleCount(item))
wait(900, 1200)
end
function BuyItems(item, count)
wait(900, 1200)
if (Self.ItemCount(item) < count) then
Self.ShopBuyItem(item, (count-Self.ItemCount(item)))
wait(200, 500)
end
end
Self.ReachDepot = function (tries)
local tries = tries or 5
Walker.Stop()
local DepotIDs = {3497, 3498, 3499, 3500}
local DepotPos = {}
for i = 1, #DepotIDs do
local dps = Map.GetUseItems(DepotIDs[i])
for j = 1, #dps do
table.insert(DepotPos, dps[j])
end
end
local function gotoDepot()
local pos = Self.Position()
print("Depots found: " .. tostring(#DepotPos))
for i = 1, #DepotPos do
location = DepotPos[i]
Self.UseItemFromGround(location.x, location.y, location.z)
wait(1000, 2000)
if Self.DistanceFromPosition(pos.x, pos.y, pos.z) >= 1 then
wait(5000, 6000)
if Self.DistanceFromPosition(location.x, location.y, location.z) == 1 then
Walker.Start()
return true
end
else
print("Something is blocking the path. Trying next depot.")
end
end
return false
end
repeat
reachedDP = gotoDepot()
if reachedDP then
return true
end
tries = tries - 1
sleep(100)
print("Attempt to reach depot was unsuccessfull. " .. tries .. " tries left.")
until tries <= 0
return false
end
Map.GetUseItems = function (id)
if type(id) == "string" then
id = Item.GetID(id)
end
local pos = Self.Position()
local store = {}
for x = -7, 7 do
for y = -5, 5 do
if Map.GetTopUseItem(pos.x + x, pos.y + y, pos.z).id == id then
itemPos = {x = pos.x + x, y = pos.y + y, z = pos.z}
table.insert(store, itemPos)
end
end
end
return store
end
Afromanz
02-16-2014, 12:41 AM
What's the error you receive ingame when executing the script?
Glowingstick
02-16-2014, 10:55 AM
Yeah the script kills itself, no error messages
shamdis
02-25-2014, 08:53 PM
No errors it just kill the script 1sec after i execute the script...
would be rly nice if someone know what the problem is, i could send the xbst file if needed but i dont think there is any problem with the xbst.
Spectrus
02-25-2014, 09:51 PM
I'd forgotten about this thread, sorry. Your script doesn't do anything, it just defines functions. You need to create an event listener. Add this line somewhere:
registerEventListener(WALKER_SELECTLABEL, "onWalkerSelectLabel")
Powered by vBulletin® Version 4.2.5 Copyright © 2025 vBulletin Solutions Inc. All rights reserved.