Jump to content
  • 0

Script Dragon Ball Legends


WebReveuse1
 Share

Question

Hello,
I just created my first lua script on the Dragon Ball Legends game on Android and I would like to have your opinion on this work which took time because I started ...
The ModMenu includes the following options:
- GodMod: Become Invincible
- Weak Ennemy: Make the opponent vulnerable (choice of the number of enemies to automate the task)
For the Weak Ennemy, when the opponent dies in excruciating pain after your fatal blow with the infinity glove, you automatically return to GameGuardian and the next opponent is automatically made vulnerable, until you extermination of each opponent.

::start::

mort = 1
gg.setVisible(true)
gg.clearResults()
gg.clearList()
menu = gg.choice({"💪GodMod💪","☠️Weak Ennemy☠️","Both"},nil,"VIP ModMenu Dragon Ball Legends")
if menu == nil then goto stop end
weakmod = 1
godmod = 1e30

if menu == 1 then
	both = false
	goto a 
end
if menu == 2 then
	both = false
	goto b 
end
if menu == 3 then
	both = true
	goto a
end
if menu == nil then goto stop end

::a::

data = gg.prompt({[1]='My HP'}, {[1]=nil})
if data == nil then goto start end
gg.searchNumber(data[1], gg.TYPE_FLOAT, false, gg.SIGN_EQUAL, 0, -1)
empty = gg.getResultsCount()
if empty == 0 then
	gg.clearResults()
	gg.searchNumber(data[1], gg.TYPE_AUTO, false, gg.SIGN_EQUAL, 0, -1)
end
gg.getResults(12)
gg.editAll(godmod, gg.TYPE_FLOAT)
gg.clearResults()
gg.toast("💪GodMod ACTIVATED💪")
if both == true then
	goto b
else
	goto stop
end

::b::

choix_nb_ennemy = gg.choice({'1', '2', '3'}, nil, 'Ennemy Number')
data = gg.prompt({[1]='Ennemy HP'}, {[1]=nil})
if data == nil then goto start end
gg.searchNumber(data[1], gg.TYPE_AUTO, false, gg.SIGN_EQUAL, 0, -1)
next_ennemy = data[1]
gg.getResults(20)
gg.editAll(weakmod, gg.TYPE_FLOAT)
gg.toast("☠️Weak Ennemy ACTIVATED☠️")
goto c

::c::

if gg.isVisible(true) then
	gg.setVisible(false)
end

if choix_nb_ennemy == 1 then
	nb_ennemy = 1
end
if choix_nb_ennemy == 2 then
	nb_ennemy = 2
end
if choix_nb_ennemy == 3 then
	nb_ennemy = 3
end

while mort <= nb_ennemy do
	if mort == nb_ennemy then break end
	for i, v in pairs(gg.getResults(16, nil, nil, nil, nil, nil, gg.TYPE_DWORD | gg.TYPE_QWORD)) do
		if v.value > 1 and v.value ~= next_ennemy then
			gg.toast("☠️Ennemy is Dead☠️Back to GG...")
			gg.sleep(1000)
			next_ennemy = v.value
			goto d
		end
	end
end

gg.toast("☠️Ennemy is Dead☠️👑YOU WIN👑")
goto stop

::d::

mort = mort + 1
gg.setVisible(true)
gg.clearResults()
gg.searchNumber(next_ennemy, gg.TYPE_AUTO, false, gg.SIGN_EQUAL, 0, -1)
gg.getResults(16)
gg.editAll(weakmod, gg.TYPE_FLOAT)
gg.toast("☠️Weak Ennemy ACTIVATED☠️")
goto c

::stop::

if gg.isVisible(true) then
	gg.setVisible(false)
end
gg.clearResults()
os.exit()

I also have a question: Can we make sure that the values are automatically found at the launch of the script without the user entering anything? For example when the fight begins, my character has 1 500 000 HP, can we find this value without the user entering "1500000" in the script?
Thank you for your feedback!

WebReveuse1

 

Edited by WebReveuse1
Link to comment
Share on other sites

