Friday, October 30, 2009

WiP: Plasma Bot v2

This is basically to show that I still exist.

I have not finished the plasma bot yet, although the basis of it is fine

A couple things to note when viewing:
-It does not recognize any plasma other than blue
-Any pixel-click or search will be off by a couple pixels, due to my windows being customized and actually smaller than what windows has default
-ITS NOT FINISHED

What is changed compared to the old version:
-No more "Turning On" the script, only pause/unpause
-Defaulting for min brightness settings, just move that slider way left and you're good.
-Made code a bit smoother/efficient on computer (still not good, too many ifs and loops)
-Code is commented! Much easier to track variables and troubleshoot imo.
--Though I'm going to add a 'Debug' of sorts, so you can reference exactly where the program isn't working.

Still planned:
-Auto-adjusting colours for plasma farming
-Chat alerts (If someone types your name, a sound will beep! Or you'll logoff. Watch your TV within getting banned... as fast)
-Debug Mode
-Fixing all pixel checks so they arn't only suited for my version of windows, hah.


Code:
PasteBin: View Download


It'll be finished... One day
Whenever I get around to it.
Unless someone else does it themself.

[Update]
Did a little bit of testing today.
So long as you clear out the brightness, and reset all windows to the default size, the bot does work. :D
Only problems are that the camera rotates a bit slow imo, simple fix.
And I need to change the mouse speed in a couple spots.
Tested it on blue plasma (with the values I have loaded in for shinigawa)
Everything seemed to work.

I'll make an alt and vid to youtube as an example. And for proofs.

39 comments:

  1. ok i tried it and it worked for the most part. it detected plasma's color and clicked on em perfect. it didnt click on the start button tho the mouse kept moving about a little on the plasma minigame. I m guessing $Connect_Over and $Connect_Start values may need to be changed but i dont know i was using a mount maybe that made a difference (maybe minigame is translucent). i'll try to make it work.
    i dunno if my colors look different than urs but heres a screen.
    http://img524.imageshack.us/img524/9882/93571096.jpg

    ReplyDelete
  2. It wasn't supposed to be working, and tbh, I'm shocked it got that far for you. Haha :-D

    I 90% certain the problem is in the line
    " If PixelGetColor(246,477) = $Connect_Start Then"

    My borders for windows are smaller than a conventional theme (ie, smaller taskbar). So it throws the values off a couple pixels.

    Easy way to test is to change "Func _getColor()" so it returns the colour at '246,477'.
    F2 writes the colour to the console, but you can change it to a messagebox if you dislike the console.

    Or take a screeny, open in paint, and find out where on 'Stop' is 'FFFFFF' (white), and use that value from now on.
    The pure-white is not translucent. Thus why I picked it.


    I'd fix myself atm, but... gtg in 10mins >.>

    ReplyDelete
  3. thaks for the help dude.. i'll try to make it work with ur instructions. ur a great help hehe. btw my borders are customized too skinnd too smaller then normal. i dunno how it makes a differe but maybe it does if u said so. i'll make it work for sure.. hell if it worked for detection it should normally i guess lol. i'll try with different colors hope it works heh. btw ur idea of getting the brightness was epic.. saed a ton lol
    i'm sure others will be grateful for that. people who read and dont reply here lmao.

    ReplyDelete
  4. too many typos damn i'm drunk. i gotta behave

    ReplyDelete
  5. Pixel-searches check an area of the screen,
    while pixel check on checks one-specific spot.

    pixel check would be throw off since my windows taskbars are a different size, making the actual client in a different spot when the bot checks for things like if you're dead, if you found plasma, etc.

    Example of my desktop theme:
    http://img5.imageshack.us/img5/8208/exampg.png

    ReplyDelete
  6. ahh i understand now. i guess pixel search works fine but pixel check fails coz of the difference in window sizes. i'm using a thin theme too but sure it would be a handful of pixels off from urs.
    I know its too much to ask but can u get to share the theme u are using.. sure that would workout then. or u can make changes to the script with a generic windows theme like blue or classic but that would be a lot of work. I'd leave it upto u.

    Btw heres the theme i'm using pretty similar to urs so i dont mind using the one u do :P (was searching all over for it)

    http://img190.imageshack.us/img190/88/36149440.jpg

    ReplyDelete
  7. It's Ashen II by Rauol (public, so I dont mind),
    http://customize.org/xpthemes/55709

    I plan on setting my script to the generic window's theme.

    ReplyDelete
  8. man with your xpthemes it's work fine...
    select plasma and press start when it need, but it can't gather simply cyrsor move to your feet...

    ReplyDelete
  9. can you explain Func _Get plz

    ReplyDelete
  10. Basically, it is what will search for, and click, and lootable plasma. If it can't find the plasma it spins around a bit (incase you got knocked back) still searching.

    There is a chance that it'll click the wrong plasma and start up the loot-game again, but it'll stop searching and connect to the plasma before the timer expires, doesn't happen often.

    Essentially it's _get'plasma'

    the very bottom statements are what check to see if the loot window is open, and then clicks "loot all".

    ReplyDelete
  11. thx but they don't clicks "loot all", they click each items in loot window

    ReplyDelete
  12. If PixelGetColor(926, 663) = 0xBDDCD8 Then
    MouseClick("left",954,678) ;Loot All!
    ConsoleWrite("^Looted" & @CRLF)
    $Counts[3] += 1
    EndIf


    Second line should be clicking loot all, tested it too.

    ReplyDelete
  13. Ok, When I unpause it, it will start up the mini game, and then just idle there. What should I do, and on what line?

    ReplyDelete
  14. Ok, so now I got it working on the white plasma, but now it won't stop in the bar. Is this whats it's supposed to do?

    ReplyDelete
  15. Check your variables:

    Case 0x000000 ;White
    $Connect_Under = 0x111111
    $Connect_Over = 0xFF6600

    So long as those have been updated, it should work fine.

    Unless it is stopping it, just not at the right time.

    ReplyDelete
  16. ITs not stopping it at the right time.

    ReplyDelete
  17. And also, where would I place text above.

    ReplyDelete
  18. Search, not place. It's apart of all the declarations. (Part of the large Switch and Case)

    ReplyDelete
  19. Not to be rude, but it's still not working so when do you think you'll have one made.

    ReplyDelete
  20. It totally works, just not for you apparently. This isn't a howto guide for botting 101, nor do I intend it to be.

    I'll have a final version eventually.

    'Less you want to start going to my university classes, working most days of the week, juggling between helping family members for the holidays. Then I might have a little more free time :)

    ReplyDelete
  21. You know to be completely honest. If I knew you I mean, like really knew your munber and address and shit. I would help. But I don't sorry. >=>

    Also, I'm sorry I came off to be like that, its just I'm tired of being poor in that damn game. I love it so, but it sucks to not have money. I need new equips and stuff. ANd its taking forever. Thats why I wanted the help

    ReplyDelete
  22. Np, theres no way to put it politely.

    Are colour plasma are you attempting the bot for?
    Red's have a shorter timeframe to click, so it needs special conditioning.

    ReplyDelete
  23. I was going for white. Seeing as thats where the money is.

    ReplyDelete
  24. Sorry, busy for a while. I'll find test it out myself within the next few days~

    ReplyDelete
  25. What if someone has Windows vista like me and doesnt know a damn about programming)? Wont it be difficult to find a solution to the pixel scan problem?

    I did everything u told here on ur blog but it doesnt work. Opened it, excecuted it unpaused it but it was of no use. When i am running the script the only thing it does is scrolling the screen to the right a bit every second.
    I dont get it...:/

    ReplyDelete
  26. erm i use the bot and it work perfectly spotting the plasma and connect with it...but it nevar loot the plasma and instead look for another plasma when finish connecting with the previous plasma...any idea how to fix it?

    ReplyDelete
  27. @Anon1: Sorry, still havn't gotten around to Megaten, so I havn't time to test the white plasmas.

    @Anon2:
    Sorry, not writing botting 101 and basics to programming for dummies.
    Don't try to run when you can't even stand.

    Try a simpler script, like making one to auto-extract elements from items. Or synthing. Or even a spin/rapid/rush/etc spam-bot to get the hang of programming. I refuse to walk you through "what could be wrong".

    And it does work on vista.


    @Anon3:
    If you're hunting down blue plasma, sometimes the colours end up being too close to the same for the initial check and the loot check. Try changing it to a deeper blue.

    If not check the _Get() function.
    Theres a lot of things to go-wrong in there unfourtunately.

    ReplyDelete
  28. Anon2 here.
    I am sorry for my inexperience on this.
    I made it work. It got plasmas with the original settings(!) but did not loot them.

    ReplyDelete
  29. to make things clear. I change nothing at all from the defaults: bot detects plasmas clicks'em and then nothing it just sits there and does nothing
    and when i have the suggested settings (no brightness no goo grafix etc) it doesnt even spot them.
    I got a hang of the script and made some experimentations n it with the colours adding other hex colors to see if these works but it didnt.
    Could you please tell me if there is any suggested resolutions for it to work?
    Anon2

    ReplyDelete
  30. Only thing at the top of my head atm:

    Within Funct _Get():

    $n = 0x808080 ;Lootable Plasma

    Change 0x808080, if you haven't already, to a colour you see on the screen for 'lootable plasma'


    I don't know what to tell you about the other plasma colours though, only thing that should need changing are the colour-variables.
    ($Connect_Under, $Connect_Over, and $Connect_Start)

    ReplyDelete
  31. While i was playing around with this i noticed that it fails on yellow plasma more often then the others. is there a setting i can change to increase the success rate?

    ReplyDelete
  32. umm is the final version out yet?

    ReplyDelete
  33. conufused <.<
    any final versions?

    ReplyDelete
  34. Late reply and short answer: Nope

    ReplyDelete
  35. Hi,

    For myself, the script directs and manages to detect the blue plasma. It also manage to start the mini game which is fine.

    But the problem arises when the mouse did not reach out to the _ConnectStart which is the stop button of the minigame. Instead it point towards the bottom part of the minigame along the black line.

    So I took a screenie and adjust the coordinates and modify the Func _getColor() and
    Func _findPlasma()
    If PixelGetColor(xxx,xxx)
    . But the same problem still persists and it heads towards the black line of the minigame.

    Running the script I was expecting some changes so i can find what is the problem, however the similar problem persists.

    Could i get some help?

    ReplyDelete
  36. Is it 'finding' the black line when it should be clicking stop (ie, synced up with the lines). Or just-always.

    If it's always, then it's a problem with _ConnectStart as you guessed. I remind you that the mouse_over and.. not mouse_over? colours for the button change-slightly, which could lead to errors (its like highlighting a button for instance)

    Meanwhile if it's simply clicking the wrong place, change the "MouseClick("left",243,491,2,0)" right before the "Connected with plasma" writing for the stop-button.

    Hopefully either of these is the solution.

    ReplyDelete
  37. So Hi I just found out ur blog and its pretty nice
    tho.. if i want to try to go in Ueno how do i do it?
    i tried to change the colors pixel code
    then the position of the Start button
    but all it can do is click on plasmas and it keeps trying to aim at other plasmas when theres the minigame...
    (TBH id prefer if u could make a new script
    cuz sometimes i change the wrong things and it messes up the whole file xDDD)
    Thanks for the help tho :D

    ReplyDelete
  38. This comment has been removed by the author.

    ReplyDelete
  39. hey kevin, do you still support this bot? everything is working fine for me except the stop for contacting plasma, it just clicks the plasma and then continue following plasmas in the background :/ could you help me a little bit please?

    ReplyDelete