Results 1 to 8 of 8

Thread: Best way to refresh Setup?

  1. #1
    iBot User
    Join Date
    Sep 2012
    Posts
    239
    Mentioned
    10 Post(s)
    Tagged
    0 Thread(s)
    Quoted
    46 Post(s)
    Reputation
    23
    Rep Power
    5

    Best way to refresh Setup?

    I have a multi-vocation script but I need to find out how to refresh the Setup when switching chars, or else I'll die/the script will not work.

    How to do it?

    Also, help me with this if possible:

    PHP Code:
    local abc "Settings\\Alerts\\Creature\\xxx\\Count"

    setsettings(abc,"10"
    It works but with two constant errors showing up on Debug:

    01:27 : Game:HotKeyList:FindHotKeyText - System.NullReferenceException: Referência de objeto não definida para uma instância de um objeto.
    em LBk=.Xh0=.Yh0=(String Yx0=, HotkeySendAuto ZB0=)

    01:27 : CaveBot:LuaControl:SayKeys - System.NullReferenceException: Referência de objeto não definida para uma instância de um objeto.
    em ohM=.pxQ=.TRU=(String ThU=)
    Is there any other way to do this? I'm using the "abc" variable because I'll use the setsettings() function a lot, so I want to make it short.
    Last edited by john86; 01-17-2014 at 01:20 AM.

  2. #2
    Normal User blakw's Avatar
    Join Date
    Mar 2012
    Location
    www.blakw.com
    Posts
    815
    Mentioned
    221 Post(s)
    Tagged
    2 Thread(s)
    Quoted
    344 Post(s)
    Reputation
    462
    Rep Power
    10
    updateworld() - Synchronizes all actions of the bot with LUA system


    ------------------------------------Latest Releases:------------------------------------
    Vocations:
    Darashia Lions Rock
    Oramond Seacrest Serpents X1

    For a better iBot!

    (◣_◢)

  3. #3
    iBot User
    Join Date
    Sep 2012
    Posts
    239
    Mentioned
    10 Post(s)
    Tagged
    0 Thread(s)
    Quoted
    46 Post(s)
    Reputation
    23
    Rep Power
    5
    updateworld() does not refresh the Setup.

    Try this yourself: add print("Hello world") in your Setup, then close it. "Hello world" will appear in the Debug console, right? Every time you open and close the Setup, it will appear there. If you press the pause key twice with Tibia focused, "Hello world" will also appear there, meaning the Setup was refreshed, but doing this will refresh it only once.

    If you could discover a way to refresh the Setup any time I want, I would be very pleased.
    Last edited by john86; 01-17-2014 at 11:27 PM.

  4. #4
    iScripter Eli's Avatar
    Join Date
    Mar 2012
    Posts
    3,764
    Mentioned
    492 Post(s)
    Tagged
    2 Thread(s)
    Quoted
    955 Post(s)
    Reputation
    586
    Rep Power
    10
    At the moment it's not possible, that's true updateworld() doesn't refresh script setup, anyway soon updateworld() wont be needed for any action, jonatas already testing completly new LUA system, all variables there is with real time values

  5. #5
    iBot User
    Join Date
    Sep 2012
    Posts
    239
    Mentioned
    10 Post(s)
    Tagged
    0 Thread(s)
    Quoted
    46 Post(s)
    Reputation
    23
    Rep Power
    5
    Quote Originally Posted by Eli View Post
    At the moment it's not possible, that's true updateworld() doesn't refresh script setup, anyway soon updateworld() wont be needed for any action, jonatas already testing completly new LUA system, all variables there is with real time values
    Nice, could you ask him to make a function to refresh the Setup when needed? Tell him it's useful for multi-vocation scripts.

  6. #6
    Normal User Balbek's Avatar
    Join Date
    May 2012
    Location
    LDZ
    Posts
    554
    Mentioned
    6 Post(s)
    Tagged
    0 Thread(s)
    Quoted
    4 Post(s)
    Reputation
    84
    Rep Power
    6
    try disabling and enabling whole action section through setsettings()
    Last edited by Balbek; 01-19-2014 at 03:58 PM.

  7. #7
    iBot User
    Join Date
    Sep 2012
    Posts
    239
    Mentioned
    10 Post(s)
    Tagged
    0 Thread(s)
    Quoted
    46 Post(s)
    Reputation
    23
    Rep Power
    5
    Hey Balbek, I have tried that, it seems pretty intuitive, doesn't it? But it didn't work, unfortunately.
    Last edited by john86; 01-21-2014 at 12:20 AM.

  8. #8
    iBot User pink_panther's Avatar
    Join Date
    May 2012
    Location
    Australia
    Posts
    4,075
    Mentioned
    49 Post(s)
    Tagged
    1 Thread(s)
    Quoted
    178 Post(s)
    Reputation
    309
    Rep Power
    10
    Quote Originally Posted by john86 View Post
    I have a multi-vocation script but I need to find out how to refresh the Setup when switching chars, or else I'll die/the script will not work.

    How to do it?

    Also, help me with this if possible:

    PHP Code:
    local abc "Settings\\Alerts\\Creature\\xxx\\Count"

    setsettings(abc,"10"
    It works but with two constant errors showing up on Debug:



    Is there any other way to do this? I'm using the "abc" variable because I'll use the setsettings() function a lot, so I want to make it short.
    The errors are due to an issue with a hotkeym and another action in your cavebot wpts by the looks of it.

    just locate what action it is, run it over and over, isolating sections at a time to find where the error is.


    Regarding multi vocaton. A better way would be to not have anything in the setup that is vocation specific. HAve options that apply, but not directly referenced if you are not that vocation, so that the setup doesnt need to check your vocation.

    IE have settings in the setup for each vocation, but an action that changes your bot settings accordingly, depending on your vocation.
    Last edited by pink_panther; 01-21-2014 at 01:31 AM.

Posting Permissions

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