# 2 functions simultaniously?

## Recommended Posts

How do i make two functions run at same time simultaniously?

I have it like this now:

```Winactive blah blah...

attack()
buff()

Func attack()
send 1
sleep(200)
send 2
sleep(200)
and so on

Func end

Func buff()
send 5
sleep (30000)

Func end```

The reason is i want my character to attack all the time but use the buff only once in a much longer time.

I tried different ways but either it jumps over the buff() or it first attacks then jumps to buff and the sleep very long and then back to attack.

I tried like this

```while 1

attack()
buff()

wend```

and another was to put buff() inside func attack() like this:

```Func attack()
send 1
sleep(200)
send 2
sleep(200)
and so on
buff()

Func end```

But neither of this makes them work parallel

And also note that is not the real code just a quick scribble so don't comment that the for example send should be written in another way

##### Share on other sites

Function 1: Computer running game

Function 2: Human playing game

Problem solved.

##### Share on other sites

Function 1: Computer running game

Function 2: Human playing game

Problem solved.

function 1: Human need sleep and want help

function: Computer don't need sleep and want to help

Human very happy to get help from very nice computer and gives him for RAM for birthday

##### Share on other sites

Function 1: Computer running game

Function 2: Human playing game

Problem solved.

LMFAO, I don't think weaponx likes cheaters

##### Share on other sites

Well, he doesn't even know why i am making this so i don't really bother about it And if it was cheating i would rather call it schortcutting or "just doing the fun stuff in the game and don't bother about the rest". I totally understand the anti-cheat feeling but this is for a good cause

##### Share on other sites

The solution lies in a particular function that runs an impromptu function every X # of seconds. You just have to enable it in a line. Keep in mind, you can only have one of these running per program.

You could also use a Timer function....

Or something similar to

```If Mod(@SEC, 4) = 0 Then ; Check the status of the buttons and lamps once every 4 seconds.  Change if required.
If \$i_ModFlag = 0 Then
_LoliCheck()
\$i_ModFlag = 1
EndIf
Else
\$i_ModFlag = 0
EndIf```

I detest bots.

Edited by Blue_Drache

Lofting the cyberwinds on teknoleather wings, I am...The Blue Drache

##### Share on other sites

I will rejoice the day that Blizzard games do not have bots in them, but until then. I sometimes use them just to keep up. It's insane how screwed up the economy gets in Diablo II. When you do find something decent on your own, everyone else has a mule full of them, because they bot 24/7. Everyone else has a shiny suit of armor, mostly from cheating , and I'm always wearing rags because I don't have time to MF all day long.

##### Share on other sites

It will never happen.

Lofting the cyberwinds on teknoleather wings, I am...The Blue Drache

##### Share on other sites

When I play Oblivion do I have a bot gather Nirnroot? HELL NO! I go out and gather that shit myself even if it takes 3 weeks.

When I play Call of Duty do I have an aimbot target the heads of my enemies? HELL NO! I run up in their face with my thompson on full auto.

When I play Battlefield 2 do I wall hack? SHIT NO! I get my ass kicked just like everyone else. I have to hit an enemy 3 times with my 50 cal to kill him just like every other MF!

So, in closing I would just like to note that no, I don't support game hacking.

##### Share on other sites

well aimbotting i can agree is bad because then you use skill that you have trained but collecting some shitty flowers...where is the skill? I will not argue with you because i agree fully but i still want to test this for a open beta game that will soon close anyhow. And it's just that i want to see the next armors before it closes

##### Share on other sites

Yeah, I hate all that shit, too. Those hacks are on an entirely different level than just killing Mephisto over and over again, too. Although the only bot I ever used was a Pindlebot...I actually would like to write one now, even though I don't play D2 anymore. I have a lot to learn about AutoIt and all projects help me learn a bit more. I don't really know anyone who would want to take the time to explain all the pixel editing crap to me though.

##### Share on other sites

Forum search for a D2 bot. Tons are here. Read and learn.

Lofting the cyberwinds on teknoleather wings, I am...The Blue Drache

## Create an account

Register a new account

×

• Wiki

• Back

• #### Beta

• Git
• FAQ
• Our Picks
×
• Create New...