NotesWhat is notes.io?

Notes brand slogan

Notes - notes.io


Starting from version 8.28.0 game guardian included a support for LUA scripts.We can now make lua scripts for literary any game we play.This guide will take you through the full scripting tutorial from scratch assuming you have NO previous programming knowledge. By the end of this you should be able to create a script for your favorite game let’s get started.

REQUIREMENTS FOR MAKING A LUA SCRIPT
Starting off you need to know that game guardian scripts are made using a programming language called LUA hence the name Lua scripts for game guardian. Keep this in mind as we will be using Lua syntax,functions and rules.Don’t let these words scare you off we will try to make this guide as easy to follow and understand as possible.

To make a game guardian lua script we will require only two apps

Game Guardian version 8.28.0 or higher
Game guardian is a basic requirement as it’s the app responsible for executing scripts however you can only use game guardian 8.28.0 or higher as the versions before this do not support lua scripting. You will however note that game guardian only supports scripts execution but does NOT support script writing or editing. Currently the only way to create a lua script for game guardian is to use a third party application which brings us to our second requirement.

Download the latest version of game guardian

Lua editor
As stated above the only way to create or edit a game guardian lua script is through a third party application.This is where the Q-Lua app editor comes to the rescue. Through the editor we can write and save our scripts after which you can execute it using game guardian.

Download the latest version of Q-Lua editor

After installing Q-Lua we need to allow storage permissions to allow saving of scripts to do this go to your device settings then navigate to apps where you can view all apps installed on your device locate and select Q-Lua and you’ll be brought to the screen shown below click on permissions.


After selecting permissions you’ll be brought to the screen shown below make sure the storage option has been checked as shown in the image below this will grant storage permissions to Q-Lua and will allow you to create, save and edit scripts on your device.


After doing this you’re good to go and you can now create your first game guardian lua script.

STEPS OF MAKING A GAME GUARDIAN LUA SCRIPT
STEP 1: Install and launch both game guardian and qlua app editor you should have the game guardian floating window over the open qlua interface as shown in the image below. Click on editor to create a new empty lua script.


STEP 2: You will be brought to a screen as the one shown below with an empty lua script.


Click on the save icon and choose a name for your lua script. In the example below I will save my script as “trial.lua”. You can change the name before the extension to whatever you want e.g. if you want to make a script that grants unlimited gems you’d save it as “unlimitedgems.lua” instead. Note that the extension “.lua” is very important and must be included to avoid errors.

STEP 3: After saving your script you’ll be brought back to your blank lua script we will now begin by adding a script menu that will allow your script user to select an option. This is where lua scripting comes into play we will begin by learning how to make a menu as the one shown below.


HOW TO MAKE A LUA SCRIPT MENU
As you can see the script has four options that the user can choose from option 1-4.To achieve the same result we need to use codes to “tell” game guardian we need a menu with the specified options.To do this we will use the codes shown below.

menu=gg.choice({‘Option 1′,’Option 2′,’Option 3′,’Option 4’})

You will input the code exactly as shown above into the qlua editor after which you’ll click on the save button as shown in the image below.


STEP 4: After saving your lua script successfully we need to test it using game guardian to ensure that everything is working as expected.To do this we will open the game guardian interface and select the execute script option shown below note that you can use any process/activity to test scripts doesn’t necessarily have to be qlua process.


On clicking on the button shown above an interface will open up asking you to select the script file you want to execute navigate to the directory where you saved your lua script you will notice your lua script highlighted in green with the name you assigned to it as shown below.


STEP 5: After selecting your script click on the execute button shown below to run the script


If you have done the above steps correctly you should be able to see the screen shown below.


As you notice this is a menu with 4 options and the user can select either of the options you can however change the ‘option 1’ to anything you want lets change the wording to see how this works.This time I will create a menu with different option to do this I will use the code below:

menu=gg.choice({‘Subscribe’,’Unlimited Gems’,’Super Speed’,’Exit’})

As you’ve noticed this time I have used a slightly different menu however the code structure remains the same when you save and execute the code above we will have the menu shown below


