Page 1 of 2 12 LastLast
Results 1 to 10 of 11

Thread: Doubt about functs

  1. #1
    Normal User peuonnis's Avatar
    Join Date
    Apr 2012
    Posts
    51
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quoted
    0 Post(s)
    Reputation
    10
    Rep Power
    5

    Doubt about functs

    i want to know
    if have any funcion to counter the monsters killed
    to do tasks

    and i need 1 action to look the time
    like if the time enter 5:30-6:20 then gotolabel("x") end

  2. #2
    Focus Group
    Join Date
    Feb 2012
    Posts
    148
    Mentioned
    13 Post(s)
    Tagged
    0 Thread(s)
    Quoted
    6 Post(s)
    Reputation
    16
    Rep Power
    5
    Yes, there is a function do count the killed monsters.

  3. #3
    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


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

    For a better iBot!

    (◣_◢)

  4. #4
    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
    Try this, if it doesnt work, change to 24h clock and try again.
    PHP Code:
    local TIME = {FROM tosec("05:30"), TO tosec("06:20"), CURRENT tosec(time())}

    if (
    TIME.CURRENT >= TIME.FROM) and (TIME.CURRENT <= TIME.TOthen
        gotolabel
    ("ITS_TIME")
    end 
    Last edited by soder; 10-24-2012 at 08:05 PM.

  5. #5
    Normal User peuonnis's Avatar
    Join Date
    Apr 2012
    Posts
    51
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quoted
    0 Post(s)
    Reputation
    10
    Rep Power
    5
    soder, do u have any action to check stamina, leave hunt if stamina < 14:30 ?

    edit, thanks all for help xD
    edit2: sirmate, i tested that hud and don't work.

    i just need any function to calculate how many monsters kill
    exemple,

    for every loot from x monster
    monsterkilled = monsterkilled + 1
    Last edited by peuonnis; 10-25-2012 at 12:34 PM.

  6. #6
    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
    Safe Stamina:

    PHP Code:
    if ((pzone == true) and (stamina <= 900))
    then
        wait
    (10001500)
        
    closetibia()
    end 


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

    For a better iBot!

    (◣_◢)

  7. #7
    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
    Quote Originally Posted by peuonnis View Post
    soder, do u have any action to check stamina, leave hunt if stamina < 14:30 ?
    i just need any function to calculate how many monsters kill
    exemple,

    for every loot from x monster
    monsterkilled = monsterkilled + 1
    Here's mine I use for demons(req. sirmate's library, and ty to sirmate for helping with calculations )

    PHP Code:
    DEMONS_KILLED DEMONS_KILLED or 0
    local MESSAGES 
    getnewmessages("Server Log")
    local MESSAGES_QUANTITY MESSAGES.count 1
    local DEMONS_PER_HOUR 
    math.floor((DEMONS_KILLED 3600) / (System.HuntingTime() / 1000))


    for 
    INDEX 0MESSAGES_QUANTITY do
        if (
    MESSAGES[MESSAGES_QUANTITY INDEX].text:find("Loot of a demon")) then
            DEMONS_KILLED 
    DEMONS_KILLED 1
        end
    end

    setfontcolor
    (rgbcolor(255248220))
    addtext("Demons per hour:"15 30)
    addtext(DEMONS_PER_HOUR,12030)
    addtext("Demons killed:"1545)
    addtext(DEMONS_KILLED12045
    Last edited by soder; 10-25-2012 at 04:01 PM.

  8. #8
    Normal User peuonnis's Avatar
    Join Date
    Apr 2012
    Posts
    51
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quoted
    0 Post(s)
    Reputation
    10
    Rep Power
    5
    bro, very thanks for ur help, u and blakw and sirmate for the library

    i'm use this HUD
    PHP Code:
     Seas_Killeds Seas_Killeds or 0
    local MESSAGES 
    getnewmessages("Server Log")
    local MESSAGES_QUANTITY MESSAGES.count 1
    local Seas_PER_HOUR 
    math.floor((Seas_Killeds 3600) / (System.HuntingTime() / 1000))


    for 
    INDEX 0MESSAGES_QUANTITY do
        if (
    MESSAGES[MESSAGES_QUANTITY INDEX].text:find("Loot of a sea serpent")) then
            Seas_Killeds 
    Seas_Killeds 1
        end
    end

    for INDEX 0MESSAGES_QUANTITY do
        if (
    MESSAGES[MESSAGES_QUANTITY INDEX].text:find("Loot of a young sea serpent")) then
            Seas_Killeds 
    Seas_Killeds 1
        end
    end



    setfontcolor
    (rgbcolor(255248220))
    addtext("Seas per hour:"15 30)
    addtext(Seas_PER_HOUR,12030)
    addtext("Seas Killeds:"1545)
    addtext(Seas_Killeds12045

    i'm using this code to check my script

    PHP Code:
    if itemcount(MPname) < MPtoback or itemcount(HPname) < HPtoback or cap Captoback or Seas_Killeds 900
    then gotolabel
    ("Leave")
    else
    gotolabel("Start")
    end 
    but he bugging and leaving hunt
    that happen when i write something wrong and the script can't read the action
    he DONT checking the Seas_Killeds
    he think that variable doest exist.
    but i can't take the code from HUD to actions, i tried and dont do
    Last edited by peuonnis; 10-27-2012 at 12:56 PM.

  9. #9
    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
    You cant make tasks like that, if you want to make task use this
    http://www.tibiaibot.com/forum/showt...cripts-100-AFK

  10. #10
    Normal User peuonnis's Avatar
    Join Date
    Apr 2012
    Posts
    51
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quoted
    0 Post(s)
    Reputation
    10
    Rep Power
    5
    i will take 1 action with
    PHP Code:
    countcreatures("Sea serpent""Young Sea Serpent"
    and on check
    PHP Code:
     if itemcount(MPname) < MPtoback or itemcount(HPname) < HPtoback or cap Captoback or killedcreatures() > 900
    then gotolabel
    ("Leave")
    else
    gotolabel("Start")
    end 
    but dont work to
    obs: i downloaded her library

Posting Permissions

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