Jump to content
  • 0

edit script


blocx
 Share

Question

hi all im very noob in coding but i want to know if it possible to modify an script recorded in gg ? i would to add an interface i develop i record a script that modify the acceleration time and i want add an menu with le name of car if you know teach me how to thanks

Link to comment
Share on other sites

13 answers to this question

Recommended Posts

  • 0

1. You can edit recorded scripts after you record the script the script should be in your downloads or the directory you picked

2. to make a menu you do this

--main code
function CN1()
 --code here
end
function CN2()
  --code here
end
function CN3()
 --code here
end
function CN4()
  --code here
end
menu = gg.choice({
  "car name 1"
  "car name 2"
  "car name 3"
  "car name 4"
  "exit"
  },nil,"car menu")
if menu == 1 then
CN1()
end
if menu == 2 then
CN2()
end
if menu == 3 then
CN3()
end
if menu == 4 then
CN4()
end
if menu == 5 then
os.exit()
end
if menu == nil then end

3. please explain more on the acceleration time? 🙂 

Link to comment
Share on other sites

  • 0

@Crystal_Mods100x
its for real racing 3 for the exemple for the script i try i use an car with 2,50 s in acceleration i modify to 0,50 and i make and andurance race i can run untill i want to stop question in your exemple when u writte code here i would say than i can paste the script ? 

[added 4 minutes later]

if i understand its that ?

--main code
function CN1(jaquar xtype?)
 --code here i paste the script record for jaguar ?
end
function CN2(acura nsx)
  --code here i paste here script record for acura ?
end
function CN3()
 --code here
end
function CN4()
  --code here
end
menu = gg.choice({
  "car name 1"
  "car name 2"
  "car name 3"
  "car name 4"
  "exit"
  },nil,"car menu")
if menu == 1 then
CN1(jaguar xtype ?)
end
if menu == 2 then
CN2(acura nsx ?)
end
if menu == 3 then
CN3()
end
if menu == 4 then
CN4()
end
if menu == 5 then
os.exit()
end
if menu == nil then end

Link to comment
Share on other sites

  • 0

this is a menu thats the code what i pasted the menu is gg.choice which is the buttons the texts in gg.choice are the button texts for the buttons its a table containing multiple texts which gg handles them as buttons

example: menu = gg.choice({"item one","item two"})

these are 2 diffrent buttons

and we add event listeners to them to check if button is clicked

if menu ==1 (if car name 1 is clicked) then

CN1()   --this is a function which is declared first above the menu

end

so it looks like you wanted game guardian to search the number 2.50 and edit it to 50 ? is that it?

also what data type are you modifying this in?

are you searching one value or multiple values?

how many results are you getting from this value?

Yes you can copy this script and paste it into the recorded script

Edited by Crystal_Mods100x
Link to comment
Share on other sites

  • 0

sorry i dont understand i have zero notion lol and im french for the exemple for i try to understand for find value and change its ok i know i record with gg for one car for the example its an porsche and the script its thats where to copy ur code and what i do writte in ur code ?

-- Script generated by GameGuardian 101.1 (16142) at 2021-05-20 16:53:10 for Real Racing 3 [com.ea.games.r3_row 9.4.0 (9401)]
-- Lua help: http://gameguardian.net/help/

-- options
local scriptName = [=====[Script for Real Racing 3 9.4.0]=====]
local scriptVersion = '1.0.0'
local scriptAuthor = 'BLOC-XV'
local startToast = '😁😁ROULE PLUS VITE ET PLUS LOIN😁😁'
-- 0 - no check; 1 - check package only, 2 - check package and build
local checkTarget = 0

local targetName = [=====[Real Racing 3]=====]
local targetPkg = 'com.ea.games.r3_row'
local targetVersion = [=====[9.4.0]=====]
local targetBuild = 9401

-- functions

-- init
gg.require('101.1', 16142)

if startToast ~= '' then startToast = '\n'..startToast end
gg.toast(scriptName..' v'..scriptVersion..' by '..scriptAuthor..startToast)

if checkTarget ~= 0 then
    local info = gg.getTargetInfo()
    local check = false
    local current = false
    if checkTarget >= 1 then
        check = targetPkg
        current = info.packageName
    end
    if checkTarget >= 2 then
        check = check..' '..targetVersion..' ('..targetBuild..')'
        current = current..' '..info.versionName..' ('..info.versionCode..')'
    end
    if check ~= current then
        gg.alert('This script for "'..targetName..'" ['..check..'].\nYou select "'..info.label..'" ['..current..'].\nNow script exit.')
        os.exit()
    end
