Cheat Engine Forum Index Cheat Engine
The Official Site of Cheat Engine
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 


Input pointers' info in Assembly wtih conditional activation
Goto page Previous  1, 2
 
Post new topic   Reply to topic    Cheat Engine Forum Index -> Cheat Engine Lua Scripting
View previous topic :: View next topic  
Author Message
Cake-san
Grandmaster Cheater
Reputation: 8

Joined: 18 Dec 2014
Posts: 541
Location: Semenanjung

PostPosted: Sat Nov 14, 2015 3:04 pm    Post subject: Reply with quote

Code:

push #1000 // will wait 1000 milliseconds or 1 second to execute the script again.

_________________
...
Back to top
View user's profile Send private message
ngoyui
Newbie cheater
Reputation: 0

Joined: 14 Nov 2015
Posts: 12

PostPosted: Sat Nov 14, 2015 3:53 pm    Post subject: Reply with quote

Thank you very much. I set it to 000 and there is no lagging at all. I think the code works almost perfect except that fact that if I activate it outside of battle, the game will crash. I think this is not a very big deal though. I just need to be more careful.

If I have time, I will look for address that separate in-battle and out-battle mode.

Again, thank you very much. You are very very helpful.
Back to top
View user's profile Send private message
Cake-san
Grandmaster Cheater
Reputation: 8

Joined: 18 Dec 2014
Posts: 541
Location: Semenanjung

PostPosted: Sat Nov 14, 2015 10:26 pm    Post subject: Reply with quote

Instead of using createthread,you can use other instruction that will always
execute when in battle else ,not execute.Find that intruction like the intruction that acces the en-spell/next command then, code inject it and paste all the lines from push ebx to pop ebx into newmem section
and don't forget about the label section.

The crash must be because of the pointer breaking when not in battle.if that,
you should add some lines in the script like this:
Code:

mov ebx,[ffxiii2img.exe+211E5F8]
mov ebx,[ebx+410]
cmp ebx,0 // compare the pointer if it is invalid
je return

_________________
...
Back to top
View user's profile Send private message
ngoyui
Newbie cheater
Reputation: 0

Joined: 14 Nov 2015
Posts: 12

PostPosted: Sun Nov 15, 2015 12:09 am    Post subject: Reply with quote

Thanks, Cake-san. Actually, I have just figure it out as well. The code I use is pretty much similar to your recommendation.
Code:

mov ebx,[ffxiii2img.exe+211E5F8]
cmp [ebx+410],00000000
je return

Finally, this script is complete without any use of hotkeys. Cool!!!
Back to top
View user's profile Send private message
ngoyui
Newbie cheater
Reputation: 0

Joined: 14 Nov 2015
Posts: 12

PostPosted: Tue Nov 24, 2015 5:03 pm    Post subject: Reply with quote

This is a continuing problem. I found the 2 pointers for the second character and write a second script. The script works fine alone. However, when I activate 2 scripts for character 1 and 2 at the same time, the game crashed.

I tried to combine them in one script. However it still crashes. Please have a look if you can see any errors there.
Code:

[ENABLE]
globalalloc(_en-element_spell,1024)  //allocate memory for script writing
createthread(_en-element_spell)
label(_enfire)
label(_enfrost)
label(_enthunder)
label(_enwater)
label(_enaero)
label(_enfire1)
label(_enfrost1)
label(_enthunder1)
label(_enwater1)
label(_enaero1)
label(_end)
label(_flamestrike1)
label(_icestrike1)
label(_thunderstrike1)
label(_waterstrike1)
label(_windstrike1)
label(_flamestrike)
label(_icestrike)
label(_thunderstrike)
label(_waterstrike)
label(_windstrike)
label(return)
registersymbol(_end)

_en-element_spell:
push eax
push ebx
push ecx
push edx
mov ebx,[ffxiii2img.exe+211E5F8]
cmp [ebx+410],00000000
je return
mov ebx,[ebx+410]
mov ecx,[ebx+2c]
lea edx,[ecx+14c] // now,edx contain the addres of next command of character 2
lea ecx,[ecx+2aa] // now,ecx contain the addres of En-spell of character 2
lea eax,[ebx+14c] // now,eax contain the addres of next command of character 1
lea ebx,[ebx+2aa] // now,ebx contain the addres of En-spell of character 1

