1 | Properties | Description | Example of use | Default |
---|---|---|---|---|
2 | Player | |||
3 | TryReccurect(); | Checking on the death of the character and his attempt to resurrect. After the resurrection when the route is set and return routes are included, then turn on the return route | if (Waypoins.isBusy) { Player.TryReccurect(); Attack.Begin(); Pause(200); } | |
4 | LoadProfile("path") | Load a profile of profile folders without ".xml" Affect the variables in the script. | Player.LoadProfile("1_Scout"); | |
5 | SaveProfile("path") | Saving profile in a folder with profiles without ".xml" Changes in the script are not saved. | Player.SaveProfile("1_Scout"); | |
6 | Update() | Manually update the information about the character. Information is lost when you change the character or teleportation, sometimes automatic update fails. | Player.Update(); | |
7 | Places the contents of the array array_name player's inventory in the form of successive id subjects. The second parameter specifies the name of the array, which will be recorded in the number of items in the stack. | Player.InvToArray("inventory_ids"); Player.InvToArray("inventory_ids", "inventory_counts"); | ||
8 | ItemsToArray ("ARRAY_NAME") | Puts an array array_name things on the character (except the belt) in successive id subjects. | Player.ItemsToArray("items_ids"); | |
9 | DistanceTo (x, y) | Returns the distance from the character to the coordinates in the two-dimensional space | if (Player.DistanceTo(123, 123) > 20) { Mes("Еще пилить " + Player.DistanceTo(123, 123) + "m");} | |
10 | DistanceToNPC ("nameNPC") | Returns the distance from the character to the NPC. If this NPC is not, it returns -1. Accounted for 3 coordinates. | if (Player.DistanceToNPC("NPC") > 20) { Mes("far more...");} if (Player.DistanceToNPC("NPC") = -1) { Mes("There is not a NPC next");} | |
11 | distanceToTarget | Returns the distance from the character to his chosen target. If the character has no target is selected, it returns -1. Accounted for 3 coordinates. | if (Player.distanceToTarget > 20) { Mes("far more...");} if (Player.distanceToTarget = -1) { Mes ("Target is not selected"); } | |
12 | distanceToEnemyPlayer | Returns the distance to the nearest enemy player. If there is no enemy near, returns 100000 | if (Player.distanceToEnemyPlayer < 60) { GameWindow.Kill();} | |
13 | targetName | Returns the name of the target character. If a character has no target, it returns an empty string. | if (Player.targetName != "") { Mes("Target: " + Player.targetName); } | |
14 | targetQuest | Returns whether or not the target quests for the character. -1 - No target is selected. 0 - no quest. 1 - you can take the quest. 2 - the quest is performed. 3 - you can take. | if (Player.targetQuest) { Mes(Player.targetName + " can take the quest!"); } | |
15 | questNPC ("nameNPC") | Returns whether the specified NPC quests for the character. -1 - NPC is not in sight. 0 - no quest. 1 - you can take the quest. 2 - the quest is performed. 3 - you can take. | if (Player.questNPC("NPC")) { Mes(Player.questNPC("NPC") + " can take the quest!"); } | |
16 | hp | In percent Health character. | if (Player.hp > 0) { Attack.Begin(); } | |
17 | hp_max | Maximum character's health. | ||
18 | hp_cur | Current health of the character | ||
19 | mp | MP character In percent | ||
20 | mp_max | MP maximum | ||
21 | mp_cur | current MP | ||
22 | dp | DP current | ||
23 | dp_max | DP maximum | ||
24 | inventory | Fullness In percent character's inventory | ||
25 | inventory_max | The size of the character inventory | ||
26 | inventory_cur | Fullness inventory character | ||
27 | inventory_kina | Number of kina in the inventory | ||
28 | inventory_broker | Number of kina from the broker | ||
29 | inventory_kinakk | Number of kina in inventory (string in millions) | ||
30 | inventory_brokerkk | Number of kina from the broker (string in millions) | ||
31 | InventoryContains(1234) | Returns the number of items in inventory at the specified object id. Considering the total number of objects, even if it is divided into several stacks. | ||
32 | ItemsContains(1234) | Are there things on the wearing of the character (except the belt) specified id things | ||
33 | level | character Level | ||
34 | channel | The channel on which the character (1+) | ||
35 | flight_time | The flight time in seconds | ||
36 | flight_time_max | Maximum flight time in seconds | ||
37 | x | X coordinate | ||
38 | and | |||
39 | from | |||
40 | exp | The experience of the character In percent | ||
41 | exp_max | The experience of the character to the next level | ||
42 | exp_cur | The experience of the character | ||
43 | exp_restore | The experience of the character, which may be reduced | ||
44 | class | character class | ||
45 | nick | Nick character | ||
46 | Waypoints | |||
47 | Running waypoints | Waypoints.BeginAsync(); | ||
48 | CancelAsync() | Abort waypoints | Waypoints.CancelAsync(); | |
49 | Reset(); | Reset all default values | Waypoints.Reset(); | |
50 | MoveTo(x, y); | Running along the ground for short distances. The maximum time of 10 seconds of motion. | Waypoints.MoveTo(Player.x + 10, Player.y + 10); | |
51 | currentWayType | Returns the current type of route. 0 - normal, 1 - Home, 2 - Quest | if (Waypoints.currentWayType = 0) { Attack.Begin(); } // Only attack in the normal route | |
52 | isBusy | Are started waypoints | while (Waypoints.isBusy) { Attack.Begin(0); Pause(200); } | not |
53 | enable | Enabling movement waypoints | Waypoints.enable = 1; | yes |
54 | standard always | Name of the normal waypoints without the suffix "_Waypoints.xml" | Waypoints.normalWays = "First"; | empty |
55 | returnWays | Name of the waypoints to return to the normal without the suffix "_WayDEAD.xml" | Waypoints.returnWays = "First"; | empty |
56 | questWays | Name of the waypoints to return to the normal without the suffix "_WayQuest.xml" | Waypoints.questWays = "First"; | empty |
57 | pause_loop | Pausing after each cycle in seconds | Waypoints.pause_loop = 123; | |
58 | regen_loop | Restore health after each cycle | Waypoints.regen_loop = 1; | yes |
59 | noFly_loop | Fold the wings at the end of waypoints | Waypoints.noFly_loop = 1; | yes |
60 | reverse_loop | Reverse waypoints if the final destination is far from its starting point | Waypoints.reverse_loop = 1; | yes |
61 | reverse | Reverse waypoints. Works only for the normal waypoints and return. | Waypoints.reverse = 1; | not |
62 | repeat | loop waypoints | Waypoints.repeat = 1; | yes |
63 | nearPointsAfterPause | After a pause, to move to the nearest point on the waypoints. If "no", then choose from the following five points on the waypoints. | Waypoints.nearPointsAfterPause = 0; | not |
64 | nearWays | Start moving from the nearest waypoints to the character | Waypoints.nearWays = 1; | yes |
65 | Attack | |||
66 | Begin(); | Selection of a suitable target for attack and attack her. With option 1 - to self-defense against any attack mobs. | Attack.Begin(0); Attack.Begin(1); | |
67 | UpdateSkills(); | Updating the list of available skills | Attack.UpdateSkills (); | |
68 | UpdateTreeSkills(); | Upgrading skills in skill tree | Attack.UpdateTreeSkills (); | |
69 | Reset(); | Reset all default values | Attack.Reset(); | |
70 | UseMantras (); | The inclusion of all these mantras in bot | Attack.UseMantras (); | |
71 | UseSkill (s); | The use of skill by its id or id of the object. | Attack.UseSkill(50002); // loot Attack.UseSkill(1801); // return | |
72 | PlaceHotbar(id, but); | Put in cell hotbar skill id or id of the object. but - cell hotbar. 1 row - from 0 to 11. 2 row from 12 to 23. 3 row from 24 to 35. 4 row from 36 to 47. | Attack.PlaceHotbar(50002, 0); // loot Attack.PlaceHotbar(1801, 12); // return | |
73 | ClearAttackedMobs(); | Clears information about mobs attacked from the moment the bot. | Attack.ClearAttackedMobs (); | |
74 | AttackedMobs ("") | Returns the number of mobs attacked containing the name. Cell counts if the primary attacker cycle has passed without errors. | if (Attack.AttackedMobs ("refisma")> 5) {Mes ("is attacked by more than 5 refism");} | |
75 | SkillReady(0) | Returns ready skill for rollback (cooldown) | if (Attack.SkillReady(1801)) { Attack.UseSkill(1801); } | |
76 | Gets Kill ("skill name") | Check for occurrence of the string in the name of the character in the studied skills. Returns 1 if the skill is, 0 - otherwise. You can specify a string instead of id skill. | if (Attack.GetSkill("Dash Attack")) { Mes("Proveest is a letter in the word!"); } | |
77 | radiusPlayer | The distance from the character | Attack.radiusPlayer = 30; | |
78 | radiusWaypoint | The distance from the waypoint to which character moves if it moves waypoints. If no route - the distance from the starting point with the launch of the bot. | Attack.radiusWaypoint = 50; | |
79 | radiusAgroNextPoint | Adding length to the radius of aggressive mobs. To select mobs crossing its radius of the point to which the character is moving. | Attack.radiusAgroNextPoint = 5; | |
80 | nextAgroEnabled | Aggressive attack mobs to attack them | Attack.nextAgroEnabled = 0; | yes |
81 | levelMin | Minimum level target including | Attack.levelMin = 2; | |
82 | levelMax | Maximum level target including | Attack.levelMax = 70; | |
83 | names | Must contain the name of the destination string. You can specify a comma-separated couple. | Attack.names = "cherub, refisma"; | empty |
84 | namesEnable | To consider the content the line in the title. | Attack.namesEnable = 0; | not |
85 | namesExeclude | The name must not contain any target line. You can specify a comma-separated couple. | Attack.namesExeclude = "boss"; | empty |
86 | namesExecludeEnable | To consider the content ignored of rows in the title. | Attack.namesExecludeEnable = 0; | not |
87 | passive | The target may not be aggressive. | Attack.passive = 1; | yes |
88 | aggressive | The target may be aggressive | Attack.agressive = 1; | yes |
89 | maxTimeFirstDamage | The maximum time in seconds for applying damage to the target from the moment of her choice. | Attack.maxTimeFirstDamage = 40; | |
90 | maxTimeFirstDamageEnable | Consider the maximum time the Damage | Attack.maxTimeFirstDamageEnable = 1; | yes |
91 | selectNotAttacked | Potential target should not attack other characters | Attack.SelectNotAttacked = 1; | yes |
92 | notSelectPlayers | Potential target can not be player of the opposing race | Attack.notSelectPlayers = 0; | not |
93 | attackPlayers | Trying to attack the character of his race | not | |
94 | comboExtended | Use advanced combos. More efficient use of combos, but some players may have problems. | not | |
95 | looting | Pick up the loot after killing mobs | yes | |
96 | lootingRadiusEnable | Picks the loot at a distance from the character | yes | |
97 | lootingRadius | The distance from the character selection for loot | ||
98 | lootingUnique | Pick up items to be acknowledged | yes | |
99 | maxBattleTimeEnable | Use a maximum of one mob attack | yes | |
100 | maxBattleTime | The maximum time in seconds a mob attack | ||
101 | maxIngnoreTime | The maximum time ignoring the target if it does not get to choose. In seconds | ||
102 | pauseAfterAttack | Get up on the pause after the attack | not | |
103 | selectTargetIntoChat | Choose the target through chat | not | |
104 | selectTargetIntoChatCommand | Chat command to select the target. Chat command to select the resource. In the Russian localization "/выбор" | "/выбор" | |
105 | useSkillPoryadok | Use skills in a fixed order | yes | |
106 | useSkillPoryadokMaxTime | The maximum time to use one skill. In milliseconds | ||
107 | Gathering | |||
108 | Begin(); | Choosing a suitable resource for the collection, and his collection. Possible add an unlimited capacity of extra parameters, each of which - the name mask to gather resources, which need to break camp. | Gathering.Begin (); Gathering.Begin ("*gart*"); Gathering.Begin ("*small*", "*crap*"); | |
109 | Reset(); | Reset all default values | Gathering.Reset(); | |
110 | lastLevel | Returns a collection of character level, which was about the last resource. | ||
111 | flyPortition | Potion on the flight. A single character string. | ||
112 | flyPortitionCooldown | Cooldown the potion on the flight. | ||
113 | flyPortitionEnable | Enabling drinking potions on flight | no | |
114 | flyPortitionLess | Condition drink cans on a flight at the specified character% of the time of flight | ||
115 | flyTimeSkipAll | The remaining flight time, in seconds, at which the resources will not be collected | ||
116 | flyTimeSkipAllEnable | Enabling pass Resources | yes | |
117 | levelFilter | Filter resource levels | yes | |
118 | levelMax | The maximum level of resource | ||
119 | levelMin | The minimum level of resource | ||
120 | maxTime | The maximum time to collect resource | ||
121 | maxCountSelect | The maximum number of attempts to select a resource within a method Begin (); | ||
122 | namesFilter | Filter by resource name | no | |
123 | radiusWaypoint | The distance of the resource from the route | ||
124 | skipIfNearPlayer | Ignore, if there's another character with the resource | yes | |
125 | Chat | |||
126 | SendMessage ("message", lang); | Sending a message to the chat. lang - change the language in which the message is sent (1049 - Russian, 3181 - English) if not specified - is checked for the presence of Russian letters in the message, if any, changes to the Russian, if not - then the layout of the window does not change. | Chat.SendMessage("/select Titanium"); Chat.SendMessage("/attack"); | |
127 | chatContains("маска", n) | Checks whether there is in the first tab of the chat line corresponding to the given pattern. If successful, returns the string or an empty string. n - number of strings being compared with the end of the conversation, if not specified - the whole chat. | if (Chat.chatContains("*you*bot*", 10)) { Mes("Alarm!"); } | |
128 | GameWindow | |||
129 | Activate(); | Activates the window game. You can specify - the time in seconds before the folding and unfolding of the game window. | GameWindow.Activate(30); | |
130 | Minimize(); | Minimizes the window game | ||
131 | Close(); | Closes the game (Like when you cross) | GameWindow.Close(); | |
132 | Kill(); | Kills the process of the game (as a task manager) | ||
133 | SendKey ("key"); | Sending keys to the game window | ||
134 | CloseAllDialogs(); | Close all windows in the game. | GameWindow.CloseAllDialogs(); | |
135 | Use folding to activate the game window. | yes | ||
136 | Text | The window title game | Mes(GameWindow.Text); GameWindow.Text = "aion1 - " + Player.nick; | |
137 | Mouse | |||
138 | Move the mouse to the coordinates. The game window - origin of the coordinate grid | Mouse.Set(732, 341); | ||
139 | Click(); | Click the left mouse button | Mouse.Click(); | |
140 | ClickR(); | Click the right mouse button | Mouse.ClickR(); | |
141 | Whell(0); | Scrolling the mouse wheel. 0 - down, 1 - up Pause before scrolling added 100 ms | Mouse.Whell(); | |
142 | id | Returns the id object under his arm | Month (Mouse.id); | |
143 | count | Returns the number of items under the arm | Month (Mouse.count); | |
144 | Time | |||
145 | sec | Returns the seconds. From 0 to 59. | Mes (Time.sec + "seconds"); | |
146 | my | Returns the minutes. From 0 to 59. | Mes (Time.min + "minutes"); | |
147 | hour | Returns the clock. From 0 to 23. | Mes(Time.hour + " hour); | |
148 | day | Returns the day of the month. From 1 to 31. | Mes (Time.day + " day"); | |
149 | my | Returns the month. From 1 to 12. | Month ("Month under number" + Time.mon); | |
150 | year | Returns the year in the Gregorian calendar. From 1 to 9999. | Mes(Time.year); | |
151 | wday | Returns the day of the week. From 0 to 6. 0 - Sunday | if (Time.wday = 1 to 5) { Mes("Vot awake and arise"); } | |
152 | yday | Returns the day of the year. From 0 to 366. | Mes ("For" + Time.yday + "day this year"); | |
153 | elapsed | Returns the number of minutes after you click "Start." | Mes ("bot is working" + Time.elapsed + "minutes"); | |
154 | Paths | |||
155 | data | The root folder of the bot. In appointing change all of the following folders. | Mes ("Hunting is in the folder" + Paths.data); | Folder bot |
156 | logs | Folder with logs | Mes ("Logiruetsâ to us in" + Paths.logs); | Bot folder + "\ log" |
157 | profiles | Folder with profiles | Mes ("Profiles lie in" + Paths.profiles); | Folder bot + "\profiles" |
158 | scripts | Folder with scripts | Mes ("Skripty LIVE" + Paths.scripts); | |
159 | sounds | Folder with the sounds | Mes (Paths.sounds); | Folder bot + "\sounds" |
160 | waypoints | Folder with routes | Mes (Paths.waypoints); | Folder bot + "\waypoints" |
161 | File | |||
162 | AppendLine ("file", "123") | Appends the specified string to a text file. If the file does not exist, create it. | File.AppendLine("C:\test.txt", "тестовая строка"); | |
163 | Delete("file") | Removes the specified file | File.Delete("C:\test.txt"); | |
164 | LoadToList("file", "array"); | Uploading a file to an array variable | File.LoadToList("C:\test.txt", "listDrop"); | |
165 | PlayMP3("file") | Asynchronously play mp3 files from the folder with the sounds. | File.PlayMP3("dead.mp3"); | |
166 | Exists("file") | Returns the file exists or not. | if (File.Exists("C:\test.txt)) { Mes("есть!"); } | |
167 | LastChanged("file") | Returns the number of minutes since the file was last modified | ||
168 | Log | |||
169 | ("String") | Writes a string to the log bot | Log ("Something HAPPENED!" + Player.nick); | |
170 | eventVoid | Input and output in the function | Log.eventVoid = 0; | yes |
171 | event change vars | API interface for scripting variables | Log.eventeventChangeVars = 1; | no |
172 | ||||
173 | ||||
174 | Arrays | |||
175 | Adds an element to the array. The element can be any type of | list.Add("element"); list.Add(123); | ||
176 | Remove (element); | Removes the first occurrence of an element in the array. | list.Remove(123); | |
177 | RemoveAt(index); | Removes the element at the specified index of the array. | list.RemoveAt(0); | |
178 | Reverse(); | Reverse the array. | list.Reverse(); | |
179 | Clear(); | Removes all of the elements of the array; | list.Clear(); | |
180 | Dispose (); | Removes the array. | list.Dispose (); | |
181 | SaveToFile ("path"); | Stores an array of elements in the file. If the array is not a string, it is converted to a string. UTF-8 encoding | list.SaveToFile("C:\text.txt"); | |
182 | LoadFromFile("path") | Loads an array of strings from a file. All the elements of the array - line of the file. UTF-8 encoding | array list; list.LoadFromFile("C:\text.txt"); | |
183 | LoadFromChat("filter") | Loads an array of strings from a chat with the specified filter strings. In the filter may contain several values separated by commas. | list.LoadFromChat("Bot, " + Player.nick); | |
184 | [Index] | Gets or sets the element with the specified sequence number (INEX). The sequence number starts with zero. | Mes ("The second element of the array list =" + list [1]); list [1] = "Substitution second element"; | |
185 | count | Returns the number of elements in the array | for (i = 0; i < list.count; i++) { Mes(list[i]; } | |
186 | Contains(element) | Returns 1 if the element is present in the array, otherwise it returns 0. | if (list.Contains ("element")) {Mes("There is such a");} | |
187 | IndexOf (element) | Returns the zero-based index of the first occurrence of an element in the array. If the desired item is not in the array, then -1 | ||
188 | LastIndexOf(element) | Returns the zero-based index of the last occurrence of an element in the array. If the desired item is not in the array, then -1 | ||
189 | RegexFind ("regex") | Returns the first occurrence of an element in a group <result> regular expression found in the array elements. | array list = {"123 - first", "44 - second"}; Mes(list.RegexFind("[0-9]* - (?<result>.*)")); | |
190 | ||||
191 | ||||
192 | ||||
193 | The color legend | |||
194 | The class name | |||
195 | Method | No value is returned | ||
196 | Property without the possibility | Returns the value of | ||
197 | The property with the ability to use | Returns a value. Possible change in the script. | ||
198 |
1 | Name | Description | Example |
---|---|---|---|
2 | Contains("string 1", "string 2"); | Checks the occurrence of the string 2 in row 1 | if (Contains(Player.nick, "TL")) { Mes("In the nick character has TL"); } |
3 | MaskMatch ("string 1", "mask"); | Checks entry mask in row 1 | if (MaskMatch(Player.nick, "*TL*")) { Mes("In the nick character has TL"); } |
4 | RegexMatch ("string", "regex"); | Returns the first occurrence of a group <result> regular expression found in the string. | Mes (RegexMatch("Nick Characters Bot" ".*\S{1}(?<result>.*)$")); |
5 | computer name | Returns the network name of the computer. | Mes (ComputerName); |
6 | Returns a random non-negative integer in the range from min to max | Rand (); // returns a number from 0 to 1000000 Rand (100) // returns a number between 0 and 100 Rand (100, 200) // returns from 100 to 200 | |
7 | Mes ("string"); | Displays a window with a string. You can use the numbers | Mes ("Zovut Player Session:" + Player.nick); Month (12 + ((20 * 2) / 3)); |
8 | SelectNPC ("имя NPC"); | Select NPC. Is used to select bust through F9. | SelectNPC("Chingachkuk"); |
9 | Pause (1000); | Pause script ukazannoe amount of milliseconds. 1 second = 1000 milliseconds | Pause (200); |
10 | |||
11 | |||
12 | |||
13 | void Event_stop_bot() { ; } | The function that executes when the script |
1 | Name | Description | Example |
---|---|---|---|
2 | int | Setting a global variable of type integer | int variable = 1 + 1; |
3 | string | Setting a global variable of type string | string string = "big and long"; |
4 | array | Setting the global variable array. An array element can be a variable of type integer or string. | array Arr1 = {1, 2, 1, 2 +, 3 - 2, "string"}; array Arr2 = Arr1; // array cloning |
5 | while (condition) {Code block} | Cycle with the precondition | int x = 1; while (x <2) { Mes ("X =" + x) x++;} |
6 | for (variable = value; condition; increment) {Code block} | Cycle For. Is used to execute a certain number of times. The loop variable is available only within a block of code, it is possible to block the change. The condition can be in any case while or if. Can contain variable-cycle, and can do without it. The increment shall consist of one operator can modify the loop variable or any other available variable. | for (i = Player.hp_cur; i < Player.hp_max; i++) { Mes(i); } |
7 | if (condition) {Code block} | If the condition is true, then the block of code. | if (1 > 2) {Mes ("No way!");} |
8 | if (condition) {Code block} else {block of code} | If the condition is true, then the first block of code, if not true, then a second. | if (1 > 2) {Mes ("No way!");} else {Mes ("That's right!");} |
9 | break | Completion of the next cycle | while (1) { Mes ("Cycle corked"); break; Mes ("The Court is not dojdet");} |
10 | continue | Interrupting the cycle transition to the next iteration. | for (i = 0; i <10; i + +) { Mes ("i =" + i); continue; Mes("Up to here it reaches");} |
11 | void | The function declaration. after the keyword should be a unique function name and parentheses. In brackets, you can specify the post variables. The number of variables is not limited | Func1 void (m) { Mes(m);} Func1 ("twelve"); Func1 ("multiply by two = "); Func1 (12 * 2); |
12 | using | Loading functions from a script file without executing it. The path may be absolute or relative. | using "C:\bot\scriptFunc.cs"; using "Funcs.cs"; // Load from folder scripts |
13 | include | Download the functions of the script file and its implementation. The path may be absolute or relative. | include "C:\bot\script2.cs"; include "SecondScript.cs"; // from the folder scripts |
14 | & | In logical terms | if (1 & 2 = 1> 1) {Mes ("1 is 1, or 2 is more than 1");} |
15 | | | in a logical OR | if (1 > 2 | 2 > 1) {Mes ("1 more 2, or 2 is less than 1");} |
16 | = | Setting a variable to the new value. Under terms of comparing the left side to the right | int x = 1, x = 2; Mes (x); if (x = 2) Mes ("x is equal to 2"); |
17 | != | The left part of the condition must be equal to the right | if (x != 0) Mes ("x is not equal to 0"); |
18 | > | The left part of the condition should be greater than the right When compared to a string, then there is a comparison of its length | if (1 < 2) { ; } |
19 | < | The left part of the condition should be smaller than the right When compared to a string, then there is a comparison of its length | if (2 > 1) { ; } |
20 | 1..3 | The range of values. Used in the comparison numbers, together with the operators = and != | if (Player.level = 1..10) { Mes("Player 1 to level 10"); } |
21 |
1 | Features conditions | |
---|---|---|
2 | If the condition compares the lines containing only characters numbers, the line is automatically translated into a number. If the condition of at least one of the elements being compared - a string, all the elements of comparison are translated into strings. | |
3 | if (123 = "120" + 3) | Right. All elements are translated into numbers. Equivalent to 123 = 120 + 3 |
4 | if ("1" + "23" = "120" + 3) | Not true. All elements are translated into numbers. Equivalent to 1 + 23 = 120 + 3 |
5 | if (123 + 1 = "123 ") | Not true. All elements are translated into strings. Equivalent to the "1231" = "123". Right string contains a space. |
6 | if (123 + 1 = "123 " | 123 = "120" + 3) | Right. In the first block of all elements translated into strings, the result is not true. In the second block all elements translated into numbers, the result is true. False or true = true |
7 | if (1) | Right. If you missed the second operator, the number is greater than zero - surely less than or equal to zero - wrong |
8 | if (0) | Wrong. |
9 | if (-81273) | Wrong. |
10 | if ("any non-empty string") | Right. If you missed the second operator of the row, then any non-empty string is correct. |
11 | if ("1 2 3 4" > "9999") | Right. When comparing lines more or fewer characters, comparing their length. |
12 | ||
13 | ||
14 | ||
15 | Comments | |
16 | Comments are completely ignored in the script at runtime. In them you can write whatever you want. Implemented two kinds of comments. | |
17 | // Any string | A single-line comment. Starts with // and ends at the end of the line. |
18 | /* Any text and here, too, Any text */ | Multiline comment. Starts with /* and end with */ |
19 |