Jump to content

Recommended Posts

Posted

ok all my friends say that diablo2 owns, and well I went out and bought it, they want me to play hardcore

since I don't want to risk my cd key using maphacks, I decided to make a chicken thingy

ChickenLifePercent=25; //chicken if life <25%

ChickenManaPercent=0; //disabled

MercChickenPercent=0; //disabled

ChickenMode=0;

;0 off

;1 on

if

lifelose=25%

send("{space}")

If WinExists("Diablo II") Then

HotKeySet("{Space}", "close")

Else

MsgBox(64, "Info", "The game isn´t running!")

Exit(0)

EndIf

Func Close()

Send("!{F4}")

EndFunc

While 1

Sleep(100)

WEnd

LOL as you can tell im new and im nooby, but I would love if you can make it something on the lines of this. I

have made a script so that if space is hit you exit the game but I perfer it doing it itself.

Thanks in advance
  • Replies 56
  • Created
  • Last Reply

Top Posters In This Topic

Top Posters In This Topic

Posted (edited)

i dont understand whats going on all i can figure so far is that if the game isnt running you want a message box to pop up saying its not running but if it is u want a hotkey to be space that will kill the game. i just dont understand the chicken part

ull have to explain the whole chicken thing

while 1
If Winexists("Diablo II") Then
    Hotkeyset("{Space}","close")
Else
Msgbox(0,"Not Running","Diablo II isn't running")
Exit
EndIf
wend
func close()
winkill("Diablo II")
EndFunc
Edited by thatsgreat2345
Posted (edited)

  thatsgreat2345 said:

i dont understand whats going on all i can figure so far is that if the game isnt running you want a message box to pop up saying its not running but if it is u want a hotkey to be space that will kill the game. i just dont understand the chicken part

ull have to explain the whole chicken thing

while 1
If Winexists("Diablo II") Then
    Hotkeyset("{Space}","close")
Else
Msgbox(0,"Not Running","Diablo II isn't running")
Exit
EndIf
wend
func close()
winkill("Diablo II")
EndFunc
ok ill explain in more detail i guess. heres picture Posted Image

thats the picture see the red orb, thats your health bar.

say if you have 1000 health, I want it so if say you lose 500 health which is 25% of your health you automaticly get booted from the game.

but you have to tell the script how much health you got. so I got 1000 I have to type that then type how much I have to lose until I Exit the game :mellow::)

oh and chicken is your health by the way chicken means your being a chicken because you don't want to die

Edited by Evil_Has_Survived
Thanks in advance
Posted

HI,

maybe you can check whether the healthbar has its specific color with Pixel...! And if the color of the pixel changes (pixel has to be at 25%) then exit.

So long,

Mega

Scripts & functions Organize Includes Let Scite organize the include files

Yahtzee The game "Yahtzee" (Kniffel, DiceLion)

LoginWrapper Secure scripts by adding a query (authentication)

_RunOnlyOnThis UDF Make sure that a script can only be executed on ... (Windows / HD / ...)

Internet-Café Server/Client Application Open CD, Start Browser, Lock remote client, etc.

MultipleFuncsWithOneHotkey Start different funcs by hitting one hotkey different times

Posted (edited)

  th.meger said:

HI,

maybe you can check whether the healthbar has its specific color with Pixel...! And if the color of the pixel changes (pixel has to be at 25%) then exit.

So long,

Mega

I have thought about that but one I don't know how to set or use pixels yet, and two when I level up I like putting points to health and I have items that give health so how would I keep changing that. I have thoguht about a script like this.

currenthealth=("1000")

losehealth=("500") or losehealth=("25%")

If WinExists("Diablo II") Then

HotKeySet("{Space}", "close")

Else

MsgBox(64, "Info", "The game isn´t running!")

Exit(0)

EndIf

Func Close()

Send("!{F4}")

EndFunc

While 1

Sleep(100)

sure enuff this script won't work but something on the lines of this would be nice

WEnd

Edited by Evil_Has_Survived
Thanks in advance
Posted (edited)

  thatsgreat2345 said:

use the autoits window info

thanks ill try it this is to find the pixels right. would someone send a example script of what I would do with the pixels when I get them please.

ok I tryed it, I put the mouse on the health bar and pushed ctrl-alt-f to pause, this was my result

Hex: 0x6F6F6F Dec: 7303023

Edited by Evil_Has_Survived
Thanks in advance
  • Moderators
Posted

I enjoy pixel work (Now), but didn't when I first started, but through many many many etc... failures, I've gotten them down fairly well... One thing to keep in mind... Since Larry wrote most if not all of them (the functions), I would search alot of his threads he has made in reference to them, he truly is an AutoIt Guru!

Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer.

Posted (edited)

  SmOke_N said:

I enjoy pixel work (Now), but didn't when I first started, but through many many many etc... failures, I've gotten them down fairly well... One thing to keep in mind... Since Larry wrote most if not all of them (the functions), I would search alot of his threads he has made in reference to them, he truly is an AutoIt Guru!

hm if you wouldn't mind I have a crazy idea.

----------- <----------------1000

l l

l l

.............. <--------------- 50% main pixel

l l

l l

------------ <----------------DEAD

