Jump to content

Requesting some one to help me make somthing


Recommended Posts

Ok I know bots are not liked to much on these forums but any ways I am trying to make a bot for a game called Dofus the game is pretty simple to make a character move where you want unless people are standing on the little portals which makes any of the bots I make at the moment screw up and I can't seem to get it to work were I can talk to an NPC that moves which would ask me to fight a monster for key. Once I have talked to him I start the fight and want to have a stronger character of mine join in on the fight in a second window to help defeat it. Then I want to have the weak character talk to the npc again and get the key and trade with my other character to get the key. Now I would want to go back to the weak character and go the character selection menu and delete the weak character and then create a new character and repeat the process. All my attempts have failed miserable I can not figure out how to deal with other characters getting in the way of the portals so instead the bot clicks on the player in the way of the portal and screws every thing up and the color detection I have tried doing to find the NPC messes up. I am really baffled when it comes to getting my bot to fight and just have the weak character pass his turn and have the strong character attack till its dead. I got the character delete and creation part working but every thing else always fails and doesn't work efficiently. :)

Edited by trippdoctor
Link to comment
Share on other sites

// les bots c'est pas bien :)

anyway, if clicking is a problem.. maybe Dofus allows moving with the keyboard?

(then use Send("{UP}") and so on..)

to detect which is an NPC and which is a player or monster.. maybe you can edit your game files to change the skins... for example use the pink color (often not used) so that the NPC is all pink then it's pretty easy to take a screenshot and analyze it to find the NPC. But the hard part is to edit the game files and I don't know if you're allowed, able to do it.

Edited by MikeP
Link to comment
Share on other sites

Here is what I have I just can't figure out how to get it to fight the monster.