12 answers to this question

Recommended Posts

  • 0

Hello,

I was trying to see of any pointer could be useful but it is way too long to search for that in a consistency way on this kind of game.

All pointer I found are fixed, like fighters data.
The game is very poorly design, there is no memory cleanup (pain in the a**...), you can see that by entering a new fight and still see the previous stats you modified...

By the way, there is a real godmod included in the game, when you search for the HP value, you should have the current (perhaps equal to max at the start of a battle) and 2 other one.
One of the value will give you a structure like :
HP
0 <-- This value can be set to 1, like a boolean but in float format (yeah... I know)... And no matter your curent HP they will become 999 999 999 and you will be immortal.

FLOAT
0
Stat 1 
Stat 2
Stat 3
Stat 4
8 times 0
FLOAT <-- This one and 3 next float corresponding to ki regen (99999 means instant Ki) and doge refill time (at 99999 you can doge all attacks).
3 times 0 <-- If you set that to DWORD value you will have a shield (yes, there are shields in this game, like physical, energy, and choc I think), shield will adsorb part of damages (even you put 999 999 you will still be injured
FLOAT
0
FLOAT
0
FLOAT ALWAYS 2000 !
Next 5/8 DWORD (did not test all of the value) represent a bonus damage to each of your attack (simple, physical card, energy card, choc).
There is some more value at this spot but It is way too long to test everything in a timed battle.
By the way if someone know how to freeze time... I did not figure out how it is stored. Perhaps millisec or sec, don't know.

Link to comment
Share on other sites

  • 0

Hello,

Thank you for your answer !  On the other hand I am not sure of having understood everything ... according to what I understood it is enough simply to look for the value of the HP of the player and to replace by 1 for the godmod?  Or do you have to go into the memory and change something else ...?  

And I did not understand your "FLOAT 0 FOAT 0 ..." 😅

Thank you

Link to comment
Share on other sites

  • 0

You search for the (max) HP. If you are at start of a battle, you should get at least 4 results.

Among these results, you must find the one that looks like (when you go to the memory viewer - tap on the HP, go to, then look at the memory order) the same I described.

The HP 0 FLOAT etc. is the order of bytes in the memory viewer.
So the 4th bytes after the HP (basically if you just display DWORD and FLOAT it is the line after the HP) allows you to activate a god mode.
Example of my Beerus EX in fight is attached. You can see on the third image the match with what I wrote before HP FLOAD 0 STAT1 etc.
 

Screenshot_20191129-173214.jpg

Screenshot_20191129-173223.jpg

Screenshot_20191129-173227.jpg

Link to comment
Share on other sites

  • 0

Super thanks for your clear explanation !

Now that I have been able to test for myself that the HPs work, I find that the unlimited ki does not work.But the unlimited dodge works, though I put the variables at 99999 as you told me.

Is there a way to directly win the game by setting the HP values of the enemy to 0 for example?

thank you for responding so quickly 👌

Link to comment
Share on other sites

  • 0

No because of the way the game manages HP. Like when you counter it stay at 1, same forbthz rush or whatever the name in English if you look at HP the enemy will stay at 1 until animation finish because it needs to check what is the status next, like some enemy in smthe story mode you cannot defeat even with 10 millions damages. 

So unless someone find the code in memory that check the winning condition. It is already the case as some modded apk does that, but I guess the author won't share anything... 

The same mod also allows to win all challenge without doing anything so it is possible but don't know how just with memory editing. 

Link to comment
Share on other sites

  • 0

LAST SCRIPT UPDATE :

::start::

mort = 0

if gg.isVisible(true) then

	gg.setVisible(false)

end

if gg.isProcessPaused() == false then

	gg.processPause()

end

gg.clearResults()
gg.clearList()
menu = gg.choice({"💪GodMod💪","☠️Weak Ennemy☠️","Both"},nil,"VIP ModMenu Dragon Ball Legends")

if menu == nil then goto stop end

weakmod = 1
godmod = 1e30

if menu == 1 then

	both = false
	goto a

end

if menu == 2 then

	both = false
	goto b

end

if menu == 3 then

	both = true
	goto a

end

if menu == nil then goto stop end

::a::

data = gg.prompt({[1]='My HP'}, {[1]=nil})

if data == nil then goto start end

gg.searchNumber(data[1], gg.TYPE_FLOAT, false, gg.SIGN_EQUAL, 0, -1)

empty = gg.getResultsCount()

if empty == 0 then

	gg.clearResults()
	gg.searchNumber(data[1], gg.TYPE_AUTO, false, gg.SIGN_EQUAL, 0, -1)

end

gg.getResults(12)
gg.editAll(godmod, gg.TYPE_FLOAT)
gg.clearResults()
gg.toast("💪GodMod ACTIVATED💪")

if both == true then
	goto b
else
	goto stop
end

::b::

data = gg.prompt({[1]='Ennemy HP'}, {[1]=nil})

if data == nil then goto start end

gg.searchNumber(data[1], gg.TYPE_AUTO, false, gg.SIGN_EQUAL, 0, -1)
next_ennemy = data[1]
gg.getResults(20)
gg.editAll(weakmod, gg.TYPE_FLOAT)
gg.toast("☠️Weak Ennemy ACTIVATED☠️")

goto c

::c::

gg.processResume()

if gg.isVisible(true) then

	gg.setVisible(false)

end

val_inf = -1
goto f

::f::

	for i, v in ipairs(gg.getResults(30, nil, nil, nil, nil, nil, gg.TYPE_QWORD)) do

		if v.value > weakmod and v.value ~= next_ennemy and v.value ~= val_inf then

			val_inf = v.value
   goto f

  elseif v.value > 1 and v.value ~= next_ennemy and v.value == val_inf then

   next_ennemy = v.value
   goto e

		end
	end
goto f

::e::

mort = mort + 1

for i, v in ipairs(gg.getResults(30, nil, nil, nil, nil, nil, gg.TYPE_QWORD)) do

	if v.value == 0 then

		goto stop

	end
end

gg.toast("☠️"..mort.." ennemies are Dead☠️")
goto d

::d::

if gg.isProcessPaused() == false then

	gg.processPause()

end

gg.clearResults()
gg.searchNumber(next_ennemy, gg.TYPE_AUTO, false, gg.SIGN_EQUAL, 0, -1)
gg.getResults(30)
gg.editAll(weakmod, gg.TYPE_FLOAT)
gg.toast("☠️Weak Ennemy ACTIVATED☠️")
goto c

::stop::

gg.toast("☠️All Ennemies are Dead☠️                 👑YOU WIN👑")
gg.processResume()
gg.clearResults()
os.exit()

Just copy-paste into a empty file named like "DBLEGENDSHACK.lua" or "Dblhack.txt" it's same

Link to comment
Share on other sites

  • 0

yes I am French, but on this site they impose English, so that everyone can understand ... I would like to deepen this script and make everything happen automatically. I'd like to get into the fight and the script finds the value of HP alone,then that it modifies the HP of the allies. He is already able to automatically change the HOs of the next enemies after entering the enemy HP for the first time.But it does not work for the allies.

Link to comment
Share on other sites

  • 0

Yeah true. 

I don't see how you get newy enemy in fact? 

Because HP are changing and location in memory is not linked between enemies. 

You do only one search from the first HP the user type but that is all. 

Or miss something? 

I see you get other value from the first result but the memory is not the same so without a new search it cannot find the HP of 2nd and 3rd enemy. 

I know the value are in Q format in the first results but no new search? 

Edited by CodeKiller
Link to comment
Share on other sites

  • 0

I noticed that the FLOAT variable of the enemy's HP is associated with a DWORD value (it's the same value except that there is no comma lol) and when the enemy dies there is only this changing DWORD value and not the FLOAT at the same address So just make a new search in FLOAT with this DWORD value which corresponds to the HP value of the new enemy.

Link to comment
Share on other sites

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
 Share

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