end
local revert = nil

-- main code
gg.searchNumber("2.56", gg.TYPE_FLOAT, false, gg.SIGN_EQUAL, 0, -1, 0)
revert = gg.getResults(500, nil, nil, nil, nil, nil, nil, nil, nil)
gg.editAll("0.25", gg.TYPE_FLOAT)

[added 1 minute later]

sorry for that i want understand @Crystal_Mods100x

Link to comment
Share on other sites

  • 0
--main code
function Audi()
--example code--
gg.searchNumber("2.56", gg.TYPE_FLOAT, false, gg.SIGN_EQUAL, 0, -1, 0)
revert = gg.getResults(500, nil, nil, nil, nil, nil, nil, nil, nil)
gg.editAll("0.25", gg.TYPE_FLOAT)
end

function Bmw()
--code here
end

function Chevrolet()
 --code here
end

function Dodge()
  --code here
end

menu = gg.choice({
  "Audi"
  "BMW"
  "Chevrolet"
  "Dodge"
  "Exit"
  },nil,"car menu")
if menu == 1 then
Audi()
end
if menu == 2 then
Bmw()
end
if menu == 3 then
Chevrolet()
end
if menu == 4 then
Dodge()
end
if menu == 5 then
os.exit()
end
if menu == nil then end

 

Link to comment
Share on other sites

  • 0

please if i pose the recorded script can just copy the good lines in your exemple becoz the script recorded have many line not just the search value all time i try to launch same error

Screenshot_20210520-201228_F1 VM.jpg

[added 1 minute later]

i am here whats wrong ?

--main code function Veneno() gg.searchNumber("2.25", gg.TYPE_FLOAT, false, gg.SIGN_EQUAL, 0, -1, 0) revert = gg.getResults(500, nil, nil, nil, nil, nil, nil, nil, nil) gg.editAll("0.25", gg.TYPE_FLOAT) end  function Porsche() gg.searchNumber("2.56", gg.TYPE_FLOAT, false, gg.SIGN_EQUAL, 0, -1, 0) revert = gg.getResults(500, nil, nil, nil, nil, nil, nil, nil, nil) gg.editAll("0.25", gg.TYPE_FLOAT) end  function Chevrolet()  --code here end  function Dodge()   --code here end  menu = gg.choice({   "Veneno"   "Porsche"   "Chevrolet"   "Dodge"   "Exit"   },nil,"car menu") if menu == 1 then Veneno() end if menu == 2 then Porsche() end if menu == 3 then Chevrolet() end if menu == 4 then Dodge() end if menu == 5 then os.exit() end if menu == nil then end

 

[added 3 minutes later]

sans titre.lua

Link to comment
Share on other sites

  • 0
local gg = gg

function main()
local menu = gg.choice({   
    "Veneno",
    "Porsche",
    "Chevrolet",
    "Dodge",  
    "Exit"},nil,"car menu")
if menu == nil then 
    
elseif 
    menu == 1 then Veneno() 
elseif 
    menu == 2 then Porsche()    
elseif 
    menu == 3 then Chevrolet()     
elseif 
    menu == 4 then Dodge()
elseif 
    menu == 5 then os.exit() 
end 
end

function Veneno() 
gg.searchNumber("2.25", gg.TYPE_FLOAT, false, gg.SIGN_EQUAL, 0, -1, 0)
revert = gg.getResults(500, nil, nil, nil, nil, nil, nil, nil, nil)
gg.editAll("0.25", gg.TYPE_FLOAT) 
gg.clearResults()
end  
  
function Porsche() 
gg.searchNumber("2.56", gg.TYPE_FLOAT, false, gg.SIGN_EQUAL, 0, -1, 0) 
revert = gg.getResults(500, nil, nil, nil, nil, nil, nil, nil, nil) 
gg.editAll("0.25", gg.TYPE_FLOAT) 
gg.clearResults()
end  

function Chevrolet()  
--code here 
end  

function Dodge()   
--code here 
end  

  
while true do
if gg.isVisible() then
gg.setVisible(false)
main()
end
end

my mistake...there are some errors in the example script given by @Crystal_Mods100x that i misslook.

try this one.

Edited by MonkeySAN
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.