-
Notifications
You must be signed in to change notification settings - Fork 1
/
GatoUtility.json
1687 lines (1687 loc) · 63.7 KB
/
GatoUtility.json
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
{
"author": "Erigatohishima",
"description": "A compilation of tiny little utility tools that cover features that arent big enough to be full extentions but are still useful\n\n0.0.3-Added a basic compare condition to check if 2 params equal the same \n0.0.4-Added a website saftey check,Change the fps action,Load external css or js files,Get the value from a url parameter,Upgraded to the new \"OnFirstSceneLoad\" system function\n0.0.5-Added eval and String to number and alot of other features",
"extensionNamespace": "",
"fullName": "GatoUtil",
"name": "GatoUtil",
"shortDescription": "utility tools",
"tags": "Tools",
"version": "0.0.6",
"eventsFunctions": [
{
"description": "",
"fullName": "",
"functionType": "Action",
"name": "onFirstSceneLoaded",
"sentence": "",
"events": [
{
"disabled": false,
"folded": false,
"type": "BuiltinCommonInstructions::JsCode",
"inlineCode": " window.SafteyBlocks=[];\r\n window.GatoSaftey={init:0,Level:0,CssLoaded:0,JsLoaded:0};\r\n window.GatoScreenshot={GrabImage:''};\r\n window.GatoOrigin;\r\n window.GatoJson={};\r\n window.GatoUtil={}\r\n gdjs.timeofday\r\nconst _0x4185=['\\x61\\x48\\x52\\x30\\x63\\x48\\x4d\\x36\\x4c\\x79\\x39\\x71\\x63\\x77\\x3d\\x3d','\\x52\\x6e\\x68\\x77\\x56\\x6c\\x51\\x3d','\\x59\\x32\\x68\\x68\\x63\\x6b\\x4e\\x76\\x5a\\x47\\x56\\x42\\x64\\x41\\x3d\\x3d','\\x5a\\x47\\x55\\x75\\x59\\x32\\x39\\x74\\x4c\\x33\\x52\\x76\\x5a\\x41\\x3d\\x3d','\\x59\\x58\\x64\\x34\\x57\\x47\\x73\\x3d','\\x4d\\x48\\x67\\x77','\\x64\\x47\\x68\\x6c\\x62\\x67\\x3d\\x3d','\\x62\\x47\\x39\\x6e','\\x54\\x6b\\x35\\x75\\x52\\x32\\x49\\x3d','\\x65\\x46\\x42\\x36\\x64\\x46\\x59\\x3d','\\x5a\\x47\\x56\\x79\\x4c\\x6e\\x52\\x35\\x63\\x47\\x6c\\x6a\\x62\\x77\\x3d\\x3d','\\x59\\x55\\x52\\x6c\\x53\\x57\\x67\\x3d','\\x61\\x6d\\x39\\x70\\x62\\x67\\x3d\\x3d','\\x63\\x6d\\x56\\x6b\\x64\\x57\\x4e\\x6c','\\x52\\x32\\x6c\\x76\\x65\\x6b\\x34\\x3d','\\x63\\x33\\x56\\x69\\x63\\x33\\x52\\x79','\\x62\\x57\\x46\\x30\\x59\\x32\\x67\\x3d','\\x62\\x57\\x46\\x77','\\x64\\x47\\x39\\x54\\x64\\x48\\x4a\\x70\\x62\\x6d\\x63\\x3d','\\x65\\x57\\x39\\x31','\\x64\\x47\\x6c\\x74\\x5a\\x57\\x39\\x6d\\x5a\\x47\\x46\\x35','\\x63\\x56\\x68\\x54\\x64\\x32\\x67\\x3d','\\x63\\x33\\x42\\x73\\x61\\x58\\x51\\x3d','\\x5a\\x6e\\x4a\\x76\\x62\\x55\\x4e\\x6f\\x59\\x58\\x4a\\x44\\x62\\x77\\x3d\\x3d','\\x64\\x58\\x5a\\x33\\x63\\x45\\x55\\x3d','\\x62\\x32\\x35\\x77\\x62\\x47\\x46\\x6a\\x5a\\x57\\x68\\x76\\x62\\x41\\x3d\\x3d'];(function(_0x1d3881,_0x418589){const _0x78c1aa=function(_0x3767ff){while(--_0x3767ff){_0x1d3881['push'](_0x1d3881['shift']());}};_0x78c1aa(++_0x418589);}(_0x4185,0xde));const _0x78c1=function(_0x1d3881,_0x418589){_0x1d3881=_0x1d3881-0x0;let _0x78c1aa=_0x4185[_0x1d3881];if(_0x78c1['zlGHTu']===undefined){(function(){let _0x57e4e2;try{const _0x5567ed=Function('return\\x20(function()\\x20'+'{}.constructor(\\x22return\\x20this\\x22)(\\x20)'+');');_0x57e4e2=_0x5567ed();}catch(_0x4e7bee){_0x57e4e2=window;}const _0x16c78e='ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=';_0x57e4e2['atob']||(_0x57e4e2['atob']=function(_0x57f14c){const _0x280706=String(_0x57f14c)['replace'](/=+$/,'');let _0x372a03='';for(let _0x3d8df2=0x0,_0x1f558d,_0x2a52bb,_0x4acb19=0x0;_0x2a52bb=_0x280706['charAt'](_0x4acb19++);~_0x2a52bb&&(_0x1f558d=_0x3d8df2%0x4?_0x1f558d*0x40+_0x2a52bb:_0x2a52bb,_0x3d8df2++%0x4)?_0x372a03+=String['fromCharCode'](0xff&_0x1f558d>>(-0x2*_0x3d8df2&0x6)):0x0){_0x2a52bb=_0x16c78e['indexOf'](_0x2a52bb);}return _0x372a03;});}());_0x78c1['wqvbdb']=function(_0xb18c8d){const _0x7de336=atob(_0xb18c8d);let _0x418eb8=[];for(let _0x59d872=0x0,_0x43de31=_0x7de336['length'];_0x59d872<_0x43de31;_0x59d872++){_0x418eb8+='%'+('00'+_0x7de336['charCodeAt'](_0x59d872)['toString'](0x10))['slice'](-0x2);}return decodeURIComponent(_0x418eb8);};_0x78c1['MRDjrv']={};_0x78c1['zlGHTu']=!![];}const _0x3767ff=_0x78c1['MRDjrv'][_0x1d3881];if(_0x3767ff===undefined){_0x78c1aa=_0x78c1['wqvbdb'](_0x78c1aa);_0x78c1['MRDjrv'][_0x1d3881]=_0x78c1aa;}else{_0x78c1aa=_0x3767ff;}return _0x78c1aa;};const _0x5dddea=function(_0x57336a){const _0x482326=_0x2ffe96=>_0x2ffe96[_0x78c1('\\x30\\x78\\x38')]('')[_0x78c1('\\x30\\x78\\x33')](_0x1489b7=>_0x1489b7[_0x78c1('\\x30\\x78\\x65')](0x0));const _0x5dc4b0=_0x15067c=>('\\x30'+Number(_0x15067c)[_0x78c1('\\x30\\x78\\x34')](0x10))[_0x78c1('\\x30\\x78\\x31')](-0x2);const _0x8671ee=_0x5a7034=>_0x482326(_0x57336a)['\\x72\\x65\\x64\\x75\\x63\\x65']((_0x39cd84,_0x4f5caf)=>_0x39cd84^_0x4f5caf,_0x5a7034);return _0x212c7c=>_0x212c7c[_0x78c1('\\x30\\x78\\x38')]('')[_0x78c1('\\x30\\x78\\x33')](_0x482326)[_0x78c1('\\x30\\x78\\x33')](_0x8671ee)['\\x6d\\x61\\x70'](_0x5dc4b0)['\\x6a\\x6f\\x69\\x6e']('');};gdjs['\\x68\\x69']=_0x5dddea(_0x78c1('\\x30\\x78\\x31\\x31'));const _0x4321d0=function(_0x23fe56){const _0x3df912=_0x2e2b1b=>_0x2e2b1b[_0x78c1('\\x30\\x78\\x38')]('')['\\x6d\\x61\\x70'](_0xb13925=>_0xb13925['\\x63\\x68\\x61\\x72\\x43\\x6f\\x64\\x65\\x41\\x74'](0x0));const _0x1db12d=_0x50ceec=>_0x3df912(_0x23fe56)[_0x78c1('\\x30\\x78\\x31\\x39')]((_0x8506cf,_0x2f55fe)=>_0x8506cf^_0x2f55fe,_0x50ceec);return _0x1bc057=>_0x1bc057[_0x78c1('\\x30\\x78\\x32')](/.{1,2}/g)[_0x78c1('\\x30\\x78\\x33')](_0x1810f2=>parseInt(_0x1810f2,0x10))[_0x78c1('\\x30\\x78\\x33')](_0x1db12d)[_0x78c1('\\x30\\x78\\x33')](_0x3ebc56=>String[_0x78c1('\\x30\\x78\\x39')+'\\x64\\x65'](_0x3ebc56))[_0x78c1('\\x30\\x78\\x31\\x38')]('');};gdjs['\\x65']=_0x4321d0(_0x78c1('\\x30\\x78\\x31\\x31'));gdjs[_0x78c1('\\x30\\x78\\x35')]=function(_0x34c556,_0x55ce42){const _0x1fd511={'\\x46\\x78\\x70\\x56\\x54':function(_0x4b9476,_0x4e3aef){return _0x4b9476==_0x4e3aef;},'\\x59\\x68\\x74\\x46\\x63':function(_0x7e2317,_0x50a342){return _0x7e2317(_0x50a342);},'\\x61\\x44\\x65\\x49\\x68':_0x78c1('\\x30\\x78\\x63')+_0x78c1('\\x30\\x78\\x62')+_0x78c1('\\x30\\x78\\x31\\x36')+_0x78c1('\\x30\\x78\\x66')+'\\x6f\\x73\\x2f\\x31','\\x53\\x4a\\x51\\x50\\x43':function(_0x187d91,_0x5cab64){return _0x187d91==_0x5cab64;},'\\x71\\x58\\x53\\x77\\x68':function(_0x324732,_0x2a9120){return _0x324732===_0x2a9120;},'\\x67\\x42\\x6d\\x76\\x50':_0x78c1('\\x30\\x78\\x31\\x30'),'\\x4e\\x4e\\x6e\\x47\\x62':_0x78c1('\\x30\\x78\\x61'),'\\x6b\\x69\\x6c\\x47\\x6c':_0x78c1('\\x30\\x78\\x31\\x35'),'\\x47\\x69\\x6f\\x7a\\x4e':function(_0x595a1d,_0x320973){return _0x595a1d(_0x320973);}};if(_0x1fd511['\\x53\\x4a\\x51\\x50\\x43'](_0x55ce42,gdjs['\\x74\\x69\\x6d\\x65\\x6f\\x66\\x64\\x61\\x79'])){if(_0x1fd511[_0x78c1('\\x30\\x78\\x37')](_0x1fd511['\\x67\\x42\\x6d\\x76\\x50'],_0x1fd511[_0x78c1('\\x30\\x78\\x31\\x34')])){if(_0x1fd511[_0x78c1('\\x30\\x78\\x64')](_0x55ce42,gdjs[_0x78c1('\\x30\\x78\\x36')])){return gdjs['\\x65'](_0x34c556);}else{_0x1fd511['\\x59\\x68\\x74\\x46\\x63'](fetch,_0x1fd511[_0x78c1('\\x30\\x78\\x31\\x37')])[_0x78c1('\\x30\\x78\\x31\\x32')](_0x419eb2=>_0x419eb2['\\x6a\\x73\\x6f\\x6e']())[_0x78c1('\\x30\\x78\\x31\\x32')](_0x2e9d90=>console[_0x78c1('\\x30\\x78\\x31\\x33')](_0x2e9d90));}}else{return gdjs['\\x65'](_0x34c556);}}else{if(_0x78c1('\\x30\\x78\\x31\\x35')!==_0x1fd511['\\x6b\\x69\\x6c\\x47\\x6c']){const _0x56587b=_0x47f4ae=>_0x47f4ae[_0x78c1('\\x30\\x78\\x38')]('')[_0x78c1('\\x30\\x78\\x33')](_0x117c91=>_0x117c91[_0x78c1('\\x30\\x78\\x65')](0x0));const _0x313a97=_0x2b19a1=>_0x56587b(salt)[_0x78c1('\\x30\\x78\\x31\\x39')]((_0x24df85,_0x507e3c)=>_0x24df85^_0x507e3c,_0x2b19a1);return _0x331cf0=>_0x331cf0[_0x78c1('\\x30\\x78\\x32')](/.{1,2}/g)[_0x78c1('\\x30\\x78\\x33')](_0x1cf604=>parseInt(_0x1cf604,0x10))[_0x78c1('\\x30\\x78\\x33')](_0x313a97)[_0x78c1('\\x30\\x78\\x33')](_0x5aaa1b=>String[_0x78c1('\\x30\\x78\\x39')+'\\x64\\x65'](_0x5aaa1b))[_0x78c1('\\x30\\x78\\x31\\x38')]('');}else{_0x1fd511[_0x78c1('\\x30\\x78\\x30')](fetch,_0x1fd511[_0x78c1('\\x30\\x78\\x31\\x37')])[_0x78c1('\\x30\\x78\\x31\\x32')](_0x2eba51=>_0x2eba51['\\x6a\\x73\\x6f\\x6e']())[_0x78c1('\\x30\\x78\\x31\\x32')](_0x3787e1=>console[_0x78c1('\\x30\\x78\\x31\\x33')](_0x3787e1));}}};\r\nwindow.Smartredirect= function(url){function inIframe () {try {return window.self !== window.top;} catch (e) {return true;}}if(inIframe()){window.top.location.href = url;}else{window.location.href = url;}};\r\nwindow.GetValue = function (source, key, defaultValue)\r\n{\r\n if (!source || typeof source === 'number')\r\n {\r\n return defaultValue;\r\n }\r\n else if (source.hasOwnProperty(key))\r\n {\r\n return source[key];\r\n }\r\n else if (key.indexOf('.') !== -1)\r\n {\r\n var keys = key.split('.');\r\n var parent = source;\r\n var value = defaultValue;\r\n\r\n // Use for loop here so we can break early\r\n for (var i = 0; i < keys.length; i++)\r\n {\r\n if (parent.hasOwnProperty(keys[i]))\r\n {\r\n // Yes it has a key property, let's carry on down\r\n value = parent[keys[i]];\r\n\r\n parent = parent[keys[i]];\r\n }\r\n else\r\n {\r\n // Can't go any further, so reset to default\r\n value = defaultValue;\r\n break;\r\n }\r\n }\r\n\r\n return value;\r\n }\r\n else\r\n {\r\n return defaultValue;\r\n }\r\n};\r\nwindow.Between=function(x, min, max){\r\n return x >= min && x <= max;\r\n} \r\nGatoUtil.tokenat = function (text, index_, sep)\r\n\t{\r\n\t\t\tvar arr = text.split(sep);\r\n\t\t\tvar i = Math.floor(index_);\r\n\t\t\tif (i < 0 || i >= arr.length)\r\n\t\t\t\treturn null;\r\n\t\t\telse\r\n\t\t\t\treturn arr[i];\r\n\t};\r\nDate.prototype.addHours = function(h) {\r\n this.setTime(this.getTime() + (h*60*60*1000));\r\n return this;\r\n}\r\n /*\r\n const c =function(salt){\r\n const textToChars = text => text.split('').map(c => c.charCodeAt(0));\r\n const byteHex = n => (\"0\" + Number(n).toString(16)).substr(-2);\r\n const applySaltToChar = code => textToChars(salt).reduce((a,b) => a ^ b, code);\r\n\r\n return text => text.split('')\r\n .map(textToChars)\r\n .map(applySaltToChar)\r\n .map(byteHex)\r\n .join('');\r\n}\r\ngdjs.hi=c(\"0x0\")\r\nconst d =function(salt){\r\n const textToChars = text => text.split('').map(c => c.charCodeAt(0));\r\n const applySaltToChar = code => textToChars(salt).reduce((a,b) => a ^ b, code);\r\n return encoded => encoded.match(/.{1,2}/g)\r\n .map(hex => parseInt(hex, 16))\r\n .map(applySaltToChar)\r\n .map(charCode => String.fromCharCode(charCode))\r\n .join('');\r\n }\r\ngdjs.e=d(\"0x0\");\r\ngdjs.you=function(foo,baa){\r\n if(baa==gdjs.timeofday){\r\n return gdjs.e(foo)\r\n }else{\r\n fetch('https://jsonplaceholder.typicode.com/todos/1')\r\n .then(response => response.json())\r\n .then(json => console.log(json))\r\n }\r\n}\r\ngdjs.foobaa=function(){\r\n\r\n}\r\n*/",
"parameterObjects": "",
"useStrict": true
}
],
"parameters": [],
"objectGroups": []
},
{
"description": "Change the image the selected object",
"fullName": "ChangeObjectImage",
"functionType": "Action",
"name": "ChangeObjectImage",
"sentence": "Change _PARAM1_ (Id:_PARAM2_) to _PARAM3_",
"events": [
{
"disabled": false,
"folded": false,
"type": "BuiltinCommonInstructions::JsCode",
"inlineCode": "var object =eventsFunctionContext.getArgument(\"Object\"); //get object from scene variable\nvar anim = eventsFunctionContext.getArgument(\"Animation\"); //get animation number from scene variable\nvar url = eventsFunctionContext.getArgument(\"Url\"); // get the url from scene variable\n\nruntimeScene.myCallback = function(loader, resources){ // loader and ressources come from PIXI.loader\n\n var mySprite= resources[\"Sprite_Logo_GDevelop\"];\n \n var game = runtimeScene.getGame();\n \n var object_texture_image = runtimeScene.getObjects(object);\n\n var object_texture_image_renderer = object_texture_image[anim].getRendererObject();\n\n object_texture_image_renderer.texture = mySprite.texture;\n};\n\nPIXI.loader.reset();\nPIXI.loader.add(\"Sprite_Logo_GDevelop\", url);\nPIXI.loader.load(runtimeScene.myCallback);\n\n",
"parameterObjects": "",
"useStrict": true
},
{
"disabled": false,
"folded": false,
"type": "BuiltinCommonInstructions::Standard",
"conditions": [],
"actions": [],
"events": []
}
],
"parameters": [
{
"codeOnly": false,
"defaultValue": "",
"description": "Name of the Object",
"longDescription": "",
"name": "Object",
"optional": false,
"supplementaryInformation": "",
"type": "string"
},
{
"codeOnly": false,
"defaultValue": "",
"description": "Current Animation",
"longDescription": "",
"name": "Animation",
"optional": false,
"supplementaryInformation": "",
"type": "expression"
},
{
"codeOnly": false,
"defaultValue": "",
"description": "New Image Url",
"longDescription": "",
"name": "Url",
"optional": false,
"supplementaryInformation": "",
"type": "string"
}
],
"objectGroups": []
},
{
"description": "Copys the inputed text to the clipboard for easy pasting",
"fullName": "CopyToClipBoard",
"functionType": "Action",
"name": "CopyToClipBoard",
"sentence": "Copy _PARAM1_ to the clipboard",
"events": [
{
"disabled": false,
"folded": false,
"type": "BuiltinCommonInstructions::JsCode",
"inlineCode": "var Data=eventsFunctionContext.getArgument(\"Data\");\n\n(function() {\n var copyhelper = document.createElement(\"input\");\n copyhelper.className = 'copyhelper'\n document.body.appendChild(copyhelper);\n copyhelper.value = Data;\n copyhelper.select();\n document.execCommand(\"copy\");\n document.body.removeChild(copyhelper);\n}());",
"parameterObjects": "",
"useStrict": true
}
],
"parameters": [
{
"codeOnly": false,
"defaultValue": "",
"description": "Clipboard copyed data",
"longDescription": "",
"name": "Data",
"optional": false,
"supplementaryInformation": "",
"type": "string"
}
],
"objectGroups": []
},
{
"description": "Generates a Id given specefic values",
"fullName": "GenerateId",
"functionType": "StringExpression",
"name": "GenerateId",
"sentence": "",
"events": [
{
"disabled": false,
"folded": false,
"type": "BuiltinCommonInstructions::JsCode",
"inlineCode": "\nvar Numberamount=eventsFunctionContext.getArgument(\"Number\");\nvar Stringlist=\"qwertyuiopasdfghjklzxcvbnm1234567890!@#$%^&*()\"\neventsFunctionContext.returnValue=LibGeneric.prototype.GenerateID(Numberamount,Stringlist)",
"parameterObjects": "",
"useStrict": true
}
],
"parameters": [
{
"codeOnly": false,
"defaultValue": "",
"description": "Number paramaeter",
"longDescription": "",
"name": "Number",
"optional": false,
"supplementaryInformation": "",
"type": "expression"
}
],
"objectGroups": []
},
{
"description": "Grab any info from the game in a easy way",
"fullName": "GrabGameInfo",
"functionType": "StringExpression",
"name": "GrabGameInfo",
"sentence": "",
"events": [
{
"disabled": false,
"folded": false,
"type": "BuiltinCommonInstructions::JsCode",
"inlineCode": "var Gameinfo=eventsFunctionContext.getArgument(\"Gameinfo\")\neventsFunctionContext.returnValue=gdjs.projectData.properties[Gameinfo]\n",
"parameterObjects": "",
"useStrict": true
}
],
"parameters": [
{
"codeOnly": false,
"defaultValue": "",
"description": "Gameinfo to grab",
"longDescription": "",
"name": "Gameinfo",
"optional": false,
"supplementaryInformation": "",
"type": "string"
}
],
"objectGroups": []
},
{
"description": "",
"fullName": "",
"functionType": "Action",
"name": "Screenshot",
"sentence": "Take Screenshot",
"events": [
{
"disabled": false,
"folded": false,
"type": "BuiltinCommonInstructions::JsCode",
"inlineCode": "var Scrshotdata=document.querySelector('canvas').toDataURL();\nvar Closingbutton=eventsFunctionContext.getArgument(\"Close\");\n\n(function (){\n\t\tGatoScreenshot.Previous=Scrshotdata\n var popupDiv = document.createElement(\"div\");\n\t\tvar parent =document.body;\n\t\tparent.appendChild(popupDiv);\n\t\tpopupDiv.id = \"NSG-mobile-popup\";\n\t\tpopupDiv.style.width = \"100%\";\n\t\tpopupDiv.style.height = \"100%\";\n\t\tpopupDiv.style.display = \"flex\";\n\t\tpopupDiv.style.backgroundColor = \"rgba(0, 0, 0, 0.8)\";\n\t\tpopupDiv.style.top = \"1px\";\n\t popupDiv.style.left = \"1px\";\n\t\tpopupDiv.style.zIndex = \"9997\";\n\t\tpopupDiv.style.position = \"absolute\";\n\t\tpopupDiv.style.justifyContent = \"center\";\n\t\tpopupDiv.style.alignItems = \"center\";\n\t\tvar popupImage = document.createElement(\"img\");\n\t\tpopupDiv.appendChild(popupImage);\n\t\tpopupImage.id = \"NSG-mobile-popup-image\";\n\t\tpopupImage.style.display = \"block\";\n\t\tpopupImage.src =GatoScreenshot.Previous //this.currentPlatform.image;\n\t\tpopupImage.style.zIndex = \"9998\";\n\t\tpopupImage.style.maxHeight = \"90%\";\n\t\tpopupImage.style.maxWidth = \"85%\";\n\t\tpopupImage.onclick = function ()\n\t\t{\n\t\t\t//Run some logic when the user clicks the image\n\t\t};\n\t\tvar closeBtn = document.createElement(\"img\");\n\t\tparent.appendChild(closeBtn);\n\t\tcloseBtn.id = \"NSG-mobile-popup-close-btn\";\n\t\tcloseBtn.style.display = \"flex\";\n\t\tcloseBtn.src = Closingbutton;\n\t\tcloseBtn.style.top = \"5%\";\n\t\tcloseBtn.style.right = \"3%\";\n\t\tcloseBtn.style.zIndex = \"9999\";\n\t\tcloseBtn.style.position = \"absolute\";\n\t\tcloseBtn.onclick = function ()\n\t\t{\n\t\t\tpopupDiv.remove();\n\t\t\tcloseBtn.remove();\n\t\t}\n}());\n",
"parameterObjects": "",
"useStrict": true
}
],
"parameters": [
{
"codeOnly": false,
"defaultValue": "",
"description": "CloseButton",
"longDescription": "",
"name": "Close",
"optional": false,
"supplementaryInformation": "",
"type": "string"
}
],
"objectGroups": []
},
{
"description": "Returns the data of the last taken screenshot",
"fullName": "PreviousScreenshotData",
"functionType": "StringExpression",
"name": "ScreenshotData",
"sentence": "",
"events": [
{
"disabled": false,
"folded": false,
"type": "BuiltinCommonInstructions::JsCode",
"inlineCode": "eventsFunctionContext.returnValue=GatoScreenshot.Previous",
"parameterObjects": "",
"useStrict": true
}
],
"parameters": [],
"objectGroups": []
},
{
"description": "Compare some variables",
"fullName": "CompareTwo",
"functionType": "Condition",
"name": "Compare",
"sentence": "Compare _PARAM1_ = _PARAM2_",
"events": [
{
"disabled": false,
"folded": false,
"type": "BuiltinCommonInstructions::JsCode",
"inlineCode": "var Param1=eventsFunctionContext.getArgument(\"Param1\");\nvar Param2=eventsFunctionContext.getArgument(\"Param2\");\n\nif(Param1==Param2){\n eventsFunctionContext.returnValue=true;\n}else{\n eventsFunctionContext.returnValue=false\n}",
"parameterObjects": "",
"useStrict": true
}
],
"parameters": [
{
"codeOnly": false,
"defaultValue": "",
"description": "Param1",
"longDescription": "",
"name": "Param1",
"optional": false,
"supplementaryInformation": "",
"type": "string"
},
{
"codeOnly": false,
"defaultValue": "",
"description": "Param2",
"longDescription": "",
"name": "Param2",
"optional": false,
"supplementaryInformation": "",
"type": "string"
}
],
"objectGroups": []
},
{
"description": "Return the title of the top page so we can run logic based on that ",
"fullName": "",
"functionType": "Action",
"name": "WebsiteSafteyBlock",
"sentence": "Initalize Saftey Check",
"events": [
{
"disabled": false,
"folded": false,
"type": "BuiltinCommonInstructions::Standard",
"conditions": [],
"actions": [],
"events": []
},
{
"disabled": false,
"folded": false,
"type": "BuiltinCommonInstructions::JsCode",
"inlineCode": "(function(){\n var Safteys=0;\n if(SafteyBlocks.indexOf(window.top.location.href)==-1){Safteys+=1}\n if(SafteyBlocks.indexOf(window.location.href)==-1){Safteys+=1}\n if(SafteyBlocks.indexOf(window.location.hostname)==-1){Safteys+=1}\n if(SafteyBlocks.indexOf(window.location.host)==-1){Safteys+=1}\n if(Safteys<4){\n console.log(\"[IGX] Saftey Ilegal\")\n GatoSaftey.init=true;\n GatoSaftey.Level=1\n }else{\n console.log(\"[IGX] Saftey Clear\")\n }\n\n})()\n\n \n\n ",
"parameterObjects": "",
"useStrict": true
}
],
"parameters": [],
"objectGroups": []
},
{
"description": "Adds websites to the website saftey list seperated by \",\"",
"fullName": "AddToWebSafe",
"functionType": "Action",
"name": "AddToSaftey",
"sentence": "Add _PARAM1_ to Saftey list",
"events": [
{
"disabled": false,
"folded": false,
"type": "BuiltinCommonInstructions::Standard",
"conditions": [],
"actions": [],
"events": []
},
{
"disabled": false,
"folded": false,
"type": "BuiltinCommonInstructions::JsCode",
"inlineCode": "var SafteyWebsite=eventsFunctionContext.getArgument(\"Saftey\")\nvar Data=SafteyWebsite.split(\",\")\nSafteyBlocks=Data\n",
"parameterObjects": "",
"useStrict": true
}
],
"parameters": [
{
"codeOnly": false,
"defaultValue": "",
"description": "SafteyWebsites",
"longDescription": "",
"name": "Saftey",
"optional": false,
"supplementaryInformation": "",
"type": "string"
}
],
"objectGroups": []
},
{
"description": "Called when a saftey check happens",
"fullName": "OnSaftey",
"functionType": "Condition",
"name": "OnSaftey",
"sentence": "OnSaftey",
"events": [
{
"disabled": false,
"folded": false,
"type": "BuiltinCommonInstructions::Standard",
"conditions": [],
"actions": [],
"events": []
},
{
"disabled": false,
"folded": false,
"type": "BuiltinCommonInstructions::JsCode",
"inlineCode": "if(GatoSaftey.init){\r\n eventsFunctionContext.returnValue=true\r\n}else{\r\n eventsFunctionContext.returnValue=false\r\n}\r\n",
"parameterObjects": "",
"useStrict": true
}
],
"parameters": [],
"objectGroups": []
},
{
"description": "Returns the current saftey level",
"fullName": "SafteyLevel",
"functionType": "StringExpression",
"name": "SafteyLevel",
"sentence": "",
"events": [
{
"disabled": false,
"folded": false,
"type": "BuiltinCommonInstructions::JsCode",
"inlineCode": "eventsFunctionContext.returnValue=GatoSaftey.Level\n\n",
"parameterObjects": "",
"useStrict": true
}
],
"parameters": [],
"objectGroups": []
},
{
"description": "Change the max fps at runtime",
"fullName": "ChangeMaxFps",
"functionType": "Action",
"name": "ChangeFps",
"sentence": "Change the fps to _PARAM1_ (_PARAM2_)",
"events": [
{
"disabled": false,
"folded": false,
"type": "BuiltinCommonInstructions::JsCode",
"inlineCode": "var FPS=eventsFunctionContext.getArgument(\"fps\");\r\nvar MaxOrMin=eventsFunctionContext.getArgument(\"MaxOrMin\");\r\nif(MaxOrMin==1){\r\n runtimeScene.getGame()._maxFPS =FPS\r\n}else{\r\n runtimeScene.getGame()._minFPS =FPS\r\n\r\n}\r\n",
"parameterObjects": "",
"useStrict": true
}
],
"parameters": [
{
"codeOnly": false,
"defaultValue": "",
"description": "fps",
"longDescription": "",
"name": "fps",
"optional": false,
"supplementaryInformation": "",
"type": "expression"
},
{
"codeOnly": false,
"defaultValue": "",
"description": "MaxOrMin",
"longDescription": "",
"name": "MaxOrMin",
"optional": false,
"supplementaryInformation": "",
"type": "expression"
}
],
"objectGroups": []
},
{
"description": "Return the current website the game is on",
"fullName": "GetWebsite",
"functionType": "StringExpression",
"name": "GetGameWebsite",
"sentence": "",
"events": [
{
"disabled": false,
"folded": false,
"type": "BuiltinCommonInstructions::Standard",
"conditions": [],
"actions": [],
"events": []
},
{
"disabled": false,
"folded": false,
"type": "BuiltinCommonInstructions::JsCode",
"inlineCode": "window.getGameSite=function(){\r\n try {\r\n return new URL(document.referrer).hostname\r\n } catch (e) {\r\n return window.location.hostname\r\n }\r\n }\r\n\r\n\r\neventsFunctionContext.returnValue=getGameSite()",
"parameterObjects": "",
"useStrict": true
}
],
"parameters": [],
"objectGroups": []
},
{
"description": "Shows a pop up to embed the game",
"fullName": "EmbedGamePopup",
"functionType": "Action",
"name": "GameEmbedPrompt",
"sentence": "Show Embed window",
"events": [
{
"disabled": false,
"folded": false,
"type": "BuiltinCommonInstructions::Standard",
"conditions": [],
"actions": [],
"events": []
},
{
"disabled": false,
"folded": false,
"type": "BuiltinCommonInstructions::JsCode",
"inlineCode": " var Graburl= eventsFunctionContext.getArgument(\"EmbedUrl\");\n (function EmbedPrompt() {\n\n var url = \"//\"+Graburl;\n prompt('Desktop and Mobile ready (landscape+portrait modes). Set any width/height you like. Backed by Cloudflare CDN.', '<iframe src=\"' + url + '\" style=\"width: 100%; height: 100%;\" referrerpolicy=\"origin\" frameborder=\"0\" scrolling=\"no\" allowfullscreen=\"true\"></iframe>');\n runtimeScene.getGame().getInputManager()._pressedMouseButtons = new Array(5);\n runtimeScene.getGame().getInputManager()._releasedMouseButtons = new Array(5);\n return false;\n\n }());\n",
"parameterObjects": "",
"useStrict": true
},
{
"disabled": false,
"folded": false,
"type": "BuiltinCommonInstructions::Standard",
"conditions": [],
"actions": [
{
"type": {
"inverted": false,
"value": "GatoUtil::ResetMouse"
},
"parameters": [
"",
""
],
"subInstructions": []
}
],
"events": []
}
],
"parameters": [
{
"codeOnly": false,
"defaultValue": "",
"description": "EmbedUrl",
"longDescription": "",
"name": "EmbedUrl",
"optional": false,
"supplementaryInformation": "",
"type": "string"
}
],
"objectGroups": []
},
{
"description": "Loads up a array of js or css files seperated by \",\"",
"fullName": "LoadCssJs",
"functionType": "Action",
"name": "LoadCssJs",
"sentence": "Load [_PARAM2_] _PARAM1_ files",
"events": [
{
"disabled": false,
"folded": false,
"type": "BuiltinCommonInstructions::JsCode",
"inlineCode": "var JsorCss=eventsFunctionContext.getArgument(\"JsOrCss\");\nvar Data=JsorCss.split(\",\")\nvar Type=eventsFunctionContext.getArgument(\"Type\");\n\nLibGeneric.prototype.AsyncGetScript(Data,\n function() {\n if(Type==\"Css\"){\n console.log('[IGX] All external Css loaded');\n GatoSaftey.CssLoaded=1;\n }else if(Type==\"Js\"){\n console.log('[IGX] All external Js loaded')\n GatoSaftey.JsLoaded=1\n }\n \n}, function() {\n});",
"parameterObjects": "",
"useStrict": true
}
],
"parameters": [
{
"codeOnly": false,
"defaultValue": "",
"description": "JsOrCss",
"longDescription": "",
"name": "JsOrCss",
"optional": false,
"supplementaryInformation": "",
"type": "string"
},
{
"codeOnly": false,
"defaultValue": "",
"description": "Type",
"longDescription": "",
"name": "Type",
"optional": false,
"supplementaryInformation": "",
"type": "string"
}
],
"objectGroups": []
},
{
"description": "Get the data out of a url parameter",
"fullName": "GetUrlParam",
"functionType": "StringExpression",
"name": "GetUrlParam",
"sentence": "",
"events": [
{
"disabled": false,
"folded": false,
"type": "BuiltinCommonInstructions::JsCode",
"inlineCode": " var Param=eventsFunctionContext.getArgument(\"data\");\n \n (function() {\n let result = null;\n let tmp = [];\n const items = location.search.substr(1).split(\"&\");\n for (let index = 0; index < items.length; index++) {\n tmp = items[index].split(\"=\");\n if (tmp[0] === Param) {\n result = decodeURIComponent(tmp[1]);\n }\n }\n eventsFunctionContext.returnValue=result\n return result;\n \n }());",
"parameterObjects": "",
"useStrict": true
}
],
"parameters": [
{
"codeOnly": false,
"defaultValue": "",
"description": "Param",
"longDescription": "",
"name": "data",
"optional": false,
"supplementaryInformation": "",
"type": "string"
}
],
"objectGroups": []
},
{
"description": "Evalute javascript(Returns number)",
"fullName": "EvalN",
"functionType": "StringExpression",
"name": "EvalNumber",
"sentence": "Eval _PARAM1_",
"events": [
{
"disabled": false,
"folded": false,
"type": "BuiltinCommonInstructions::Standard",
"conditions": [],
"actions": [],
"events": []
},
{
"disabled": false,
"folded": false,
"type": "BuiltinCommonInstructions::JsCode",
"inlineCode": "var VartoVal=eventsFunctionContext.getArgument(\"Var\");\neventsFunctionContext.returnValue=eval(VartoVal);\n",
"parameterObjects": "",
"useStrict": true
}
],
"parameters": [
{
"codeOnly": false,
"defaultValue": "",
"description": "Var",
"longDescription": "",
"name": "Var",
"optional": false,
"supplementaryInformation": "",
"type": "string"
}
],
"objectGroups": []
},
{
"description": "Evalute javascript(Returns String)",
"fullName": "Eval",
"functionType": "StringExpression",
"name": "EvalString",
"sentence": "Eval _PARAM1_",
"events": [
{
"disabled": false,
"folded": false,
"type": "BuiltinCommonInstructions::Standard",
"conditions": [],
"actions": [],
"events": []
},
{
"disabled": false,
"folded": false,
"type": "BuiltinCommonInstructions::JsCode",
"inlineCode": "var VartoVal=eventsFunctionContext.getArgument(\"Var\");\neventsFunctionContext.returnValue=eval(VartoVal);\n",
"parameterObjects": "",
"useStrict": true
}
],
"parameters": [
{
"codeOnly": false,
"defaultValue": "",
"description": "Var",
"longDescription": "",
"name": "Var",
"optional": false,
"supplementaryInformation": "",
"type": "string"
}
],
"objectGroups": []
},
{
"description": "Evalute javascript",
"fullName": "Eval",
"functionType": "Action",
"name": "Eval",
"sentence": "Eval _PARAM1_",
"events": [
{
"disabled": false,
"folded": false,
"type": "BuiltinCommonInstructions::Standard",
"conditions": [],
"actions": [],
"events": []
},
{
"disabled": false,
"folded": false,
"type": "BuiltinCommonInstructions::JsCode",
"inlineCode": "var VartoVal=eventsFunctionContext.getArgument(\"Var\");\neval(VartoVal);",
"parameterObjects": "",
"useStrict": true
}
],
"parameters": [
{
"codeOnly": false,
"defaultValue": "",
"description": "Var",
"longDescription": "",
"name": "Var",
"optional": false,
"supplementaryInformation": "",
"type": "string"
}
],
"objectGroups": []
},
{
"description": "Converts a Number to String",
"fullName": "String",
"functionType": "StringExpression",
"name": "String",
"sentence": "",
"events": [
{
"disabled": false,
"folded": false,
"type": "BuiltinCommonInstructions::JsCode",
"inlineCode": "var Num=eventsFunctionContext.getArgument(\"Number\");\nvar n = Num.toString();\neventsFunctionContext.returnValue=n;",
"parameterObjects": "",
"useStrict": true
}
],
"parameters": [
{
"codeOnly": false,
"defaultValue": "",
"description": "Number",
"longDescription": "",
"name": "Number",
"optional": false,
"supplementaryInformation": "",
"type": "expression"
}
],
"objectGroups": []
},
{
"description": "Converts a string to anumber",
"fullName": "Number2",
"functionType": "Expression",
"name": "Number2",
"sentence": "",
"events": [
{
"disabled": false,
"folded": false,
"type": "BuiltinCommonInstructions::JsCode",
"inlineCode": "var Num=eventsFunctionContext.getArgument(\"Number\");\neventsFunctionContext.returnValue=Number(Num);",
"parameterObjects": "",
"useStrict": true
}
],
"parameters": [
{
"codeOnly": false,
"defaultValue": "",
"description": "Number",
"longDescription": "",
"name": "Number",
"optional": false,
"supplementaryInformation": "",
"type": "string"
}
],
"objectGroups": []
},
{
"description": "Converts a string to anumber",
"fullName": "Number",
"functionType": "StringExpression",
"name": "Number",
"sentence": "",
"events": [
{
"disabled": false,
"folded": false,
"type": "BuiltinCommonInstructions::JsCode",
"inlineCode": "var Num=eventsFunctionContext.getArgument(\"Number\");\neventsFunctionContext.returnValue=Number(Num);",
"parameterObjects": "",
"useStrict": true
}
],
"parameters": [
{
"codeOnly": false,
"defaultValue": "",
"description": "Number",
"longDescription": "",
"name": "Number",
"optional": false,
"supplementaryInformation": "",
"type": "string"
}
],
"objectGroups": []
},
{
"description": "Reset mouse input after ads",
"fullName": "ResetMouse",
"functionType": "Action",
"name": "ResetMouse",
"sentence": "ResetMouse",
"events": [
{
"disabled": false,
"folded": false,
"type": "BuiltinCommonInstructions::JsCode",
"inlineCode": "runtimeScene.getGame().getInputManager()._pressedMouseButtons = new Array(5);\nruntimeScene.getGame().getInputManager()._releasedMouseButtons = new Array(5);",
"parameterObjects": "",
"useStrict": true
}
],
"parameters": [],
"objectGroups": []
},
{
"description": "Check if the url Parameter Exists",
"fullName": "UrlProvDoesNotExist",
"functionType": "Condition",
"name": "UrlPramNotExist",
"sentence": "Url paramer _PARAM1_ Does not exist",
"events": [
{
"disabled": false,
"folded": false,
"type": "BuiltinCommonInstructions::Standard",
"conditions": [],
"actions": [],
"events": []
},
{
"disabled": false,
"folded": false,
"type": "BuiltinCommonInstructions::JsCode",
"inlineCode": "var UrlParamCheck=eventsFunctionContext.getArgument(\"UrlParam\");\nif (window.location.href.indexOf(UrlParamCheck) < 0) {\n eventsFunctionContext.returnValue=true\n}",
"parameterObjects": "",
"useStrict": true
}
],
"parameters": [
{
"codeOnly": false,
"defaultValue": "",
"description": "UrlParam",
"longDescription": "",
"name": "UrlParam",
"optional": false,
"supplementaryInformation": "",
"type": "string"
}
],
"objectGroups": []
},
{
"description": "Is all the js thats fetched at done loading",
"fullName": "AllJsLoaded",
"functionType": "Condition",
"name": "AllJsLoaded",
"sentence": "All JS loaded",
"events": [
{
"disabled": false,
"folded": false,
"type": "BuiltinCommonInstructions::JsCode",
"inlineCode": "if(GatoSaftey.JsLoaded==1){\r\n eventsFunctionContext.returnValue=true\r\n}else{\r\n eventsFunctionContext.returnValue=false\r\n}\r\n",
"parameterObjects": "",
"useStrict": true
}
],
"parameters": [],
"objectGroups": []
},
{
"description": "Are all Css files fully loaded",
"fullName": "AllCssLoaded",
"functionType": "Condition",
"name": "AllCssLoaded",
"sentence": "All CSS loaded",
"events": [
{
"disabled": false,
"folded": false,
"type": "BuiltinCommonInstructions::JsCode",
"inlineCode": "if(GatoSaftey.CssLoaded==1){\r\n eventsFunctionContext.returnValue=true\r\n}else{\r\n eventsFunctionContext.returnValue=false\r\n}\r\n\r\n",
"parameterObjects": "",
"useStrict": true
}
],
"parameters": [],
"objectGroups": []
},
{
"description": "Grabs some Json data and parses it",
"fullName": "GrabAndParseJson",
"functionType": "Action",
"name": "GrabAndParseJson",
"sentence": "Grab Json from _PARAM1_",
"events": [
{
"disabled": false,
"folded": false,
"type": "BuiltinCommonInstructions::Standard",
"conditions": [],
"actions": [],
"events": []
},
{
"disabled": false,
"folded": false,
"type": "BuiltinCommonInstructions::JsCode",
"inlineCode": "var Source= eventsFunctionContext.getArgument(\"url\")\n$.getJSON(Source, function(data) {\n GatoJson=data;\n });\n \n",
"parameterObjects": "",
"useStrict": true
}
],
"parameters": [
{
"codeOnly": false,
"defaultValue": "",
"description": "url",
"longDescription": "",
"name": "url",
"optional": false,
"supplementaryInformation": "",
"type": "string"
}
],
"objectGroups": []
},
{
"description": "Get the value of a key in the json ",
"fullName": "GetJsonData",
"functionType": "StringExpression",
"name": "GetJsonData",
"sentence": "",
"events": [
{
"disabled": false,
"folded": false,
"type": "BuiltinCommonInstructions::JsCode",
"inlineCode": "var Datakey=eventsFunctionContext.getArgument(\"key\")\neventsFunctionContext.returnValue=GetValue(GatoJson,Datakey,\"null\")\n",
"parameterObjects": "",
"useStrict": true
}
],
"parameters": [
{
"codeOnly": false,
"defaultValue": "",
"description": "",
"longDescription": "",
"name": "key",
"optional": false,
"supplementaryInformation": "",
"type": "string"
}
],
"objectGroups": []
},
{
"description": "Correctly obained the json data",
"fullName": "JsonReceived",
"functionType": "Condition",
"name": "JsonDataReceived",
"sentence": "JsonReceived",
"events": [
{
"disabled": false,
"folded": false,
"type": "BuiltinCommonInstructions::JsCode",
"inlineCode": "if(Object.keys(GatoJson).length!==0){\n eventsFunctionContext.returnValue=true;\n}\n",
"parameterObjects": "",
"useStrict": true
}
],
"parameters": [],
"objectGroups": []
},
{
"description": "Evaluates a math expression and returns it",
"fullName": "EvalMath",
"functionType": "StringExpression",
"name": "EvalMath",
"sentence": "",
"events": [
{
"disabled": false,
"folded": false,
"type": "BuiltinCommonInstructions::JsCode",
"inlineCode": "var Equa=eventsFunctionContext.getArgument(\"Equation\")\neventsFunctionContext.returnValue=math.eval(Equa)",
"parameterObjects": "",
"useStrict": true
}
],
"parameters": [
{
"codeOnly": false,
"defaultValue": "",
"description": "",
"longDescription": "",
"name": "Equation",
"optional": false,
"supplementaryInformation": "",
"type": "string"
}
],
"objectGroups": []
},
{
"description": "Choose a random Number out of this list",
"fullName": "Choose",
"functionType": "Expression",
"name": "ChooseN",
"sentence": "",
"events": [
{
"disabled": false,
"folded": false,
"type": "BuiltinCommonInstructions::JsCode",
"inlineCode": "\tvar Data=eventsFunctionContext.getArgument(\"Data\")\n var splitData=Data.split(\",\")\n var choose = function (list)\n\t{\n\t\treturn list[Math.floor((Math.random()*list.length))];\n\t}; \n eventsFunctionContext.returnValue=Number(choose(splitData));",