XenoBot Forums - Powered by vBulletin

User Tag List

Page 2 of 2 FirstFirst 12
Results 11 to 19 of 19

Thread: call a variable that is stored on a .lua file

  1. #11

    Join Date
    Feb 2013
    Location
    brazil
    Posts
    112
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    yes, just tried both ways.. even calling a variable GLOBAL
    said no one ever

  2. #12

    Join Date
    Feb 2013
    Location
    brazil
    Posts
    112
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    yes i have no idea what is going on over here
    said no one ever

  3. #13

    Join Date
    Feb 2013
    Location
    brazil
    Posts
    112
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    i'm using windows 7 and runing bot as admin right now:


    my .lua file:
    lua code:

    leaveHP = 10 -- set how much healths to leave
    BuyHP = 40 -- set how much healths to buy
    prieceHP = 100 -- set the priece of the potion [45 normal, 100 strong, 190 great, 310 ultimate]
    itemHP = 236 -- set the item ID of the potion [266 to normal, 236 to strong]
    --Mana potions
    leaveMP = 20 -- set how much manas to leave
    BuyMP = 100 -- set how much manas to buy
    prieceMP = 50 -- set the priece of the potion [50 normal, 80 strong]
    itemMP = 268 -- set the item ID of the potion [238 to normal]
    --General
    LeaveCap = 20 -- set the cap to leave the cave


    also i have these one liners for the instance:
    lua code:

    Self.SayToNpc({'hi', 'ticket', 'yes', 'deposit all', 'yes'}, 65) wait(1700) Self.SayToNpc({'withdraw'.. ((BuyHP-Self.ItemCount(itemHP))*prieceHP)+((BuyMP-Self.ItemCount(itemMP))*prieceMP)}) wait(500) Self.SayToNpc({'yes'}, 65)
    lua code:

    Walker.Stop() Creature.Follow('Sigurd') wait(4000) Self.SayToNpc({'hi', 'vials', 'yes', 'trade'}, 65) wait(2000) Self.ShopBuyItemsUpTo(itemMP, buyMP) wait(1600) Self.ShopBuyItemsUpTo(itemHP, buyHP) wait(1600) Walker.Start()
    ]lua code:

    dofile('forgee.lua') Self.ReachDepot() wait(500) Self.DepositItems(9689,8031,10275,9692,5894,11485,5880)



    btw everytime i load the kazzsetings.lua it auto closes itself. its happening to every file i make. but if i copy the settings with the same text from a file made from other it work. i'm using sublime.
    Last edited by icaro43; 03-03-2013 at 12:52 PM. Reason: kewl stuff
    said no one ever

  4. #14

    Join Date
    Feb 2013
    Location
    brazil
    Posts
    112
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    i'm gettin really mad a this lol been working on this like 3 hours before the ss
    said no one ever

  5. #15

    Join Date
    Feb 2013
    Location
    brazil
    Posts
    112
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    yes i did it, sorry i just sent you the older scripts, but even with the dofile in the front it wasn't working :/
    said no one ever

  6. #16

    Join Date
    Feb 2013
    Location
    brazil
    Posts
    112
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    i will try to reinstall the bot because i switched to "label way" to make things happen and this is what i have
    this is not working to me. when i load the script it closes automatic and i don't get any bug error.

    lua code:

    -- Buy Potions?
    local BuyPots = true -- Set to false if you don't want to buy potions.
    -- Potion Config
    local MinPotion = 5 -- Potions to deposit on.
    local MaxPotion = 30 -- Amount of Potions to buy.
    local PotionID = 266 -- ID of Potions.
    local PotionPrice = 45 -- How much Potions cost.
    --General
    local MinCap = 20 -- Cap to deposit.

    -----------
    dofile('forgee.lua')


    function onWalkerSelectLabel(labelName)
    if (labelName == "Bank") then
    Self.SayToNpc({"hi", "ticket", "yes", "deposit all", "yes"}, 65)
    wait(1700)
    Self.SayToNpc({"withdraw".. ((BuyHP-Self.ItemCount(itemHP))*prieceHP)+((BuyMP-Self.ItemCount(itemMP))*prieceMP)}) wait(500) Self.SayToNpc({'yes'}, 65)
    elseif (labelName == "depot") then
    Self.ReachDepot()
    wait(500)
    Self.DepositItems(9689,8031,10275,9692,5894,11485,5880)
    elseif (labelname == "BuyPots") then
    Walker.Stop()
    Creature.Follow("Sigurd")
    wait(4000) Self.SayToNpc({"hi", "vials", "yes", "trade"}, 65)
    wait(2000) Self.ShopBuyItemsUpTo(itemMP, buyMP)
    wait(1600) Self.ShopBuyItemsUpTo(itemHP, buyHP)
    wait(1600) Walker.Start()
    end
    end
    said no one ever

  7. #17

    Join Date
    Jan 2012
    Location
    Brasil
    Posts
    318
    Mentioned
    5 Post(s)
    Tagged
    0 Thread(s)
    Where is "BuyHp" declared? Is it a built in function?
    Is it really supposed to be "priece" or instead price?
    It seems as if you need to add lua code:
    registerEventListener(WALKER_SELECTLABEL, "onWalkerSelectLabel")
    after the original dofile.

  8. #18

    Join Date
    Feb 2013
    Location
    brazil
    Posts
    112
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by SamDaMan View Post
    Where is "BuyHp" declared? Is it a built in function?
    Is it really supposed to be "priece" or instead price?
    It seems as if you need to add lua code:
    registerEventListener(WALKER_SELECTLABEL, "onWalkerSelectLabel")
    after the original dofile.
    a) yes as i said it was the older script i have the new with the typos fixed and with dofile() before every cavebot action
    b) yea that might work i will test this out
    said no one ever

  9. #19

    Join Date
    Feb 2013
    Location
    brazil
    Posts
    112
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    so the
    lua code:
    registerEventListener(WALKER_SELECTLABEL, "onWalkerSelectLabel") 

    kept the .lua file open. and working on LABEL MODE.

    if i want to work on one-liner script mode how do i make to keep this open? \/

    lua code:

    -- Buy Potions?
    BuyPots = true -- Set to false if you don't want to buy potions.
    -- Potion Config
    MinPotion = 5 -- Potions to deposit on.
    MaxPotion = 30 -- Amount of Potions to buy.
    PotionID = 266 -- ID of Potions.
    PotionPrice = 45 -- How much Potions cost.
    --General
    MinCap = 20 -- Cap to deposit.

    said no one ever

Posting Permissions

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