Now that you’ve understood the basics of creating a script menu we will dive a little bit deeper on how to make the script responsive.You will notice that when you select any option in the list the script does nothing instead it just ends with a notification as shown below.


MAKING THE LUA SCRIPT RESPONSIVE
We will now learn how to make the lua script responsive such that when you click on or select any option the script does what it’s expected to do. For this we will add code to instruct it on what to do depending on the user’s selection.For this we will use our new menu that we just created.

menu=gg.choice({‘Subscribe’,’Unlimited Gems’,’Super Speed’,’Exit’})

We will start by the first option “Subscribe”.I want to make this script responsive such that anytime anyone clicks on subscribe it will show a message “Subscribe to ronoplays.com” but how do we do this?

Showing alerts/messages using lua scripts
First we need to know what code we will use to show alerts/messages to users for this we will use a simple code:

gg.alert(”)

anything between the brackets will be shown to the users as a message so to show our message to the user we will write:

gg.alert(‘Subscribe to ronoplays.com’)

Now that we know the code to show alerts we can integrate this to our menu so that if the user select subscribe our message is shown to them.For this we will use a simple if statement. Since we have assigned the table to a variable “menu” we can specify actions In relation to the variable menu as shown below.

menu=gg.choice({‘Subscribe’,’Unlimited Gems’,’Super Speed’,’Exit’})

if menu==1 then

gg.alert(‘Subscribe to ronoplays.com’)

end

The code above simply instructs the lua script to give the user a message “Subscribe to ronoplays.com” if they select the first option. Type and save the code above into your lua editor as shown below:


When we execute the code above and select the first option “subscribe” we get a response shown below.


Now that you are familiar with the functionality lets add code for the second option “Unlimited gems”.For this we will need to search and replace a value for gems let’s take for example we’re playing a game and currently only have 10 gems but we want to change this to 1000 how do we write a script to do this?

SEARCHING FOR VALUES
Searching for values using a lua script is easy all we need to know is the value were searching for and its data type for this example I will use the value 10 and the data type dword.The code for searching in game guardian is

gg.searchnumber(’10’,gg.TYPE_DWORD)

The code above will search for the number 10 data type dword.Note that you can change the value 10 to anything you want to search for

SELECTING VALUES TO EDIT
After searching for values we have to select the values we want to edit from the result list before attempting to edit.To do this we use the code below

gg.getResults(100)

Note that the 100 in brackets is the number of results we want to select you can change this to any amount of results that you want to edit.

EDITING VALUES
Now that you’ve known how to search and select the values you want to edit we will learn how to edit your selected results.To edit we use the code below

gg.editAll(‘1000’,gg.TYPE_DWORD)

The code above will edit all selected results to whatever values they currently have to 1000.Note that you can change the 1000 to whatever value you want.

Now that we know how to search,select and edit results let combine these codes into one to do all these activities progressively.To do this we will combine the code as follows:

gg.searchnumber(’10’,gg.TYPE_DWORD)

gg.getresults(100)

gg.editAll(‘1000’,gg.TYPE_DWORD)

The code above will search for the number 10 select the first 100 results and edit them to 1000.Now that we have the full code for searching and replacing our gems value lets include this code to only run when the user selects option two from our menu above.For this we will use an if statement as we did with our first option in the menu.Combined the whole code should be as shown below

menu=gg.choice({‘Subscribe’,’Unlimited Gems’,’Super Speed’,’Exit’})

if menu==1 then

gg.alert(‘Subscribe to ronoplays.com’)

end

if menu==2 then

gg.searchnumber(’10’,gg.TYPE_DWORD)

gg.getresults()

gg.editAll(‘1000’,gg.TYPE_DWORD)

end

