
chandelier
Members-
Posts
24 -
Joined
-
Last visited
-
Days Won
1
chandelier last won the day on June 7
chandelier had the most liked content!
Recent Profile Visitors
The recent visitors block is disabled and is not being shown to other users.
chandelier's Achievements
-
thankyou so much my good man, i will try the code later ahh its my first time seeing that, thankyou, i have something in other code that will need this later.
-
interesting, ahh and in another code about removing a value in saved list, if i want to add another condition, is it fine if i write like this? i dont know if this works since i saw condition with both string and integer local savedItems = gg.getListItems() local tableATK = {} for i, v in ipairs(savedItems) do if v.address & 0xF == 0xC and v.name == "ATK" and v.value == 0 then tableATK[#tableATK + 1] = v end gg.removeListItems(tableATK) end
-
hello its me again, i still couldnt find solution about comparing address and... changing the value. the goal is to edit a value in each different address using offset, before going to the code, let me give a briefing. 0x1234567C value 19 DWORD (address "C" is static, the rest always changing) 0x123456D8 value 19 DWORD (address "D8" is static, the rest always changing) and here is my lua code, correct me please, i knew my code below is wrong. gg.searchNumber("19",gg.TYPE_DWORD) local t = gg.getResults(2) for i, v in ipairs(t) do if v.address == "C" then local q = {} q[1].address = t[1].address + 0x2 q[1].flags = 4 q[1].value = 2 q[1].freeze = true q[1].name = 'ATK' q[2].address = t[1].address + 0x20 q[2].flags = 4 q[2].value = 20 q[2].freeze = true q[2].name = 'ATK SPD' end if v.address == "D8" then local q = {} q[1].address = t[1].address + 0x4 q[1].flags = 4 q[1].value = 4 q[1].freeze = true q[1].name = 'MOVE' q[2].address = t[1].address + 0x40 q[2].flags = 4 q[2].value = 40 q[2].freeze = true q[2].name = 'MOVE SPD' end gg.setValues(q) gg.addListItems(q) end
-
as always, yours are better xD it fixed some problem when im using mine anyway thankyou so muchhhh
-
ah i found the solution but idk if i can make it more efficient, local lang = {' English',' Español'} local selectHack = {"ONLY SELECT ONE HACK", "ELIGE SOLO UN TRUCO"} local hack = {{'Position', 'Teleport'}, {'Posición', 'Teletransportarse'}} local teleporthack = {{'Map 1', 'Map 2'}, {'Mapa 1', 'Mapa 2'}} local toast = {{'Position Hack chosen!', 'Teleport Hack chosen!'},{'¡Posición elegida!', '¡Teletransportado!'}} function SelectLanguage() local menu = gg.choice(lang, nil,'CHOOSE LANGUAGE / ELIGE EL IDIOMA') if menu == nil then os.exit() else langC = menu Main() end end function Main() local menu = gg.choice(hack[langC], nil, selectHack[langC]) if menu == nil then return end gg.toast(toast[langC][menu]) if menu == 1 then -- Position Hack menutext = menu elseif menu == 2 then TeleportHack() menutext = menu end end function TeleportHack() local menu = gg.choice(teleporthack[langC], nil, tostring(hack[langC][menutext]).."\n"..selectHack[langC]) if menu == nil then return end if menu == 1 then -- Map 1 elseif menu == 2 then -- Map 2 end end gg.setVisible(false) SelectLanguage() while true do if gg.isVisible() then gg.setVisible(false) Main() end gg.sleep(100) end
-
sorry if i reopen this rather than making new help topic, it should have been solved the other day but, i need help again regarding this help topic and want to add something on my menu. how do i add current chosen menu text from local hack table to gg.choice in the function TeleportHack()? local lang = {' English',' Español'} local selectHack = {"ONLY SELECT ONE HACK", "ELIGE SOLO UN TRUCO"} local hack = {{'Position', 'Teleport'}, {'Posición', 'Teletransportarse'}} local teleporthack = {{'Map 1', 'Map 2'}, {'Mapa 1', 'Mapa 2'}} local toast = {{'Position Hack chosen!', 'Teleport Hack chosen!'},{'¡Posición elegida!', '¡Teletransportado!'}} function SelectLanguage() local menu = gg.choice(lang, nil,'CHOOSE LANGUAGE / ELIGE EL IDIOMA') if menu == nil then os.exit() else langC = menu Main() end end function Main() local menu = gg.choice(hack[langC], nil, selectHack[langC]) if menu == nil then return end gg.toast(toast[langC][menu]) if menu == 1 then -- Position Hack elseif menu == 2 then TeleportHack() end end function TeleportHack() local menu = gg.choice(teleporthack[langC], nil, hack[langC][menu].."\n"..selectHack[langC]) if menu == nil then return end if menu == 1 then -- Map 1 elseif menu == 2 then -- Map 2 end end gg.setVisible(false) SelectLanguage() while true do if gg.isVisible() then gg.setVisible(false) Main() end gg.sleep(100) end I've tried code above but i got this error. attempt to concatenate a nil value (field'?')
-
ahh now you mentioned it xD thanks for pointing that out, yepp it does look more decent if i do that
-
ahh i just realized that i input dot instead of comma xD, well thankyou for replying, it does work, and im now working on updating all my menu and submenu thankyou so much my good man
-
hello again, here iam with my curiosity and experiment on lua scripting today i will make menu and the goal is to switch between language using menu text before making this, i ve read some past topic posted by RCPOLSKI heres his topic link RCPOLSI's Topic Link but i will try to make my version with the goal that i want. local lang = {' English'. ' Español'} local langC = 0 local hackEN = {'Position'. 'Teleport'} local hackSP = {'Posición'. 'Teletransportarse'} function SelectLanguage() local menu = gg.choice({lang[1], lang[2]}, nil,'ONLY SELECT ONE LANGUAGE') if menu == nil then os.exit end if menu == 1 then langC = 1 Main() end end if menu == 2 then langC = 2 Main() end end end function Main() if langC == 1 then local menu = gg.choice({hackEN[1], hackEN[2]}, nil,'ONLY SELECT ONE HACK') if menu == nil then os.exit end if menu == 1 then --Position Hack end if menu == 2 then --Teleport Hack end end if langC == 2 then local menu = gg.choice({hackSP[1], hackSP[2]}, nil,'ONLY SELECT ONE HACK') if menu == nil then os.exit end if menu == 1 then --Position Hack end if menu == 2 then --Teleport Hack end end end while true do if gg.isVisible() then gg.setVisible(false) SelectLanguage() end gg.sleep(100) end i wonder what i write above is correct or not, i havent try it yet. maybe perhaps, you can shorten the script text length?
-
ahh it does work, thankyou so much, i apreciate it, hope to see you again in my next question xD
-
ahh i see, it does work if i do that, thankyou.. a question from me, what if i have so many phase grouping that more than 3? do i need increment for it? so i dont have to write SET_POSITION(phaseValues[i][1], phaseValues[i][2], phaseValues[i][3].............................., phaseValues[i][1000])
-
hm maybe for now i will keep them outside function also in a case where i want to put another phase grouping like this : local phaseValues = {{171, 172, 200},{181, 182, 300},{191, 192, 400}} is it allowed to be written like that? after added that, so the full code will be this : function SET_POSITION(P1, P2, P3) local saved = gg.getListItems() local edited = {} for i, v in ipairs(saved) do if v.name == "P1" then v.value = P1 table.insert(edited, v) elseif v.name == "P2" then v.value = P2 table.insert(edited, v) elseif v.name == "P3" then v.value = P3 table.insert(edited, v) end end if #edited > 0 then gg.setValues(edited) gg.addListItems(edited) else gg.toast("NO MATCHING P1/P2/P3 FOUND.") end end local function createPhaseDisplayer(phaseValues, buffInfo, progressSymbol, backgroundSymbol) local phasesCount = #phaseValues local currentPhase = 0 return function () currentPhase = currentPhase + 1 if currentPhase > phasesCount then os.exit() end local indicatorFirstPart = string.rep(progressSymbol, currentPhase) local indicatorSecondPart = string.rep(backgroundSymbol, phasesCount - currentPhase) local indicator = indicatorFirstPart .. indicatorSecondPart local phaseValue = phaseValues[currentPhase] local buffInfo = buffInfo local displayMessage = string.format("\n%s : %s", buffInfo, indicator) gg.toast(displayMessage, true) end end local phaseValues = {{171, 172, 200},{181, 182, 300},{191, 192, 400}} local buffInfo = "MISSION" local symbol1 = "=" local symbol2 = "-" local displayPhase = createPhaseDisplayer(phaseValues, buffInfo, symbol1, symbol2) for i = 1, #phaseValues do SET_POSITION(phaseValues[i]) displayPhase() end
-
ahhh i dont know why it works just by deleting +1 on #phaseValues , and adding [i] on SET_BUFF(phaseValues()) well as long as it works im good and i found another problem when im trying to put them on function and call them back inside a function function BUFF_TRIGGER() local symbol1 = "=" local symbol2 = "-" local displayPhase = createPhaseDisplayer(phaseValues, buffInfo, symbol1, symbol2) for i = 1, #phaseValues do SET_BUFF(phaseValues[i]) displayPhase() end end function SET_BUFF(BUFF) gg.sleep(6000) local saved_buff = gg.getListItems() local edited_buff = {} for i, v in ipairs(saved_buff) do if v.name == "BUFF" then v.value = BUFF v.freeze = true table.insert(edited_buff, v) end end if #edited_buff > 0 then gg.setValues(edited_buff) gg.addListItems(edited_buff) else gg.toast("NO MATCHING BUFF FOUND.") end end local function createPhaseDisplayer(phaseValues, buffInfo, progressSymbol, backgroundSymbol) local phasesCount = #phaseValues local currentPhase = 0 return function () currentPhase = currentPhase + 1 if currentPhase > phasesCount then os.exit() end local indicatorFirstPart = string.rep(progressSymbol, currentPhase) local indicatorSecondPart = string.rep(backgroundSymbol, phasesCount - currentPhase) local indicator = indicatorFirstPart .. indicatorSecondPart local phaseValue = phaseValues[currentPhase] local buffInfo = buffInfo local displayMessage = string.format("\n%s : %s", buffInfo, indicator) gg.toast(displayMessage, true) end end function Main() local phaseValues = {171, 172, 200} local buffInfo = "MISSION" BUFF_TRIGGER() end Main()
-
oof after i implemented on some part of my script, theres some error about bad argument for key 'value' : string expected, got table (field'setValue') function SET_BUFF(BUFF) gg.sleep(6000) local saved_buff = gg.getListItems() local edited_buff = {} for i, v in ipairs(saved_buff) do if v.name == "BUFF" then v.value = BUFF v.freeze = true table.insert(edited_buff, v) end end if #edited_buff > 0 then gg.setValues(edited_buff) gg.addListItems(edited_buff) else gg.toast("NO MATCHING BUFF FOUND.") end end local function createPhaseDisplayer(phaseValues, buffInfo, progressSymbol, backgroundSymbol) local phasesCount = #phaseValues local currentPhase = 0 return function () currentPhase = currentPhase + 1 if currentPhase > phasesCount then os.exit() end local indicatorFirstPart = string.rep(progressSymbol, currentPhase) local indicatorSecondPart = string.rep(backgroundSymbol, phasesCount - currentPhase) local indicator = indicatorFirstPart .. indicatorSecondPart local phaseValue = phaseValues[currentPhase] local buffInfo = buffInfo local displayMessage = string.format("\n%s : %s", buffInfo, indicator) gg.toast(displayMessage, true) end end local phaseValues = {171, 172, 200} local buffInfo = "MISSION" local symbol1 = "=" local symbol2 = "-" local displayPhase = createPhaseDisplayer(phaseValues, buffInfo, symbol1, symbol2) for i = 1, #phaseValues + 1 do SET_BUFF(phaseValues) displayPhase() end the toast in displayPhase() works fine
-
awesome work, at first idk what it does, im fine as long as the goal is reached, well i tried it and already experiment on it. and will put the code here on my full script, thankyou so much my good man