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
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
1222
1223
1224
1225
1226
1227
1228
1229
1230
1231
1232
1233
1234
1235
1236
1237
1238
1239
1240
1241
1242
1243
1244
1245
1246
1247
1248
1249
1250
1251
1252
1253
1254
1255
1256
1257
1258
1259
1260
1261
1262
1263
1264
1265
1266
1267
1268
1269
1270
1271
1272
1273
1274
1275
1276
1277
1278
1279
1280
1281
1282
1283
1284
1285
1286
1287
1288
1289
1290
1291
1292
1293
1294
1295
1296
1297
1298
1299
1300
1301
1302
1303
1304
1305
1306
1307
1308
1309
1310
1311
1312
1313
1314
1315
1316
1317
1318
1319
1320
1321
1322
1323
1324
1325
1326
1327
1328
1329
1330
1331
1332
1333
1334
1335
1336
1337
1338
1339
1340
1341
1342
1343
1344
1345
1346
1347
1348
1349
1350
1351
1352
1353
1354
1355
1356
1357
1358
1359
1360
1361
1362
1363
1364
1365
1366
1367
1368
1369
1370
1371
1372
1373
1374
1375
1376
1377
1378
1379
1380
1381
1382
1383
1384
1385
1386
1387
1388
1389
1390
1391
1392
1393
1394
1395
1396
1397
1398
1399
1400
1401
1402
1403
1404
1405
1406
1407
1408
1409
1410
1411
1412
1413
1414
1415
1416
1417
1418
1419
1420
1421
1422
1423
1424
1425
1426
1427
1428
1429
1430
1431
1432
1433
1434
1435
1436
1437
1438
1439
1440
1441
1442
1443
1444
1445
1446
1447
1448
1449
1450
1451
1452
1453
1454
1455
1456
1457
1458
1459
1460
1461
1462
1463
1464
1465
1466
1467
1468
1469
1470
1471
1472
1473
1474
1475
1476
1477
1478
1479
1480
1481
1482
1483
1484
1485
1486
1487
1488
1489
1490
1491
1492
1493
1494
1495
1496
1497
1498
1499
1500
1501
1502
1503
1504
1505
1506
1507
1508
1509
1510
1511
1512
1513
1514
1515
1516
1517
1518
1519
1520
1521
1522
1523
1524
1525
1526
1527
1528
1529
1530
1531
1532
1533
1534
1535
1536
1537
1538
1539
1540
1541
1542
1543
1544
1545
1546
1547
1548
1549
1550
1551
1552
1553
1554
1555
1556
1557
1558
1559
1560
1561
1562
1563
1564
1565
1566
1567
1568
1569
1570
1571
1572
1573
1574
1575
1576
1577
1578
1579
1580
1581
1582
1583
1584
1585
1586
1587
1588
1589
1590
1591
1592
1593
1594
1595
1596
1597
1598
1599
1600
1601
1602
1603
1604
1605
1606
1607
1608
1609
1610
1611
1612
1613
1614
1615
1616
1617
1618
1619
1620
1621
1622
1623
1624
1625
1626
1627
1628
1629
1630
1631
1632
1633
1634
1635
1636
1637
1638
1639
1640
1641
1642
1643
1644
1645
1646
1647
1648
1649
1650
1651
1652
1653
1654
1655
1656
1657
1658
1659
1660
1661
1662
1663
1664
1665
1666
1667
1668
1669
1670
1671
1672
1673
1674
1675
1676
1677
1678
1679
1680
1681
1682
1683
1684
1685
1686
1687
1688
1689
1690
1691
1692
1693
1694
1695
1696
1697
1698
1699
1700
1701
1702
1703
1704
1705
1706
1707
1708
1709
1710
1711
1712
1713
1714
1715
1716
1717
1718
1719
1720
1721
1722
1723
1724
1725
1726
1727
1728
1729
1730
1731
1732
1733
1734
1735
1736
1737
1738
1739
1740
1741
1742
1743
1744
1745
1746
1747
1748
1749
1750
1751
1752
1753
1754
1755
1756
1757
1758
1759
1760
1761
1762
1763
1764
1765
1766
1767
1768
1769
1770
1771
1772
1773
1774
1775
1776
1777
1778
1779
1780
1781
1782
1783
1784
1785
1786
1787
1788
1789
1790
1791
1792
1793
1794
1795
1796
1797
1798
1799
1800
1801
1802
1803
1804
1805
1806
1807
1808
1809
1810
1811
1812
1813
1814
1815
1816
1817
1818
1819
1820
1821
1822
1823
1824
1825
1826
1827
1828
1829
1830
1831
1832
1833
|
// standard menu definitions
// don't modify, add personal menus to autoexec.cfg instead
// Only for testing. This will break stuff, delete config.cfg after use.
reui = [exec data/menus.cfg; echo "Menus Reinitialized"]
togglemainmenu = [
|| (cleartexgui) [cleargui 1] [showgui main]
]
bind ESCAPE [togglemainmenu]
newgui hudhealthmenu [
guilist [
guitext "X"
guistrut 6
newhudhealthx = $hudhealthx
guifield newhudhealthx 8 [hudhealthx $newhudhealthx]
]
guilist [
guitext "Y"
guistrut 6
newhudhealthy = $hudhealthy
guifield newhudhealthy 8 [hudhealthy $newhudhealthy]
]
guilist [
guitext "Scale"
guistrut 6
newhudhealthscale = $hudhealthscale
guifield newhudhealthscale 8 [hudhealthscale $newhudhealthscale]
]
] "HUD Health"
checkrolloveraction = [
if (>= (strstr $guirolloveraction $arg1) 0) [
if (>= $numargs 2) [arg2] [result $guirolloveraction]
]
]
newgui main [
guilist [
guistrut 0.25
guilist [
newname = (getname)
guifield newname 15 [name $newname]
guispring
guilist [
guibutton (playermodelname) [chooseplayermodel] 0
guistrut 1
guiimage (getcrosshair) [showgui crosshair] 0.5
]
]
]
guibar
guibutton "server browser.." "showgui servers"
if (isconnected) [
guibar
if (|| $editing (m_edit (getmode))) [
guibutton "editing.." "showgui editing"
]
guibutton "vote game mode / map.." "showgui gamemode"
guibutton "switch team" [if (strcmp (getteam) "good") [team evil] [team good]]
guibutton "toggle spectator" [spectator (! (isspectator (getclientnum)))] "spectator"
guibutton "master.." [showgui master]
guibar
guibutton "options.." "showgui options"
guibutton "disconnect" "disconnect" "exit"
] [
guibutton "bot match.." "showgui botmatch"
guibar
guibutton "options.." "showgui options"
guibutton "about.." "showgui about"
guibutton "quit" "quit" "exit"
]
] 0
newgui about [
guitext "Cube 2: Sauerbraten" 0
guitext [by Wouter "Aardappel" van Oortmerssen, Lee "eihrul" Salzman,] 0
guitext [Mike "Gilt" Dysart, Robert "baby-rabbit" Pointon,] 0
guitext [John "geartrooper" Siar, Quinton "Quin" Reeves, and others] 0
guitext "(for a full list of contributors see the readme)" 0
guitext "http://sauerbraten.org/" 0
]
genmapitems = [
looplist curmap $arg1 [
guibutton $curmap (concat map $curmap) "cube"
]
]
//17
ffamaps1 = "aard3c abyss academy access albatross akaritori akimiski alithia alloy antel anubis aod aqueducts arbana asenatra asthma averas"
ffamaps2 = "awoken bvdm_01 carbide cartel castle_trap catacombs cavefire church51 clash collusion colony complex conflict corruption crypta curvedm curvy_castle"
ffamaps3 = "darkdeath deathtek depot dirtndust dispute DM_BS1 dock dopamine douze duel5 duel7 duel8 dune elegy exist exo fallen"
ffamaps4 = "fanatic_quake fdm6 ferguson force frag-lab frag2 fragplaza frostbyte frozen fubuki fury ghetto gorge gothic-df guacamole gubo hades"
ffamaps5 = "hashi hator haze hdm3 headroom helligsted hektik hillfort hog2 horus idyll3 imhotep industry infernal injustice insipid island"
ffamaps6 = "janela justice kalking1 kastro katrez_d kffa killfactory kmap5 konkuri-to ksauer1 legacy legazzo lost_soul lost_world lostinspace maple masdm"
ffamaps7 = "mbt2 mbt9 mbt10 memento memoria metl2 metl3 metl4 mood moonlite neondevastation neonpanic nessus nmp8 nmp10 nucleus oasis"
ffamaps8 = "oddworld ognjen ogrosupply oldschool orbe orion osiris ot outpost paradigm pariah park pgdm phosgene phrantic pitch_black powerplant"
ffamaps9 = "purgatory refuge renegade rm1 rm5 roughinery ruby ruine saffier sandstorm sauerowalk sauerstruck sdm1 shadowed shindou shinmei1 shiva"
ffamaps10 = "simplicity skrdm1 skycastle-r slingshot souls spcr2 stahlbox stemple stronghold suburb suisei tartech teahupoo tejen thetowers thor torment"
ffamaps11 = "toxicity tumwalk turbine turmoil unworld unworld2 ventania waltz wake5 wdcd zamak zavial zdm2 ztn"
capturemaps1 = "aastha abbey access akimiski akroseum alithia anubis aod arabic asenatra asgard asteroids averas bklyn c_egypt c_lone c_valley"
capturemaps2 = "campo capture_night caribbean casa collide collusion core_refuge core_transfer corruption croma cwcastle damnation destiny dirtndust disc disruption donya"
capturemaps3 = "duomo dust2 earthstation eris eternal_valley evilness face-capture fallen fb_capture fc3 fc4 fc5 forge fragnostic frostbyte fusion genesis"
capturemaps4 = "ghetto gorge gothic-df hades hallo harbor haste hidden imhotep infamy infernal killcore3 kopenhagen laucin lostinspace luna mbt12"
capturemaps5 = "mc-lab meltdown2 mercury metro monastery nevil_c new_energy nitro nmp4 nmp9 nucleus ogrosupply overdrive ow pandora paradigm pariah"
capturemaps6 = "ph-capture pul1ctf reissen relic risk river_c river_keep ruby ruebli rust serenity skycastle-r snapper_rocks spcr stadium stronghold subterra"
capturemaps7 = "suburb surge tempest tortuga triforts turbulence turmoil twinforts urban_c valhalla venice waltz xenon zamak"
ctfmaps1 = "aastha abbey akimiski akroseum arbana asgard authentic autumn bad_moon berlin_wall bklyn breakout bt_falls campo capture_night casa catch22"
ctfmaps2 = "collide core_refuge core_transfer croma ctf_suite daemex damnation desecration destiny disc disruption divine duomo dust2 earthsea earthstation enigma"
ctfmaps3 = "eris eternal_valley europium evilness face-capture fire_keep flagstone forge forgotten fortress fragnostic fusion garden hallo harbor haste hidden"
ctfmaps4 = "idris infamy kiryu kopenhagen l_ctf laucin luna mach2 mbt1 mbt4 mbt12 mc-lab meltdown2 mercury metro mill new_energy"
ctfmaps5 = "nitro nucleus overdrive ow pandora pul1ctf ra recovery redemption regal reissen risk river_keep ruebli rust sacrifice shellshock2"
ctfmaps6 = "shipwreck siberia snapper_rocks spcr stadium stronghold subterra suburb surge tatooine tectonic tejen tempest tortuga triforts tubes turbulence"
ctfmaps7 = "twinforts unworld3 urban_c valhalla warlock wdcd xenon"
conceptmaps = "box_demo canyon door_demo firstevermap ladder platform_demo sauerbraten secondevermap spiralz"
spmaps = "mpsp6a mpsp6b mpsp6c mpsp9a mpsp9b mpsp9c mpsp10 lost level9 skrsp1 crnsp1"
rpgmaps = "k_rpg1 rpg_01"
allffamaps = (concat $ffamaps1 $ffamaps2 $ffamaps3 $ffamaps4 $ffamaps5 $ffamaps6 $ffamaps7 $ffamaps8 $ffamaps9 $ffamaps10 $ffamaps11)
allcapturemaps = (concat $capturemaps1 $capturemaps2 $capturemaps3 $capturemaps4 $capturemaps5 $capturemaps6 $capturemaps7)
allctfmaps = (concat $ctfmaps1 $ctfmaps2 $ctfmaps3 $ctfmaps4 $ctfmaps5 $ctfmaps6 $ctfmaps7)
allmaps = (concat $allffamaps $allcapturemaps $allctfmaps $conceptmaps $spmaps $rpgmaps)
guirollovername = ""
guirolloveraction = ""
guirolloverimgpath = ""
guirolloverimgaction = ""
guirolloverpreviewname = ""
guirolloverpreviewaction = ""
showmapshot = [
guibar
mname = (checkrolloveraction "map " [if (> $numargs 0) [result $arg1] [at $guirollovername 0]])
guilist [
guiimage (concatword "packages/maps/" $mname ".png") (checkrolloveraction "map ") 4 1 "data/cube.png" $mname
]
]
newgui maps [
guilist [
guistrut 17 1
guilist [ guistrut 15 1; genmapitems $ffamaps1 ]
guilist [ guistrut 15 1; genmapitems $ffamaps2 ]
guilist [ guistrut 15 1; genmapitems $ffamaps3 ]
showmapshot
]
guitab 2
guilist [
guistrut 17 1
guilist [ guistrut 15 1; genmapitems $ffamaps4 ]
guilist [ guistrut 15 1; genmapitems $ffamaps5 ]
guilist [ guistrut 15 1; genmapitems $ffamaps6 ]
showmapshot
]
guitab 3
guilist [
guistrut 17 1
guilist [ guistrut 15 1; genmapitems $ffamaps7 ]
guilist [ guistrut 15 1; genmapitems $ffamaps8 ]
guilist [ guistrut 15 1; genmapitems $ffamaps9 ]
showmapshot
]
guitab 4
guilist [
guistrut 17 1
guilist [ guistrut 15 1; genmapitems $ffamaps10 ]
guilist [ guistrut 15 1; genmapitems $ffamaps11 ]
guilist [ guistrut 15 1 ]
showmapshot
]
guitab capture
guilist [
guistrut 17 1
guilist [ guistrut 15 1; genmapitems $capturemaps1 ]
guilist [ guistrut 15 1; genmapitems $capturemaps2 ]
guilist [ guistrut 15 1; genmapitems $capturemaps3 ]
showmapshot
]
guitab 2
guilist [
guistrut 17 1
guilist [ guistrut 15 1; genmapitems $capturemaps4 ]
guilist [ guistrut 15 1; genmapitems $capturemaps5 ]
guilist [ guistrut 15 1; genmapitems $capturemaps6 ]
showmapshot
]
guitab 3
guilist [
guistrut 17 1
guilist [ guistrut 15 1; genmapitems $capturemaps7 ]
guilist [ guistrut 15 1 ]
guilist [ guistrut 15 1 ]
showmapshot
]
guitab ctf
guilist [
guistrut 17 1
guilist [ guistrut 15 1; genmapitems $ctfmaps1 ]
guilist [ guistrut 15 1; genmapitems $ctfmaps2 ]
guilist [ guistrut 15 1; genmapitems $ctfmaps3 ]
showmapshot
]
guitab 2
guilist [
guistrut 17 1
guilist [ guistrut 15 1; genmapitems $ctfmaps4 ]
guilist [ guistrut 15 1; genmapitems $ctfmaps5 ]
guilist [ guistrut 15 1; genmapitems $ctfmaps6 ]
showmapshot
]
guitab 3
guilist [
guistrut 17 1
guilist [ guistrut 15 1; genmapitems $ctfmaps7 ]
guilist [ guistrut 15 1 ]
guilist [ guistrut 15 1 ]
showmapshot
]
guitab concept
guilist [
guistrut 17 1
guilist [ guistrut 15 1; genmapitems $conceptmaps ]
guilist [ guistrut 15 1 ]
guilist [ guistrut 15 1 ]
showmapshot
]
]
newgui capturemaps [
guilist [
guistrut 17 1
guilist [ guistrut 15 1; genmapitems $capturemaps1 ]
guilist [ guistrut 15 1; genmapitems $capturemaps2 ]
guilist [ guistrut 15 1; genmapitems $capturemaps3 ]
showmapshot
]
guitab 2
guilist [
guistrut 17 1
guilist [ guistrut 15 1; genmapitems $capturemaps4 ]
guilist [ guistrut 15 1; genmapitems $capturemaps5 ]
guilist [ guistrut 15 1; genmapitems $capturemaps6 ]
showmapshot
]
guitab 3
guilist [
guistrut 17 1
guilist [ guistrut 15 1; genmapitems $capturemaps7 ]
guilist [ guistrut 15 1 ]
guilist [ guistrut 15 1 ]
showmapshot
]
] "capture maps"
newgui ctfmaps [
guilist [
guistrut 17 1
guilist [ guistrut 15 1; genmapitems $ctfmaps1 ]
guilist [ guistrut 15 1; genmapitems $ctfmaps2 ]
guilist [ guistrut 15 1; genmapitems $ctfmaps3 ]
showmapshot
]
guitab 2
guilist [
guistrut 17 1
guilist [ guistrut 15 1; genmapitems $ctfmaps4 ]
guilist [ guistrut 15 1; genmapitems $ctfmaps5 ]
guilist [ guistrut 15 1; genmapitems $ctfmaps6 ]
showmapshot
]
guitab 3
guilist [
guistrut 17 1
guilist [ guistrut 15 1; genmapitems $ctfmaps7 ]
guilist [ guistrut 15 1 ]
guilist [ guistrut 15 1 ]
showmapshot
]
] "ctf maps"
custommaps = ""
newgui custommaps [
looplist curmap $custommaps [
guibutton $curmap (concat map $curmap) "cube"
]
] "custom maps"
showcustommaps = [
custommaps = ""
loopfiles curmap "packages/maps" "ogz" [
if (< (indexof $allmaps $curmap) 0) [
custommaps = (concat $custommaps (escape $curmap))
]
]
custommaps = (sortlist $custommaps x y [naturalsort $x $y])
showgui custommaps
]
crosshairs = [
"data/crosshair.png data/crosshair_hit.png"
"packages/crosshairs/crosshair_0.png packages/crosshairs/crosshair_hit_0.png"
"packages/crosshairs/crosshair_1.png packages/crosshairs/crosshair_hit_1.png"
"packages/crosshairs/crosshair_2.png packages/crosshairs/crosshair_hit_2.png"
"packages/crosshairs/crosshair_3.png packages/crosshairs/crosshair_hit_3.png"
"packages/crosshairs/crosshair_4.png packages/crosshairs/crosshair_hit_4.png"
"packages/crosshairs/crosshair_5.png packages/crosshairs/crosshair_hit_5.png"
"packages/crosshairs/crosshair_6.png packages/crosshairs/crosshair_hit_6.png"
"packages/crosshairs/crosshair_7.png packages/crosshairs/crosshair_hit_7.png"
"packages/crosshairs/crosshair_8.png packages/crosshairs/crosshair_hit_8.png"
"packages/crosshairs/crosshair_9.png packages/crosshairs/crosshair_hit_9.png"
"packages/crosshairs/crosshair_10.png packages/crosshairs/crosshair_hit_10.png"
"packages/crosshairs/crosshair_11.png packages/crosshairs/crosshair_hit_11.png"
"packages/crosshairs/crosshair_12.png packages/crosshairs/crosshair_hit_12.png"
"packages/crosshairs/crosshair_13.png packages/crosshairs/crosshair_hit_13.png"
"packages/crosshairs/crosshair_14.png packages/crosshairs/crosshair_hit_14.png"
"packages/crosshairs/crosshair_15.png packages/crosshairs/crosshair_hit_15.png"
"packages/crosshairs/crosshair_16.png packages/crosshairs/crosshair_hit_16.png"
"packages/crosshairs/crosshair_17.png packages/crosshairs/crosshair_hit_17.png"
"packages/crosshairs/crosshair_18.png packages/crosshairs/crosshair_hit_18.png"
"packages/crosshairs/crosshair_19.png packages/crosshairs/crosshair_hit_19.png"
"packages/crosshairs/crosshair_20.png packages/crosshairs/crosshair_hit_20.png"
"packages/crosshairs/crosshair_21.png packages/crosshairs/crosshair_hit_21.png"
"packages/crosshairs/crosshair_22.png packages/crosshairs/crosshair_hit_22.png"
"packages/crosshairs/crosshair_23.png packages/crosshairs/crosshair_hit_23.png"
"packages/crosshairs/crosshair_24.png packages/crosshairs/crosshair_hit_24.png"
"packages/crosshairs/crosshair_25.png packages/crosshairs/crosshair_hit_25.png"
"packages/crosshairs/crosshair_26.png packages/crosshairs/crosshair_hit_26.png"
]
newgui crosshair [
guitext "crosshair size"
guislider crosshairsize
loop row (div (+ (listlen $crosshairs) 6) 7) [
guilist [
loop col 7 [
ch = (at $crosshairs (+ (* $row 7) $col))
if (!=s $ch "") [
guiimage (at $ch 0) [
cleargui 1
loadcrosshair @(at $ch 0) 0
loadcrosshair @(at $ch (if (> (listlen $ch) 1) 1 0)) 2
] 0.5
]
]
]
]
]
newgui master [
guistayopen [
if (ismaster (getclientnum)) [
guibutton "relinquish master" "setmaster 0"
] [
guibutton "claim master" "setmaster 1"
]
guilist [
guitext "mastermode: "
mm = (getmastermode)
guiradio "open (0) " mm 0 "mastermode 0"
guiradio "veto (1) " mm 1 "mastermode 1"
guiradio "locked (2) " mm 2 "mastermode 2"
guiradio "private (3) " mm 3 "mastermode 3"
]
guibar
looplist cn (listclients 0 0) [
guilist [
guitext (concatword (getclientname $cn) ": ") (getclienticon $cn)
guibutton "kick " [kick @cn]
guibutton "toggle spectator " [spectator @(= (isspectator $cn) 0) @cn]
if (m_teammode (getmode)) [
guibutton "switch team " [setteam @cn @(? (=s (getclientteam $cn) "good") "evil" "good")]
]
if (ismaster $cn) [
guibutton "take master" [setmaster 0 @cn]
] [
guibutton "give master" [setmaster 1 @cn]
]
]
]
]
]
botmatchcount = 5
botmatchminskill = 50
botmatchmaxskill = 100
startbotmatch = [
if (isconnected 0 0) [
echo "You must disconnect from the current multiplayer game before starting a bot match."
] [
loop i $botmatchcount [addbot (rnd (+ $botmatchmaxskill 1) $botmatchminskill)]
]
]
newgui botmatch [
guitext "bot amount"
guislider botmatchcount 0 32
guitext "bot minimum skill"
guislider botmatchminskill 50 101 [if (< $botmatchmaxskill $botmatchminskill) [botmatchmaxskill = $botmatchminskill]]
guitext "bot maximum skill"
guislider botmatchmaxskill 50 101 [if (> $botmatchminskill $botmatchmaxskill) [botmatchminskill = $botmatchmaxskill]]
guibutton "start match.." [guionclear [startbotmatch]; showgui gamemode]
] "bot match"
newgui servers [
guistayopen [
guiservers [
guilist [
guibutton "update from master server" "updatefrommaster"
guibar
guicheckbox "search LAN" searchlan
guibar
guicheckbox "auto-update" autoupdateservers
guibar
guicheckbox "auto-sort" autosortservers
if (= $autosortservers 0) [
guibar
guibutton "sort" "sortservers"
]
]
guibar
] 17
]
] "" [initservers]
newgui gamemode [
guilist [
guilist [
guibutton "ffa" "mode 0; showgui maps"
guibutton "coop-edit" "mode 1; showgui maps"
guibutton "teamplay" "mode 2; showgui maps"
guibutton "instagib" "mode 3; showgui maps"
guibutton "instagib team" "mode 4; showgui maps"
guibutton "efficiency" "mode 5; showgui maps"
guibutton "efficiency team" "mode 6; showgui maps"
]
guibar
]
]
showfileeditor = [
guinoautotab [
guieditor $arg1 $arg2 $arg3
textinit $arg1 $arg1
guistayopen [
guilist [
guibutton "load" [textfocus @arg1; textload @arg1]
guibar
guibutton "save" [textfocus @arg1; textsave @arg1]
guibar
guibutton "exec" [textfocus @arg1; textexec]
guibar
guibutton "copy" [textfocus @arg1; textcopy]
guibar
guibutton "paste" [textfocus @arg1; textpaste]
guibar
guibutton "select" [textfocus @arg1; textselectall]
guibar
guibutton "clear" [textfocus @arg1; textclear]
]
]
]
]
notepadfile = "untitled.txt"
newgui notepad [
guifield notepadfile -30
showfileeditor $notepadfile -80 20
]
notepad = [
if (> $numargs 0) [notepadfile = $arg1]
showgui notepad
]
newgui pastebuffer [
guinoautotab [
guieditor "#pastebuffer" -80 20
guistayopen [
guilist [
guibutton "exec" [textfocus "#pastebuffer"; textexec]
guibar
guibutton "clear" [textfocus "#pastebuffer"; textclear]
]
]
]
]
pastebuffer = [showgui pastebuffer]
newgui scratchpad [
guinoautotab [
guieditor "#scratchpad" -80 20
guistayopen [
guilist [
guibutton "exec" [textfocus "#scratchpad"; textexec]
guibar
guibutton "copy" [textfocus "#scratchpad"; textcopy]
guibar
guibutton "paste" [textfocus "#scratchpad"; textpaste]
guibar
guibutton "select" [textfocus "#scratchpad"; textselectall]
guibar
guibutton "clear" [textfocus "#scratchpad"; textclear]
]
]
]
]
scratchpad = [showgui scratchpad]
newmapsize = 12
savemap_name = temp
newgui "editing" [ ////////////////////////////////////////////////////////////////////////////////////////////////////////////
guikeeptab 1
guibutton "toggle edit mode^t^t^f2[E]" "edittoggle"
guibar //-------------------------------------------------------------------------
guilist [
guilist [
guitext "select^t^t^t^t^f2[mouse-left *drag]^t"
guitext "extend selection^t^t^f2[mouse-right]"
guitext "move selection^t^t^t^f2[mouse-right *drag]"
guitext "deselect^t^t^t^t^f2[SPACE]"
guitext "select all ents in box^t^f2[keypad-ENTER]"
]
guilist [
guitext "select corners^t^t^t^f2[mouse-middle *drag]"
guitext "reorient^t^t^t^t^f2[mouse-right]"
guitext "passthrough^t^t^t^f2[LCTRL *hold]"
guitext "center view on ent^t^t^f2[COMMA + mousewheel]"
guitext "select all ents matching^t^f2[N]"
]
]
guibar //-------------------------------------------------------------------------
guilist [
guilist [
guitext "push/pull selection^t^t^f2[mousewheel]^t^t"
guitext "change gridsize^t^t^f2[G + mousewheel]"
guitext "mirror on selected axis^t^f2[X]"
]
guilist [
guitext "push cube face^t^t^f2[F + mousewheel]"
guitext "push corner with cursor^t^f2[Q + mousewheel]"
guitext "rotate^t^t^t^t^f2[R + mousewheel]"
]
]
guibar //-------------------------------------------------------------------------
guilist [
guilist [
guitext "undo^t^t^t^t^t^f2[U] [Z]^t^t^t"
guitext "copy^t^t^t^t^t^f2[C]"
guitext "delete^t^t^t^t^f2[DELETE]"
]
guilist [
guitext "redo^t^t^t^t^t^f2[I]"
guitext "paste^t^t^t^t^f2[V]"
]
]
guibar //-------------------------------------------------------------------------
guilist [
guilist [
guitext "change textures^t^t^f2[Y + mousewheel]^t"
guicheckbox "texture all faces^t^t^f2[0]" "allfaces"
guicheckbox "toggle outline^t^t^t^f2[7]" "outline"
]
guilist [
guibutton "texture palette..^t^t^f2[F2]" "showtexgui"
guibutton "materials.." "showgui materials"
guicheckbox "toggle wireframe^t^t^f2[8]" "wireframe"
]
]
guitab "ents" ////////////////////////////////////////////////////////////////////////////////////////////////////////////
guilist [
guilist [
guibutton "edit selected ent..^t^t^f2[F3]^t^t^t" "showentgui"
guicheckbox "entity snap-to-grid^t^t^f2[6]" "entselsnap"
]
guilist [
guibutton "edit selected entity in console^t^f2[PERIOD]" "selentedit"
guicheckbox "entity selection" "entediting"
]
]
guibar //-------------------------------------------------------------------------
guitext "drop entities"
guilist [
guilist [
guiradio "at selection^t^t^t^t^t^t" entdrop 2
guiradio "at selection & to the floor" entdrop 3
]
guilist [
guiradio "at current position" entdrop 0
guiradio "at current position & to the floor" entdrop 1
]
]
guibar //-------------------------------------------------------------------------
guitext "newent *"
guilist [
guilist [
guibutton "light..^t^t^t^t^t" "resetlight;showgui newlight"
guibutton "playerstart" "newent playerstart"
]
guilist [
guibutton "mapmodel..^t^t^f2[F4]^t^t" "showgui mapmodels"
guibutton "playerstart team-1" "newent playerstart 1"
]
guilist [
guibutton "teleport.." "showgui newteleport"
]
]
guitext "pickup entities:"
guilist [
guilist [
guibutton "shells^t^t^t^t^t^t^t" "newent shells"
guibutton "bullets" "newent bullets"
guibutton "rockets" "newent rockets"
guibutton "riflerounds" "newent riflerounds"
guibutton "grenades" "newent grenades"
guibutton "cartridges" "newent cartridges"
]
guilist [
guibutton "tinyhealth" "newent tinyhealth"
guibutton "tinyarmour" "newent tinyarmour"
guibutton "health" "newent health"
guibutton "healthboost" "newent healthboost"
guibutton "greenarmour" "newent greenarmour"
guibutton "yellowarmour" "newent yellowarmour"
guibutton "quaddamage" "newent quaddamage"
guibutton "select all pickup ents ^f2/findpickupents" "findpickupents"
]
]
guitab "lighting" ////////////////////////////////////////////////////////////////////////////////////////////////////////////
guibutton "maplighting.. ^f2/maplighting" "showgui _maplighting"
guibar //-------------------------------------------------------------------------
lightingstuff
guitab "skybox" ////////////////////////////////////////////////////////////////////////////////////////////////////////////
guilist [
guistayopen [
guilist [ genskyitems $skies1 ]
guilist [ genskyitems $skies2 ]
guilist [ genskyitems $skies3 ]
showskyshot
]
]
guitab "sky" ////////////////////////////////////////////////////////////////////////////////////////////////////////////
_skyboxcolour_r = (& (>> $skyboxcolour 16) 0xFF)
_skyboxcolour_g = (& (>> $skyboxcolour 8) 0xFF)
_skyboxcolour_b = (& (>> $skyboxcolour 0) 0xFF)
guilist [
guitext "skyboxcolour "
guicolor $skyboxcolour
]
guislider _skyboxcolour_r 0 255 [skyboxcolour $_skyboxcolour_r $_skyboxcolour_g $_skyboxcolour_b]
guislider _skyboxcolour_g 0 255 [skyboxcolour $_skyboxcolour_r $_skyboxcolour_g $_skyboxcolour_b]
guislider _skyboxcolour_b 0 255 [skyboxcolour $_skyboxcolour_r $_skyboxcolour_g $_skyboxcolour_b]
guibar //-------------------------------------------------------------------------
guilist [
guitext "spinsky "
guifield spinsky 5
guistayopen [ guibutton "- " [spinsky (+fround $spinsky -0.1)] ]
guistayopen [ guibutton "+" [spinsky (+fround $spinsky 0.1)] ]
]
guibar //-------------------------------------------------------------------------
guitext "yawsky"
guislider yawsky
guitab "cloudlayer" ////////////////////////////////////////////////////////////////////////////////////////////////////////////
guistayopen [
guilist [
guilist [
guitext "cloudlayer^t^t^t^t^t^t"
guibutton "clouds/clouds01.png" [cloudlayer "clouds/clouds01.png"]
guibutton "clouds/clouds02.png" [cloudlayer "clouds/clouds02.png"]
guibutton "clouds/clouds03.png" [cloudlayer "clouds/clouds03.png"]
]
guilist [
guibutton "*no clouds*" [cloudlayer ""]
guibutton "clouds/cloud_ring.png" [cloudlayer "clouds/cloud_ring.png"]
]
]
]
guibar //-------------------------------------------------------------------------
_cloudcolour_r = (& (>> $cloudcolour 16) 0xFF)
_cloudcolour_g = (& (>> $cloudcolour 8) 0xFF)
_cloudcolour_b = (& (>> $cloudcolour 0) 0xFF)
guilist [
guitext "cloudcolour "
guicolor $cloudcolour
]
guislider _cloudcolour_r 0 255 [cloudcolour $_cloudcolour_r $_cloudcolour_g $_cloudcolour_b]
guislider _cloudcolour_g 0 255 [cloudcolour $_cloudcolour_r $_cloudcolour_g $_cloudcolour_b]
guislider _cloudcolour_b 0 255 [cloudcolour $_cloudcolour_r $_cloudcolour_g $_cloudcolour_b]
guibar //-------------------------------------------------------------------------
guilist [
guilist [
guilist [
guitext "cloudalpha^t"
guifield cloudalpha 5
guistayopen [ guibutton "- " [cloudalpha (+fround $cloudalpha -0.05)] ]
guistayopen [ guibutton "+^t^t" [cloudalpha (+fround $cloudalpha 0.05)] ]
]
guilist [
guitext "cloudfade^t^t"
guifield cloudfade 5
guistayopen [ guibutton "- " [cloudfade (+fround $cloudfade -0.05)] ]
guistayopen [ guibutton "+^t^t" [cloudfade (+fround $cloudfade 0.05)] ]
]
]
guilist [
guilist [
guitext "cloudheight^t"
guifield cloudheight 5
guistayopen [ guibutton "- " [cloudheight (+fround $cloudheight -0.01)] ]
guistayopen [ guibutton "+^t^t" [cloudheight (+fround $cloudheight 0.01)] ]
]
guilist [
guitext "cloudscale^t^t"
guifield cloudscale 5
guistayopen [ guibutton "- " [cloudscale (+fround $cloudscale -0.0625)] ]
guistayopen [ guibutton "+^t^t" [cloudscale (+fround $cloudscale 0.0625)] ]
]
]
]
guibar //-------------------------------------------------------------------------
guilist [
guilist [
guilist [
guitext "cloudoffsetx^t"
guifield cloudoffsetx 5
guistayopen [ guibutton "- " [cloudoffsetx (+fround $cloudoffsetx -0.01)] ]
guistayopen [ guibutton "+^t^t" [cloudoffsetx (+fround $cloudoffsetx 0.01)] ]
]
guilist [
guitext "cloudoffsety^t"
guifield cloudoffsety 5
guistayopen [ guibutton "- " [cloudoffsety (+fround $cloudoffsety -0.01)] ]
guistayopen [ guibutton "+" [cloudoffsety (+fround $cloudoffsety 0.01)] ]
]
]
guilist [
guilist [
guitext "cloudscrollx^t"
guifield cloudscrollx 5
guistayopen [ guibutton "- " [cloudscrollx (+fround $cloudscrollx -0.01)] ]
guistayopen [ guibutton "+^t^t" [cloudscrollx (+fround $cloudscrollx 0.01)] ]
]
guilist [
guitext "cloudscrolly^t"
guifield cloudscrolly 5
guistayopen [ guibutton "- " [cloudscrolly (+fround $cloudscrolly -0.01)] ]
guistayopen [ guibutton "+" [cloudscrolly (+fround $cloudscrolly 0.01)] ]
]
guilist [
guitext "spincloudlayer^t"
guifield spincloudlayer 5
guistayopen [ guibutton "- " [spincloudlayer (+fround $spincloudlayer -0.1)] ]
guistayopen [ guibutton "+" [spincloudlayer (+fround $spincloudlayer 0.1)] ]
]
]
]
guitab "fog" ////////////////////////////////////////////////////////////////////////////////////////////////////////////
guitext "fog"
guislider fog 128 8192
_fogcolour_r = (& (>> $fogcolour 16) 0xFF)
_fogcolour_g = (& (>> $fogcolour 8) 0xFF)
_fogcolour_b = (& (>> $fogcolour 0) 0xFF)
guilist [
guitext "fogcolour "
guicolor $fogcolour
]
guislider _fogcolour_r 0 255 [fogcolour $_fogcolour_r $_fogcolour_g $_fogcolour_b]
guislider _fogcolour_g 0 255 [fogcolour $_fogcolour_r $_fogcolour_g $_fogcolour_b]
guislider _fogcolour_b 0 255 [fogcolour $_fogcolour_r $_fogcolour_g $_fogcolour_b]
guibar //-------------------------------------------------------------------------
_fogdomecolour_r = (& (>> $fogdomecolour 16) 0xFF)
_fogdomecolour_g = (& (>> $fogdomecolour 8) 0xFF)
_fogdomecolour_b = (& (>> $fogdomecolour 0) 0xFF)
guilist [
guitext "fogdomecolour (0 = use fogcolour) "
guicolor $fogdomecolour
]
guislider _fogdomecolour_r 0 255 [fogdomecolour $_fogdomecolour_r $_fogdomecolour_g $_fogdomecolour_b]
guislider _fogdomecolour_g 0 255 [fogdomecolour $_fogdomecolour_r $_fogdomecolour_g $_fogdomecolour_b]
guislider _fogdomecolour_b 0 255 [fogdomecolour $_fogdomecolour_r $_fogdomecolour_g $_fogdomecolour_b]
guilist [
guilist [
guilist [
guitext "fogdomemax^t"
guifield fogdomemax 5
guistayopen [ guibutton "- " [fogdomemax (+fround $fogdomemax -0.01)] ]
guistayopen [ guibutton "+^t^t" [fogdomemax (+fround $fogdomemax 0.01)] ]
]
guilist [
guitext "fogdomemin^t"
guifield fogdomemin 5
guistayopen [ guibutton "- " [fogdomemin (+fround $fogdomemin -0.01)] ]
guistayopen [ guibutton "+" [fogdomemin (+fround $fogdomemin 0.01)] ]
]
]
guilist [
guilist [
guitext "fogdomeclip^t"
guifield fogdomeclip 5
guistayopen [ guibutton "- " [fogdomeclip (+fround $fogdomeclip -0.01)] ]
guistayopen [ guibutton "+" [fogdomeclip (+fround $fogdomeclip 0.01)] ]
]
guilist [
guitext "fogdomeheight^t"
guifield fogdomeheight 5
guistayopen [ guibutton "- " [fogdomeheight (+fround $fogdomeheight -0.01)] ]
guistayopen [ guibutton "+" [fogdomeheight (+fround $fogdomeheight 0.01)] ]
]
]
]
guilist [
guicheckbox "fogdomecap^t^t^t^t^t^t" "fogdomecap"
guicheckbox "fogdomeclouds" "fogdomeclouds"
]
guitab "height&blendmap" ////////////////////////////////////////////////////////////////////////////////////////////////////////////
guilist [
guilist [
guitext "toggle heightmap mode^t^t^f2[H]^t^t^t"
guitext "push/pull heightmap^t^t^t^f2[mousewheel]"
]
guilist [
guitext "select heightmap brush^t^f2[B + mousewheel]"
]
]
guibar //-------------------------------------------------------------------------
guitext "blend paint mode"
guilist [
guilist [
guiradio "off^t^t^t^t^t^t^f2[keypad 0]^t" blendpaintmode 0
guiradio "dig^t^t^t^t^t^t^f2[keypad 2]" blendpaintmode 2
guiradio "inverted dig^t^t^t^t^f2[keypad 4]" blendpaintmode 4
]
guilist [
guiradio "replace^t^t^t^t^f2[keypad 1]" blendpaintmode 1
guiradio "fill^t^t^t^t^t^f2[keypad 3]" blendpaintmode 3
guiradio "inverted fill^t^t^t^f2[keypad 5]" blendpaintmode 5
]
]
guitext "paint blendmap^t^t^t^f2[mouse-left]"
guibutton "change blend brush^t^t^t^f2[mousewheel]" "nextblendbrush"
guibutton "rotate blend brush^t^t^t^f2[mouse-right]" "rotateblendbrush"
guibutton "clear entire blendmap^t^t^f2/clearblendmap" "clearblendmap"
guibutton "clear blendmap in selection^t^f2/clearblendmapsel" "clearblendmapsel"
guitab "map" ////////////////////////////////////////////////////////////////////////////////////////////////////////////
guitext "save map:"
guifield savemap_name 20 [ savemap $savemap_name ]
guibutton [load @savemap_name map] "map $savemap_name"
guibutton "newmap (default size: 12)" "newmap $newmapsize"
guislider "newmapsize" 10 16
guibutton "increase mapsize (2x)" "mapenlarge"
guitext "max undo size (default: 8 MB)"
guislider "undomegs" 1 20
guibutton "optimize geometry" "remip"
guibutton "set map title/author" "saycommand [/maptitle @maptitle]"
guibutton "show custom maps" "showcustommaps"
guitab "cfg" ////////////////////////////////////////////////////////////////////////////////////////////////////////////
guitext (mapcfgname)
showfileeditor (mapcfgname) -80 17
]
skies1 = [
skyboxes/black
]
genskyitems = [
looplist cursky $arg1 [
guibutton $cursky (concat skybox $cursky) //"cube"
]
]
showskyshot = [
guibar
skyshotname = (checkrolloveraction "skybox " [if (> $numargs 0) [result $arg1] [at $guirollovername 0]])
guiimage (concatword "<thumbnail:128>packages/" $skyshotname "_ft") (checkrolloveraction "skybox ") 4 1 "data/cube.png" (chopstr $skyshotname -16 "..")
]
lightingstuff = [
guitext "lightprecision"
guilistslider lightprecision "8 16 32 48 64 128 256"
guitext "lightlod (>= use lightprecision, < use lightprecision/2)"
guislider lightlod
guitext "lighterror"
guislider lighterror
guitext "lightthreads"
guislider lightthreads
guilist [
guitext "blurskylight^t"
guiradio "0 " blurskylight 0
guiradio "1 " blurskylight 1
guiradio "2 " blurskylight 2
]
guilist [
guitext "blurlightmaps^t"
guiradio "0 " blurlms 0
guiradio "1 " blurlms 1
guiradio "2 " blurlms 2
]
guibar //-------------------------------------------------------------------------
guibutton "calclight 1 (slow: 8xAA)" "calclight 1"
guibutton "calclight -1 (quick: no AA, no model shadows)" "calclight -1"
guicheckbox "fullbright ^f2[L]" fullbright
]
maplighting = [showgui _maplighting]
newgui _maplighting [ ////////////////////////////////////////////////////////////////////////////////////////////////////////////
_sunlight_r = (& (>> $sunlight 16) 0xFF)
_sunlight_g = (& (>> $sunlight 8) 0xFF)
_sunlight_b = (& (>> $sunlight 0) 0xFF)
guilist [
guitext "sunlight^t^t^t^t^t^t^t^t"
guicolor $sunlight
]
guislider _sunlight_r 0 255 [sunlight $_sunlight_r $_sunlight_g $_sunlight_b]
guislider _sunlight_g 0 255 [sunlight $_sunlight_r $_sunlight_g $_sunlight_b]
guislider _sunlight_b 0 255 [sunlight $_sunlight_r $_sunlight_g $_sunlight_b]
guilist [
guitext "sunlightscale "
guifield sunlightscale 8
]
guitext "sunlightpitch "
guislider sunlightpitch
guitext "sunlightyaw "
guislider sunlightyaw
guibutton "Get sun pitch & yaw from camera. ^f2/getsundir" "getsundir"
guibar //-------------------------------------------------------------------------
_skylight_r = (& (>> $skylight 16) 0xFF)
_skylight_g = (& (>> $skylight 8) 0xFF)
_skylight_b = (& (>> $skylight 0) 0xFF)
guilist [
guitext "skylight^t^t^t^t^t^t^t^t"
guicolor $skylight
]
guislider _skylight_r 0 255 [skylight $_skylight_r $_skylight_g $_skylight_b]
guislider _skylight_g 0 255 [skylight $_skylight_r $_skylight_g $_skylight_b]
guislider _skylight_b 0 255 [skylight $_skylight_r $_skylight_g $_skylight_b]
guibar //-------------------------------------------------------------------------
_ambient_r = (& (>> $ambient 16) 0xFF)
_ambient_g = (& (>> $ambient 8) 0xFF)
_ambient_b = (& (>> $ambient 0) 0xFF)
guilist [
guitext "ambient^t^t^t^t^t^t^t^t"
guicolor $ambient
]
guislider _ambient_r 0 255 [ambient $_ambient_r $_ambient_g $_ambient_b]
guislider _ambient_g 0 255 [ambient $_ambient_r $_ambient_g $_ambient_b]
guislider _ambient_b 0 255 [ambient $_ambient_r $_ambient_g $_ambient_b]
guitab "settings" ////////////////////////////////////////////////////////////////////////////////////////////////////////////
lightingstuff
] "maplighting"
newgui materials [
guibutton "air" "editmat air"
guibutton "water" "editmat water"
guibutton "lava" "editmat lava"
guibutton "clip" "editmat clip"
guibutton "glass" "editmat glass"
guibutton "noclip" "editmat noclip"
guibutton "gameclip" "editmat gameclip"
guibutton "death" "editmat death"
guibutton "alpha" "editmat alpha"
guicheckbox "show material volumes" showmat
//guibutton "waterlod very high (3)" "waterlod 3"
//guibutton "waterlod high (2)" "waterlod 2"
//guibutton "waterlod default (1)" "waterlod 1"
//guibutton "waterlod low (0)" "waterlod 0"
//guibutton "watersubdiv very fine (0)" "watersubdiv 0"
//guibutton "watersubdiv fine (1)" "watersubdiv 1"
//guibutton "watersubdiv default (2)" "watersubdiv 2"
//guibutton "watersubdiv coarse (3)" "watersubdiv 3"
//guibutton "water waves on" "waterwaves 1"
//guibutton "water waves off" "waterwaves 0"
]
resetlight = [
lightcolour = 0
lightbright = 1
lightset 255 255 255
lightradius = 128
]
lightset = [
lightr = $arg1
lightg = $arg2
lightb = $arg3
if (= $lightbright 0) lightscale
]
lightscale = [
if (= $lightbright 0) [
lightr = (div $lightr 2); lightg = (div $lightg 2); lightb = (div $lightb 2)
] [
lightr = (min 255 (* $lightr 2)); lightg = (min 255 (* $lightg 2)); lightb = (min 255 (* $lightb 2))
]
]
lightcmd = [
result (concat newent light $lightradius $lightr $lightg $lightb)
]
newgui newlight [
guibutton (lightcmd)
guibar
guitext "color:"
guicolor (+ (* (+ (* $lightr 256) $lightg) 256) $lightb)
guislider lightr 0 255
guislider lightg 0 255
guislider lightb 0 255
guilist [
guicheckbox "bright" lightbright 1 0 [lightscale]
guibar
guiradio "white" lightcolour 0 [lightset 255 255 255]
guiradio "blue" lightcolour 1 [lightset 192 192 255]
guiradio "red" lightcolour 2 [lightset 255 192 192]
guiradio "green" lightcolour 3 [lightset 192 255 192]
guiradio "yellow" lightcolour 4 [lightset 255 255 192]
guiradio "purple" lightcolour 5 [lightset 255 192 255]
guiradio "turquoise" lightcolour 6 [lightset 192 255 255]
]
guitext "radius:"
guislider lightradius 0 512
]
newgui newteleport [
guibutton "newent teleport 1"
guibutton "newent teledest 1"
guibutton "newent teleport 2"
guibutton "newent teledest 2"
guibutton "newent teleport 3"
guibutton "newent teledest 3"
guibutton "newent teleport 4"
guibutton "newent teledest 4"
]
getmapmodels = [
loopconcat i $nummapmodels [
if $arg2 [ if (mapmodelloaded $i) [ $arg1 $i ] ] [ $arg1 $i ]
]
]
mmguiwidth = 7
mmguiheight = 4
newgui mapmodels [
guikeeptab 1
local mmarea mmid
mmguiarea = (* $mmguiwidth $mmguiheight)
guinoautotab [
loop n (div (+ $nummapmodels (- $mmguiarea 1)) $mmguiarea) [
if $n [guitab (+ $n 1)]
if (= $guitabnum (+ $n 1)) [
loop y $mmguiheight [
guilist [
loop x $mmguiwidth [
mmid = (+ (* $n $mmguiarea) (+ (* $y $mmguiwidth) $x))
guimodelpreview (mapmodelname $mmid) "mapmodel" [newent mapmodel @mmid] 3 1 $mmid 1
]
]
]
guistrut 0.2
guititle (concatword "^f7" (strreplace (strreplace $guirolloverpreviewname "\" "/") "/" "^fc/^f7"))
]
]
]
]
newgui postfx [
guibutton "(effect OFF)" "clearpostfx"
guibutton "bloom (subtle: 30%)" "bloom 0.3"
guibutton "bloom (bright: 55%)" "bloom 0.55"
guibutton "bloom (intense: 80%)" "bloom 0.8"
guibutton "rotoscope" "rotoscope 1"
guibutton "rotoscope + blur3" "rotoscope 1 1"
guibutton "rotoscope + blur5" "rotoscope 1 2"
guibutton "sobel" "setpostfx sobel"
guibutton "invert" "setpostfx invert"
guibutton "gbr" "setpostfx gbr"
guibutton "bw" "setpostfx bw"
guibutton "blur3" "setpostfx hblur3; addpostfx vblur3"
guibutton "blur5" "setpostfx hblur5; addpostfx vblur5"
]
macro resbutton [
guibutton "%1x%2" "screenres %1 %2" (if (&& (= $scr_w %1) (= $scr_h %2)) [result "radio_on"] [result "radio_off"])
]
newgui options [ /////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
guilist [
guicheckbox "2D menus" gui2d
guibar
guicheckbox "click tab" guiclicktab
guibar
guicheckbox "menu fade in" guifadein
]
guicheckbox "show scoreboard at death" deathscore
guicheckbox "blood" blood
guilist [
guicheckbox "ragdoll deaths" ragdoll
if $ragdoll [
guibar
guicheckbox "keep after respawn" ragdollmillis 10000
]
guibar
guicheckbox "hide dead players" hidedead
]
guitext "ragdoll velocity multiplier"
guislider deadpush
guilist [
guicheckbox "fullbright player models" fullbrightmodels 60 0
if $fullbrightmodels [
guibar
guiradio "subtle" fullbrightmodels 60
guibar
guiradio "bright" fullbrightmodels 100
guibar
guiradio "overbright" fullbrightmodels 150
guibar
guiradio "max" fullbrightmodels 200
]
]
guilist [
guicheckbox "always use team skins" teamskins
]
guicheckbox "hit sound" hitsound
guibar
guibutton "restore defaults (clears ALL settings)" "exec restore.cfg"
guitab "hud" ////////////////////////////////////////////////////////////////////////////////////////////////////////////
guicheckbox "show FPS" showfps
guilist [
guicheckbox "wall clock" wallclock
if $wallclock [
guibar
guicheckbox "24 hour" wallclock24
guibar
guicheckbox "seconds" wallclocksecs
]
]
guilist [
guicheckbox "damage screen" damagescreen
guibar
guicheckbox "damage compass" damagecompass
]
guilist [
guicheckbox "hudguns" hudgun
if $hudgun [
guibar
guicheckbox "sway" hudgunsway
guibar
guicheckbox "muzzle flash" muzzleflash
guibar
guicheckbox "muzzle light" muzzlelight
]
]
guilist [
guicheckbox "crosshair effects" crosshairfx
if $crosshairfx [
guibar
guicheckbox "health colors" crosshaircolors
guibar
guicheckbox "teammates" teamcrosshair
guibar
guicheckbox "hits" hitcrosshair 425
]
]
guilist [
guicheckbox "outline capture meters" outlinemeters
guibar
guicheckbox "numbered capture bases" basenumbers
guibar
guicheckbox "show teammates" radarteammates 1
]
guibar
guilist [
guicheckbox "ammobar^t^t" ammobar
guibutton "adjust ammobar" [showgui ammobar]
]
guilist [
guicheckbox "gameclock^t" gameclock
guibutton "adjust gameclock" [showgui gameclock]
]
guilist [
guicheckbox "hudscore^t^t" hudscore
guibutton "adjust hudscore" [showgui hudscore]
]
guitab "gfx" ////////////////////////////////////////////////////////////////////////////////////////////////////////////
guitext "performance key: ^f0fast^f~, ^f2moderate^f~, ^f3slow and pretty^f~"
guibar
guilist [
guitext "shaders^t^t"
guibar
guiradio "^f0low detail" shaderdetail 1
guibar
guiradio "^f2high detail" shaderdetail 3
]
guilist [
guitext "water^t^t"
guibar
guicheckbox "^f2refraction" waterrefract
guibar
guicheckbox "^f3reflection" waterreflect
guibar
guicheckbox "^f0caustics" caustics
guibar
guicheckbox "^f2animation" vertwater
]
guilist [
guitext "waterfalls^t^t"
guibar
guicheckbox "^f2refraction" waterfallrefract
guibar
guicheckbox "^f0reflection" waterfallenv
]
guilist [
guicheckbox "^f3soft shadows^t" shadowmap
if $shadowmap [
guibar
guiradio "^f2medium quality" shadowmapsize 9 [blurshadowmap 1]
guibar
guiradio "^f3high quality" shadowmapsize 10 [blurshadowmap 2]
] [
guibar
]
]
if $glare [
glarepreset = 0
if (= $glarescale 1) [
if (= $blurglare 4) [glarepreset = 1]
if (= $blurglare 7) [glarepreset = 3]
]
if (= $glarescale 2) [
if (= $blurglare 3) [glarepreset = 2]
if (= $blurglare 7) [glarepreset = 4]
]
guilist [
guicheckbox "^f3glare^t^t^t" glare
guibar
guiradio "^f2subtle" glarepreset 1 [blurglare 4; glarescale 1]
guibar
guiradio "^f2glowy" glarepreset 2 [blurglare 3; glarescale 2]
guibar
guiradio "^f3soft" glarepreset 3 [blurglare 7; glarescale 1]
guibar
guiradio "^f3intense" glarepreset 4 [blurglare 7; glarescale 2]
]
] [
guicheckbox "^f3glare" glare
]
guilist [
guicheckbox "^f3motion blur^t" motionblur
if $motionblur [
guibar
guiradio "^f3subtle" motionblurscale 0.5
guibar
guiradio "^f3moderate" motionblurscale 0.65
guibar
guiradio "^f3intense" motionblurscale 0.8
]
]
guilist [
guicheckbox "^f0dynamic lights^t" maxdynlights 3 0
if $maxdynlights [
guibar
guiradio "^f0medium quality" maxdynlights 3
guibar
guiradio "^f2high quality" maxdynlights 5
]
]
guilist [
guicheckbox "^f0soft particles^t" depthfx
if $depthfx [
guibar
guiradio "^f0low quality" depthfxsize 7 [blurdepthfx 1]
guibar
guiradio "^f2medium quality" depthfxsize 10 [blurdepthfx 0]
guibar
guiradio "^f3high quality" depthfxsize 12 [blurdepthfx 0]
]
]
guicheckbox "^f0glass reflection" glassenv
guilist [
guicheckbox "^f0decals^t^t" decals
if $decals [
guibar
guiradio "^f0quick fade" decalfade 10000 [maxdecaltris 1024]
guibar
guiradio "^f2slow fade" decalfade 60000 [maxdecaltris 4096]
]
]
guilist [
guitext "textures^t^t"
guibar
guiradio "^f0low quality" maxtexsize 256
guibar
guiradio "^f0medium quality" maxtexsize 512
guibar
guiradio "^f2high quality" maxtexsize 0
]
guilist [
guitext "models^t^t"
guibar
guicheckbox "^f0reflection" envmapmodels
guibar
guicheckbox "^f2bumpmap" bumpmodels
]
guitab "display" ////////////////////////////////////////////////////////////////////////////////////////////////////////////
guitext "field of view (default: 100)"
guislider fov
guicheckbox "v-sync" vsync 1 0
guicheckbox "fullscreen" fullscreen
guitext "gamma (default: 100)"
guislider gamma
guitext "full-scene anti-aliasing (default: -1)"
guilistslider fsaa "-1 0 2 4 8 16"
guitext "z-buffer depth (default: 0)"
guilistslider depthbits "0 16 24 32"
guitext "anisotropic filtering (default: 0)"
guilistslider aniso "0 2 4 8 16"
guilist [
guicheckbox "bilinear filtering" bilinear
guibar
guicheckbox "trilinear filtering (mipmaps)" trilinear
]
guitab "res" ////////////////////////////////////////////////////////////////////////////////////////////////////////////
guistayopen [
guilist [
guilist [
guitext "4:3"
@@@@(resbutton 320 240)
@@@@(resbutton 640 480)
@@@@(resbutton 800 600)
@@@@(resbutton 1024 768)
@@@@(resbutton 1152 864)
@@@@(resbutton 1280 960)
@@@@(resbutton 1400 1050)
@@@@(resbutton 1600 1200)
@@@@(resbutton 1792 1344)
@@@@(resbutton 1856 1392)
@@@@(resbutton 1920 1440)
@@@@(resbutton 2048 1536)
@@@@(resbutton 2800 2100)
@@@@(resbutton 3200 2400)
]
guibar
guilist [
guitext "16:10"
@@@@(resbutton 320 200)
@@@@(resbutton 640 400)
@@@@(resbutton 1024 640)
@@@@(resbutton 1280 800)
@@@@(resbutton 1440 900)
@@@@(resbutton 1600 1000)
@@@@(resbutton 1680 1050)
@@@@(resbutton 1920 1200)
@@@@(resbutton 2048 1280)
@@@@(resbutton 2560 1600)
@@@@(resbutton 2880 1800)
@@@@(resbutton 3200 2000)
@@@@(resbutton 3840 2400)
]
guibar
guilist [
guitext "16:9"
@@@@(resbutton 1024 600)
@@@@(resbutton 1280 720)
@@@@(resbutton 1366 768)
@@@@(resbutton 1600 900)
@@@@(resbutton 1920 1080)
@@@@(resbutton 2048 1152)
@@@@(resbutton 2560 1440)
@@@@(resbutton 2880 1620)
@@@@(resbutton 3200 1800)
@@@@(resbutton 3840 2160)
]
guibar
guilist [
guitext "5:4"
@@@@(resbutton 600 480)
@@@@(resbutton 1280 1024)
@@@@(resbutton 1600 1280)
@@@@(resbutton 2560 2048)
]
guibar
guilist [
guitext "5:3"
@@@@(resbutton 800 480)
@@@@(resbutton 1280 768)
guibar
guitext "Custom"
guilist [
customw = $scr_w
customh = $scr_h
guifield customw 4 [scr_w $customw]
guifield customh 4 [scr_h $customh]
]
]
]
]
guitab "sound" ////////////////////////////////////////////////////////////////////////////////////////////////////////////
guitext "sound volume"
guislider soundvol
guitext "music volume"
guislider musicvol
guitext "sound channels"
guislider soundchans
guitext "sound frequency"
guilistslider soundfreq "11025 22050 44100"
guitext "sound buffer length"
guislider soundbufferlen
guicheckbox "Mumble positional audio" mumble
guitab "mouse" ////////////////////////////////////////////////////////////////////////////////////////////////////////////
guicheckbox "invert mouse" invmouse
guilist [
guitext "mouse sensitivity: "
newsens = $sensitivity
guifield newsens 8 [sensitivity $newsens]
]
guilist [
guitext "mouse UI sensitivity: "
newguisens = $guisens
guifield newguisens 8 [guisens $newguisens]
]
guilist [
guibutton "crosshair: " [showgui crosshair]
guiimage (getcrosshair) [showgui crosshair] 0.5
]
guitext "crosshair size"
guislider crosshairsize
guitab "keys" ////////////////////////////////////////////////////////////////////////////////////////////////////////////
guitext "(basic keybinds, for anything more use the 'bind' command)"
guitext "select action to bind and press desired keys (ESC when done):"
bindidx = 0
guilistsplit n 2 $bindactions [
guilist [
guitext (tabify (concatword $n ": ") 4)
[newbinds@bindidx] = (searchbinds $n)
guikeyfield [newbinds@bindidx] -12 [
oldbinds = (searchbinds [@@n])
looplist j $oldbinds [bind $j ""]
looplist j $[newbinds@@bindidx] [bind $j [@@@n]]
]
bindidx = (+ $bindidx 1)
]
] [guibar]
guitab "console" ////////////////////////////////////////////////////////////////////////////////////////////////////////////
guicheckbox "chat console" miniconfilter 0x300 0
guitext "console size (lines)"
guislider consize
guitext "console filter:"
guilist [
guilist [
guibitfield "important information" confilter 0x11
guibitfield "warnings" confilter 0x02
guibitfield "errors" confilter 0x04
guibitfield "script messages" confilter 0x20
]
guibar
guilist [
guibitfield "chat" confilter 0x100
guibitfield "team chat" confilter 0x200
guibitfield "game events" confilter 0x400
]
guibar
guilist [
guibitfield "self frags" confilter 0x800
guibitfield "other player frags" confilter 0x1000
guibitfield "team kills" confilter 0x2000
]
]
guitext "full console size (percent of screen)"
guislider fullconsize
guitext "full console filter:"
guilist [
guilist [
guibitfield "important information" fullconfilter 0x11
guibitfield "warnings" fullconfilter 0x02
guibitfield "errors" fullconfilter 0x04
guibitfield "script messages" fullconfilter 0x20
]
guibar
guilist [
guibitfield "chat" fullconfilter 0x100
guibitfield "team chat" fullconfilter 0x200
guibitfield "game events" fullconfilter 0x400
]
guibar
guilist [
guibitfield "self frags" fullconfilter 0x800
guibitfield "other player frags" fullconfilter 0x1000
guibitfield "team kills" fullconfilter 0x2000
]
]
guitab "cfg" ////////////////////////////////////////////////////////////////////////////////////////////////////////////
guitext "autoexec.cfg"
showfileeditor "autoexec.cfg" -64 13
] "game"
+fround = [round (+f $arg1 $arg2) (absf $arg2)]
newgui ammobar [
guicheckbox "AmmoBar" ammobar
guibar
guilist [
guitext "AmmoBarAlign:^t^t^t"
guiradio "-1 " ammobaralign -1
guiradio "0 " ammobaralign 0
guiradio "1" ammobaralign 1
]
guicheckbox "AmmoBarHorizontal" ammobarhorizontal
guicheckbox "AmmoBarFlip" ammobarflip
guicheckbox "AmmoBarHideEmpty" ammobarhideempty
guitext "AmmoBarSep:"
guislider ammobarsep
guitext "AmmoBarCountSep:"
guislider ammobarcountsep
guilist [
guitext "AmmoBarCountScale:^t"
guifield ammobarcountscale 5
guistayopen [ guibutton "- " [ammobarcountscale (+fround $ammobarcountscale -0.1)] ]
guistayopen [ guibutton "+" [ammobarcountscale (+fround $ammobarcountscale 0.1)] ]
]
guilist [
guitext "AmmoBarScale:^t^t^t"
guifield ammobarscale 5
guistayopen [ guibutton "- " [ammobarscale (+fround $ammobarscale -0.01)] ]
guistayopen [ guibutton "+" [ammobarscale (+fround $ammobarscale 0.01)] ]
]
guilist [
guitext "AmmoBarX:^t^t^t"
guifield ammobarx 5
guistayopen [ guibutton "- " [ammobarx (+fround $ammobarx -0.01)] ]
guistayopen [ guibutton "+" [ammobarx (+fround $ammobarx 0.01)] ]
]
guilist [
guitext "AmmoBarY:^t^t^t"
guifield ammobary 5
guistayopen [ guibutton "- " [ammobary (+fround $ammobary -0.01)] ]
guistayopen [ guibutton "+" [ammobary (+fround $ammobary 0.01)] ]
]
] "AmmoBar"
newgui gameclock [
guicheckbox "GameClock" gameclock
guibar
guilist [
guitext "GameClockAlign:^t"
guiradio "-1 " gameclockalign -1
guiradio "0 " gameclockalign 0
guiradio "1" gameclockalign 1
]
guitext "GameClockAlpha:"
guislider gameclockalpha
// gameclockcolour 0 - 0xFFFFFF
// gameclocklowcolour 0 - 0xFFFFFF
guilist [
guitext "GameClockScale:^t"
guifield gameclockscale 5
guistayopen [ guibutton "- " [gameclockscale (+fround $gameclockscale -0.01)] ]
guistayopen [ guibutton "+" [gameclockscale (+fround $gameclockscale 0.01)] ]
]
guilist [
guitext "GameClockX:^t^t"
guifield gameclockx 5
guistayopen [ guibutton "- " [gameclockx (+fround $gameclockx -0.01)] ]
guistayopen [ guibutton "+" [gameclockx (+fround $gameclockx 0.01)] ]
]
guilist [
guitext "GameClockY:^t^t"
guifield gameclocky 5
guistayopen [ guibutton "- " [gameclocky (+fround $gameclocky -0.01)] ]
guistayopen [ guibutton "+" [gameclocky (+fround $gameclocky 0.01)] ]
]
] "GameClock"
newgui hudscore [
guicheckbox "HUDScore" hudscore
guibar
guilist [
guitext "HUDScoreAlign:^t^t"
guiradio "-1 " hudscorealign -1
guiradio "0 " hudscorealign 0
guiradio "1" hudscorealign 1
]
guitext "HUDScoreAlpha:"
guislider hudscorealpha
// hudscoreenemycolour 0 - 0xFFFFFF
// hudscoreplayercolour 0 - 0xFFFFFF
guitext "HUDScoreSep:"
guislider hudscoresep
guilist [
guitext "HUDScoreScale:^t^t"
guifield hudscorescale 5
guistayopen [ guibutton "- " [hudscorescale (+fround $hudscorescale -0.01)] ]
guistayopen [ guibutton "+" [hudscorescale (+fround $hudscorescale 0.01)] ]
]
guilist [
guitext "HUDScoreX:^t^t"
guifield hudscorex 5
guistayopen [ guibutton "- " [hudscorex (+fround $hudscorex -0.01)] ]
guistayopen [ guibutton "+" [hudscorex (+fround $hudscorex 0.01)] ]
]
guilist [
guitext "HUDScoreY:^t^t"
guifield hudscorey 5
guistayopen [ guibutton "- " [hudscorey (+fround $hudscorey -0.01)] ]
guistayopen [ guibutton "+" [hudscorey (+fround $hudscorey 0.01)] ]
]
] "HUDScore"
bindactions = [forward backward left right jump attack togglezoom saycommand sayteamcommand showscores toggleconsole screenshot edittoggle "setweapon FI" "setweapon SG" "setweapon CG" "setweapon RL" "setweapon RI" "setweapon GL" "setweapon PI" "weapon" "universaldelta 1" "universaldelta -1" dropflag addbot delbot]
entupdate = [ entset $entguitype $entguiattr0 $entguiattr1 $entguiattr2 $entguiattr3 $entguiattr4 ]
initentgui = [
entguitype = (enttype)
@(loopconcat i 5 [result [
entguiattr@i = (entattr @i)
]])
]
genentattributes = [
entattributes = (loopconcat i (listlen $arg2) [
entattribname = (at $arg2 $i)
entattriblimits = (at $arg3 (* 2 $i))
entattriblimits2 = (at $arg3 (+ 1 (* 2 $i)))
if (=s (at $entattriblimits 0) $entattriblimits) [
result [
guitext @entattribname
guislider entguiattr@i @entattriblimits @entattriblimits2 entupdate
]
] [
result [
guitext @entattribname
guinameslider entguiattr@i [@@entattriblimits] [@@entattriblimits2] entupdate
]
]
])
]
guilistsplit = [
guilist [
z = (div (+ (listlen $arg3) (- $arg2 1)) $arg2)
loop a $arg2 [
guilist [
if (>= $numargs 6) [arg6]
loopsublist $arg1 $arg3 (* $a $z) $z [
arg4
]
]
if (&& (>= $numargs 5) (< (+ $a 1) $arg2)) [arg5]
]
]
]
quickeditmenu = [
guitext "Quick Commands:"
guibar
guifield savemap_name 10 [ savemap $savemap_name ]
guibutton "quick light" "calclight -1"
guibutton "optimize map" "remip"
guibutton "new entity" "newent shells"
guibar
guibutton newmap
guibar
guibutton help "showgui editing"
]
matmenu = [
guibutton "air" "editmat air"
guibutton "water" "editmat water"
guibutton "lava" "editmat lava"
guibutton "clip" "editmat clip"
guibutton "glass" "editmat glass"
guibutton "noclip" "editmat noclip"
guibutton "gameclip" "editmat gameclip"
guibutton "death" "editmat death"
guibutton "alpha" "editmat alpha"
guicheckbox "show material volumes" showmat
]
brushmenu = [
guilist [ // diamonds
guiimage "packages/icons/brush_1c.png" brush_0
guiimage "packages/icons/brush_21c.png" brush_1
guiimage "packages/icons/brush_421c.png" brush_2
]
guilist [ // squares
guiimage "packages/icons/brush_3s.png" brush_3
guiimage "packages/icons/brush_5s.png" brush_4
guiimage "packages/icons/brush_7s.png" brush_5
]
guititle smooth
guilist [ // smooth
guiimage "packages/icons/brush_3s.png" brush_6
guiimage "packages/icons/brush_5s.png" brush_7
guiimage "packages/icons/brush_7s.png" brush_8
]
]
newentgui = [
genentattributes $arg1 $arg2 $arg3
newgui $arg1 [
guitext $entguitype
guibar
@entattributes
guitab type
guilistsplit n 2 $enttypelist [
guibutton $n [ entset @n ]
]
guitab misc
@quickeditmenu
] "" [initentgui]
]
looplist i $enttypelist [
newentgui $i "" ""
]
newgui materials [
@matmenu
guitab misc
@quickeditmenu
]
newgui brushes [
@brushmenu
guitab misc
@quickeditmenu
]
newgui quickedit [
@quickeditmenu
guitab materials
@matmenu
]
newentgui light "radius red green blue" "1 400 0 255 0 255 0 255"
newentgui spotlight "radius" "0 200"
newentgui playerstart "direction" "0 360"
newentgui teleport "tag" "0 20"
newentgui teledest "direction tag" "0 360 0 20"
newentgui monster "direction type" "0 360 0 7"
newentgui mapmodel "direction model" "0 360 0 372"
newentgui envmap "radius" "0 512"
newentgui jumppad "Z Y X" "-128 128 -128 127 -128 127"
newentgui sound "type radius size" "0 20 0 500 0 500"
newentgui particles "type" "0 13"
contexteditgui = [
if $hmapedit [showgui brushes] [
if (enthavesel) [
showgui (enttype)
] [showgui (? (havesel) materials quickedit)]
]
]
showentgui = [ contexteditgui ] // legacy bind
newgui seltexinfo [
guitext (concatword "Slot: " (getseltex))
guilist [ loop x 5 [
texname = (gettexname (getseltex) $x)
texname = (substr $texname (+ (strstr $texname ">") 1)) // chop off any leading commands
guiimage (concatword "packages/" $texname) "" 1 1
]]
loop x 5 [ tex = (gettexname (getseltex) $x); if (strcmp $tex "") [] [guitext $tex]]
]
|