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 


Unable to execute LUA script

 
Post new topic   Reply to topic    Cheat Engine Forum Index -> Cheat Engine Lua Scripting
View previous topic :: View next topic  
Author Message
awawerre
How do I cheat?
Reputation: 0

Joined: 06 May 2014
Posts: 2

PostPosted: Sat Feb 13, 2016 1:11 pm    Post subject: Unable to execute LUA script Reply with quote

So, er, I looked up for some RPG maker MV (or mx) cheat engine guide and managed to find this script.

Code:
Code:
typename="RPG maker MX"
bytecount=4  --number of bytes of this type
functionbasename="RPGMakerMX"

function RPGMakerMX_bytestovalue(b1,b2,b3,b4,address)
 local DataAddress=3+(b1+b2*256+b3*65536+b4*16777216);
  if ((DataAddress)%4 ~= 0 or DataAddress<0x1000) then --return 0 if DataAddress isn't a valid 32bit aligned address
    return 0
  else
    return readDouble(DataAddress) --return (double) [address]+3
  end
end

function RPGMakerMX_valuetobytes(i,address)
  local OriginalValue=readInteger(address)
  local ReturnValue=dwordToByteTable(OriginalValue);
  writeDouble(OriginalValue+3,i) --write i at [address]+3
return ReturnValue[1],ReturnValue[2],ReturnValue[3],ReturnValue[4]

end
return typename,bytecount,functionbasename


I copy pasted this thing into the "Show Cheat Table Lua Script" and clicked execute script, but nothing happened.
I tried another approach and saved the script into a file, and loading it that way. It said that this file contains a LUA script, and do you want to execute it? I said yes and once again nothing happened.

Am I doing something wrong here?
Back to top
View user's profile Send private message
panraven
Grandmaster Cheater
Reputation: 62

Joined: 01 Oct 2008
Posts: 959

PostPosted: Sat Feb 13, 2016 1:24 pm    Post subject: Reply with quote

The script is for Custom Type (for Scanning etc.), similar to double, 4 bytes etc.

To define/edit a Custom Type, Right-Click the 'Value Type' of the Scan Panel while not performing any scanning task.

There will be 2 or 4 menu item, depend on the selected 'Value Type', 2 for standard type, 4 for defined custom type.
1.Define new custom type (Auto Assembler)
2.Define new custom type (Lua)
3.Edit selected custom type
4.Delete selected custom type

Your script is using Lua, so for defining new, select 2, then paste the script.
If after defined, and want to edit it, select the custom type 1st, then right-click and select 3.

bye~

_________________
- Retarded.
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
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