As you will notice we now have our menu and 2 if statements to give a response when the user selects them you will notice that the last 2options “super speed and exit” just end when selected as we have not yet added responsive code for either.The format is the same if we want to add code now lets add code for super speed.
Sürüm 8.28.0 oyun guardian başlayarak LUA komut dosyaları için bir destek dahil.Şimdi edebi oynadığımız herhangi bir oyun için LUA senaryoları yapabiliriz.Bu kılavuz hiçbir önceki programlama bilgisine sahip varsayarak sıfırdan tam komut dosyası öğretici götürecektir. Bu sonunda en sevdiğiniz oyun başlayalım için bir komut dosyası oluşturmak gerekir.

BİR LUA BETİĞİ YAPMAK İÇİN GEREKSİNİMLER
Eğer oyun guardian komut dolayısıyla oyun guardian için adı LUA komut LUA denilen bir programlama dili kullanılarak yapılır bilmeniz gereken kapalı başlayarak. Lua sözdizimini, işlevlerini ve kurallarını kullanacağımız için bunu aklınızda bulundurun.Bu sözlerin sizi korkutmasına izin vermeyin, bu kılavuzu mümkün olduğunca takip etmeyi ve anlamayı kolaylaştırmaya çalışacağız.

Bir oyun guardian LUA komut dosyası yapmak için sadece iki uygulama gerektirir

Oyun Guardian sürüm 8.28.0 veya daha yüksek
Oyun guardian, komut dosyalarını yürütmekten sorumlu olan uygulama olduğu için temel bir gerekliliktir, ancak yalnızca game guardian 8.28.0 veya daha üstünü kullanabilirsiniz, Çünkü bundan önceki sürümler lua komut dosyasını desteklemez. Ancak oyun guardian yalnızca komut dosyaları yürütme destekler ama senaryo yazma veya düzenleme desteklemiyor unutmayın. Şu anda game guardian için bir LUA komut dosyası oluşturmanın tek yolu, bizi ikinci gereksinimimize getiren üçüncü taraf bir uygulama kullanmaktır.

Oyun guardian son sürümünü indirin

LUA editörü
Yukarıda belirtildiği gibi, bir oyun guardian LUA betiğini oluşturmanın veya düzenlemenin tek yolu üçüncü taraf uygulamasıdır.Q-Lua uygulama editörünün kurtarmaya geldiği yer burası. Editör aracılığıyla biz yazmak ve oyun guardian kullanarak çalıştırabilirsiniz bundan sonra bizim komut kaydedebilirsiniz.

Q-Lua editörünün en son sürümünü indirin

Q-Lua'yı yükledikten sonra, komut dosyalarının kaydedilmesine izin vermek için depolama izinlerine izin vermemiz gerekiyor. cihaz ayarlarınıza gidin ve ardından cihazınızda yüklü tüm uygulamaları görüntüleyebileceğiniz uygulamalara gidin Q-Lua'yı bulun ve seçin ve aşağıda gösterilen ekrana getirilecek izinlere tıklayın.


İzinleri seçtikten sonra aşağıda gösterilen ekrana getirileceksiniz aşağıdaki resimde gösterildiği gibi depolama seçeneğinin kontrol edildiğinden emin olun bu, Q-Lua'ya depolama izinleri verecek ve cihazınızda komut dosyaları oluşturmanıza, kaydetmenize ve düzenlemenize izin verecektir.


Bunu yaptıktan sonra gitmek için iyisin ve şimdi ilk oyun guardian LUA komut dosyası oluşturabilirsiniz.

BİR OYUN GUARDİAN LUA KOMUT YAPMA ADIMLARI
Adım 1: yükleme ve oyun guardian ve qlua app editor hem başlatmak aşağıdaki resimde gösterildiği gibi açık qlua arayüzü üzerinde oyun guardian yüzen pencere olmalıdır. Yeni bir boş LUA komut dosyası oluşturmak için editöre tıklayın.


Adım 2: boş bir LUA komut dosyası ile aşağıda gösterildiği gibi bir ekrana getirilecektir.


