Results 1 to 2 of 2

Thread: Help with Killing in the name of

  1. #1
    iBot User
    Join Date
    May 2012
    Posts
    41
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quoted
    18 Post(s)
    Reputation
    16
    Rep Power
    5

    Question Help with Killing in the name of

    I kinda need help doing tasks but I need it to still count even if I logout and login again.
    Do I need to use a .txt file like old days or is there something new?

  2. #2
    Moderator Drakke's Avatar
    Join Date
    Jun 2012
    Location
    Sweden
    Posts
    1,898
    Mentioned
    216 Post(s)
    Tagged
    0 Thread(s)
    Quoted
    390 Post(s)
    Reputation
    366
    Rep Power
    10
    Okey.

    Make 2 new actions


    Action1:

    name it killcounter
    Lua Code:
     
    local KILLED_COUNT1 = getsettings('Settings\\Actions\\List\\Countkills\\  Script')
    local KILLED_COUNT2 = positive(KILLED_COUNT1+1)
    local TASK_MONSTERS = {"Tarantula"}
    local TASKS_DONE = getsettings('Settings\\Looting\\List\\TASK_DONE\\D  estination')+0
    local SERVER_LOG_MSG = getnewmessages("Server Log")
    local SERVER_LOG_MSG_COUNT = SERVER_LOG_MSG.count - 1
    for INDEX = 0, SERVER_LOG_MSG_COUNT do
        if (SERVER_LOG_MSG[SERVER_LOG_MSG_COUNT - INDEX].text:find('Loot of a') and SERVER_LOG_MSG[SERVER_LOG_MSG_COUNT - INDEX].type == 20) then
            for _, MONSTER in ipairs(TASK_MONSTERS) do
        if (SERVER_LOG_MSG[SERVER_LOG_MSG_COUNT - INDEX].text:find(MONSTER:lower())) then
            setsettings('Settings\\Actions\\List\\Countkills\\  Script',KILLED_COUNT2)
                end
                end    end
            end


    action2:

    name it Countkills

    Lua Code:
     
    0 --Put only a 0 in here


    This is how you count kills.
    Now to make it count the tasks

    1.Add a new item to lootlist
    2.Name it TASK_DONE

    and after everytime a task has been made add an action with this
    Lua Code:
     
    local TASKS = getsettings('Settings\\Looting\\List\\TASK_DONE\\D  estination')
     
    local TASK_AFTER = TASKS+1
     
    setsettings('Settings\\Actions\\List\\Countkills\\  Script',0)
     
    setsettings('Settings\\Looting\\List\\TASK_DONE\\D  estination',TASK_AFTER)

Posting Permissions

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