XenoBot Forums - Powered by vBulletin

User Tag List

Page 1 of 2 12 LastLast
Results 1 to 10 of 12

Thread: Is there any "Stop loot item X when cap is under Y"?

  1. #1
    Banned
    Join Date
    May 2014
    Posts
    43
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Is there any "Stop loot item X when cap is under Y"?

    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

  2. #2
    Queen Fatality Fatality's Avatar
    Join Date
    Mar 2014
    Location
    Canada
    Posts
    754
    Mentioned
    83 Post(s)
    Tagged
    1 Thread(s)
    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.

  3. #3
    Banned
    Join Date
    May 2014
    Posts
    43
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    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

  4. #4
    Senior Member ppgab's Avatar
    Join Date
    Mar 2014
    Location
    Brazil
    Posts
    986
    Mentioned
    86 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by Hippipeace View Post
    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

    lua code:


    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

  5. #5
    Banned
    Join Date
    May 2014
    Posts
    43
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by ppgab View Post
    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

    lua code:


    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

  6. #6

    Join Date
    Oct 2015
    Posts
    11
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    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

  7. #7
    Lifetime Subscriber L!p3's Avatar
    Join Date
    Dec 2011
    Location
    Brazil
    Posts
    157
    Mentioned
    6 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by darrickyoung View Post
    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


    lua code:
    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 ")".
    Last edited by L!p3; 02-12-2016 at 10:57 AM.

  8. #8

    Join Date
    Oct 2015
    Posts
    11
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    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.

  9. #9
    Lifetime Subscriber L!p3's Avatar
    Join Date
    Dec 2011
    Location
    Brazil
    Posts
    157
    Mentioned
    6 Post(s)
    Tagged
    0 Thread(s)
    lua code:
    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)

  10. #10

    Join Date
    Oct 2015
    Posts
    11
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    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...

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •