yompa93
04-07-2016, 07:40 AM
Hello!
I've been botting all night long on 3 accounts and had this weird problem.
I was using one of "my own" creations using complex scripts library and some code from sLib(ShadowArts library)
What happened was that i got the message "server not responding" even though everything was moving in the background, seeing myself getting killed. The message was popping up repeatedly giving me no choice but to restart the client. This happened on 2 accounts simultaneously, both running on the scripts i cooked together whilst the third one running on one of the free scripts from xeno was stuck on nothing, just had to move it a square and it was okay :confused:
This is the .lua, i made some of the code myself and wouldnt be surprised if i did something weird :rolleyes:
dofile('cslib.lua')
--========Backpacks====================--
mainBP = "Backpack of holding"
stackBP = "Zaoan Chess box"
lootBP = "Jewelled backpack"
goldBP = "Golden backpack"
--====Pots====--
mPots = "Mana Potion" -- Mana pots to bring
hPots = "Great Health Potion" -- Health pots to bring
maxMP = 1000 -- How many manas to bring
minMP = 150 -- How many manas to leave
maxHP = 50 -- How many health pots to bring
minHP = 10 -- How many health pots to leave
runes = "great fireball rune"
buyRunes = "great fireball rune"
maxRune = 50
ManaToLeave = 60 -- Manas to leave function, Will leave from anywhere in the cave. Only relevant if LeaveFromAnywhere~ is true.
LeaveFromAnywhereBeforePots = true -- Want to leave from anywhere in the cave when pots run low?
--====Other====--
minCap = 100 -- Cap to leave.
extraCash = 0 -- Extra cash to withdraw just in case.
staminaLogout = true -- logout at chosen amount of stamina.
StaminaToLogout = 16 -- How much stamina to logout in hours.
DropVialsAtCap = 150 -- Drop vials? 0 if not.
screenShot = false -- Take Screenshot at level?
bpReopen = true -- open backpacks after ss/kick ?
manaRestore = false -- Fill up your mana to 90% when no creatures nearby?
useHasteToSpawn = true -- Use haste to and from spawn?
--====Trainers====--
Trainers = true -- Wanna go to trainers when logging out?
local Sword = true -- if Trainers, go to Sword trainer
local Axe = false -- if Trainers, go to Axe trainer
local Club = false -- if Trainers, go to Club trainer
local Distance = false -- if Trainers, go to Distance trainer
local Magic = false -- if Trainers, go to Magic trainer
--====SS====--
LeaveFromAnywhereBeforeSS = true -- true/false. true if you want the bot to leave from anywhere in the cave.
leaveMinutesBeforeSS = 30 -- Leaving from anywhere in the cave at chosen amount of minutes before SS.
LogoutMinutesBeforeSS = 60 -- Logs out before SS at chosen amount of minutes before SS. In depot.
ssTime = 10 -- The time of SS in your country.
Looter.Start()
Targeting.Start()
registerEventListener(WALKER_SELECTLABEL, "onLabel")
print("Script started successfully. Have fun!")
--====FUNCTIONS====--
function onLabel(label)
if (label == "Backpacks") then
CS.OpenBackpacks()
elseif (label == "Deposit") then
-- non stackables
Self.DepositItems({3069, 0}, {3039, 0}, {12306, 0}, {8531, 0}, {5668, 0}, {3079, 0}, {8045, 0}, {3070, 0}, {3324, 0}, {3037, 0}, {6299, 0}, {3071, 0}, {12320, 0}, {3061, 0}, {811, 0}, {3098, 0}, {3567, 0}, {3081, 0}, {820, 0}, {3435, 0}, {3055, 0}, {12304, 0}, {8073, 0}, {7456, 0}, {8082, 0}, {8074, 0}, {3434, 0}, {3284, 0}, {3010, 0}, {8076, 0}, {7416, 0})
-- stackables
Self.DepositItems({5905, 1}, {11449, 1}, {3027, 1}, {3026, 1}, {9685, 1}, {8192, 1}, {18924, 1}, {3030, 1}, {18927, 1}, {5911, 1}, {18925, 1}, {18928, 1}, {18929, 1}, {10320, 1}, {18926, 1}, {18930, 1}, {237, 1}, {5909, 1}, {9057, 1}, {3032, 1}, {11446, 1}, {10420, 1}, {10316, 1}, {3155, 1}, {11493, 1})
elseif (label == "Stamina") then
StaminaLog()
local outOfTime = (LogoutMinutesBeforeSS and timeToSS() < LogoutMinutesBeforeSS)
if outOfTime then
if Trainers == true then
Walker.Goto("Trainers")
else
os.exit()
end
end
elseif (label == "Bank") then
CS.Bank()
elseif (label == "BuySupplies") then
CS.BuySupplies()
elseif (label == "ReachTrainers") then
Walker.Stop()
if Sword == true then
Self.UseItemFromGround(33238, 32407, 7)
elseif Axe == true then
Self.UseItemFromGround(33241, 32407, 7)
elseif Magic == true then
Self.UseItemFromGround(33237, 32411, 7)
elseif Club == true then
Self.UseItemFromGround(33239, 32411, 7)
elseif Distance == true then
Self.UseItemFromGround(33241, 32411, 7)
end
elseif (label == "DoorNorth") then
CS.OpenDoor("NORTH")
elseif (label == "DoorSouth") then
CS.OpenDoor("SOUTH")
elseif (label == "DoorWest") then
CS.OpenDoor("WEST")
elseif (label == "DoorEast") then
CS.OpenDoor("EAST")
elseif (label == "StepNorth") then
Self.Step(NORTH)
elseif (label == "StepSouth") then
Self.Step(SOUTH)
elseif (label == "StepWest") then
Self.Step(WEST)
elseif (label == "StepEast") then
Self.Step(EAST)
elseif (label == "PreCheck1") then
Walker.ConditionalGoto((Self.ItemCount(Item.GetID( mPots)) < maxMP) or (Self.ItemCount(Item.GetID(hPots)) < maxHP) or (Self.ItemCount(Item.GetID(runes)) < maxRune), "ContinueSupply1", "ToHunt")
elseif (label == "PreCheck2") then
Walker.ConditionalGoto((Self.ItemCount(Item.GetID( mPots)) < maxMP) or (Self.ItemCount(Item.GetID(hPots)) < maxHP) or (Self.ItemCount(Item.GetID(runes)) < maxRune), "ContinueSupply2", "ToHunt")
elseif(label == "Check") then
local outOfTime = (LogoutMinutesBeforeSS and timeToSS() < LogoutMinutesBeforeSS)
Walker.ConditionalGoto((Self.ItemCount(Item.GetID( mPots)) <= minMP) or (Self.ItemCount(Item.GetID(hPots)) <= minHP) or outOfTime or (Self.Cap() <= minCap), "Leave", "Continue")
elseif(label == "Check1") then
Walker.ConditionalGoto((Self.ItemCount(Item.GetID( mPots)) <= minMP) or (Self.Cap() <= minCap), "Leave1", "Continue1")
elseif(label == "Check2") then
Walker.ConditionalGoto((Self.ItemCount(Item.GetID( mPots)) <= minMP) or (Self.Cap() <= minCap), "Leave2", "Continue2")
elseif(label == "Check3") then
Walker.ConditionalGoto((Self.ItemCount(Item.GetID( mPots)) <= minMP) or (Self.Cap() <= minCap), "Leave3", "Continue3")
elseif (label == "ToHunt") then
LoadSettings(otherXbst, "Targeting")
if LeaveFromAnywhereBeforeSS then
BeforeSS = true
else
BeforeSS = false
end
if LeaveFromAnywhereBeforePots then
BeforePots = true
else
BeforePots = false
end
if useHasteToSpawn then
LoadSettings(otherXbst, "Condition Manager")
end
elseif (label == "Leave") then
LoadSettings(otherXbst, "Targeting")
if useHasteToSpawn then
LoadSettings(otherXbst, "Condition Manager")
end
elseif (label == "ReachHunt") then
LoadSettings(mainXbst, "Targeting")
LoadSettings(mainXbst, "Condition Manager")
elseif (label == "Start") then
LoadSettings(mainXbst, "Condition Manager")
end
end
mainXbst = "[Knight] Drefia Vampires"
otherXbst = "[Other] Drefia Vampires"
function LoadSettings(file, panel)
loadSettings(file, panel)
wait(0)
end
Module.New('LeaveBeforePots', function()
local outOfPots = (Self.ItemCount(mPots) < ManaToLeave)
if outOfPots and BeforePots and Self.Position().z == 13 then
print("Getting low on pots, leaving..")
BeforePots = false
Walker.Goto("Leave")
end
end)
--====VialDropper====--
Module.New('DropVials', function()
if Self.Cap() < DropVialsAtCap then
pos = Self.Position()
Self.DropFlasks(pos.x, pos.y, pos.z)
end
end)
--====SSlogout====--
function timeToSS()
if ssTime then
local nowDate = os.date("*t")
local now = os.time(nowDate)
local ss = os.time{year = nowDate.year, month = nowDate.month, day = nowDate.day, hour = ssTime}
return (os.difftime(ss, now) / 60) % (24*60)
else
return 9999
end
end
StaminaLog = function ()
if (staminaLogout) and (Self.Stamina() < StaminaToLogout*60) then
if Trainers == true then
Walker.Goto("Trainers")
else
os.exit()
end
end
end
Module.New('LeaveBeforeSS', function()
local outOfTimeAtHunt = (timeToSS() < leaveMinutesBeforeSS)
if BeforeSS and outOfTimeAtHunt and Self.Position().z == 13 then
print("Getting close to SS, leaving..")
Walker.Goto("Leave")
BeforeSS = false
end
end)
--========MODULES========================--
if bpReopen then
Module.Start('BP_Reconnect')
end
if dropVials then
Module.Start('Drop_Vials')
end
if screenShot then
Module.Start('Screenshot')
end
if manaRestore then
Module.Start('Mana_Restore')
end
I've been botting all night long on 3 accounts and had this weird problem.
I was using one of "my own" creations using complex scripts library and some code from sLib(ShadowArts library)
What happened was that i got the message "server not responding" even though everything was moving in the background, seeing myself getting killed. The message was popping up repeatedly giving me no choice but to restart the client. This happened on 2 accounts simultaneously, both running on the scripts i cooked together whilst the third one running on one of the free scripts from xeno was stuck on nothing, just had to move it a square and it was okay :confused:
This is the .lua, i made some of the code myself and wouldnt be surprised if i did something weird :rolleyes:
dofile('cslib.lua')
--========Backpacks====================--
mainBP = "Backpack of holding"
stackBP = "Zaoan Chess box"
lootBP = "Jewelled backpack"
goldBP = "Golden backpack"
--====Pots====--
mPots = "Mana Potion" -- Mana pots to bring
hPots = "Great Health Potion" -- Health pots to bring
maxMP = 1000 -- How many manas to bring
minMP = 150 -- How many manas to leave
maxHP = 50 -- How many health pots to bring
minHP = 10 -- How many health pots to leave
runes = "great fireball rune"
buyRunes = "great fireball rune"
maxRune = 50
ManaToLeave = 60 -- Manas to leave function, Will leave from anywhere in the cave. Only relevant if LeaveFromAnywhere~ is true.
LeaveFromAnywhereBeforePots = true -- Want to leave from anywhere in the cave when pots run low?
--====Other====--
minCap = 100 -- Cap to leave.
extraCash = 0 -- Extra cash to withdraw just in case.
staminaLogout = true -- logout at chosen amount of stamina.
StaminaToLogout = 16 -- How much stamina to logout in hours.
DropVialsAtCap = 150 -- Drop vials? 0 if not.
screenShot = false -- Take Screenshot at level?
bpReopen = true -- open backpacks after ss/kick ?
manaRestore = false -- Fill up your mana to 90% when no creatures nearby?
useHasteToSpawn = true -- Use haste to and from spawn?
--====Trainers====--
Trainers = true -- Wanna go to trainers when logging out?
local Sword = true -- if Trainers, go to Sword trainer
local Axe = false -- if Trainers, go to Axe trainer
local Club = false -- if Trainers, go to Club trainer
local Distance = false -- if Trainers, go to Distance trainer
local Magic = false -- if Trainers, go to Magic trainer
--====SS====--
LeaveFromAnywhereBeforeSS = true -- true/false. true if you want the bot to leave from anywhere in the cave.
leaveMinutesBeforeSS = 30 -- Leaving from anywhere in the cave at chosen amount of minutes before SS.
LogoutMinutesBeforeSS = 60 -- Logs out before SS at chosen amount of minutes before SS. In depot.
ssTime = 10 -- The time of SS in your country.
Looter.Start()
Targeting.Start()
registerEventListener(WALKER_SELECTLABEL, "onLabel")
print("Script started successfully. Have fun!")
--====FUNCTIONS====--
function onLabel(label)
if (label == "Backpacks") then
CS.OpenBackpacks()
elseif (label == "Deposit") then
-- non stackables
Self.DepositItems({3069, 0}, {3039, 0}, {12306, 0}, {8531, 0}, {5668, 0}, {3079, 0}, {8045, 0}, {3070, 0}, {3324, 0}, {3037, 0}, {6299, 0}, {3071, 0}, {12320, 0}, {3061, 0}, {811, 0}, {3098, 0}, {3567, 0}, {3081, 0}, {820, 0}, {3435, 0}, {3055, 0}, {12304, 0}, {8073, 0}, {7456, 0}, {8082, 0}, {8074, 0}, {3434, 0}, {3284, 0}, {3010, 0}, {8076, 0}, {7416, 0})
-- stackables
Self.DepositItems({5905, 1}, {11449, 1}, {3027, 1}, {3026, 1}, {9685, 1}, {8192, 1}, {18924, 1}, {3030, 1}, {18927, 1}, {5911, 1}, {18925, 1}, {18928, 1}, {18929, 1}, {10320, 1}, {18926, 1}, {18930, 1}, {237, 1}, {5909, 1}, {9057, 1}, {3032, 1}, {11446, 1}, {10420, 1}, {10316, 1}, {3155, 1}, {11493, 1})
elseif (label == "Stamina") then
StaminaLog()
local outOfTime = (LogoutMinutesBeforeSS and timeToSS() < LogoutMinutesBeforeSS)
if outOfTime then
if Trainers == true then
Walker.Goto("Trainers")
else
os.exit()
end
end
elseif (label == "Bank") then
CS.Bank()
elseif (label == "BuySupplies") then
CS.BuySupplies()
elseif (label == "ReachTrainers") then
Walker.Stop()
if Sword == true then
Self.UseItemFromGround(33238, 32407, 7)
elseif Axe == true then
Self.UseItemFromGround(33241, 32407, 7)
elseif Magic == true then
Self.UseItemFromGround(33237, 32411, 7)
elseif Club == true then
Self.UseItemFromGround(33239, 32411, 7)
elseif Distance == true then
Self.UseItemFromGround(33241, 32411, 7)
end
elseif (label == "DoorNorth") then
CS.OpenDoor("NORTH")
elseif (label == "DoorSouth") then
CS.OpenDoor("SOUTH")
elseif (label == "DoorWest") then
CS.OpenDoor("WEST")
elseif (label == "DoorEast") then
CS.OpenDoor("EAST")
elseif (label == "StepNorth") then
Self.Step(NORTH)
elseif (label == "StepSouth") then
Self.Step(SOUTH)
elseif (label == "StepWest") then
Self.Step(WEST)
elseif (label == "StepEast") then
Self.Step(EAST)
elseif (label == "PreCheck1") then
Walker.ConditionalGoto((Self.ItemCount(Item.GetID( mPots)) < maxMP) or (Self.ItemCount(Item.GetID(hPots)) < maxHP) or (Self.ItemCount(Item.GetID(runes)) < maxRune), "ContinueSupply1", "ToHunt")
elseif (label == "PreCheck2") then
Walker.ConditionalGoto((Self.ItemCount(Item.GetID( mPots)) < maxMP) or (Self.ItemCount(Item.GetID(hPots)) < maxHP) or (Self.ItemCount(Item.GetID(runes)) < maxRune), "ContinueSupply2", "ToHunt")
elseif(label == "Check") then
local outOfTime = (LogoutMinutesBeforeSS and timeToSS() < LogoutMinutesBeforeSS)
Walker.ConditionalGoto((Self.ItemCount(Item.GetID( mPots)) <= minMP) or (Self.ItemCount(Item.GetID(hPots)) <= minHP) or outOfTime or (Self.Cap() <= minCap), "Leave", "Continue")
elseif(label == "Check1") then
Walker.ConditionalGoto((Self.ItemCount(Item.GetID( mPots)) <= minMP) or (Self.Cap() <= minCap), "Leave1", "Continue1")
elseif(label == "Check2") then
Walker.ConditionalGoto((Self.ItemCount(Item.GetID( mPots)) <= minMP) or (Self.Cap() <= minCap), "Leave2", "Continue2")
elseif(label == "Check3") then
Walker.ConditionalGoto((Self.ItemCount(Item.GetID( mPots)) <= minMP) or (Self.Cap() <= minCap), "Leave3", "Continue3")
elseif (label == "ToHunt") then
LoadSettings(otherXbst, "Targeting")
if LeaveFromAnywhereBeforeSS then
BeforeSS = true
else
BeforeSS = false
end
if LeaveFromAnywhereBeforePots then
BeforePots = true
else
BeforePots = false
end
if useHasteToSpawn then
LoadSettings(otherXbst, "Condition Manager")
end
elseif (label == "Leave") then
LoadSettings(otherXbst, "Targeting")
if useHasteToSpawn then
LoadSettings(otherXbst, "Condition Manager")
end
elseif (label == "ReachHunt") then
LoadSettings(mainXbst, "Targeting")
LoadSettings(mainXbst, "Condition Manager")
elseif (label == "Start") then
LoadSettings(mainXbst, "Condition Manager")
end
end
mainXbst = "[Knight] Drefia Vampires"
otherXbst = "[Other] Drefia Vampires"
function LoadSettings(file, panel)
loadSettings(file, panel)
wait(0)
end
Module.New('LeaveBeforePots', function()
local outOfPots = (Self.ItemCount(mPots) < ManaToLeave)
if outOfPots and BeforePots and Self.Position().z == 13 then
print("Getting low on pots, leaving..")
BeforePots = false
Walker.Goto("Leave")
end
end)
--====VialDropper====--
Module.New('DropVials', function()
if Self.Cap() < DropVialsAtCap then
pos = Self.Position()
Self.DropFlasks(pos.x, pos.y, pos.z)
end
end)
--====SSlogout====--
function timeToSS()
if ssTime then
local nowDate = os.date("*t")
local now = os.time(nowDate)
local ss = os.time{year = nowDate.year, month = nowDate.month, day = nowDate.day, hour = ssTime}
return (os.difftime(ss, now) / 60) % (24*60)
else
return 9999
end
end
StaminaLog = function ()
if (staminaLogout) and (Self.Stamina() < StaminaToLogout*60) then
if Trainers == true then
Walker.Goto("Trainers")
else
os.exit()
end
end
end
Module.New('LeaveBeforeSS', function()
local outOfTimeAtHunt = (timeToSS() < leaveMinutesBeforeSS)
if BeforeSS and outOfTimeAtHunt and Self.Position().z == 13 then
print("Getting close to SS, leaving..")
Walker.Goto("Leave")
BeforeSS = false
end
end)
--========MODULES========================--
if bpReopen then
Module.Start('BP_Reconnect')
end
if dropVials then
Module.Start('Drop_Vials')
end
if screenShot then
Module.Start('Screenshot')
end
if manaRestore then
Module.Start('Mana_Restore')
end