;script below
Global $pix1
Global $pix2
Global $pix3
Global $pix4
sleep(2000)
_moveme()
Func _moveme()
MouseClick("Left", 868, 578)
MouseClick("left", 555, 400)
Sleep(3200)
MouseClick("left", 875, 650)
mouseclick("left", 500, 655)
Send("Silverna")
sleep(2000)
If Hex(PixelGetColor(256, 445),6) = "FF3300" Then
Sleep(25)
MouseClick("Left", 949, 654)
ElseIf Hex(pixelGetColor(264, 442),6) = "6F6F6F" Then
MouseClick("Left", 792, 338)
Sleep(50)
MouseClick("Left", 949, 654)
ElseIf Hex(pixelGetColor(229, 458),6) = "495E76" Then
MouseClick("Left", 792, 338)
Sleep(1050)
MouseClick("Left", 792, 338)
Sleep(50)
MouseClick("Left", 949, 654)
ElseIf Hex(pixelGetColor(258, 462),6) = "506D6D" Then
MouseClick("Left", 792, 338)
Sleep(1050)
MouseClick("Left", 792, 338)
Sleep(1050)
MouseClick("Left", 792, 338)
Sleep(50)
MouseClick("Left", 949, 654)
ElseIf Hex(pixelGetColor(257, 444),6) = "000000" Then
MouseClick("Left", 792, 338)
Sleep(1050)
MouseClick("Left", 792, 338)
Sleep(1050)
MouseClick("Left", 792, 338)
Sleep(1050)
MouseClick("Left", 792, 338)
Sleep(50)
MouseClick("Left", 949, 654)
ElseIf Hex(pixelGetColor(255, 434),6) = "9E9E9E" Then
MouseClick("Left", 792, 338)
Sleep(1050)
MouseClick("Left", 792, 338)
Sleep(1050)
MouseClick("Left", 792, 338)
Sleep(1050)
MouseClick("Left", 792, 338)
Sleep(1050)
MouseClick("Left", 792, 338)
Sleep(50)
MouseClick("Left", 949, 654)
ElseIf Hex(pixelGetColor(249, 453),6) = "FFCC00" Then
MouseClick("Left", 499, 338)
Sleep(1050)
MouseClick("Left", 499, 338)
Sleep(1050)
MouseClick("Left", 499, 338)
Sleep(1050)
MouseClick("Left", 499, 338)
Sleep(1050)
MouseClick("Left", 499, 338)
Sleep(1050)
MouseClick("Left", 499, 338)
Sleep(50)
MouseClick("Left", 949, 654)
ElseIf Hex(pixelGetColor(253, 449),6) = "000033" Then
MouseClick("Left", 499, 338)
Sleep(1050)
MouseClick("Left", 499, 338)
Sleep(1050)
MouseClick("Left", 499, 338)
Sleep(1050)
MouseClick("Left", 499, 338)
Sleep(1050)
MouseClick("Left", 499, 338)
Sleep(50)
MouseClick("Left", 949, 654)
ElseIf Hex(pixelGetColor(256, 443),6) = "784B01" Then
MouseClick("Left", 499, 338)
Sleep(1050)
MouseClick("Left", 499, 338)
Sleep(1050)
MouseClick("Left", 499, 338)
Sleep(1050)
MouseClick("Left", 499, 338)
Sleep(50)
MouseClick("Left", 949, 654)
ElseIf Hex(pixelGetColor(259, 464),6) = "FFCC00" Then
MouseClick("Left", 499, 338)
Sleep(1050)
MouseClick("Left", 499, 338)
Sleep(1050)
MouseClick("Left", 499, 338)
Sleep(50)
MouseClick("Left", 949, 654)
ElseIf Hex(pixelGetColor(259, 446),6) = "FF66FF" Then
MouseClick("Left", 499, 338)
Sleep(1050)
MouseClick("Left", 499, 338)
Sleep(50)
MouseClick("Left", 949, 654)
ElseIf Hex(pixelGetColor(251, 439),6) = "D2221A" Then
MouseClick("Left", 499, 338)
Sleep(50)
MouseClick("Left", 949, 654)
EndIf
MouseClick("Left", 178, 68)
Sleep(750)
MouseClick("Left", 556, 371)
Sleep(50)
MouseClick("Left", 657, 503)
Sleep(50)
MouseClick("Left", 1091, 557)
Sleep(9200)
MouseClick("Left", 1091, 557)
Sleep(9200)
MouseClick("Left", 814, 592)
Sleep(9200)
MouseClick("Left", 1005, 575)
Sleep(9200)
;Incarman Map (-1,3) Temple
MouseClick("Left", 1119, 593)
Sleep(9200)
;Incarman Map (0,3) exit Temple
MouseClick("Left", 1104, 521)
Sleep(9200)
;Incarman Map (1,3)
MouseClick("Left", 1115, 380)
Sleep(9200)
;Incarman Map (2,3)
MouseClick("Left", 1107, 343)
Sleep(9200)
;Incarman Map (3,3)
MouseClick("Left", 1116, 485)
Sleep(9200)
;Incarman Map (4,3)
MouseClick("Left", 397, 598)
Sleep(9200)
;Incarman Map (4,4)
MouseClick("Left",  901, 437)
Sleep(5000)
_groupus()
EndFunc
Func _groupus()
    MouseClick("left", 367, 760)
    MouseClick("right", 367, 760)
    MouseClick("left", 406, 748)
    Send("/w Tsunechika Hello")
    Send("{ENTER}")
    MouseClick("left", 241, 727)
    MouseClick("left", 302, 678)
    Sleep(250)
    MouseClick("left", 133, 781)
    MouseClick("left", 554, 352)
    MouseClick("left", 288,786)
    sleep(50)
    _khfinder()
EndFunc
Func _khfinder()
    $pix1 = PixelSearch(0,0,@DesktopWidth, @DesktopHeight, 0xCAC056)
    $pix2 = PixelSearch(0,0,@DesktopWidth, @DesktopHeight, 0x6D9160)
    $pix3 = PixelSearch(0,0,@DesktopWidth, @DesktopHeight, 0x7FA066)
    $pix4 = PixelSearch(0,0,@DesktopWidth, @DesktopHeight, 0x91AD6B)
    If IsArray($pix1) Then ; If $pix1 is an array, then it found key holder
        MouseClick("left", $pix1[0], $pix1[1])
        MouseClick("Left", $pix1[0] + 10, $pix1[1] + 10)
        MouseClick("Left",  323, 376)
    ElseIf IsArray($pix2) Then ; If $pix2 is an array, then it found key holder
        MouseClick("left", $pix2[0], $pix2[1])
        MouseClick("Left", $pix2[0] + 10, $pix2[1] + 10)
        MouseClick("Left",  323, 376)
    ElseIf IsArray($pix3) Then ; If $pix3 is an array, then it found key holder
        MouseClick("left", $pix3[0], $pix3[1])
        MouseClick("Left", $pix3[0] + 10, $pix3[1] + 10)
        MouseClick("Left",  323, 376)
    ElseIf IsArray($pix4) Then ; If $pix4 is an array, then it found key holder
        MouseClick("left", $pix4[0], $pix4[1])
        MouseClick("Left", $pix4[0] + 10, $pix4[1] + 10)
        MouseClick("Left",  323, 376)       
    Else
        _moveme()
    EndIf
EndFunc
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...