_flamestrike1:
cmp [edx+4],30315F30
je _enfire1
_flamestrike:
cmp [eax+4],30315F30
je _enfire
_icestrike1:
cmp [edx+4],30325F30
je _enfrost1
_icestrike:
cmp [eax+4],30325F30
je _enfrost
_thunderstrike1:
cmp [edx+4],30335F30
je _enthunder1
_thunderstrike:
cmp [eax+4],30335F30
je _enthunder
_waterstrike1:
cmp [edx+4],30345F30
je _enwater1
_waterstrike:
cmp [eax+4],30345F30
je _enwater
_windstrike1:
cmp [edx+4],30355F30
je _enaero1
_windstrike:
cmp [eax+4],30355F30
je _enaero
jmp return

_enfire1:
mov [ecx],21
jmp _flamestrike
_enfrost1:
mov [ecx],31
jmp _icestrike
_enthunder1:
mov [ecx],41
jmp _thunderstrike
_enwater1:
mov [ecx],51
jmp _waterstrike
_enaero1:
mov [ecx],61
jmp _windstrike
_enfire:
mov [ebx],20
jmp return
_enfrost:
mov [ebx],30
jmp return
_enthunder:
mov [ebx],40
jmp return
_enwater:
mov [ebx],50
jmp return
_enaero:
mov [ebx],60

return:  //Set return point
pop eax
pop ebx
pop edx
pop ecx

push #000
call sleep
cmp [_end],01
jne _en-element_spell
ret

_end:
dd 0

[DISABLE]
_end:
dd 01
unregistersymbol(_end)
Back to top
View user's profile Send private message
Cake-san
Grandmaster Cheater
Reputation: 8

Joined: 18 Dec 2014
Posts: 541
Location: Semenanjung

PostPosted: Wed Nov 25, 2015 3:02 am    Post subject: Reply with quote

Code:

return:  //Set return point
pop edx
pop ecx
pop ebx
pop eax

push #1000

If its still crash, can I see the pointer ?

_________________
...
Back to top
View user's profile Send private message
ngoyui
Newbie cheater
Reputation: 0

Joined: 14 Nov 2015
Posts: 12

PostPosted: Wed Nov 25, 2015 10:19 am    Post subject: Reply with quote

Hi, Cake-san, it's been sometimes.

I tried as you instructed and it does not crash. However, when the execution time is that big, the address of en-spell cannot be updated on time. When it is updated, the corresponding skill has already finished its implementation.

I believe the execution time must be set at near 0 for correct timing. I tried numbers such 1, 10 and it still crashes.

Does this mean the code I wrote was ok but it still didn't work because the computer cannot handle that many commands?

By the way, here are the pointers:

Char 1's en-spell:
ffxiii2img.exe+211E5F8 /410 /2aa

Char 1's next command:
ffxiii2img.exe+211E5F8 /410 /14c

Char 2's en-spell:
ffxiii2img.exe+211E5F8 /410 /2c /2aa

Char 2's next command:
ffxiii2img.exe+211E5F8 /410 /2c /14c
Back to top
View user's profile Send private message
Cake-san
Grandmaster Cheater
Reputation: 8

Joined: 18 Dec 2014
Posts: 541
Location: Semenanjung

PostPosted: Wed Nov 25, 2015 12:55 pm    Post subject: Reply with quote

Cake-san wrote:
Instead of using createthread,you can use other instruction that will always
execute when in battle else ,not execute.Find that intruction like the intruction that acces the en-spell/next command then, code inject it and paste all the lines from push eax to pop eax into newmem section
and don't forget about the label section.

Using this method the instruction should be run according to game or you can add some lines like call timer thingy that I had never used before.It's in this forum somewhere and someone that is more expert can help you, I think.

Sorry, my internet down for some hours and I have some exams to study for.

_________________
...
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    Cheat Engine Forum Index -> Cheat Engine Lua Scripting All times are GMT - 6 Hours
Goto page Previous  1, 2
Page 2 of 2

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Powered by phpBB © 2001, 2005 phpBB Group

CE Wiki   IRC (#CEF)   Twitter
Third party websites