Signup Now
Page 1 of 2 12 LastLast
Results 1 to 10 of 11
  1. #1
    Free User
    Join Date
    Nov 2014
    Posts
    21
    Reputation
    10
    Rep Power
    0

    Check $settingsname

    Hello, function that would be very usefull, get the current $settingsname.

  2. #2
    Wind Powered Zen's Avatar
    Join Date
    Dec 2013
    Location
    Rio de Janeiro
    Posts
    196
    Reputation
    14
    Rep Power
    25
    Why do you need it? When you gonna use this? To get script name? to get script dir?
    If so, you can use $curscript

    This image is hosted on a possibly dangerous website (http://www.codeivate.com/users/zen/signature.jpg). Please consider reuploading it on Imgur.com.


  3. #3
    Moderator Raphael's Avatar
    Join Date
    Dec 2013
    Location
    raphseller.com
    Posts
    2,437
    Reputation
    309
    Rep Power
    32
    Quote Originally Posted by Zen View Post
    Why do you need it? When you gonna use this? To get script name? to get script dir?
    If so, you can use $curscript
    $curscript actually points to the current hotkey/hud, not the .xml file.

  4. #4
    Wind Powered Zen's Avatar
    Join Date
    Dec 2013
    Location
    Rio de Janeiro
    Posts
    196
    Reputation
    14
    Rep Power
    25
    Quote Originally Posted by Raphael View Post
    $curscript actually points to the current hotkey/hud, not the .xml file.
    Yes, i know. I just don't know why he needs $settingsname.
    If he needs what the script name or what is running it, he can use $curscript.

    This image is hosted on a possibly dangerous website (http://www.codeivate.com/users/zen/signature.jpg). Please consider reuploading it on Imgur.com.


  5. #5
    Free User KrusT's Avatar
    Join Date
    Jul 2014
    Posts
    332
    Reputation
    15
    Rep Power
    24
    Quote Originally Posted by Zen View Post
    Yes, i know. I just don't know why he needs $settingsname.
    If he needs what the script name or what is running it, he can use $curscript.
    he want for hunt in the same account different vocations and lvls, each char log one script.

    $curscript dont have possibility to check which cavebot are running for change when stamina over and log another char

  6. #6
    Moderator RoxZin xD's Avatar
    Join Date
    Dec 2013
    Location
    Rio de Janeiro
    Posts
    4,911
    Reputation
    109
    Rep Power
    35
    Set the script name on user options and use getuseroption('scriptname')



    Troubled Animals Quest [100+]
    ALL
    Feyrist Animals Surface [160+]
    RP
    Feyrist Silencers Underground X1 [180+]
    RP | EK
    Feyrist Silencers Underground X2 [200+]
    RP | EK
    Feyrist Silencers Surface [210+]
    RP | EK
    Rathleton Sewers [240+]
    RP
    Glooth Fairy [350+]
    ED/MS
    Hardcore Draken Walls [400+]
    EK

  7. #7
    Free User
    Join Date
    Nov 2014
    Posts
    21
    Reputation
    10
    Rep Power
    0
    Will try that RoxZin xD.

  8. #8
    Free User
    Join Date
    Nov 2014
    Posts
    21
    Reputation
    10
    Rep Power
    0
    PHP Code:
    if $name == 'x' and  getuseroption('settings') ~= ('Knight rotworm.xml'then
    loadsettings
    ('Knight Rotworm.xml')
    end

    if $name == 'y' and  getuseroption('settings') ~= ('testing ghost pal.xml'then
    loadsettings
    ('testing ghost pal.xml')
    end

    if $name == 'z' and  getuseroption('settings') ~= ('Knight Bas.xml'then
    loadsettings
    ('Knight Bas.xml')
    end 
    works same as loadsettings with name check no diffrence infinite loop

  9. #9
    Free User
    Join Date
    Nov 2014
    Posts
    21
    Reputation
    10
    Rep Power
    0
    After some testing soemtimes it works sometimes settings dont change, sometimes persistent scvript dont load at all and sometimes cavebot user options changes. I tried forlong time to set this becasue i dont want supervise my accounts every day, more like every weekend, this $checksettings function be realy useful for people who have difrent vocations and want run difrent settings for each character without supervising every day.

  10. #10
    Moderator RoxZin xD's Avatar
    Join Date
    Dec 2013
    Location
    Rio de Janeiro
    Posts
    4,911
    Reputation
    109
    Rep Power
    35
    @Longerion you're using it wrong. Did you make an option called 'settings' or what? Also, it should be different all the time because it won't return the value inside ().

    What I told you to do was: On all your scripts, add on the user options something like this:

    {
    "type" : "scriptinfo",
    "name" : "EK - Banuta"
    }


    Then, you check the script name with getuseroption('scriptname'), like this. It will return EK - Banuta when you try to get it. In your case, it should be something like this:

    if $name == 'x' and getuseroption('scriptname') ~= 'Knight rotworm' then 
    loadsettings('Knight Rotworm.xml')
    elseif $name == 'y' and getuseroption('scriptname') ~= 'testing ghost pal' then
    loadsettings('testing ghost pal.xml')
    elseif $name == 'z' and getuseroption('scriptname') ~= 'Knight Bas.xml' then
    loadsettings('Knight Bas.xml')
    end



    Troubled Animals Quest [100+]
    ALL
    Feyrist Animals Surface [160+]
    RP
    Feyrist Silencers Underground X1 [180+]
    RP | EK
    Feyrist Silencers Underground X2 [200+]
    RP | EK
    Feyrist Silencers Surface [210+]
    RP | EK
    Rathleton Sewers [240+]
    RP
    Glooth Fairy [350+]
    ED/MS
    Hardcore Draken Walls [400+]
    EK

 

 

Posting Permissions

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