Jump to content

Recommended Posts

Posted

Hello. In certain RPG game I know that after the MP value has the value of the special bar that always starts at 0 and can go up to 1600. I do the DWORD search and find these two values followed by another 5 which are always random and then two more values that are magic and spirit. How should I put in the escript to look for 2 known values followed by 5 unknown and 2 more known? example:

192 (current MP)

0 (special bar at the start of the fight)

1.722.5 (random value)

1.723.5 (random value)

1.724.5 (random value)

1.725.5 (random value)

15.674.8 (random value)

150 (magic)

104 (spirit)

What I want to do is a script that looks for those numbers I know (mp, special bar, Magic and spirit) and the random ones so I can change the value of the special bar. I am not aware of programming, but with the help of the posts I have already been able to do some scripts. thank you all.

 

Posted (edited)

But i only know four numbers, exemple: 192;0;x;x;x;x;x;150;104:2 cause all the "x" are always random, how group search to display in sequence know and unknow numbers? Thank you!

Edited by willkof2
Wrong word
  • Administrators
Posted

My answer stay same. Use group size 33. It is usually enough for find needed sequence.

Posted
On 17/07/2017 at 7:22 PM, Enyby said:

Not bad script from one chinese user:

299f7f3c972b82645d3a881b6117d978.jpg

Can be used as example for make automated group search with edit values.

Can you give an example of how to use this?

  • Administrators
Posted

No. If you do not know hot to use some code then this code not for you.

Or search someone who teach you and waste lot of time for that.

Posted (edited)

Enby, thanks for the answer. I have wrote the script I wanted and it works just fine. But I have some complain. I want to dismiss a final window of script automatically if there was nothing printed (I use print to catch errors such as there was nothing found). I can hide GG window so there is no need to press "Back" button but I want to not waste my taps to dismiss empty window ;)

 

PS. Adding LUA is soooo awsome. There is so much ways to make things easier. Thank you for your work!

Edited by AntonioOne
  • Administrators
Posted
15 minutes ago, AntonioOne said:

I want to dismiss a final window of script automatically if there was nothing printed

No. This need for inform user about script end.

Posted
if debug == 0
	then edit (on)
	else edit (off)
	end

Why even when debug == 1 it always returns edit (on)?

  • Administrators
Posted

For me worked:

local debug = 0
print('debug:', debug)
if debug == 0 then
	print('debug off')
else
	print('debug on')
end

local debug = 1
print('debug:', debug)
if debug == 0 then
	print('debug off')
else
	print('debug on')
end

 

scr_1504366525.jpg

_______________________________________________
added 1 minute later
1 hour ago, Aufar_R said:

when debug == 1

It is not set. Set directive include only one sign char. You write test for equals ("=="), not set ("=").

Posted

Hmm, it seems that making new functions in a lua script is pretty confusing??.

I messed things up and somehow it became good...

Btw, thank you.

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
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.