Jump to content
  • 0

need help writing a complex function


zolotov123344

Question

Posted

So. I want to make a seekbar with 100 fragments. Now I'll tell you in more detail, so I need to add damage to the game, that is, for example, when shooting in the leg, the enemy takes 15 damage, I need to add the same value from the seekbar that the user has chosen to this value of 15. It sounds not difficult, but the problem is that this damage value does not work on any double word, but works in hexadecimal, it turns out that the script needs to translate the value of the favored person into hexadecimal and add it to the damage value. Another very important detail, the script works on the load list, that is, it is necessary to make sure that after the seekbar a load list is automatically created to increase the damage. The function, even in my understanding, is very complex, so I'm now turning to really smart scripters. This can be said to be a challenge for you)

8 answers to this question

Recommended Posts

Posted
4 hours ago, zolotov123344 said:

So. I want to make a seekbar with 100 fragments. Now I'll tell you in more detail, so I need to add damage to the game, that is, for example, when shooting in the leg, the enemy takes 15 damage, I need to add the same value from the seekbar that the user has chosen to this value of 15. It sounds not difficult, but the problem is that this damage value does not work on any double word, but works in hexadecimal, it turns out that the script needs to translate the value of the favored person into hexadecimal and add it to the damage value. Another very important detail, the script works on the load list, that is, it is necessary to make sure that after the seekbar a load list is automatically created to increase the damage. The function, even in my understanding, is very complex, so I'm now turning to really smart scripters. This can be said to be a challenge for you)

Then what do ask?

Posted
1 hour ago, zolotov123344 said:

ARM HEX

Try use index:

local damage = {15, 16, 17, 18}--table index, you can change what you want

local inDamage = gg.prompt({"Select damage:[0;4]"}, nil, {"number"})

if inDamage then

inDamage = damage[inDamage[1]]

--make your script

end

Posted
1 hour ago, HEROGAMEOfficial said:

Try use index:

local damage = {15, 16, 17, 18}--table index, you can change what you want

local inDamage = gg.prompt({"Select damage:[0;4]"}, nil, {"number"})

if inDamage then

inDamage = damage[inDamage[1]]

--make your script

end

it doesn't suit me

Posted
6 hours ago, HEROGAMEOfficial said:

ok you Just need convert to hex.

print (string.format("%X", 123456))

Arm hex dont work like that

ARM HEX is ARM OPCODE translated to hex notation

Archived

This topic is now archived and is closed to further replies.

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