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 


[SOLVED]How is the push pressure set, without minus?

 
Post new topic   Reply to topic    Cheat Engine Forum Index -> Cheat Engine Lua Scripting
View previous topic :: View next topic  
Author Message
Aylin
Master Cheater
Reputation: 7

Joined: 16 Feb 2017
Posts: 383

PostPosted: Sun Jan 20, 2019 5:47 am    Post subject: [SOLVED]How is the push pressure set, without minus? Reply with quote

a course of 60 seconds.
I'm trying to raise time.
Values after 127 seconds go to - minus.
Code and warnings below, which is the idea?

Code:
code
; d0
getlocal_0
; 30
pushscope
; 5d b8 9f 01
findpropstrict Qname(PackageNamespace("net.shared.cheats"),"isCheatActivated")
; 60 31
getlex Qname(PackageNamespace("net.model.cheat"),"CheatFlagName")
; 66 f5 87 01
getproperty Qname(PackageNamespace(""),"QUICK")
; 46 b8 9f 01 01
callproperty Qname(PackageNamespace("net.shared.cheats"),"isCheatActivated") 1
; 12 0e 00 00
iffalse ofs0023
; 5e dc 88 01
findproperty Qname(PrivateNamespace(null,"157"),"MAX_GAMEPLAY_TIME")
; 24 0b
pushbyte 11
; 61 dc 88 01
setproperty Qname(PrivateNamespace(null,"157"),"MAX_GAMEPLAY_TIME")
; 10 0a 00 00
jump ofs002d
; 5e dc 88 01
ofs0023:findproperty Qname(PrivateNamespace(null,"157"),"MAX_GAMEPLAY_TIME")
; 24 3c
pushbyte 60
; 61 dc 88 01
setproperty Qname(PrivateNamespace(null,"157"),"MAX_GAMEPLAY_TIME")
; 5e dd 88 01
ofs002d:findproperty Qname(PrivateNamespace(null,"157"),"START_TIMEOUT_SOUND_TIME")
; 60 dc 88 01
getlex Qname(PrivateNamespace(null,"157"),"MAX_GAMEPLAY_TIME")
; 60 db 88 01
getlex Qname(PrivateNamespace(null,"157"),"TIMEOUT_SOUND_DURATION")
; a1
subtract
; 61 dd 88 01
setproperty Qname(PrivateNamespace(null,"157"),"START_TIMEOUT_SOUND_TIME")
; 47
returnvoid



The exchange codes used:

Code:
24 0b ?? ?? ?? 01 10 0a 00 00 5e ?? ?? 01 24 3c
24 ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? 25 fe 01 //and 48


Code:
24 0b ?? ?? ?? 01 10 0a 00 00 5e ?? ?? 01 24 3c
24 ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? 24 7f


Code:
24 0b ?? ?? ?? 01 10 0a 00 00 5e ?? ?? 01 24 3c
24 ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? 2d eb 06 //and 48



warnings:

Quote:
Byte value expected (-128 to 127).
Use pushshort or pushint to push larger values on line 18.


- how can I assign a 180-second value without entering a minus?

thanks in advance for answers

_________________
Hi Hitler Make a Youtube Web for Trainer
https://forum.cheatengine.org/viewtopic.php?t=609146
Enthusiastic people: Always one step ahead
Do not underestimate me Master: You were a beginner in the past


Last edited by Aylin on Sun Jan 20, 2019 7:42 pm; edited 1 time in total
Back to top
View user's profile Send private message MSN Messenger
FreeER
Grandmaster Cheater Supreme
Reputation: 41

Joined: 09 Aug 2013
Posts: 1061

PostPosted: Sun Jan 20, 2019 7:04 am    Post subject: Reply with quote

you'd have to change the type, if or how you can do that in flash \_(ツ)_/
_________________
https://github.com/FreeER/ has a few CE related repos
Back to top
View user's profile Send private message
Aylin
Master Cheater
Reputation: 7

Joined: 16 Feb 2017
Posts: 383

PostPosted: Sun Jan 20, 2019 9:30 am    Post subject: Reply with quote

Quote:
Use pushshort or pushint


I applied the recommendations in the example.
But, again, it beats values between minus or plus million.
I couldn't raise the seconds to more than 127.
I'm new to Flash Decompiler. Is an example available?

_________________
Hi Hitler Make a Youtube Web for Trainer
https://forum.cheatengine.org/viewtopic.php?t=609146
Enthusiastic people: Always one step ahead
Do not underestimate me Master: You were a beginner in the past
Back to top
View user's profile Send private message MSN Messenger
ParkourPenguin
I post too much
Reputation: 70

Joined: 06 Jul 2014
Posts: 2287

PostPosted: Sun Jan 20, 2019 10:22 am    Post subject: This post has 1 review(s) Reply with quote

Do as it says: use pushshort or pushint to push larger values.

Many instructions use a variable-length encoded 30-bit unsigned integer value (u30). This operand includes the next byte in the value if the highest bit of the current byte is set.
Code:
raw bytes:
C0 84 3D    - only 3 bytes, but highest bit of last byte isn't set, so value ends here

