Jump to content
Moopler
eternalzx

Help Turn on/off Godmode after a period of time

Recommended Posts

I'd like to write a script to turn on Godmode then off then on again and again to avoid d/c while botting.

First, I'm trying to turn off Godmode after a period of time.

That's what I wrote but it didn't work as I want

//v195.2
[ENABLE]
define(_GodmodeDelay,#1000) //Set time in milliseconds
alloc(GodmodeTimer,4)
alloc(Godmode,128)
label(Godmode_Return)
label(Exit)

GodmodeTimer:
dd 0

022B9E80: //CUserLocal::SetDamaged
db C2 2C 00 //Godmode on
jmp Godmode
Godmode_Return:

Godmode:
inc [GodmodeTimer]
cmp [GodmodeTimer],_GodmodeDelay
jne Exit
db 55 8B EC //Godmode off

Exit:
popad
jmp Godmode_Return
[DISABLE]
022B9E80: //E8 ? ? ? ? 8B CF E8 ? ? ? ? 8B ? ? 8B ? ? 85 C0 75 ? 8B CB E8 ? ? ? ? 84 C0 74 ? 85 FF [First Result Follow Call]
db 55 8B EC

Anyone show me how to fix it? Highly appreciate

Share this post


Link to post
12 hours ago, irotoridori said:

Why not use an external program for that?

I'm using Auto Click to check and uncheck but I have to leave my PC untouched.

I want to do it with CE to use my PC normally

Share this post


Link to post
26 minutes ago, eternalzx said:

I'm using Auto Click to check and uncheck but I have to leave my PC untouched.

I want to do it with CE to use my PC normally

You can re-write the script fairly easily, or use the lua functionality in CE to do this too.

It's a matter of getting the tick count and doing basic subtraction math, how much exactly have you tried before posting this question?

Share this post


Link to post
4 hours ago, Erotica said:

You can re-write the script fairly easily, or use the lua functionality in CE to do this too.

It's a matter of getting the tick count and doing basic subtraction math, how much exactly have you tried before posting this question?

I read other scripts to learn how to increase a variable till it reaches the value I want it to stop.

I did re-write the AutoKey script so I can press 2 keys or more after some defined delay time.

All other scripts that I learnt from would call to another function or jump to another address, none of  them would directly change the bytes written at the address.

That's the problem I got stuck with.

Share this post


Link to post

The CUserLocal::SetDamaged function only runs when you get hit, your kinda of limited depending on your creativity/knowledge to "delays" involving a counter.

In this case, what your trying to do doesn't do what you think it does

define(_GodmodeDelay,#1000) //Set time in milliseconds
inc [GodmodeTimer] <---- Increase counter per hit 
cmp [GodmodeTimer],_GodmodeDelay <---- compare counter to thousand 

There's a god mode out there that kevjuhtuh93 posted that should work what you want to do.

Share this post


Link to post
1 hour ago, OuterHaven said:

The CUserLocal::SetDamaged function only runs when you get hit, your kinda of limited depending on your creativity/knowledge to "delays" involving a counter.

In this case, what your trying to do doesn't do what you think it does


define(_GodmodeDelay,#1000) //Set time in milliseconds

inc [GodmodeTimer] <---- Increase counter per hit 
cmp [GodmodeTimer],_GodmodeDelay <---- compare counter to thousand 

There's a god mode out there that kevjuhtuh93 posted that should work what you want to do.

I can't find the script that kevjnuhtuh93 posted.

Based on your suggestion, I try to re-write the script so that Godmode is on for 10 times my char gets hit then Godmode off.

But it doesn't seem to work.

Can you tell me where I did wrong?

//v195.2
define(_GodmodeDelay, #10) //Times get hits before turning off Godmode

[ENABLE]
label(Original)
label(Return)
label(Hook)
alloc(GodmodeTimer,4)

GodmodeTimer:
dd 0

Hook:
inc [GodmodeTimer]
cmp [GodmodeTimer],_GodmodeDelay
je Original
db C2 2C 00

Original:
db 55 8B EC
mov [GodmodeTimer],0
jmp Return

022B9E80: //CUserLocal::SetDamaged
jmp Hook

Return:

[DISABLE]
022B9E80: //E8 ? ? ? ? 8B CF E8 ? ? ? ? 8B ? ? 8B ? ? 85 C0 75 ? 8B CB E8 ? ? ? ? 84 C0 74 ? 85 FF [First Result Follow Call]
db 55 8B EC

 

Share this post


Link to post
8 minutes ago, eternalzx said:

I can't find the script that kevjnuhtuh93 posted.

Based on your suggestion, I try to re-write the script so that Godmode is on for 10 times my char gets hit then Godmode off.

But it doesn't seem to work.

Can you tell me where I did wrong?


//v195.2
define(_GodmodeDelay, #10) //Times get hits before turning off Godmode

[ENABLE]
label(Original)
label(Return)
label(Hook)
alloc(GodmodeTimer,4)

GodmodeTimer:
dd 0

Hook:
inc [GodmodeTimer]
cmp [GodmodeTimer],_GodmodeDelay
je Original
db C2 2C 00

Original:
db 55 8B EC
mov [GodmodeTimer],0
jmp Return

022B9E80: //CUserLocal::SetDamaged
jmp Hook

Return:

[DISABLE]
022B9E80: //E8 ? ? ? ? 8B CF E8 ? ? ? ? 8B ? ? 8B ? ? 85 C0 75 ? 8B CB E8 ? ? ? ? 84 C0 74 ? 85 FF [First Result Follow Call]
db 55 8B EC

 

Pretty sure it was this. 

 

Share this post


Link to post
3 hours ago, ButterSmooth said:

Pretty sure it was this. 

 

Thanks for your help. I read the script but still can't figure out how to apply it to my script. Unfornately, the AoB for Blink Godmode is broken, I can't update the script for using.

Share this post


Link to post

@OuterHaven @ButterSmooth I figured it out ^.^ Thanks all for your help

//v195.2
define(_GodmodeDelay, #500) //Godmode on delay time. Change it to your precious time

[ENABLE]
label(Original)
label(Return)
alloc(Hook,100)
alloc(GodmodeTimer,4)

GodmodeTimer:
dd 0

Hook:
inc [GodmodeTimer]
cmp [GodmodeTimer],_GodmodeDelay
je Original
db C2 2C 00 6A FF

Original:
db 55 8B EC 6A FF
mov [GodmodeTimer],0
jmp Return

022B9E80: //CUserLocal::SetDamaged
jmp Hook

Return:

[DISABLE]
022B9E80: //E8 ? ? ? ? 8B CF E8 ? ? ? ? 8B ? ? 8B ? ? 85 C0 75 ? 8B CB E8 ? ? ? ? 84 C0 74 ? 85 FF [First Result Follow Call]
db 55 8B EC 6A FF

dealloc(Hook)
dealloc(GodmodeTimer)

 

Share this post


Link to post
2 hours ago, eternalzx said:

@OuterHaven @ButterSmooth I figured it out ^.^ Thanks all for your help


//v195.2
define(_GodmodeDelay, #500) //Godmode on delay time. Change it to your precious time

[ENABLE]
label(Original)
label(Return)
alloc(Hook,100)
alloc(GodmodeTimer,4)

GodmodeTimer:
dd 0

Hook:
inc [GodmodeTimer]
cmp [GodmodeTimer],_GodmodeDelay
je Original
db C2 2C 00 6A FF

Original:
db 55 8B EC 6A FF
mov [GodmodeTimer],0
jmp Return

022B9E80: //CUserLocal::SetDamaged
jmp Hook

Return:

[DISABLE]
022B9E80: //E8 ? ? ? ? 8B CF E8 ? ? ? ? 8B ? ? 8B ? ? 85 C0 75 ? 8B CB E8 ? ? ? ? 84 C0 74 ? 85 FF [First Result Follow Call]
db 55 8B EC 6A FF

dealloc(Hook)
dealloc(GodmodeTimer)

 

 C2 2C 00 6A FF? What?

You don't need the 6A FF, it's redundant 

 

Share this post


Link to post

Thanks @NewSprux2.0?. I just tested as you comment and it works.

I added 6A FF cause first time I tried I used only C2 2C 00 then my Maple crashed when I got hit.

I thought I need to write value to the last 2 bytes then I added 6A FF as original.

 

Share this post


Link to post

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

×