Kaydet simgesine tıklayın ve lua komut dosyanız için bir ad seçin. Aşağıdaki örnekte komut dosyamı “deneme " olarak kaydedeceğim.lua". Uzantıdan önce adı istediğiniz her şeye değiştirebilirsiniz. örneğin, sınırsız mücevher veren bir komut dosyası yapmak istiyorsanız, "unlimitedgems" olarak kaydedersiniz.lua " yerine. Uzantının " olduğunu unutmayın.LUA " çok önemlidir ve hataları önlemek için dahil edilmelidir.

Adım 3: komut dosyanızı kaydettikten sonra boş lua komut dosyanıza geri getirileceksiniz, şimdi komut dosyası kullanıcınızın bir seçenek seçmesine izin verecek bir komut dosyası menüsü ekleyerek başlayacağız. Burada LUA komut dosyası devreye giriyor, aşağıda gösterildiği gibi bir menünün nasıl hazırlanacağını öğrenerek başlayacağız.


LUA KOMUT DOSYASI MENÜSÜ NASIL YAPILIR
Gördüğünüz gibi komut dosyası kullanıcı seçeneği arasından seçim yapabilirsiniz dört seçenek vardır 1-4.To biz belirtilen bir menüye ihtiyacımız oyun guardian “anlatmak” için kodları kullanmak gerekir aynı sonucu elde options.To bunu aşağıda gösterilen kodları kullanacağız.

