Results 1 to 6 of 6

Thread: Help me please with setsettings().

  1. #1
    iBot User
    Join Date
    Apr 2012
    Location
    Poland
    Posts
    21
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quoted
    1 Post(s)
    Reputation
    10
    Rep Power
    5

    Help me please with setsettings().

    I have it.

    PHP Code:
    local ITEMS = {"halberd")

    if 
    x<cap then
    setsettings
    ("Settings\\Looting\\List"ITEMS[0]"\\Destination","ground")
    end 
    What to do to set settings item from table loot destination using name from table "ITEMS"?

    I want change current loot destination to "ground" using setsettings() function?

    Thx for help

  2. #2
    Normal User RafiXWPT's Avatar
    Join Date
    Jun 2012
    Location
    (Poland) http://rafixwptscripts.com
    Posts
    1,602
    Mentioned
    31 Post(s)
    Tagged
    1 Thread(s)
    Quoted
    128 Post(s)
    Reputation
    128
    Rep Power
    9
    if u dont have much items just make different lines with item names

  3. #3
    Normal User RafiXWPT's Avatar
    Join Date
    Jun 2012
    Location
    (Poland) http://rafixwptscripts.com
    Posts
    1,602
    Mentioned
    31 Post(s)
    Tagged
    1 Thread(s)
    Quoted
    128 Post(s)
    Reputation
    128
    Rep Power
    9
    PHP Code:
    if cap X then
    setsettings
    ("Settings\\Looting\\List\\halberd\\Destination","ground")
    setsettings("Settings\\Looting\\List\\item2\\Destination","ground")
    setsettings("Settings\\Looting\\List\\item3\\Destination","ground")
    ...
    else
    setsettings("Settings\\Looting\\List\\halberd\\Destination","2")
    setsettings("Settings\\Looting\\List\\item2\\Destination","2")
    setsettings("Settings\\Looting\\List\\item3\\Destination","2")
    ...
    end 
    or just same
    PHP Code:
    if cap X then
    setsettings
    ("Settings\\Looting\\List\\halberd\\Destination","ground")
    setsettings("Settings\\Looting\\List\\item2\\Destination","ground")
    setsettings("Settings\\Looting\\List\\item3\\Destination","ground")
    ...
    end 

  4. #4
    iBot User
    Join Date
    Apr 2012
    Location
    Poland
    Posts
    21
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quoted
    1 Post(s)
    Reputation
    10
    Rep Power
    5
    i have much item. This is only for example.
    Last edited by Lolek1993; 02-26-2013 at 02:35 PM.

  5. #5
    Normal User
    Join Date
    Jun 2012
    Location
    Sweden
    Posts
    1,671
    Mentioned
    18 Post(s)
    Tagged
    1 Thread(s)
    Quoted
    8 Post(s)
    Reputation
    132
    Rep Power
    9
    PHP Code:
    local ITEMS = {"item1","item2"}

    if 
    cap 100 then
        
    for ITEM 1#ITEMS do
            
    setsettings("Settings\\Looting\\List\\"..ITEMS[ITEM].."\\Destination","ground")
        
    end
    else
        for 
    ITEM 1#ITEMS do
            
    setsettings("Settings\\Looting\\List\\"..ITEMS[ITEM].."\\Destination","2")
        
    end
    end 

  6. #6
    iBot User
    Join Date
    Apr 2012
    Location
    Poland
    Posts
    21
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quoted
    1 Post(s)
    Reputation
    10
    Rep Power
    5
    Ty man very much. I solve this problem.

Posting Permissions

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