XenoBot Forums - Powered by vBulletin

User Tag List

Page 3 of 6 FirstFirst 12345 ... LastLast
Results 21 to 30 of 60

Thread: [Update] XenoBot v2.5.3 [Scriptable HUD]

  1. #21
    Lifetime Subscriber
    Join Date
    Dec 2011
    Posts
    994
    Mentioned
    13 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by Spectrus View Post
    @soul4soul, what's your script look like? Try mine!

    [highlight=lua]
    local lootList = {"gold coin","blood herb"}

    local lootIcons = {}
    local lootCounts = {}
    for x = 1, #lootList do
    lootIcons[x] = HUD.CreateItemDisplay(10, x * 32, Item.GetID(lootList[x]), 32, math.min(Self.ItemCount(Item.GetID(lootList[x])), 100))
    lootCounts[x] = HUD.CreateTextDisplay(26, x * 32 + 20, Self.ItemCount(Item.GetID(lootList[x])), 200, 200, 200)
    end
    local ElapsedTime = HUD.CreateTextDisplay(10, 15, "Elapsed Time: ", 200, 200, 200)
    local time = os.clock()

    while true do
    wait(500)
    ElapsedTime:SetText(string.format("Elapsed Time: %.2d:%.2d:%.2d", math.floor(os.difftime(os.clock(), time) / 3600), math.floor(os.difftime(os.clock(), time) / 60) - math.floor(os.difftime(os.clock(), time) / 3600) * 60, os.difftime(os.clock(), time) - math.floor(os.difftime(os.clock(), time) / 60) * 60 - math.floor(os.difftime(os.clock(), time) / 3600) * 3600))
    for x = 1, #lootList do
    lootIcons[x]:SetItemCount(math.min(Self.ItemCount(Item.GetID(l ootList[x])), 100))
    lootCounts[x]:SetText(Self.ItemCount(Item.GetID(lootList[x])))
    end
    end
    [/highlight]
    everything is the same except I didnt include the time,I dont change the item count of the icon, and you have a more clever approach when spacing the icons.
    [highlight=lua]local items= {3031, 10196, 11479, 11477, 11452, 11478, 11453, 11480, 3725, 3244, 3369, 3072, 3091}
    local counts = {}
    local hudtexts = {}
    local movedown = 15
    for i=1, #items do
    HUD.CreateItemDisplay(1, movedown, items[i], 32, 100)
    counts[i] = 0
    movedown = movedown + 32
    hudtexts[i] = HUD.CreateTextDisplay(1, movedown - 14, counts[i], 255, 120, 120)
    end

    while (true) do
    for i=1, #items do
    counts[i] = Self.ItemCount(items[i])
    hudtexts[i]:SetText(counts[i])
    end
    wait(1000)
    end[/highlight]
    The biggest problem I see is for the time being the loot counters will be bound to waypoint scripts. Which doesnt make them easily exportable especially for those who really dont understand how to script. Using the waypoints we can turn on/off the loot counter when entering town and record the values to a second counter and add the 2 for a total which we can display out. To get the number of supplies used we can see how many potions are bought from the NPC each time you go to refill. I havent figured out a good way to count raw gp yet.

    EDIT: hmm can we access variables between lua scripts?
    Last edited by soul4soul; 07-16-2012 at 01:32 PM.

  2. #22
    XenoBot Developer DarkstaR's Avatar
    Join Date
    Dec 2010
    Posts
    6,104
    Mentioned
    1326 Post(s)
    Tagged
    16 Thread(s)
    Quote Originally Posted by mastomania View Post
    "finally scriptable HUD, i love those things to check my hunt status, but I really wished you could add the (loot monsters with listed items) and also checked a bug that I had, from time to time my character gets kicked and it shows the message ( you are disconnected from the sever) this only happens with chars using xenobot, for example, i was botting with my druid 250 , while hunting manually on my friend's ED 400 at walls, the bloker decided to get a glass of water, i went to check my char and was disconnect even though no mass kick happened, neither i felt lag or something related.this Happened not only once, but at least 40x, I already died alot i tried many different things, like every hunt that i finish i close my client and open again, but it doesn't seem to work, it will eventually happen. is not like a normal death, because if my character died in normal circustances, it would not show ( You are disconnected from the server). its not only weird, but annoying, and I really noticed that on the double exp event since that time i died A LOT. i could be close to 300 right now but i lost so much money & exp that i really don't have idea how I still play with this character. and I say it again, is not mass kick , because it happens almost everyday and no one complains about mass kick neither my internet drops. most of the time I'm online with other character maybe using others bots maybe playing manually and only my char using xenobot gets kicked no matter what."

    @thenick


    i've been having the very same problem ever since i started with xenobot.

    it happens once every other day to me.

    last time it happened this happened Jul 14 2012, 16:57:31 CEST Died at Level 129 by a brimstone bug.

    I'm unable to recreate that bug and so is the large majority of users, so fixing it isn't something I can see happening unless something changes. It might be XenoBot is a facilitator, but I'm convinced this is actually due to a combination of high-latency and the new kick system added by KickSoft. A few updates ago (Winter update maybe?) they implemented features to help people live through kicks. In the times before this, you only got disconnected if there was no communication between you and the server for 30 seconds, at a minimum (sometimes up to 45. This was noticeable as you would stay "in-game" when server save kicked for nearly a minute). Now, however, you get an auto-disconnect after 5 seconds of latency. This is also when people started noticing this bug. The only thing that makes sense here is the fact that XenoBot is taking just the right amount of processing to tip the boat and cause the kick, when in a normal client you're just on the brink of playability. Try running the process Tibia.exe in real-time priority.

    Quote Originally Posted by Spectrus View Post
    It generates an itemcount and icon for each item you add to lootList. At this time the itemcount is not very intuitive as it only counts what items it can currently see.

    @DarkstaR, my HUD script seems to make me lag a bit. Are the HUD functions pretty demanding?
    They aren't any more demanding than the normal HUD (At least, not on my end. Try using less os invocations and cleanup that nested call shitstorm.)

    EDIT:
    Every SetText, SetColor, SetCount, etc, has to invoke a blocking semaphore on Tibia's main thread in order to modify the internal HUD object list in a thread-safe manner (however, almost every function you call does this as well). When you're updating twenty different HUD objects two times a second, this can be a problem. Instead of doing a wait(500) in your main loop, use a wait(100) and a wait(100) in between each item loop. This way you're updating the text and count for one object at a time and then giving Tibia time to do its thing.


    Quote Originally Posted by soul4soul View Post
    I havent figured out a good way to count raw gp yet.

    EDIT: hmm can we access variables between lua scripts?
    Try this:
    1. Once the BP is half full of gold, set a "Halfway" milestone variable for that backpack.
    2. If a BP has the Halfway milestone set but is no longer half full, continue to step 3. Else, Step 5.
    3. Have a "PreviousGold" variable. Add 1900 (or 2300 if BPoH, etc) to that value.
    4. Reset the Halfway variable so we know we're in a new backpack.
    5. Display PreviousGold + CountItems(3031).
    6. Rinse and repeat.

  3. #23
    Lifetime Subscriber
    Join Date
    Dec 2011
    Posts
    994
    Mentioned
    13 Post(s)
    Tagged
    0 Thread(s)
    Thats not good, its what I have now. I was looking at newbp instead of halfway bp. Okay im going to ignore bpoh and use itemcount(gp) if its over 1k ill set halfway the bot is only going to be looting gold into the same bp so I dont need to specific which bp to count from. That might not be so bad. It might not be so bad after all Ill give it a try.

  4. #24
    thenick's Avatar
    Join Date
    Dec 2010
    Posts
    146
    Mentioned
    9 Post(s)
    Tagged
    0 Thread(s)
    Okay i spent 10min writing that I strongly agree with darkstar point of view about my problem with kicks and my firefox crashed and i lost what i wrote, so i gonna just ask something. Maybe as a solution, would you be able to recreate the FPS booster and CPU Minimizer. I tried once with C#, but it droped the fps and the responsiviness, while it should only drop the FPS but keep the client response normal, so it doesn't affect the bot. maybe today i gonna change my xenobot to a laptop that i have in here. it has better CPU and more memory than my desktop so i hope this fix the kick issues, but i dont like the wireless.

  5. #25

    Join Date
    Dec 2010
    Location
    Norway
    Posts
    108
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    @thenick, try out http://battleping.com/
    It might help you out.

  6. #26
    thenick's Avatar
    Join Date
    Dec 2010
    Posts
    146
    Mentioned
    9 Post(s)
    Tagged
    0 Thread(s)
    @Kingdom, my problem is not the internet. I live in U.S.A, my average ping at tibia is 80+- , my ventrilo shows ping 30-50 and raidcal 50-60. My kicks are probably related with memory and cpu i guess, since i only get kicked with clients using xenobot. I'm afraid i can't use realtime priority since I noticed sometimes my client "stop responding" from time to time using realtime .

  7. #27
    robakopas's Avatar
    Join Date
    Jun 2012
    Posts
    62
    Mentioned
    3 Post(s)
    Tagged
    0 Thread(s)

    Add

    I'm fucking idiot... I always used Tibia Auto and now I often don't turn on auto attack and looter, thats why my chars die often... (There was just 1 button to start cave bot)

    Can it be fixed somehow? Make it possible to activate just in one button? Or do some HUD who always show that you didn't activated some parts? Or auto activating when it seeing you traped or got damage or got few creatures in screen??

    Or maybe make new load list: setup (It activating setting and scripts you need and maybe even activate targeting, looter... That could help a lot)

    Please, help me with my dam mind...

    P.S. If you liked my idea, send private msg

  8. #28
    Super Moderator Luls's Avatar
    Join Date
    Dec 2010
    Location
    Canadaaaa.
    Posts
    1,976
    Mentioned
    186 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by robakopas View Post
    I'm fucking idiot... I always used Tibia Auto and now I often don't turn on auto attack and looter, thats why my chars die often... (There was just 1 button to start cave bot)

    Can it be fixed somehow? Make it possible to activate just in one button? Or do some HUD who always show that you didn't activated some parts? Or auto activating when it seeing you traped or got damage or got few creatures in screen??

    Or maybe make new load list: setup (It activating setting and scripts you need and maybe even activate targeting, looter... That could help a lot)

    Please, help me with my dam mind...

    P.S. If you liked my idea, send private msg



    Just tick all the boxes...?

  9. #29
    polaris's Avatar
    Join Date
    Jun 2012
    Posts
    46
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Is it possible for this to be able to turn into icons? Sorta like elf?

  10. #30
    Super Moderator Infernal Bolt's Avatar
    Join Date
    Dec 2011
    Location
    Skellefteċ, Sweden
    Posts
    2,880
    Mentioned
    217 Post(s)
    Tagged
    2 Thread(s)
    Quote Originally Posted by robakopas View Post
    I'm fucking idiot... I always used Tibia Auto and now I often don't turn on auto attack and looter, thats why my chars die often... (There was just 1 button to start cave bot)

    Can it be fixed somehow? Make it possible to activate just in one button? Or do some HUD who always show that you didn't activated some parts? Or auto activating when it seeing you traped or got damage or got few creatures in screen??

    Or maybe make new load list: setup (It activating setting and scripts you need and maybe even activate targeting, looter... That could help a lot)

    Please, help me with my dam mind...

    P.S. If you liked my idea, send private msg
    Just make a lua script that turns everything on.

Posting Permissions

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