Jump to content
  • 0

Seekbar Function For Execute Saved List


Dimz_Alberto

Question

Hello, 

Please can someone help me with function of seekbar ? 

I use this setting as some kind of mod menu :

fileData = gg.EXT_STORAGE .. "/###.dat"
modmenu = "⚙️ Mod Menu"
function modmenu()
         menu = gg.multiChoice
 
(
  {
    MENU1 .. "Enemy Freeze",
	MENU2 .. "No Hunger",
	MENU3 .. "Fast Travel",
                             }, 
    nil, "Check Box Function")
  
  if menu == 1 then Enemy Freeze(A) end
  if menu == 2 then No Hunger(B)    end
  if menu == 3 then Fast Travel(C)  end
 
  elseif menu == nil then Main() end
  Manchung = -1
  end
  
  --1 ENEMY FREEZE
MENU1 = "【⛔】"
function enemy_freeze(A)
if MENU1 == "【⛔】"
  then 
    gg.clearResults()
      io.output(fileData):write([[
13987
Var #B1024D94|b1024d94|4|e12fff1ee3a00001|0|0|0|0|r-xp|/data/app/zombie.survival.craft.z-GCJumgOlm0drOOgseM8-rQ==/lib/arm/libil2cpp.so|xxxxxx
]])
  :close()
    gg.loadList(fileData, gg.LOAD_APPEND | gg.LOAD_VALUES)
    gg.sleep(50)
    gg.clearList()
    gg.clearResults()
    gg.toast("Activated")

MENU1 = "【✅️】"   
elseif MENU1 == "【✅️】"
  then  
    gg.clearResults()
      io.output(fileData):write([[
13987
Var #B1024D94|b1024d94|4|e28db018e92d4bf0|0|0|0|0|r-xp|/data/app/zombie.survival.craft.z-GCJumgOlm0drOOgseM8-rQ==/lib/arm/libil2cpp.so|xxxxxx
]])
  :close()
    gg.loadList(fileData, gg.LOAD_APPEND | gg.LOAD_VALUES)
    gg.sleep(50)
    gg.clearList()
    gg.clearResults()
    gg.toast("Off")
MENU1 = "【⛔】"   
end 
end
  
  
  
  

So I wanted to make this menu work on seekbar, example seekbar

Lvl 1, using arm code MOV R0, #1 

Lvl 2, using arm code : MOV R0, #2 

And so on.. 

I used a saved list of editing value on libil2cpp.so . So in my imagination it would be seekbar lvl 1 will exe function a , seekbar lvl 2 will exe function b, c , d , e and so on.. 

 

Please help me ..

Link to comment
Share on other sites

4 answers to this question

Recommended Posts

Try this

local ARM = "MOV R0, #%d"
local function main()
  local prompt = gg.prompt({"Select[1;10]"}, nil, {"number"})
  if (not prompt) then
    return nil
  else
    local value = ARM:format(tonumber(prompt[1]))
    gg.alert (value)
  end
end
main()

 

Link to comment
Share on other sites

On 5/12/2022 at 10:25 AM, MAARS said:

Try this

local ARM = "MOV R0, #%d"
local function main()
  local prompt = gg.prompt({"Select[1;10]"}, nil, {"number"})
  if (not prompt) then
    return nil
  else
    local value = ARM:format(tonumber(prompt[1]))
    gg.alert (value)
  end
end
main()

 

How if value is < 0? it doesn't work on him.

Link to comment
Share on other sites

The function will work, but ARM does not accept negative value like that, if you patch the memory the game will probably freeze and crash. you can look on YouTube how to return negative number

Screenshot_20220513-081055_Chrome.png

Link to comment
Share on other sites

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.