binary notation:
11000000 10000100 00111101

reverse order (little endian):
00111101 10000100 11000000

remove highest bit:
0111101 0000100 1000000

concatenate bits:
011110100001001000000

real value:
1,000,000 (decimal)

pushshort takes a u30 and pushes it on the stack.
pushint pushes an int from the constant pool. It still uses a u30 to index into the pool.

It's going to take up more bytes than the original instruction, so optimize or remove code to make room for it. e.g. optimize the setproperty outside the if/else statement.

_________________
I don't know where I'm going, but I'll figure it out when I get there.
Back to top
View user's profile Send private message
Aylin
Master Cheater
Reputation: 7

Joined: 16 Feb 2017
Posts: 383

PostPosted: Sun Jan 20, 2019 12:46 pm    Post subject: Reply with quote

If and else the opinion is good. but I can't give the value out of "if and else".
still worth 127 Max. more raise minus value.
The nice thing is: I just started the language 'C #' and
Surprised to see the same encodings. Smile



In this context, "u30" makes a negative value assignment.
So: "B4 01" gives the error as minus in the game.
I may still need a sample.


Code:
[MessageHandler]
      public function handleIncreaseGameplayTime(param1:IncreaseGameplayTime) : void
      {
         this.increaseGameplayTime(param1.seconds);
      }
     
      private function setMaxGameplayTime() : void
      {
         if(isCheatActivated(CheatFlagName.QUICK))
         {
            MAX_GAMEPLAY_TIME = 11;
         }
         else
         {
            MAX_GAMEPLAY_TIME = 60;
         }
         START_TIMEOUT_SOUND_TIME = MAX_GAMEPLAY_TIME - TIMEOUT_SOUND_DURATION;
      }

_________________
Hi Hitler Make a Youtube Web for Trainer
https://forum.cheatengine.org/viewtopic.php?t=609146
Enthusiastic people: Always one step ahead
Do not underestimate me Master: You were a beginner in the past
Back to top
View user's profile Send private message MSN Messenger
panraven
Grandmaster Cheater
Reputation: 30

Joined: 01 Oct 2008
Posts: 711

PostPosted: Sun Jan 20, 2019 3:36 pm    Post subject: This post has 1 review(s) Reply with quote

As ParkourPenguin said, manipulate if/else to make room,
Code:

; 46 b8 9f 01 01
callproperty Qname(PackageNamespace("net.shared.cheats"),"isCheatActivated") 1
; 12 0e 00 00     ======> 29 25 b4 01   ;; popstack / pushInt 180   ;; also remove test
iffalse ofs0023
; 5e dc 88 01
findproperty Qname(PrivateNamespace(null,"157"),"MAX_GAMEPLAY_TIME")
; 24 0b           ======> 2b 02       ;; swapstack / nop ;; fix stack order
pushbyte 11
; 61 dc 88 01
setproperty Qname(PrivateNamespace(null,"157"),"MAX_GAMEPLAY_TIME")

ie
Code:

scan: 12 0e 00 00 5e ?? ?? ?? 24 0b
swap: 29 25 b4 01 ?? ?? ?? ?? 2b 02

let's pray it work~

_________________
- Retarded.
Back to top
View user's profile Send private message
Aylin
Master Cheater
Reputation: 7

Joined: 16 Feb 2017
Posts: 383

PostPosted: Sun Jan 20, 2019 5:47 pm    Post subject: Reply with quote

panraven wrote:
As ParkourPenguin said, manipulate if/else to make room,
Code:

; 46 b8 9f 01 01
callproperty Qname(PackageNamespace("net.shared.cheats"),"isCheatActivated") 1
; 12 0e 00 00     ======> 29 25 b4 01   ;; popstack / pushInt 180   ;; also remove test
iffalse ofs0023
; 5e dc 88 01
findproperty Qname(PrivateNamespace(null,"157"),"MAX_GAMEPLAY_TIME")
; 24 0b           ======> 2b 02       ;; swapstack / nop ;; fix stack order
pushbyte 11
; 61 dc 88 01
setproperty Qname(PrivateNamespace(null,"157"),"MAX_GAMEPLAY_TIME")

ie
Code:

scan: 12 0e 00 00 5e ?? ?? ?? 24 0b
swap: 29 25 b4 01 ?? ?? ?? ?? 2b 02

let's pray it work~


It worked great. Very Happy
Now I have to spend some more time for "C #".
Thanks for this excellent coding.
+1 always the masters.
Thanks again.


_________________
Hi Hitler Make a Youtube Web for Trainer
https://forum.cheatengine.org/viewtopic.php?t=609146
Enthusiastic people: Always one step ahead
Do not underestimate me Master: You were a beginner in the past
Back to top
View user's profile Send private message MSN Messenger
Display posts from previous:   
Post new topic   Reply to topic    Cheat Engine Forum Index -> Cheat Engine Lua Scripting All times are GMT - 6 Hours
Page 1 of 1

 
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