menu = gg.Cho (ice ({'seçenek 1', 'seçenek 2', 'seçenek 3','seçenek 4'})

Kodu tam olarak yukarıda gösterildiği gibi qlua düzenleyicisine gireceksiniz, ardından aşağıdaki resimde gösterildiği gibi Kaydet düğmesine tıklayacaksınız.


ADIM 4: lua komut dosyası kaydettikten Sonra başarıyla her şey beklendiği gibi çalıştığından emin olmak için oyun guardian kullanarak test etmemiz gerekiyor.Bunu yapmak için oyun guardian arayüzü açın ve komut test etmek için/aktivite mutlaka qlua süreç olması gerekmez herhangi bir işlem kullanabilirsiniz aşağıda gösterilen yürütme komut seçeneği seçeceğiz.


Bir arayüz yukarıda gösterilen düğmeye tıklayarak size LUA komut dosyası size LUA komut dosyası aşağıda gösterildiği gibi kendisine atanan adı ile yeşil vurgulanan göreceksiniz kaydedilen dizine gidin yürütmek istediğiniz komut dosyasını seçmek isteyen açılacaktır.


Adım 5: komut dosyasını seçtikten sonra komut dosyasını çalıştırmak için aşağıda gösterilen yürütme düğmesine tıklayın


Yukarıdaki adımları doğru yaptıysanız, aşağıda gösterilen ekranı görebilmeniz gerekir.


Fark ettiğiniz gibi bu 4 seçenekli bir menü ve kullanıcı seçeneklerden birini seçebilir, ancak ‘seçenek 1’ i istediğiniz herhangi bir şeye değiştirebilirsiniz, bunun nasıl çalıştığını görmek için ifadeyi değiştirmenizi sağlar.Bu sefer bunu yapmak için farklı seçenekli bir menü oluşturacağım, aşağıdaki kodu kullanacağım:

menu = gg.Cho (ice({‘Sub's'cr (ibe’,’un Unlimitedl Unlimitedim'ited gem (s’, 'Super Speed’,' EX'it’})

Bu sefer fark ettiğiniz gibi biraz farklı bir menü kullandım, ancak yukarıdaki kodu kaydettiğinizde ve çalıştırdığınızda kod yapısı aynı kalıyor, aşağıda gösterilen menüye sahip olacağız


Şimdi daha derin bir senaryo duyarlı yapmak için biraz dalış yapacağız komut menü oluşturma temellerini anlamış oldum.Listedeki herhangi bir seçeneği seçtiğinizde, komut dosyasının hiçbir şey yapmadığını fark edeceksiniz, bunun yerine aşağıda gösterildiği gibi bir bildirim ile biter.


LUA KOMUT DUYARLI YAPMA
Şimdi, LUA komut dosyasını nasıl duyarlı hale getireceğinizi öğreneceğiz, böylece herhangi bir seçeneği tıkladığınızda veya komut dosyasının yapması beklenen şeyi yapacağı seçeneği seçersiniz. Bunun için kullanıcının seçimine bağlı olarak ne yapılması gerektiği konusunda talimat vermek için kod ekleyeceğiz.Bunun için yeni oluşturduğumuz yeni menümüzü kullanacağız.

menu = gg.Cho (ice({‘Sub's'cr (ibe’,’un Unlimitedl Unlimitedim'ited gem (s’, 'Super Speed’,' EX'it’})

İlk seçenek “abone ol”ile başlayacağız.Bu komut dosyasını duyarlı hale getirmek istiyorum, böylece herkes abone olduğunda bir mesaj gösterecek " abone ol ronoplays.com” ama bunu nasıl yapacağız?

LUA komut dosyalarını kullanarak uyarıları/mesajları gösterme
Öncelikle, kullanıcılara uyarılar/mesajlar göstermek için hangi kodu kullanacağımızı bilmemiz gerekir bunun için basit bir kod kullanacağız:

gg.uyarı(”)

parantez arasındaki şey biz yazacak kullanıcıya mesajımızı göstermek için böylece bir mesaj olarak kullanıcılara gösterilecektir:

gg.a alertler (t ('abone ronoplays.com’)

Artık uyarıları göstermek için kodu biliyoruz ki, bunu menümüze entegre edebiliriz, böylece kullanıcı abone ol'u seçerse mesajımız onlara gösterilir.Bunun için basit bir ıf ifadesi kullanacağız. Tabloyu bir değişken " menü” ye atadığımız için, aşağıda gösterildiği gibi değişken menüsüne ilişkin eylemleri belirleyebiliriz.

menu = gg.Cho (ice({‘Sub's'cr (ibe’,’un Unlimitedl Unlimitedim'ited gem (s’, 'Super Speed’,' EX'it’})

if menu= = 1 th thenen

gg.a alertler (t ('abone ronoplays.com’)

sonlandırmak

Yukarıdaki kod, kullanıcıya "abone ol" mesajı vermesi için lua komut dosyasına talimat verir ronoplays.com” Eğer ilk seçeneği seçerlerse. Yukarıdaki kodu aşağıda gösterildiği gibi lua düzenleyicinize yazın ve kaydedin:


Yukarıdaki kodu çalıştırdığımızda ve ilk seçeneği seçtiğimizde “abone ol” aşağıda gösterilen bir yanıt alırız.


Şimdi işlevselliği aşina olduğunu ikinci seçenek “sınırsız taşlar " için kod eklemek sağlar.Bunun için, örneğin bir oyun oynuyoruz ve şu anda sadece 10 mücevherimiz var, ancak bunu 1000 olarak değiştirmek istiyoruz bunu yapmak için bir komut dosyası nasıl yazacağız?

DEĞERLER ARANIYOR
Bir LUA komut dosyası kullanarak değerleri aramak kolaydır, bilmemiz gereken tek şey, değerin arandığı ve veri türünün bu örnek için 10 değerini ve veri türünü kullanacağıdır. DWORD.Oyun Guard searchingian arama kodu

gg.searchnumber ('10’, gg.TYPE_DWORD)

Yukarıdaki kod 10 numaralı veri türü DWORD arar.10 değerini aramak istediğiniz herhangi bir şeyle değiştirebileceğinizi unutmayın

DÜZENLEMEK İÇİN DEĞERLERİ SEÇME
Değerleri aradıktan sonra, denemeden önce sonuç listesinden düzenlemek istediğimiz değerleri seçmeliyiz edit.To bunu yapmak için aşağıdaki kodu kullanıyoruz

gg.getResults (100)

Parantez içindeki 100'ün seçmek istediğimiz sonuç sayısı olduğunu unutmayın. bunu düzenlemek istediğiniz herhangi bir sonuç miktarına değiştirebilirsiniz.

DEĞERLERİ DÜZENLEME
Artık düzenlemek istediğiniz değerleri nasıl arayacağınızı ve seçeceğinizi bildiğinize göre, seçtiğiniz değerleri nasıl düzenleyeceğinizi öğreneceğiz results.To düzenleme aşağıdaki kodu kullanıyoruz

gg.editAll ('1000’, gg.TYPE_DWORD)

Yukarıdaki kod, seçilen tüm sonuçları şu anda 1000'e sahip oldukları değerlere göre düzenleyecektir.1000'i istediğiniz değere değiştirebileceğinizi unutmayın.

Artık nasıl arama yapacağımızı,sonuçları nasıl seçeceğimizi ve düzenleyeceğimizi bildiğimize göre, bu kodları tüm bu faaliyetleri yapmak için bir araya getirelim progressively.To bunu yapmak için kodu aşağıdaki gibi birleştireceğiz:

gg.searchnumber ('10’, gg.TYPE_DWORD)

gg.getresults (100)

gg.editAll ('1000’, gg.TYPE_DWORD)

Yukarıdaki kod 10 numarasını arayacaktır ilk 100 sonuçları seçin ve bunları 1000'e düzenleyin.Şimdi Arama ve değerli taşlar değiştirmek için tam kod var kullanıcı yukarıdaki menüden seçenek iki seçtiğinde sadece çalıştırmak için bu kodu içerir sağlar.Bunun için, menüdeki ilk seçeneğimizle yaptığımız gibi bir if ifadesi kullanacağız.Kombine tüm kod aşağıda gösterildiği gibi olmalıdır

menu = gg.Cho (ice({‘Sub's'cr (ibe’,’un Unlimitedl Unlimitedim'ited gem (s’, 'Super Speed’,' EX'it’})

if menu= = 1 th thenen

gg.a alertler (t ('abone ronoplays.com’)

sonlandırmak

if menu= = 2 th thenen

gg.searchnumber ('10’, gg.TYPE_DWORD)

gg.getresults()

gg.editAll ('1000’, gg.TYPE_DWORD)

sonlandırmak

Kullanıcı onları seçtiğinde ifadeleri bir yanıt vermek için eğer biz şimdi bizim menü ve 2 var fark edeceksiniz gibi biz henüz ya duyarlı kod eklemedim olarak seçildiğinde son 2options “süper hız ve çıkış” sadece sona göreceksiniz.Kod eklemek istiyorsak biçim aynıdır şimdi süper hız için kod ekleyelim.
     
 
what is notes.io
 

Notes is a web-based application for online taking notes. You can take your notes and share with others people. If you like taking long notes, notes.io is designed for you. To date, over 8,000,000,000+ notes created and continuing...

With notes.io;

  • * You can take a note from anywhere and any device with internet connection.
  • * You can share the notes in social platforms (YouTube, Facebook, Twitter, instagram etc.).
  • * You can quickly share your contents without website, blog and e-mail.
  • * You don't need to create any Account to share a note. As you wish you can use quick, easy and best shortened notes with sms, websites, e-mail, or messaging services (WhatsApp, iMessage, Telegram, Signal).
  • * Notes.io has fabulous infrastructure design for a short link and allows you to share the note as an easy and understandable link.

Fast: Notes.io is built for speed and performance. You can take a notes quickly and browse your archive.

Easy: Notes.io doesn’t require installation. Just write and share note!

Short: Notes.io’s url just 8 character. You’ll get shorten link of your note when you want to share. (Ex: notes.io/q )

Free: Notes.io works for 14 years and has been free since the day it was started.


You immediately create your first note and start sharing with the ones you wish. If you want to contact us, you can use the following communication channels;


Email: [email protected]

Twitter: http://twitter.com/notesio

Instagram: http://instagram.com/notes.io

Facebook: http://facebook.com/notesio



Regards;
Notes.io Team

     
 
Shortened Note Link
 
 
Looding Image
 
     
 
Long File
 
 

For written notes was greater than 18KB Unable to shorten.

To be smaller than 18KB, please organize your notes, or sign in.