Jump to content

PublicHax

Members
  • Content Count

    23
  • Donations

    $0.00 
  • Joined

  • Last visited

Community Reputation

4 n00b

4 Followers

About PublicHax

  • Rank
    Member

Additional Information

  • Android
    10.x
  • Device
    Huawei P40 Lite
  • Service provider
    T-Mobile

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

  1. View File [Perfect Dec] Decrypted GamerDemon 2.0 Hide Online this maked for watching opened code. Submitter PublicHax Submitted 04/09/2021 Category LUA scripts  
  2. Version 1.0.0

    62 downloads

    this maked for watching opened code.
  3. PublicHax

    Lua Script Help

    bruh local x = [=[STARTED]=] gg.toast(x) a = 7.31 b = -1 gg.searchNumber(a, gg.TYPE_FLOAT) gg.getResults(88888) gg.editAll(b, gg.TYPE_FLOAT) local y = [=[Activated]=] gg.alert(y) local z = [=[END]=] print(z)
  4. Lua scripts A script written in Lua does not have any special function from which to start its execution. A script can be thought of simply as a set of commands (instructions) that are executed starting from the first instruction. A script can be either very simple, consisting of just one command, or very complex, containing tens, hundreds or even thousands of instructions. Consecutive instructions can be separated by semicolons (;). However, this requirement is optional, so all of the code below is syntactically correct: a = 1; b = 2 a = 1 b = 2 a = 1; b = 2; a = 1 b = 2 Working with variables in Lua Variables are used to store values during script execution. Variable names in Lua Variable names (identifiers) in Lua can be any sequence of letters, numbers, and the underscore that does not start with a number. note Lua is case-sensitive, so abc, Abc, ABC are different names. The table below shows words that are reserved by the Lua language and cannot be used in variable names: and break do else elseif end false for function if in local nil not or repeat return then true until while In addition, all names beginning with an underscore followed by capital letters (for example, _VERSION) are also reserved. What variables are there in Lua? Variables in Lua can be global or local. If a variable is not explicitly declared as local, it is considered global. Lua global variables The global variable appears when the first value is assigned to it. Before the first value is assigned, the call to the global variable yields nil. MsgBox (tostring (g)) -> nil g = 1 MsgBox (tostring (g)) -> 1 The global variable exists as long as the script execution environment exists and is available to any Lua code executed in this environment. If necessary, you can explicitly delete a global variable by simply assigning a nil value to it. g = 1 - create a global variable g with the value 1 ... g = nil - delete the global variable g MsgBox (tostring (g)) -> nil All global variables are fields of a regular table called the global environment. This table is accessible through the global variable _G. Since the fields of the global environment are all global variables (including _G itself), then _G._G == _G. Lua local variables Any local variables must be declared explicitly using the local keyword. You can declare a local variable anywhere in the script. The declaration can include assigning an initial value to the variable. If no value is assigned, the variable contains nil. local a - declare a local variable a local b = 1 - declare a local variable b, assign it the value 1 local c, d = 2, 3 - declare local variables c and d, assign them values 2 and 3 The scope of a local variable begins after the declaration and continues to the end of the block. Note The scope of a variable is a piece of program code within which you can access the value stored in a given variable. A block is understood as: the body of the control structure (if-then, else, for, while, repeat); function body; a piece of code enclosed in the keywords do ... end. If a local variable is defined outside of any block, its scope extends to the end of the script. a = 5 - global variable a local i = 1 - variable i is local within the script while i <= a do - loop from 1 to 5 local a = i ^ 2 - variable a is local inside the while loop MsgBox (a) -> 1, 4, 9, 16, 25 i = i + 1 end MsgBox (a) -> 5 (here reference to global a) if i> 5 then local a - variable a is local inside then a = 10 MsgBox (a) -> 10 else MsgBox (a) -> 5 (here reference to global a) end do local a = 20 - variable a is local inside the do-end MsgBox (a) -> 20 end MsgBox (a) -> 5 (here reference to global a) note Whenever possible, it is recommended to use local variables instead of global ones. This will avoid "cluttering" the global namespace and provide better performance (since access to local variables in Lua is somewhat faster than to global ones). Lua data types What data types does Lua support? Lua supports the following data types: 1. Nil (nothing). Corresponds to the fact that a variable has no value. This type is represented by a single value, nil. 2. Boolean (logical). This type includes the values false and true. When performing logical operations, nil is considered false. All other values, including the number 0 and the empty string, are considered true. 3. Number (numeric). Serves to represent numeric values. Numeric constants can contain an optional fractional part and an optional decimal order, specified by the characters "e" or "E". Integer numeric constants can be specified in hexadecimal using the 0x prefix. Examples of valid numeric constants: 3, 3.0, 3.1415926, 314.16e-2, 0xff. 4. String (string). Serves to represent strings. String values are specified as a sequence of characters, enclosed in single or double quotes: a = "this is a string" b = 'this is the second line' Strings enclosed in double quotes can interpret C-like escape sequences (escape sequences) that start with the character "\" (backslash): \ b (space), \ n (line feed), \ r (carriage return); \ t (horizontal tab), \\ (backslash); \ '' (double quote); \ '(single quote). note A character in a string can also be represented by its own code using an escape sequence: \ ddd, where ddd is a sequence of no more than three digits. In addition to quotation marks, double square brackets can also be used to define a string: local a = [[Kronos Company]] Defining a string with double square brackets allows all escape sequences to be ignored, that is, the string is created entirely as described: local a = [[string string1 string2 string3 ]] - "string string1 string2 string3 " Note When defining a string with double square brackets, tabs and hyphens are considered. Double brackets can be nested. In order not to confuse them, the symbol "equal" (=) is inserted between the brackets: local a = [= [definition of string [[string]] in Lua] =] - there will be a term: "definition of string [[string]] in Lua" 5. Function. Functions in Lua can be written to variables, passed as parameters to other functions, and returned as the result of executing functions. 6. Table (table). A table is a set of key-value pairs, which are called fields or table elements. Both the keys and the values of the fields in the table can be of any type except nil. Tables do not have a fixed size: you can add an arbitrary number of elements to them at any time. More details - in the article "Creating tables in Lua" 7. Userdata (user data). It is a special data type. Values of this type cannot be created or modified directly in a Lua script. Userdata is used to represent new types created in the script calling program or in libraries written in C. For example, the Lua extension libraries for "CronosPRO" use this type to represent objects such as: data banks (class Bank); databases (Base class); records (class Record), etc. 8. Thread (thread). Corresponds to the flow of execution. These streams are not connected in any way with the operating system and are supported exclusively by means of Lua itself. How to set the type of a variable in Lua? Lua does not explicitly set the type of a variable. The type of a variable is set at the time the variable is assigned a value. Any variable can be assigned a value of any type (regardless of what type of value it previously contained). a = 123 - variable a is of type number a = "123" - now the variable a is of type string a = true - now the variable a is of type boolean a = {} - now the variable a is of type table note Variables of type table, function, thread and userdata do not contain the data itself, but store references to the corresponding objects. When assigning, passing to a function as an argument and returning from a function as a result, objects are not copied, only references to them are copied. a = {} - create a table. A reference to the table is placed in the variable a b = a - variable b refers to the same table as a a [1] = 10 - the element of the table with index 1 is assigned the value 10 MsgBox (b [1]) -> '10' b [1] = 20 MsgBox (a [1]) -> '20' The rest of the data are immediate values. a = 10 b = a a = 20 MsgBox (a) -> '20' MsgBox (b) -> '10' How to get the type of a variable in Lua? The type of the value stored in a variable can be found out using the standard function type. This function returns a string containing the name of the type ("nil", "number", "string", "boolean", "table", "function", "thread", "userdata"). t = type ("this is a string") - t is equal to "string" t = type (123) - t equals "number" t = type (type) - t is "function" t = type (true) - t is "boolean" t = type (nil) - t is "nil" t = type (CroApp.GetBank ()) - t equals "userdata" How to convert the type of a variable in Lua? Lua automatically converts numbers to strings and vice versa as needed. For example, if a string value is an operand in an arithmetic operation, it is converted to a number. Likewise, a numeric value that occurs where a string is expected will be converted to a string. a = "10" + 2 - a is equal to 12 a = "10" + 2 - a is equal to "10 + 2" a = "-5.3e-10" * "2" - a equals -1.06e-09 a = "string" + 2 - Error! Cannot convert "string" to number Any value can be explicitly converted to a string using the standard tostring function. a = tostring (10) - a equals "10" a = tostring (true) - a equals "true" a = tostring (nil) - a equals "nil" a = tostring ({[1] = "this is field 1"}) - a is equal to "table: 06DB1058" From the previous example, you can see that the contents of tables are not converted by the tostring function. This transformation can be done using the render function. a = render (10) - a equals "10" a = render (true) - a equals "true" a = render (nil) - a is "nil" a = render ({[1] = "this is field 1"}) - a is equal to "{[1] =" this is field 1 "}" You can use the standard tonumber function to explicitly convert a value to a number. If the value is a string that can be converted to a number (or is already a number), the function returns the conversion result, otherwise it returns nil. a = tonumber ("10") - a equals "10" a = tonumber ("10" .. ". 5") - a equals 10.5 a = tonumber (true) - a is "nil" a = tonumber (nil) - a is "nil" Arranging comments in Lua A comment in Lua begins with two minus signs (-) and continues to the end of the line. local a = 1 - single line comment If two open square brackets ([[)] immediately follow the “-” characters, the comment is multiline and continues up to two closing square brackets (]]). local a = 1 - [[multiline comment ]] Double brackets in comments can be nested. In order not to confuse them, an equal sign (=) is inserted between the brackets: local a = [[Kronos Company]] - [= [ local a = [[Kronos Company]] ] =] The number of "=" symbols determines the nesting: local a = [= [definition of some string [[string]] in Lua language] =] - [== [ local a = [= [definition of some string [[string]] in Lua language] =] ] ==] Lua Operations The following types of operations can be used in expressions written in Lua: 1. Arithmetic operations. Lua supports the following arithmetic operations: + (addition); - (subtraction); * (multiplication); / (division); ^ (exponentiation); % (remainder of the division). note Arithmetic operations apply to both numbers and strings, which in this case are converted to numbers. 2. Operations of comparison. Lua allows the following comparison operations for values: == (equal); ~ = (not equal); <(less); > (more); <= (less or equal); > = (greater or equal). note Comparison operations always return the Boolean value true or false. The rules for converting numbers to strings (and vice versa) do not work for comparisons, that is, the expression "0" == 0 results in false. 3. Logical operations. Logical operations include: and (logical AND). The and operator returns its first operand if it is false or nil. Otherwise, the operation returns the second operand (and this operand can be of any type). a = (nil and 5) - a is nil a == (false and 5) - a equals false a == (4 and 5) - a equals 5 or (logical OR). The or operator returns the first operand if it is not false or nil, otherwise it returns the second operand. a == (4 or 5) - a equals 4 a == (false or 5) - a equals 5 note Boolean operations and and or can return values of any type. The logical operators and and or evaluate the value of the second operand only if it needs to be returned. If not required, the second operand is not evaluated. For instance: a == (4 or f ()) - the function f () will not be called not (logical NOT). The not operation always returns true or false. 4. Operation of concatenation. To concatenate (join) strings, use the operation ... (two dots). a = "Kronos" .. "-" .. "Inform" - the variable a will receive the value "Kronos-Inform" note If one or both operands are numbers, they are converted to strings. a = 0..1 - the variable a will receive the value "01" 5. The operation of obtaining the length. Lua defines a length operator # that can be used to get the length of a string. a = "string" len = #a - len is 6 len = # "another line" - len is 10 note You can also use the # operation to find out the maximum index (or size) of an array. More details - in the article "Working with arrays in Lua". Operation precedence in Lua In Lua, operations are performed according to the following priority (in descending order): 1. ^ 2.not # - (unary) 3. * /% 4. + - five. .. 6. <> <=> = ~ = == 7. and 8.or Calling scripts from forms Each form (including nested forms) has a separate script associated with it, which usually contains functions that handle the events of the form and its elements. When the form is launched, its script is loaded into the global environment. When an event of a form or its element occurs, the system calls the handler function associated with this event. It should be noted that the form script, although it does not contain a call to the module function, is in fact a module. This means that variables declared in the form script without the local keyword are not moved to the global environment and are available only within this script. If you need to make a value available to scripts of other forms, it must be explicitly defined in the global table _G: _G.var = 123 Another form script can read this value like this: local a = _G.var Operator (instruction) blocks The main Lua operators are: assignment; conditional operator; operators for organizing loops. A group of statements can be combined into a block (compound statement) using the do… end construction. do - the beginning of the block <operator1> - block body <operator2> ... <operatorN> end - the end of the block The block opens a new scope in which you can define local variables. a = 5 - global variable a do local a = 20 - inside the do-end local variable a is defined MsgBox (a) -> 20 end MsgBox (a) -> 5 (here the call is already to the global a) Lua assignment operator An assignment changes the value of a variable or table field. In its simplest form, an assignment might look like this: a = 1 - variable a is assigned the value 1 a = b + c - variable a is assigned the sum of values of variables b and c a = f (x) - the variable a is assigned the value returned by the function f (x) Lua allows the so-called multiple assignment, when several variables to the left of the assignment operator receive the values of several expressions written to the right of the assignment operator: a, b = 1.5 * c - a equals 1; b equals 5 * c If there are more variables than values, nil is assigned to the "extra" variables. a, b, c = 1, 2 - a is 1; b is 2; c is nil If there are more values than variables, "extra" values are ignored. a, b = 1, 2, 3 - a is 1; b is 2; value 3 not used Multiple assignment can be used to exchange values between variables: a = 10; b = 20 - a is 10, b is 20 a, b = b, a - now a is 20, b is 10 Conditional statement (if) in Lua The if statement tests the truth of the given condition. If the condition is true, the part of the code following the then keyword (then section) is executed. Otherwise, the code following the else keyword is executed (the else section). if a> b then return a - if a is greater than b, return a else return b - otherwise, return b end The else section is optional. if a <0 then a = 0 - if a is less than 0, set a to 0 end Instead of nested if statements, you can use the elseif construct. For example, the following code: if a == 1 then return "Ivan" - if a is 1 else if a == 2 then return "Peter" - if a is 2 else if a == 3 then return "Sergey" - if a is 3 else return "There is no such player" - if a is none of the above end end end it will be easier to understand if you replace it with the following: if a == 1 then return "Ivan" - if a is 1 elseif a == 2 then return "Peter" - if a is 2 elseif a == 3 then return "Sergey" - if a is 3 else return "There is no such player" - if a is none of the above end Loop with precondition (while) in Lua The while statement is designed to organize loops with a precondition and has the following form: while <condition> do ... - the body of the cycle end Before each iteration of the loop, the <condition> condition is checked: if the condition is false, the loop ends and control is transferred to the first statement following the while statement; if the condition is true, the body of the loop is executed, after which all actions are repeated. i = 10; t = {} while i> 0 do - loop from 10 to 1 t = "field" ..i i = i - 1 end You can use the break statement to exit the loop before it completes. a = {3, 5, 8, -6, 5} i = #a while i> 0 do - looking for a negative value in the array if a <0 then break end - if found, break the loop i = i - 1 - otherwise go to the next element end if i> 0 then MsgBox ("Index of negative value:" ..i) else MsgBox ("Array does not contain negative values") end
  5. Cheats are programs that give you an advantage in a particular game. For example, in CS you have the ability to use cheats for auto-aiming or viewing through walls. Cheats are a scam, they are written by programmers, if you are interested in this, then in our programming school you can not only write your own cheat, but also learn a lot! Most often used in games, especially on a PC. They are often not officially documented and show up as "Easter eggs" to software. The cheat code, cheat was previously intended by developers for more detailed debugging and checking everything in a game or program, that is, this term is not something bad, because it does not originate from some left uncles, but from the people themselves, who develop programs. Such code has been introduced into the program for different purposes, that is, debugging / error checking / checking for the "strength" of the program. It does not come into conflict with the game in many cases, since the "cheat" code has long been spelled out and "allowed" by the program, since the program itself understands what follows. Therefore, the current "cheats" are not cheats, but programs for hacking all kinds of games / other programs, that is, the program is designed to "fit" into another program and edit the parameters for the player that are written in the program itself - "break in". A program for a program, it turns out, or a cracker, but not a "cheat". I adhere to this position, since I myself developed my own program and sometimes I had to introduce such nishyachki to test the program for "strength". Cheats can be both in the form of special codes (commands for the console) in the game, and in the form of programs that are introduced into the process and give some advantage in it. Such programs, in turn, are divided into paid and free. With free ones, everything is clear, you can find them in the public domain and try, and paid cheats, or whatever they call them, are private, cost money, are constantly supported by the authors and most often have exclusive functionality that is not available in free samples. Those who do not want to immediately get on the federal wanted list are recommended to start with anonymity. And of course you need to start by analyzing the most fundamental things: Give yourself an answer to the question, what is a computer and what is programming, in the form in which it is given. These questions consist of the following topics: - Computer architecture: (processor, memory, controllers, etc.) - To understand how a processor is able to perceive a programming language and what a programming language is in general. A number of concepts will follow from this: - What is a compiler; - What is an interpreter; - Levels of programming languages; - Paradigms of programming languages. - Basic concepts of programming languages: Branching Cycles Lambda expressions Recursion, etc. More and more nouns will follow from this: - Number systems; - Various types of data; - Various types of data encoding; - Data type theory and much more; In general, you need to understand what a computer is and how this computer can be programmed. These include: - The concept of databases; - Types of bach data; - How information is stored there; The next step is to study math: Excellent Soviet books and services will help you to study, which will help to pump your skill in this science. The next step is to study networks and network programming in general. You need to study the model of the Internet. TCP / IP Model OSI model The second fundamental point in programming is: - Sockets. Protocol models and sockets are two basic building blocks of network programming. You also need to know how HTTP or application protocols work. It is advisable to understand additional protocol layers, for example, SSL / TLS. The next step is operating systems. First you need to understand what an operating system is and what types of operating systems are: - Windows - Linux - Android - Mac OS How the operating system works with hardware, represent the boot process of your computer. A more in-depth study of operating systems should be the one who plans to write system software. Each operating system has a specific interface. APIs. For example, Win32 Api on Windows. The next step is choosing a programming language. You need to decide on the programming language and programming style. You need to know certain concepts. This list includes knowledge: - Data structures; - Algorithms; - Design patterns; Here, in fact, is the necessary minimum of knowledge that will be needed for further development. There is such a concept "place of power". Usually these are natural places without signs of people - a forest, a village, the sea, etc. - helps many people well. Me too. Animals - cuddle the cat / dog - at a time when there is an overload, it helps a lot, even if at other times you don't like animals very much - they have powerful energy and sincerity. Well .. one thing I know for sure, it's pointless to complain to the developer. There is either such a blockage that he will never be able to clean it up, or he has already created another project for himself and is having fun with it. Even collective complaints do not help, in vain have so many service centers built across the country. And cheat codes are cool, but where to enter them? You can, of course, intravenously or through the mucous membrane, but they are short-lived. And the gameplay after them lags terribly, problems with textures and other difficulties. Hope remains only for nirvana, but here you can't do with a simple keyboard shortcut. I would advise you to read the walkthroughs of users who are in the top (Steve Jobs, Paul McCartney). Depending on your tasks.
  6. PublicHax

    What Is Script?

    In modern web programming, scripts (scripts) are separate sequences of actions created to automatically complete a task. If there is no ready script, the user performs these steps manually, with the corresponding investment of time and the possibility of errors. To write scripts, special programming languages are used, which are called scripts. Accordingly, a scripting programming language is a set of lexical, semantic and syntactic rules for creating and editing scripts. The synonymous name "scripting language" is also correct. The history of the development of scripts Consider, for example, the history of the development of the most common scripting language JavaScript. It is with its help that many solutions for the interaction of users with sites are implemented, the wide capabilities of interactive pages are programmed. In 1995, Netscape introduced a special language called LiveScript for its then popular Netscape Navigator 2.0 browser. At that time, the capabilities of the language were very scarce, and many simply did not understand what a script is in a browser. Then he could check and process the data that the user left on the site page through the form. Such a check made it possible to control the correctness of the entered data and avoid submitting a form without the necessary information. Soon the name of this language was changed to JavaScript. After some time, the well-known competitor of Netscape - Microsoft Corporation - created its own version of JavaScript. Despite the fact that such a scripting programming language had slightly different functions, it successfully caught on and got its own name JScript. It has been used in Internet Explorer since version 3.0. After a while, other browsers began to support JavaScript. Over time, the language has developed and improved, now it can be used to successfully solve much more complex problems. The JavaScript interpreter is a built-in feature of all modern browsers. Despite fierce competition, Microsoft and Netscape worked alongside some of the most respected Internet software developers to work for the W3C. As a result, uniform standards and recommendations were prepared. Still, JavaScript and JScript languages have certain differences that must be taken into account in the work. Basic Scripting Principles The JavaScript language interpreter is built into all popular browsers. That is why any browser understands what a script in this language is. These codes are successfully executed at the moment when the user accesses the pages of the site. But the same scripts can work successfully on the server if the JavaScript interpreter is installed on it. Scripts can be executed both on the client side, in the browser, or directly on the server. Scripts have the following goals: SEO scripts (templates) for website promotion. Usually specialized programs for automating this process run under their control. The most famous are ZennoPoster, Human Emulator; systems for collecting statistics of visits (attendance counters). These scripts are most often written using JavaScript; scripts for accessing databases. PHP is the leader here; scripts for guest books and creating comments to entries. The most commonly used combination of PHP and JavaScript; scripts for dynamic display of sites. In this case, the scripting language is determined by the CMS writing language; scripts for changing part of a site page without reloading it. The implementation uses Ajax technologies. In this case, asynchronous JavaScript and XML come to the fore. Web applications exchange data with the server in the background, changes on the site pages occur without their complete reloading. Users usually do not notice such changes, and they do not need to understand what a scripting programming language is in order to interact perfectly with the site. Benefits of scripts Their use makes it possible to make software changes without fear of destroying the entire system. If the script is written with an error, then when it is executed, they will be issued as a result. In this case, the site will remain functional. The use of scripts makes it possible to obtain a problem-oriented set of commands. In this case, one line of script allows you to perform the same amount of actions as a program of many tens of lines in a compiled language. This example clearly shows what a script is in programming and how much its application speeds up solving problems. Using scripts, the cross-platform task execution is successfully implemented. JavaScript is a great example - the same scripts in this language are executed without problems by browsers on different operating systems. Disadvantages of scripts Significantly longer execution time. In almost all cases, interpreted scripts require much more time and computer resources to execute. Until now, a high-quality IDE-level development environment has not been created for such languages. Insufficient funds are invested in the promotion and advertising of these languages. Paradoxically, the relative availability and conditional free-of-charge of script languages lead to the fact that developers simply do not have enough funds for marketing and advertising. Therefore, for many large money projects, Java or C # is chosen. Types of scripts In terms of performance, they are categorized into parsing languages (sh, COMMAND.COM) and precompiled languages such as Perl. Also, scripting languages are divided into several large groups for use. Allocate: command-script (JCL, sh, bash, csh, ksh, AppleScript, COMMAND.COM and cmd.exe, VBScript); applied (AutoLISP, JScript, JavaScript, ActionScript, Game Maker Language, VBA, etc.); universal scripting (Tcl, Lua, Perl, PHP, Python, REBOL, Ruby). Examples of scripting languages The most famous: PHP, Perl, Python, AngelScript, JavaScript, JScript and others. They are all high level. By their mechanism of action, scripting languages are usually interpreted, not compiled. The role of scripts in promotion The use of sliders, dynamic navigation menus, active animation elements in the process of programming pages allows you to expand the usability of sites, increase their traffic. Successful solutions on this basis will significantly increase sales. As an example, we can consider special technologies for creating video selling pages. JavaScript-based techniques are used here. And there are many such solutions. Separately, it is worth noting the technologies for creating scripts that simulate user actions in various directions with the help of special programs. Such scripts and templates are generated based on ZennoPoster, Human Emulator and their analogs. The uniqueness of such solutions is based on the fact that any sequence of actions of a real user can be programmed in ZennoPoster templates. At the same time, the program can simultaneously emulate an almost unlimited number of users, use both its own and information bases obtained from the Internet. As an example, we can consider templates that allow you to perform many actions in an automated mode to promote sites and products on the VKontakte social network. Other templates provide posting of ads or other information on the web. Still others can automatically generate many blogs and pages that contain links or commercial information. Users who see the results of such actions usually do not know that this scripted algorithm posts information for them in social media. In many cases, multiple mail accounts are needed to promote websites. As an example, consider the mail.ru mail service. The automated template for ZennoPoster copes with this task easily. In this case, the script does not just go to the registration page, but also independently performs the work on solving the captcha, determines a possible ban on the IP address and performs many other actions. Using JavaScript in contextual advertising Back in 2012, the Google AdWords advertising system introduced into its interface the ability to use scripts to automate the management of an advertising campaign. This control method is much faster than using the API. Moreover, it does not require the use of complex programming languages. Script-based tasks run on a schedule. They provide regular account checking, make it possible to analyze ad statistics and make any specified changes. At the same time, you can automatically monitor the quality of advertisements, disable ineffective advertising channels and connect effective ones.
  7. Lua (lua, from port. - "moon") is a scripting programming language developed by the Tecgraf (Computer Graphics Technology Group) division of the Catholic University of Rio de Janeiro (Brazil). The language interpreter is free, open source in the C language. In terms of ideology and implementation, the Lua language is closest to JavaScript, in particular, it also implements the prototype OOP model, but differs in Pascal-like syntax and more powerful and flexible constructs. A characteristic feature of Lua is the implementation of a large number of software entities with a minimum of syntactic tools. So, all composite user-defined data types (arrays, structures, sets, queues, lists) are implemented through the mechanism of tables, and the mechanisms of object-oriented programming, including multiple inheritance, are implemented using metatables, which are also responsible for overloading operations and a number of other features. Lua is intended for non-professional programmers, with a focus on simplicity of design and ease of learning. The language is widely used to create replicable software (for example, the graphical interface of the Adobe Lightroom package is written in it). It also gained fame as a programming language for levels and extensions in many games (including Garry's Mod) The language was developed by the Tecgraf division (a group of computer graphics technologies) of the Catholic University of Rio de Janeiro in Brazil, the history of the language dates back to 1993. The authors of the language are Robert Jeruzalimski, Luiz Henrique de Figueiredo and Waldemar Celes. Lua is free, open source in C. As noted by Luis Enrique di Figueiredo, Lua is the only programming language developed in a developing country and has received worldwide recognition, which, in particular, was expressed in the invitation to the HOPL conference The historical parents of the language were the configuration and data description languages SOL (Simple Object Language) and DEL (Data-Entry Language), they were independently developed at Tecgraf in 1992-1993 to add some flexibility to two separate projects (both were interactive graphic applications for design needs at Petrobras). SOL and DEL lacked any control constructs, and Petrobras felt a growing need to add full-fledged programming to them. As the author of the language writes in The Evolution of Lua: In 1993, the only real contender was Tcl, which was specifically designed to be embedded in applications. However, Tcl had an unfamiliar syntax, lacked good support for describing data, and only ran on Unix platforms. We have not reviewed Lisp or Scheme due to their unfriendly syntax. Python was still in its infancy. In the do-it-yourself atmosphere of Tecgraf back then, it was only natural that we decided to develop our own scripting language. Due to the fact that most of the users were not professional programmers, the language should have avoided convoluted syntax and semantics. The implementation of the new language should be easily portable, as Tecgraf clients came across a wide variety of platforms. Finally, since we expected that other Tecgraf products would also need an embedded scripting language, the new language should follow SOL's example and be provided as a library with a C API. Lua 1.0 was designed in such a way that the object constructors, then slightly different from the current light and flexible style, included the syntax of the SOL language (hence the name Lua: sol for "sun" in Portuguese, lua for "moon"). Lua control constructs are mostly borrowed from Modula-2 (if, while, repeat / until), although they were also influenced by Clu (parallel assignment, multiple function return value as a simpler alternative to instead of passing parameters by reference or explicit pointers), C ++ ( “It's a great idea to declare local variables only when you need them”), Snobol and awk (associative arrays). The Lua creators also acknowledge that the ubiquitous data structuring mechanism in Lisp and Scheme (linked list) had a major impact on their decision to choose tables as the primary data structure for Lua. Lua versions up to 5.0 were released under a license similar to the BSD license. From version 5.0 and up, Lua is distributed under the MIT license. Both licenses are permissive and nearly identical. General characteristics: Lua is intended to be used as a stand-alone or embedded scripting language in an application. It was designed from the ground up to be simple and compact enough to fit on a variety of runtime platforms and provide acceptable performance. Also, the design took into account the requirements of ease of training and the possibility of using non-professional programmers. Lua is a dynamically typed procedural modular language with automatic memory management. Includes basic elements to support functional and object programming styles. Thus, Lua can be called a multi-paradigm language. Built-in parallel programming tools allow you to write multithreaded programs using the language only, without accessing the operating system API or external libraries. Since the main purpose of Lua is embedding, it has an efficient means of interlanguage interaction, focused mainly on calling C libraries and working in a C environment. The language supports a small number of built-in data types: booleans, numbers, strings, functions, streams. Typical combined data structures such as arrays, sets, lists, and records are missing; instead they all use one basic Lua structure - a table (see below). A separate userdata type is designed specifically for low-level programming and data exchange with external code in other languages. Functions in Lua are first class objects, they can be assigned and passed in parameters. Closures are supported, it is possible to create higher-order functions. The object system is prototypical, there is no explicit support for inheritance, but it is easily implemented using metatables. In general, Lua strives to provide flexible metafunctions that can be extended as needed, rather than supplying a set of functions specific to a particular programming paradigm. As a result, the core of the language is simple and easily adaptable to most applications. By providing a minimal set of basic tools, Lua tries to strike a balance between power and size. Syntax: Lua syntax is mostly built on the basis of late Pascal-like languages such as Modula-2 or Oberon. The text recording format is free, commands in the program text are separated by any whitespace characters. It is allowed, but not required, to use a semicolon to separate operations. In an interview with Robert Jeruzalimsky, he noted that the Lua syntax is a compromise decision that he was forced to make in order to make it easier for non-professional programmers to learn the language. He described this syntax as "rather verbose", noting that he personally would have preferred a shorter notation. Vocabulary The main alphabet of the language is English; in string literals, characters from other languages are allowed. Identifiers can be letters, numbers, and the underscore, but they cannot start with a number or match one of the keywords. The language guide discourages the use of identifiers starting with an underscore, as such identifiers are used for systemic purposes. The language is case-sensitive, all keywords are written in lower case, identifiers that differ only in case of letters are considered different. The following 22 keywords cannot be used for names: and break do else elseif end false goto for function if in local nil not or repeat return then true until while Comments: For comments, the following syntax is used, which is close to the Ada, SQL and VHDL languages: - A simple one-line comment in Lua starts with a double minus and continues to the end of the line. dim = {"one", "two", "three"} - A line comment does not have to start from the beginning of a line, - it can follow other language constructs, - explaining them. - [[A multi-line comment begins with two opening square brackets in a row, followed by two minuses and continues up to two consecutive closing square brackets. Like here: ]] - An interesting effect can be obtained by combining inline and multiline comments: - [[To uncomment the code below, just add a space between the minuses and parentheses on this line. for i = 1, # dim do print (dim ) end - If a space is added between the minus and parentheses above, then -]] - here the end of a multi-line comment will turn into a normal line comment Data types: Lua is a language with implicitly dynamic data types. A language variable can contain values of any type. All values in Lua can be stored in variables, used as arguments when calling functions, and returned as the result of their execution. Lua has eight basic types: nil (undefined) boolean (boolean) number (numeric) string (string) function (function) userdata (user data) thread table (table) nil is a value type of nil [null], the main property of which is to be different from all other values and denote the absence of a suitable value. The boolean type is false and true. The number type is usually real numbers (double). In the first versions of Lua, integers were not allocated to a separate type; this decision is motivated by the fact that the real representation allows you to accurately represent a fairly wide range of integers. Starting with version 5.3, the ability to explicitly define an integer or real number format has been added. The internal representation of numbers can be changed when the interpreter is built. The string type denotes arrays of characters. Lua strings can contain any 8-bit characters, including zero ('\ 0'). Strings are immutable. String literals can be written in single or double quotes; service characters are placed in them in standard C notation with a leading backslash. Multiline literals are delimited by two consecutive opening and two consecutive closing square brackets. There is no built-in support for Unicode, although the use of UTF-8 characters in string literals is allowed, and the UTF-8 representation system itself allows you to enter, output, and partially process strings in this encoding by standard system means. Recent versions of Lua include the utf8 library, which provides more advanced UTF-8 support, and there are third-party libraries that provide tools for working with Unicode strings in various encodings. Functions in Lua are full-fledged objects that can be assigned, passed to a function as a parameter, and returned from a function as one of the values. The thread type has coroutines, the userdata type is intended to represent external data received or provided from / to code in another language (mainly C / C ++). Operations: Assignment: The = symbol serves as the assignment operator. Like scripting languages such as Perl, Python, Ruby, and Icon, it allows concurrent assignment. In the simplest case, this allows you to write expressions of the form: x, y = y, x Unlike, for example, the Go language, parallel assignment in Lua is very liberal, it does not require the exact correspondence of the number of variables to the number of values. If there are more values than variables, then the last values are discarded, if there are fewer values, the last variables in the list are nil. Comparisons and Boolean Operators Comparison operators: <,>, <=,> =, ==, ~ = (the last two mean, respectively, comparison for equality and for inequality). Equality and inequality comparisons are applicable to any data type, others only to strings and numbers. Boolean operators: and, or, not - Boolean "and", "or" and "not", respectively, can be applied to values of any type and return true or false. In the parameters of these operations, the values nil and false are considered false, any other values are considered true. Unlike C and a number of other languages, even a numeric zero (0) or an empty string ("") represents "true" in terms of logical operators. Evaluation of binary logical operators is traditionally performed until the result is determined, and the last evaluated subexpression is returned as the result. Therefore, they can be used as the ternary operator?: In the C language: - similarly r = (a <b)? f (a): f (b); in Xi, r = (a <b) and f (a) or f (b) - r will get the value of the function f () from the lesser of two values: a and b, - provided that f (a) is not nil or false. Arithmetic operators + - addition; - - subtraction; * - multiplication; / - division; - - unary minus; % - remainder of the division; ^ - exponentiation. All arithmetic operators support real operands, giving predictable results. For example, x ^ 0.5 returns the square root of x, x ^ (- 1/3) is the reciprocal of the cube root of x. The% operator is defined by the expression: a% b = a - math.floor (a / b) * b, where the math.floor () function evaluates the integer part of its argument. For integer arguments, its result is quite common. For a real dividend, you need to take into account that the operation does not perform any additional rounding or discarding of the fractional part, so the result will retain the fractional part of the dividend. For example, math.pi% 2 will return 1.1415926535898 rather than 1. This implementation provides some additional features. For example, to truncate x to three decimal places, it is enough to take the expression x - x% 0.001 Tables: A table in Lua is a dynamic heterogeneous associative array, that is, many key-value pairs. The keys can be values of any Lua type except nil. Keys can also be Lua literals (identifiers). Writing nil to a table entry is the same as deleting that entry. Tables are the only composite data type in Lua. They are the foundation for all custom data types such as structures, arrays, sets, and others: - General view table: empty = {} - Empty table empty [1] = "first" - Adding an element with an integer index empty [3] = "second" - Adding an element with an integer index empty ["third"] = "third" - Adding an element with a string index empty [1] = nil - Remove an element from the table - Classic array - strings are indexed by default with integers, starting from 1 days1 = {"Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday", "Sunday"} - Array with arbitrary indexing days2 = {[0] = "Sunday", [1] = "Monday", [2] = "Tuesday", [3] = "Wednesday", [4] = "Thursday", [5] = "Friday" , [6] = "Saturday"} - Record (structure) - values of various types are indexed by literals person = {tabnum = 123342, - Personnel number fio = "Ivanov Stepan Vasilievich", - full name post = "toolmaker", - Position salary = 25800.45, - Salary sdate = "10/23/2013", - Date of employment bdate = "08/08/1973"} - Date of birth pfio = person.fio --Reference to a structure element. - Set - indices are used to store values workDays = {["Monday"] = true, ["Tuesday"] = true, ["Wednesday"] = true, ["Thursday"] = true, ["Friday"] = true} workDays ["Saturday"] = true - Add Saturday to the number of working days workDays ["Wednesday"] = nil - We no longer work on Wednesdays - Check if d is a working day if workDays [d] then print (d .. "- working day") else print (d .. "- day off") end Multisets (sets that can contain more than one instance of the same element) are implemented similarly to the last example, only as values are used not logical, but integers - counters of the number of corresponding elements in the set. Linked lists can be represented as arrays of two-element arrays storing a value and a reference to the next element. Multidimensional arrays can be implemented as arrays of arrays. More complex structures such as queues, graphs, networks are also implemented on the basis of tables, the specific implementation method is determined by the task. Closures: Lua supports the concept of closures, for example: function makeaddfunc (x) - Returns a new anonymous function that adds x to the argument return function (y) - When we refer to a variable x that is outside the current scope, - and whose lifetime is less than that of this anonymous function, - Lua creates a closure. return x + y end end plustwo = makeaddfunc (2) - i.e. plustwo = function (y) return 2 + y end print (plustwo (5)) - Prints 7 Each time makeaddfunc is called, a new closure is created for the variable x, so that each anonymous function returned will refer to its own parameter x. Like any other Lua object, the lifetime of a closure is controlled by the garbage collector. Means and methods of programming: Metatables The metatable mechanism provides many of the capabilities that other languages provide by introducing separate syntactic mechanisms. By structure, metatables are ordinary Lua tables, subject to all the rules and restrictions of the language. Their peculiarity is their application. Metatable stores additional metadata of types and objects, that is, information about parameters and functions associated with them. The information stored in the metatables is used by the Lua interpreter and can be used to modify or extend the functionality of program objects. A metatable in Lua can be associated with a value of any type. Scalar data types (all except userdata and tables) have common metatables for each type. Tables and values of type userdata have individual metatables references in each instance. Metatables of all types, except tables, can be modified only through external C code. Only table metatables are available directly from Lua. A Lua table created from scratch does not have a metatable (its metatable reference is nil). But the metatable for it can be created at any time or obtained from another table. The getmetatable (t) built-in function returns the metatable of table t, and the setmetatable (t, m) function sets the metatable m for table t. For metatables, a set of fields is documented that can be used by the language interpreter. To indicate the special role of these fields, a special naming rule is adopted for them: their identifiers begin with two underscores. Some of these fields contain information about specific properties of the object to which the metatable belongs. For example, the __mode parameter, when given, can make a table weak, that is, a table whose object references are all weak references. But the values of most of the possible fields of the metatable are the so-called metamethods, that is, references to functions that the interpreter calls under certain conditions. The general logic of using metamethods by the interpreter is as follows: when the interpreter encounters an operation in the program that is not defined for the operand object, it accesses the metatable associated with the operand, finds the corresponding metamethod in it, and calls it. - [[Create an addition operation for tables]] - Operands t1 = {1,2,3} t2 = {10,20,30} - Creating a metatable mt = {} - Writing to the metatable of the "__add" metamethod mt .__ add = function (a, b) local res = {} for k in pairs (a) do res [k] = a [k] + b [k] end return res end - Binding metatable to table t1 setmetatable (t1, mt) - Now adding tables is a correct operation t3 = t1 + t2 - connect to t3 a metatable with __tostring metamethod setmetatable (t3, {__tostring = function (t) local res = "\ n" for _, v in pairs (t) do res = res .. tostring (v) .. "-" end return res .. "\ n" end}) - The result will be displayed: "11,22,33," for _, v in ipairs (t3) do io.write (v, ",") end print (tostring (t3)) - will print "11-22-33-" Lua supports metamethods for all arithmetic and comparison operations, so they can be used to implement arithmetic on any object created by the programmer. In addition to the standard ones, you can use the so-called "library" metamethods, which are supported not by the core of the language, but by specific libraries. In the example above, this is the __tostring metamethod supported by the string library; this method converts the table to a string. Of most interest is the __index field. It is accessed when the interpreter tries to read a table element, but does not find it. The __index field can refer to either a table or a method. In the first case, the interpreter, not finding the desired value in the main table, will look for it in the __index table. In the second, instead of accessing the table, this method will be called. By defining tables or metamethods for a given field, Lua can implement inheritance, object data hiding, tracking operations on table data, and much more. Object Oriented Programming The basis for OOP in Lua is tables. In principle, a table is an object in the OOP sense, since it can have fields named using identifiers and store arbitrary values (object properties) and functions for implementing the object's behavior (object methods) in these fields. Some syntactic sugar provided by Lua makes describing and manipulating objects more familiar to programmers with experience with traditional OOP languages. There is no concept of a "class" in Lua, so a separate object is described and all fields and methods refer to it. Properties are described similarly to table elements with identifier keys, methods are described as function fields. Like the classical Oberon, the description of methods includes an explicit indication in the first paragraph Code examples Classic program "Hello, world!" in Lua it looks like this: print ("Hello World!") Factorial is an example of a recursive function: function factorial (n) if n == 0 then return 1 else return n * factorial (n - 1) end end Loop with counter: for i = 1.5 do - Statements end Working with functions as first-class objects is demonstrated in the following example, which modifies the behavior of the print function: do local oldprint = print - Store the current print function as oldprint function print (s) - Override the print function if s == "foo" then oldprint ("bar") else oldprint (s) end end end Any future print calls will now be redirected to the new function, and thanks to Lua's lexical support, the old print function will only be available through the new, modified print function. Lua also supports closures, as described above in the related section. A key feature of Lua is extensible semantics, the metatable mechanism gives you great flexibility in customizing unique behavior for Lua tables. The following example demonstrates an "infinite" table. For any {\ displaystyle n} n, fibs [n] will give {\ displaystyle n} the nth Fibonacci number using memoization. fibs = {1, 1} - Initial values for fibs [1] and fibs [2]. setmetatable (fibs, { __index = function (name, n) - Call the function if fibs [n] does not exist. name [n] = name [n - 1] + name [n - 2] - Calculation and memoization of fibs [n]. return name [n] end }) Implementation Like many interpreted programming languages, the Lua implementation has a separate compiler from the source language to executable bytecode and a virtual machine to execute the generated bytecode. Moreover, the bytecode is not the instructions of the stack machine, but the instructions of a virtual processor with several registers, which increases the efficiency of execution. The standard Lua VM uses garbage collection (similar to Java or .NET) memory allocation. Lua uses a single string pool, which reduces memory overhead for storing strings. For time-critical tasks, there is a Lua JIT compiler - LuaJIT [16]. The llvm-lua compiler [17] has also been developed, which generates code for the LLVM virtual machine, which provides the possibility of subsequent compilation into very efficient machine code for processors of various architectures. Using [edit | edit code] See also category: Software Using Lua It is currently used in various projects where it is required to embed a rather fast and easy-to-learn scripting programming language - for example, in game development, where Lua is often used as a layer between the game engine and data for scripting the behavior and interaction of objects. Due to its compactness, it is also applicable in portable devices, in particular, one of the Texas Instruments graphical calculators uses the language instead of the traditional BASIC for this class of devices. Games [edit | edit code] LucasArts was the first to introduce the Lua language into the development of computer games, starting with the game Grim Fandango [18]. The authors of the language in their report at the HOPL conference (eng.) Russian. recall that in January 1997 they received a message from Bret Mogilefsky, the main developer of Grim Fandango, where he wrote that after reading about the language in a 1996 article in Dr. Dobb's Journal, he plans to replace their homemade scripting language SCUMM with Lua [19]. As a result, he created the GrimE game engine, which is also used by the later quest from LucasArts - Escape from Monkey Island. In 2003, as a result of a poll on the GameDev.net site, Lua was recognized as the most popular scripting language for game development [10]. An example of a game programmed with Lua is World of Warcraft [20] [21]. The levels of the puzzle game Enigma are described in Lua [22]. A number of free Lua game engines are available, such as Defold [23] [unauthorized source?] [Significance of the fact?], Arcade engine LÖVE [24] [25], game constructor Novashell [26] and quest oriented (mostly - text) INSTEAD [27]. Also used in the X-Plane flight simulator, in the X-Ray engine for S.T.A.L.K.E.R [28]. For the popular game Minecraft, modifications have been made to ComputerCraft and its more perfect analogue OpenComputers, which add computers programmed in the Lua language [29]. The famous game Garry's Mod is programmable and also supports modifications written in Lua. The Croteam team (developed by Serious Sam and The Talos Principle) has been using Lua in scripts since Serious Engine 3.5. For the game GTA: San Andreas, modifications are created, written in the Lua language and supported by the Moonloader plugin. Also, the game Multi Theft Auto supports scripting in the Lua language. Roblox gaming platform uses Lua as its game coding language and game environment control LuaTeX [edit | edit code] LuaTeX, an extended version of pdfTeX, uses Lua as its built-in scripting language [33]. RPM [edit | edit code] RPM Batch Manager contains built-in Lua interpreter IDE There are at least two native development environments for Lua, these are: ZeroBrane Studio [35] is a multi-platform development environment written in Lua itself. Decoda is a Windows development environment written in C ++ with rich debugging capabilities for Lua scripts, including in running applications. For 2018, the last release of Wednesday dates back to 2014 and has beta status. In addition, Lua is supported by some generic IDEs, in particular: Geany Lua Development Tools [36] for the Eclipse environment EmmyLua plugin for IntelliJ IDEA, also equipped with on-the-fly syntax checking and advanced type annotation system [37] There was a Lua support module for NetBeans, but development ceased in 2013 and is only available for NetBeans 7.4 and earlier. The plugin is not supported in NetBeans 8.
  8. View File Use GG Version For Script | Work on equipped versions script ppap hahaha Use GG Version For Script | Work on equipped versions script Use GG Version For Script | Work on equipped versions script Use GG Version For Script | Work on equipped versions script Made by PublicHax Submitter PublicHax Submitted 02/23/2021 Category Templates  
  9. Version 1.0.0

    525 downloads

    ppap hahaha Use GG Version For Script | Work on equipped versions script Use GG Version For Script | Work on equipped versions script Use GG Version For Script | Work on equipped versions script Made by PublicHax
  10. View File LoadSite for scripts im sleepy This file make for script detect to not internet follow me. Submitter PublicHax Submitted 02/22/2021 Category Templates  
  11. Version 1.0.1

    241 downloads

    im sleepy This file make for script detect to not internet follow me.
×
×
  • Create New...