lol I didn't know how to add a picture off of my desktop, anyways pretend that the shitty picture I drew was my health bar lol. As you can see were it says 50% main pixel if I went in the game, and got the middle pixel

(50%) marker and made a script telling it once it hits the 50% maker to exit the game would that work.

since this maybe hard to read ill make another example.

If WinExists("Diablo II")

Sleep(1000)

if (50%) marker is hit exit ("Diablo II")

Func Close()

Send("!{F4}")

EndFunc

While 1

Sleep(100)

WEnd

it would look different but that sorta of a cheap smaple :)

If this is not possible I would like a script like this please

If WinExists("Diablo II")

Sleep(1000)

sethealth(1000)

healthleave(500) or (50%)

if (50%) marker is hit exit ("Diablo II")

Func Close()

Send("!{F4}")

EndFunc

While 1

Sleep(100)

WEnd

Edited by Evil_Has_Survived
Thanks in advance
Posted

u would have to get the color , which is some sort of red, and the coords so just use autoits get info shit and then press shift ctrl f to save it and post it here cuz we just need 2 coords and we cna use the same coords for both top left and bottom right

Posted

Press CTRL-ALT-F to pause the display.

>>>>>>>>>>>> Window Details <<<<<<<<<<<<<

Title: Diablo II

Class: Diablo II

Size: X: 0 Y: 0 W: 800 H: 600

>>>>>>>>>>> Mouse Details <<<<<<<<<<<

Screen: X: 77 Y: 540

Cursor ID: 2

>>>>>>>>>>> Pixel Color Under Mouse <<<<<<<<<<<

RGB: Hex: 0x888888 Dec: 8947848

>>>>>>>>>>> Control Under Mouse <<<<<<<<<<<

Size:

Control ID:

ClassNameNN:

Text:

>>>>>>>>>>> Status Bar Text <<<<<<<<<<<

>>>>>>>>>>> Visible Window Text <<<<<<<<<<<

>>>>>>>>>>> Hidden Window Text <<<<<<<<<<<

heres what I got :)

Thanks in advance
Posted (edited)

While 1
    $coord = PixelSearch( 77, 540, 77, 540, 0x888888)
    If Not @error Then
        call("close")
    EndIf
WEnd

Func close()
winkill("Diablo II")
exit
EndFunc

Edited by thatsgreat2345
Posted (edited)

  thatsgreat2345 said:

While 1
    $coord = PixelSearch( 77, 540, 77, 540, 0x888888)
    If Not @error Then
        close()
    EndIf
WEnd

Func close()
winkill("Diablo II")
exit
EndFunc
nope sorry didn't work still died :) but thanks, ill try messing with it I think your script will work great jsut wrong pixel I think thats my mistake ill look again

>>>>>>>>>>>> Window Details <<<<<<<<<<<<<

Title: Diablo II

Class: Diablo II

Size: X: 0 Y: 0 W: 800 H: 600

>>>>>>>>>>> Mouse Details <<<<<<<<<<<

Window: X: 73 Y: 536

Cursor ID: 2

>>>>>>>>>>> Pixel Color Under Mouse <<<<<<<<<<<

RGB: Hex: 0x6F6F6F Dec: 7303023

that might help

ok

Edited by Evil_Has_Survived
Thanks in advance
Posted (edited)

  Evil_Has_Survived said:

nope sorry didn't work still died :) but thanks

While 1
    $coord = PixelSearch( 73, 536, 72, 536, 0x6F6F6F)
    If Not @error Then
        close()
    EndIf
WEnd

Func close()
winkill("Diablo II")
exit
EndFunc
Edited by thatsgreat2345
Posted (edited)

  thatsgreat2345 said:

While 1
    $coord = PixelSearch( 73, 536, 72, 536, 0x6F6F6F)
    If Not @error Then
        close()
    EndIf
WEnd

Func close()
winkill("Diablo II")
exit
EndFunc
still not working did I mention that when you lose health the red turns transparent.. :):mellow:

also RECTANGLE ? found in help file

left coordinate of rectangle. <----

top top coordinate of rectangle. <----

right right coordinate of rectangle. <----

bottom bottom coordinate of rectangle. <----

colour Colour value of pixel to find (in decimal or hex).

shade-variation [optional] A number between 0 and 255 to indicate the allowed number of shades of variation of the red, green, and blue components of the colour. Default is 0 (exact match).

step [optional] Instead of searching each pixel use a value larger than 1 to skip pixels (for speed). E.g. A value of 2 will only check every other pixel. Default is 1.

Edited by Evil_Has_Survived
Thanks in advance
Posted (edited)

im sure it was finding the pixel its just not killing the window

While 1
    $coord = PixelSearch( 73, 536, 72, 536, 0x6F6F6F)
    If Not @error Then
        close()
    EndIf
WEnd

Func close()
winkill('')
exit
EndFunc
Edited by thatsgreat2345
Posted (edited)

I could jsut use this.

If WinExists("Diablo II") Then

HotKeySet("{Space}", "close")

Else

MsgBox(64, "Info", "The game isn´t running!")

Exit(0)

EndIf

Func Close()

Send("!{F4}")

EndFunc

While 1

Sleep(100)

WEnd

but I would like to have them both

Edited by Evil_Has_Survived
Thanks in advance

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
  • Recently Browsing   0 members

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