PDA

View Full Version : Is there any "Stop loot item X when cap is under Y"?



Hippipeace
06-09-2014, 02:22 PM
Tried to use the search bar abit, but didnt wanna find any of my key words.
So im asking here :>

First of all, i have 0 experience of knowledge of programming, so i have no idea how to add stuff if your just post a code :P


But yeah, i wanna stop loot gold when im under 100 cap..
Is it possible :)?

Thanks in advance!

Peace!

//Hippipeace

Fatality
06-09-2014, 03:37 PM
i think you would have to make 2 settings, one with looting gold and one without looting gold,then make it loadsettings without looting gold for just looter.
idk how to do it but i think it would owrk.

Hippipeace
06-09-2014, 03:50 PM
Idk either :P
But its accauly quite irritating that you need to leave some supplies at home to spare cap.
And if you have plenty of supplies, but out of cap due to gold. its just annoying to see him walk back :P

ppgab
06-09-2014, 03:57 PM
Tried to use the search bar abit, but didnt wanna find any of my key words.
So im asking here :>

First of all, i have 0 experience of knowledge of programming, so i have no idea how to add stuff if your just post a code :P

But yeah, i wanna stop loot gold when im under 100 cap..
Is it possible :)?

Thanks in advance!

Peace!

//Hippipeace


not so simply, what you can do is, have another xbst file that doesn't loot gold and then you can switch only the looter when your cap is below 100



local Mainfile = "insertname" -- name of the main file without .xbst in the end
local NoGoldFile = "insertname" -- name of the other file which doesn't loot gold

----------------------------

local MainLoaded = true

Module.New('Settings switcher', function(mod)
if Self.Cap() < 100 then
if MainLoaded then
loadSettings(NoGoldFile, 'Looter')
MainLoaded = false
end
elseif not MainLoaded then
loadSettings(MainFile, 'Looter')
MainLoaded = true
end
end)


you can paste this under any script

Hippipeace
06-09-2014, 04:12 PM
not so simply, what you can do is, have another xbst file that doesn't loot gold and then you can switch only the looter when your cap is below 100



local Mainfile = "insertname" -- name of the main file without .xbst in the end
local NoGoldFile = "insertname" -- name of the other file which doesn't loot gold

----------------------------

local MainLoaded = true

Module.New('Settings switcher', function(mod)
if Self.Cap() < 100 then
if MainLoaded then
loadSettings(NoGoldFile, 'Looter')
MainLoaded = false
end
elseif not MainLoaded then
loadSettings(MainFile, 'Looter')
MainLoaded = true
end
end)


you can paste this under any script


Thanks i will try this later :) just got home from work and smoked a bong...
So im trying to avoid potential "need to think" situations :P

But awesome dude :) Thanks!

Peace

//Hippipeace

darrickyoung
02-11-2016, 06:37 AM
I attempted to use this script. I placed 2 xbst script names where it is supposed to go and I am getting an error that reads:


Error:

01:36 You lose 5 hitpoints due to an attack by a crystal spider.
01:36 XenoScript Error:
Script: GOLD STOP CAP.lua
Line #: 8
Chunk: C:?Users?Darrick?DOCUME?1?XenoBot?Scripts??GOLDST? 1.LUA
Error: '(' expected near ')'
This is an error with user-input and should not be reported as a bug with XenoBot.


Script Text:

local Mainfile = "[ED] Formorgar Crystal Spiders.xbst" -- name of the main file without .xbst in the end
local NoGoldFile = "DROOD setup.xbst" -- name of the other file which doesn't loot gold

----------------------------

local MainLoaded = true

Module.New('Settings switcher', function(mod)
if Self.Cap() < 100 then
if MainLoaded then
loadSettings(NoGoldFile, 'Looter')
MainLoaded = false
end
elseif not MainLoaded then
loadSettings(MainFile, 'Looter')
MainLoaded = true
end
end

L!p3
02-12-2016, 10:53 AM
I attempted to use this script. I placed 2 xbst script names where it is supposed to go and I am getting an error that reads:


Error:

01:36 You lose 5 hitpoints due to an attack by a crystal spider.
01:36 XenoScript Error:
Script: GOLD STOP CAP.lua
Line #: 8
Chunk: C:?Users?Darrick?DOCUME?1?XenoBot?Scripts??GOLDST? 1.LUA
Error: '(' expected near ')'
This is an error with user-input and should not be reported as a bug with XenoBot.


Script Text:

local Mainfile = "[ED] Formorgar Crystal Spiders.xbst" -- name of the main file without .xbst in the end
local NoGoldFile = "DROOD setup.xbst" -- name of the other file which doesn't loot gold

----------------------------

local MainLoaded = true

Module.New('Settings switcher', function(mod)
if Self.Cap() < 100 then
if MainLoaded then
loadSettings(NoGoldFile, 'Looter')
MainLoaded = false
end
elseif not MainLoaded then
loadSettings(MainFile, 'Looter')
MainLoaded = true
end
end

local Mainfile = "[ED] Formorgar Crystal Spiders.xbst" -- name of the main file without .xbst in the end
local NoGoldFile = "DROOD setup.xbst" -- name of the other file which doesn't loot gold

----------------------------

local MainLoaded = true

Module.New('Settings switcher', function(mod)
if Self.Cap() < 100 then
if MainLoaded then
loadSettings(NoGoldFile, 'Looter')
MainLoaded = false
end
elseif not MainLoaded then
loadSettings(MainFile, 'Looter')
MainLoaded = true
end
mod:Delay(500)
end)

You forgot to copy the last ")".

darrickyoung
02-12-2016, 06:41 PM
Ok, thanks for the help. No I am getting another error. I created an identical .xbst file which had all the same loot items aside from gold. The two names of the .xbst files are :

1-[ED] Formorgar Crystal Spiders
2-Formorgar Crystal Spiders No Gold

Attached is the script, which i have copied and pasted into here from the notepad ++:

SCRIPT:

local Mainfile = "[ED] Formorgar Crystal Spiders" -- name of the main file without .xbst in the end
local NoGoldFile = "Formorgar Crystal Spiders No Gold" -- name of the other file which doesn't loot gold

----------------------------

local MainLoaded = true

Module.New('Settings switcher', function(mod)
if Self.Cap() < 100 then
if MainLoaded then
loadSettings(NoGoldFile, 'Looter')
MainLoaded = false
end
elseif not MainLoaded then
loadSettings(MainFile, 'Looter')
MainLoaded = true
end
end)


Now, I am getting an error that states:

13:35 XenoBot: File not found C:\Users\darri\Documents\XenoBot\Settings\\0.xbst

If someone could please help, I would be very appreciative. Thank you, kindly.

L!p3
02-12-2016, 08:16 PM
local MainFile = "[ED] Formorgar Crystal Spiders" -- name of the main file without .xbst in the end
local NoGoldFile = "Formorgar Crystal Spiders No Gold" -- name of the other file which doesn't loot gold

----------------------------

local MainLoaded = true

Module.New('Settings switcher', function(mod)
if Self.Cap() < 100 then
if MainLoaded then
loadSettings(NoGoldFile, 'Looter')
MainLoaded = false
end
elseif not MainLoaded then
loadSettings(MainFile, 'Looter')
MainLoaded = true
end
end)

darrickyoung
02-15-2016, 09:18 PM
This script is not working, i tried adding it to an existing lua and it is not stopping gold dropping. Can someone please help me...

shadowart
02-16-2016, 01:22 AM
There is nothing in that script that is related to gold dropping. Your error lies elsewhere.

darrickyoung
02-16-2016, 04:06 PM
bump, bump