Results 1 to 5 of 5

Thread: Loot Alert on Debug window

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

    Exclamation Loot Alert on Debug window

    hey guys,

    so, here's what's going on: back in neobot days i had a script which warned me everytime i looted a rare item in the Debug window(it didn't play any song, it just warned me by posting the looting message in the debug)

    so i was trying to do the same in iBot but guess what? i couldn't get it to work =/

    here's what i've done so far:
    PHP Code:
    local warnitems = {'item1''item2''item3'}

    local msgs getmessages("Server Log")

    local qtd msgs.count-1
          local l 
    0

    for i=0,qtd do
    for 
    l=1table.getn(warnitems) do
     if 
    msgs[qtd-i].type == 19 and msgs[qtd-i].text:find('Loot of 'then
         
    if msgs[qtd-i].text:find(warnitems[l]) then
         
    print(warnitems[l].." looted!")
     
           
    end  
    end
    end
    end 
    problem is that if i use the action just like that
    and i loot one of the items on the list the bot will keep posting messages in debug like crazy
    and i just want it to do it once...

    any ideas? :P

    aw, and by the way, if someone finds out how to put the message in a different color (like red) please tell me how
    You may say i'm a dreamer...
    but i'm not the only one


    +++REP If i helped you =)

  2. #2
    Normal User JeTPsych's Avatar
    Join Date
    Mar 2012
    Posts
    84
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quoted
    0 Post(s)
    Reputation
    10
    Rep Power
    5
    please help me



    up
    You may say i'm a dreamer...
    but i'm not the only one


    +++REP If i helped you =)

  3. #3
    iBot User Ragekemi's Avatar
    Join Date
    Sep 2012
    Posts
    300
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    Quoted
    3 Post(s)
    Reputation
    15
    Rep Power
    5
    Quote Originally Posted by JeTPsych View Post
    please help me



    up

    try using getnewmessages instead getmessages

  4. #4
    Normal User JeTPsych's Avatar
    Join Date
    Mar 2012
    Posts
    84
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quoted
    0 Post(s)
    Reputation
    10
    Rep Power
    5
    Quote Originally Posted by Ragekemi View Post
    try using getnewmessages instead getmessages
    thanks, that was really useful and i feel like an idiot right now uhauahuh
    You may say i'm a dreamer...
    but i'm not the only one


    +++REP If i helped you =)

  5. #5
    iBot User Ragekemi's Avatar
    Join Date
    Sep 2012
    Posts
    300
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    Quoted
    3 Post(s)
    Reputation
    15
    Rep Power
    5
    Quote Originally Posted by JeTPsych View Post
    thanks, that was really useful and i feel like an idiot right now uhauahuh
    It's all ok, getmessages is a old command... some people dont know the getnewmessages :P

Posting Permissions

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