home *** CD-ROM | disk | FTP | other *** search
Unknown | 2002-05-07 | 12.1 KB |
open in:
MacOS 8.1
|
Win98
|
DOS
view JSON data
|
view as text
This file was not able to be converted.
This format is not currently supported by dexvert.
Confidence | Program | Detection | Match Type | Support
|
---|
100%
| file
| data
| default
|
|
hex view+--------+-------------------------+-------------------------+--------+--------+
|00000000| 00 00 00 00 00 00 00 00 | 46 c2 01 2f 2f 3d 3d 3d |........|F..//===|
|00000010| 3d 3d 3d 3d 3d 3d 3d 3d | 3d 3d 3d 3d 3d 3d 3d 3d |========|========|
|00000020| 3d 3d 3d 3d 3d 3d 3d 3d | 3d 3d 3d 3d 3d 3d 3d 3d |========|========|
|00000030| 3d 3d 3d 3d 3d 3d 3d 3d | 3d 3d 3d 3d 3d 3d 3d 3d |========|========|
|00000040| 3d 3d 3d 3d 3d 3d 3d 3d | 3d 3d 3d 3d 3d 3d 3d 3d |========|========|
|00000050| 3d 3d 3d 3d 3d 3d 3d 3d | 3d 3d 0d 0a 2f 2f 20 55 |========|==..// U|
|00000060| 64 70 53 65 72 76 65 72 | 51 75 65 72 79 0d 0a 2f |dpServer|Query../|
|00000070| 2f 0d 0a 2f 2f 20 56 65 | 72 73 69 6f 6e 3a 20 31 |/..// Ve|rsion: 1|
|00000080| 2e 35 0d 0a 2f 2f 0d 0a | 2f 2f 20 54 68 69 73 20 |.5..//..|// This |
|00000090| 71 75 65 72 79 20 73 65 | 72 76 65 72 20 69 73 20 |query se|rver is |
|000000a0| 63 6f 6d 70 6c 69 61 6e | 74 20 77 69 74 68 20 74 |complian|t with t|
|000000b0| 68 65 20 47 61 6d 65 53 | 70 79 20 55 70 6c 69 6e |he GameS|py Uplin|
|000000c0| 6b 20 53 70 65 63 69 66 | 69 63 61 74 69 6f 6e 2e |k Specif|ication.|
|000000d0| 0d 0a 2f 2f 20 54 68 65 | 20 73 70 65 63 69 66 69 |..// The| specifi|
|000000e0| 63 61 74 69 6f 6e 20 69 | 73 20 61 76 61 69 6c 61 |cation i|s availa|
|000000f0| 62 6c 65 20 61 74 20 68 | 74 74 70 3a 2f 2f 77 77 |ble at h|ttp://ww|
|00000100| 77 2e 67 61 6d 65 73 70 | 79 2e 63 6f 6d 2f 64 65 |w.gamesp|y.com/de|
|00000110| 76 65 6c 6f 70 65 72 0d | 0a 2f 2f 20 61 6e 64 20 |veloper.|.// and |
|00000120| 6d 69 67 68 74 20 62 65 | 20 6f 66 20 75 73 65 20 |might be| of use |
|00000130| 74 6f 20 70 72 6f 67 61 | 6d 6d 65 72 73 20 77 68 |to proga|mmers wh|
|00000140| 6f 20 61 72 65 20 77 72 | 69 74 69 6e 67 20 6f 72 |o are wr|iting or|
|00000150| 20 6d 61 69 6e 74 61 69 | 6e 69 6e 67 0d 0a 2f 2f | maintai|ning..//|
|00000160| 20 74 68 65 69 72 20 6f | 77 6e 20 73 74 61 74 20 | their o|wn stat |
|00000170| 67 61 74 68 65 72 69 6e | 67 2f 67 61 6d 65 20 71 |gatherin|g/game q|
|00000180| 75 65 72 79 69 6e 67 20 | 73 6f 66 74 77 61 72 65 |uerying |software|
|00000190| 2e 0d 0a 2f 2f 0d 0a 2f | 2f 20 4e 6f 74 65 3a 20 |...//../|/ Note: |
|000001a0| 43 75 72 72 65 6e 74 6c | 79 2c 20 53 65 6e 64 54 |Currentl|y, SendT|
|000001b0| 65 78 74 20 72 65 74 75 | 72 6e 73 20 66 61 6c 73 |ext retu|rns fals|
|000001c0| 65 20 69 66 20 73 75 63 | 63 65 73 73 66 75 6c 2e |e if suc|cessful.|
|000001d0| 0d 0a 2f 2f 0d 0a 2f 2f | 20 46 75 6c 6c 20 64 6f |..//..//| Full do|
|000001e0| 63 75 6d 65 6e 74 61 74 | 69 6f 6e 20 6f 6e 20 74 |cumentat|ion on t|
|000001f0| 68 69 73 20 63 6c 61 73 | 73 20 69 73 20 61 76 61 |his clas|s is ava|
|00000200| 69 6c 61 62 6c 65 20 61 | 74 20 68 74 74 70 3a 2f |ilable a|t http:/|
|00000210| 2f 75 6e 72 65 61 6c 2e | 65 70 69 63 67 61 6d 65 |/unreal.|epicgame|
|00000220| 73 2e 63 6f 6d 2f 0d 0a | 2f 2f 0d 0a 2f 2f 3d 3d |s.com/..|//..//==|
|00000230| 3d 3d 3d 3d 3d 3d 3d 3d | 3d 3d 3d 3d 3d 3d 3d 3d |========|========|
|00000240| 3d 3d 3d 3d 3d 3d 3d 3d | 3d 3d 3d 3d 3d 3d 3d 3d |========|========|
|00000250| 3d 3d 3d 3d 3d 3d 3d 3d | 3d 3d 3d 3d 3d 3d 3d 3d |========|========|
|00000260| 3d 3d 3d 3d 3d 3d 3d 3d | 3d 3d 3d 3d 3d 3d 3d 3d |========|========|
|00000270| 3d 3d 3d 3d 3d 3d 3d 3d | 3d 3d 3d 0d 0a 63 6c 61 |========|===..cla|
|00000280| 73 73 20 55 64 70 53 65 | 72 76 65 72 51 75 65 72 |ss UdpSe|rverQuer|
|00000290| 79 20 65 78 74 65 6e 64 | 73 20 55 64 70 4c 69 6e |y extend|s UdpLin|
|000002a0| 6b 20 63 6f 6e 66 69 67 | 3b 0d 0a 0d 0a 2f 2f 20 |k config|;....// |
|000002b0| 47 61 6d 65 20 53 65 72 | 76 65 72 20 43 6f 6e 66 |Game Ser|ver Conf|
|000002c0| 69 67 2e 0d 0a 76 61 72 | 28 29 20 6e 61 6d 65 09 |ig...var|() name.|
|000002d0| 09 09 09 09 51 75 65 72 | 79 4e 61 6d 65 3b 09 09 |....Quer|yName;..|
|000002e0| 09 2f 2f 20 4e 61 6d 65 | 20 74 6f 20 73 65 74 20 |.// Name| to set |
|000002f0| 74 68 69 73 20 6f 62 6a | 65 63 74 27 73 20 54 61 |this obj|ect's Ta|
|00000300| 67 20 74 6f 2e 0d 0a 76 | 61 72 20 69 6e 74 09 09 |g to...v|ar int..|
|00000310| 09 09 09 20 20 20 20 43 | 75 72 72 65 6e 74 51 75 |... C|urrentQu|
|00000320| 65 72 79 4e 75 6d 3b 09 | 2f 2f 20 51 75 65 72 79 |eryNum;.|// Query|
|00000330| 20 49 44 20 4e 75 6d 62 | 65 72 2e 0d 0a 76 61 72 | ID Numb|er...var|
|00000340| 20 67 6c 6f 62 61 6c 63 | 6f 6e 66 69 67 20 73 74 | globalc|onfig st|
|00000350| 72 69 6e 67 09 09 47 61 | 6d 65 4e 61 6d 65 3b 0d |ring..Ga|meName;.|
|00000360| 0a 2f 2f 63 72 74 0d 0a | 76 61 72 20 73 74 72 69 |.//crt..|var stri|
|00000370| 6e 67 20 52 65 70 6c 79 | 44 61 74 61 3b 0d 0a 0d |ng Reply|Data;...|
|00000380| 0a 76 61 72 20 67 6c 6f | 62 61 6c 63 6f 6e 66 69 |.var glo|balconfi|
|00000390| 67 20 69 6e 74 09 09 4d | 69 6e 4e 65 74 56 65 72 |g int..M|inNetVer|
|000003a0| 3b 0d 0a 0d 0a 2f 2f 21 | 21 20 48 61 63 6b 20 74 |;....//!|! Hack t|
|000003b0| 6f 20 70 72 65 76 65 6e | 74 20 70 6f 72 74 20 73 |o preven|t port s|
|000003c0| 77 61 70 70 69 6e 67 0d | 0a 76 61 72 20 67 6c 6f |wapping.|.var glo|
|000003d0| 62 61 6c 63 6f 6e 66 69 | 67 20 69 6e 74 09 09 4f |balconfi|g int..O|
|000003e0| 6c 64 51 75 65 72 79 50 | 6f 72 74 4e 75 6d 62 65 |ldQueryP|ortNumbe|
|000003f0| 72 3b 0d 0a 76 61 72 20 | 67 6c 6f 62 61 6c 63 6f |r;..var |globalco|
|00000400| 6e 66 69 67 20 62 6f 6f | 6c 09 09 62 52 65 73 74 |nfig boo|l..bRest|
|00000410| 61 72 74 53 65 72 76 65 | 72 4f 6e 50 6f 72 74 53 |artServe|rOnPortS|
|00000420| 77 61 70 3b 0d 0a 0d 0a | 0d 0a 0d 0a 2f 2f 20 49 |wap;....|....// I|
|00000430| 6e 69 74 69 61 6c 69 7a | 65 2e 0d 0a 66 75 6e 63 |nitializ|e...func|
|00000440| 74 69 6f 6e 20 50 72 65 | 42 65 67 69 6e 50 6c 61 |tion Pre|BeginPla|
|00000450| 79 28 29 0d 0a 7b 0d 0a | 09 6c 6f 63 61 6c 20 69 |y()..{..|.local i|
|00000460| 6e 74 20 62 6f 75 6e 64 | 70 6f 72 74 3b 0d 0a 0d |nt bound|port;...|
|00000470| 0a 09 2f 2f 20 53 65 74 | 20 74 68 65 20 54 61 67 |..// Set| the Tag|
|00000480| 0d 0a 09 54 61 67 20 3d | 20 51 75 65 72 79 4e 61 |...Tag =| QueryNa|
|00000490| 6d 65 3b 0d 0a 0d 0a 09 | 2f 2f 20 42 69 6e 64 20 |me;.....|// Bind |
|000004a0| 74 68 65 20 6c 69 73 74 | 65 6e 20 73 6f 63 6b 65 |the list|en socke|
|000004b0| 74 0d 0a 09 62 6f 75 6e | 64 70 6f 72 74 20 3d 20 |t...boun|dport = |
|000004c0| 42 69 6e 64 50 6f 72 74 | 28 4c 65 76 65 6c 2e 47 |BindPort|(Level.G|
|000004d0| 61 6d 65 2e 47 65 74 53 | 65 72 76 65 72 50 6f 72 |ame.GetS|erverPor|
|000004e0| 74 28 29 2c 20 74 72 75 | 65 29 3b 0d 0a 09 69 66 |t(), tru|e);...if|
|000004f0| 28 20 62 6f 75 6e 64 70 | 6f 72 74 20 3d 3d 20 30 |( boundp|ort == 0|
|00000500| 20 29 0d 0a 09 7b 0d 0a | 09 09 4c 6f 67 28 22 55 | )...{..|..Log("U|
|00000510| 64 70 53 65 72 76 65 72 | 51 75 65 72 79 3a 20 50 |dpServer|Query: P|
|00000520| 6f 72 74 20 66 61 69 6c | 65 64 20 74 6f 20 62 69 |ort fail|ed to bi|
|00000530| 6e 64 2e 22 29 3b 0d 0a | 09 09 72 65 74 75 72 6e |nd.");..|..return|
|00000540| 3b 0d 0a 09 7d 0d 0a 09 | 4c 6f 67 28 22 55 64 70 |;...}...|Log("Udp|
|00000550| 53 65 72 76 65 72 51 75 | 65 72 79 28 63 72 74 29 |ServerQu|ery(crt)|
|00000560| 3a 20 50 6f 72 74 20 22 | 24 62 6f 75 6e 64 70 6f |: Port "|$boundpo|
|00000570| 72 74 24 22 20 73 75 63 | 63 65 73 73 66 75 6c 6c |rt$" suc|cessfull|
|00000580| 79 20 62 6f 75 6e 64 2e | 22 29 3b 0d 0a 0d 0a 09 |y bound.|");.....|
|00000590| 69 66 28 20 62 52 65 73 | 74 61 72 74 53 65 72 76 |if( bRes|tartServ|
|000005a0| 65 72 4f 6e 50 6f 72 74 | 53 77 61 70 20 29 0d 0a |erOnPort|Swap )..|
|000005b0| 09 7b 0d 0a 09 09 69 66 | 28 20 4f 6c 64 51 75 65 |.{....if|( OldQue|
|000005c0| 72 79 50 6f 72 74 4e 75 | 6d 62 65 72 20 21 3d 20 |ryPortNu|mber != |
|000005d0| 30 20 29 0d 0a 09 09 09 | 61 73 73 65 72 74 28 20 |0 ).....|assert( |
|000005e0| 4f 6c 64 51 75 65 72 79 | 50 6f 72 74 4e 75 6d 62 |OldQuery|PortNumb|
|000005f0| 65 72 20 3d 3d 20 62 6f | 75 6e 64 70 6f 72 74 20 |er == bo|undport |
|00000600| 29 3b 0d 0a 09 09 4f 6c | 64 51 75 65 72 79 50 6f |);....Ol|dQueryPo|
|00000610| 72 74 4e 75 6d 62 65 72 | 20 3d 20 62 6f 75 6e 64 |rtNumber| = bound|
|00000620| 70 6f 72 74 3b 0d 0a 09 | 09 53 61 76 65 43 6f 6e |port;...|.SaveCon|
|00000630| 66 69 67 28 29 3b 0d 0a | 09 7d 0d 0a 7d 0d 0a 0d |fig();..|.}..}...|
|00000640| 0a 66 75 6e 63 74 69 6f | 6e 20 50 6f 73 74 42 65 |.functio|n PostBe|
|00000650| 67 69 6e 50 6c 61 79 28 | 29 0d 0a 7b 0d 0a 09 6c |ginPlay(|)..{...l|
|00000660| 6f 63 61 6c 20 55 64 70 | 42 65 61 63 6f 6e 09 42 |ocal Udp|Beacon.B|
|00000670| 65 61 63 6f 6e 3b 0d 0a | 0d 0a 09 66 6f 72 65 61 |eacon;..|...forea|
|00000680| 63 68 20 41 6c 6c 41 63 | 74 6f 72 73 28 63 6c 61 |ch AllAc|tors(cla|
|00000690| 73 73 27 55 64 70 42 65 | 61 63 6f 6e 27 2c 20 42 |ss'UdpBe|acon', B|
|000006a0| 65 61 63 6f 6e 29 0d 0a | 09 7b 0d 0a 09 09 42 65 |eacon)..|.{....Be|
|000006b0| 61 63 6f 6e 2e 55 64 70 | 53 65 72 76 65 72 51 75 |acon.Udp|ServerQu|
|000006c0| 65 72 79 50 6f 72 74 20 | 3d 20 50 6f 72 74 3b 0d |eryPort |= Port;.|
|000006d0| 0a 09 7d 0d 0a 09 53 75 | 70 65 72 2e 50 6f 73 74 |..}...Su|per.Post|
|000006e0| 42 65 67 69 6e 50 6c 61 | 79 28 29 3b 0d 0a 7d 0d |BeginPla|y();..}.|
|000006f0| 0a 0d 0a 2f 2f 20 52 65 | 63 65 69 76 65 64 20 61 |...// Re|ceived a|
|00000700| 20 71 75 65 72 79 20 72 | 65 71 75 65 73 74 2e 0d | query r|equest..|
|00000710| 0a 65 76 65 6e 74 20 52 | 65 63 65 69 76 65 64 54 |.event R|eceivedT|
|00000720| 65 78 74 28 20 49 70 41 | 64 64 72 20 41 64 64 72 |ext( IpA|ddr Addr|
|00000730| 2c 20 73 74 72 69 6e 67 | 20 54 65 78 74 20 29 0d |, string| Text ).|
|00000740| 0a 7b 0d 0a 09 6c 6f 63 | 61 6c 20 73 74 72 69 6e |.{...loc|al strin|
|00000750| 67 20 51 75 65 72 79 3b | 0d 0a 09 6c 6f 63 61 6c |g Query;|...local|
|00000760| 20 62 6f 6f 6c 20 51 75 | 65 72 79 52 65 6d 61 69 | bool Qu|eryRemai|
|00000770| 6e 69 6e 67 3b 0d 0a 09 | 6c 6f 63 61 6c 20 69 6e |ning;...|local in|
|00000780| 74 20 20 51 75 65 72 79 | 4e 75 6d 2c 20 50 61 63 |t Query|Num, Pac|
|00000790| 6b 65 74 4e 75 6d 3b 0d | 0a 0d 0a 09 2f 2f 20 41 |ketNum;.|....// A|
|000007a0| 73 73 69 67 6e 20 74 68 | 69 73 20 70 61 63 6b 65 |ssign th|is packe|
|000007b0| 74 20 61 20 75 6e 69 71 | 75 65 20 76 61 6c 75 65 |t a uniq|ue value|
|000007c0| 20 66 72 6f 6d 20 31 20 | 74 6f 20 31 30 30 0d 0a | from 1 |to 100..|
|000007d0| 09 43 75 72 72 65 6e 74 | 51 75 65 72 79 4e 75 6d |.Current|QueryNum|
|000007e0| 2b 2b 3b 0d 0a 09 69 66 | 20 28 43 75 72 72 65 6e |++;...if| (Curren|
|000007f0| 74 51 75 65 72 79 4e 75 | 6d 20 3e 20 31 30 30 29 |tQueryNu|m > 100)|
|00000800| 0d 0a 09 09 43 75 72 72 | 65 6e 74 51 75 65 72 79 |....Curr|entQuery|
|00000810| 4e 75 6d 20 3d 20 31 3b | 0d 0a 09 51 75 65 72 79 |Num = 1;|...Query|
|00000820| 4e 75 6d 20 3d 20 43 75 | 72 72 65 6e 74 51 75 65 |Num = Cu|rrentQue|
|00000830| 72 79 4e 75 6d 3b 0d 0a | 0d 0a 09 51 75 65 72 79 |ryNum;..|...Query|
|00000840| 20 3d 20 54 65 78 74 3b | 0d 0a 09 69 66 20 28 51 | = Text;|...if (Q|
|00000850| 75 65 72 79 20 3d 3d 20 | 22 22 29 09 09 2f 2f 20 |uery == |"")..// |
|00000860| 49 66 20 74 68 65 20 73 | 74 72 69 6e 67 20 69 73 |If the s|tring is|
|00000870| 20 65 6d 70 74 79 2c 20 | 64 6f 6e 27 74 20 70 61 | empty, |don't pa|
|00000880| 72 73 65 20 69 74 0d 0a | 09 09 51 75 65 72 79 52 |rse it..|..QueryR|
|00000890| 65 6d 61 69 6e 69 6e 67 | 20 3d 20 66 61 6c 73 65 |emaining| = false|
|000008a0| 3b 0d 0a 09 65 6c 73 65 | 0d 0a 09 09 51 75 65 72 |;...else|....Quer|
|000008b0| 79 52 65 6d 61 69 6e 69 | 6e 67 20 3d 20 74 72 75 |yRemaini|ng = tru|
|000008c0| 65 3b 0d 0a 09 2f 2f 63 | 72 74 0d 0a 09 50 61 63 |e;...//c|rt...Pac|
|000008d0| 6b 65 74 4e 75 6d 20 3d | 20 20 30 3b 0d 0a 09 52 |ketNum =| 0;...R|
|000008e0| 65 70 6c 79 44 61 74 61 | 20 3d 20 22 22 3b 0d 0a |eplyData| = "";..|
|000008f0| 09 77 68 69 6c 65 20 28 | 51 75 65 72 79 52 65 6d |.while (|QueryRem|
|00000900| 61 69 6e 69 6e 67 29 20 | 7b 0d 0a 09 09 51 75 65 |aining) |{....Que|
|00000910| 72 79 20 3d 20 50 61 72 | 73 65 51 75 65 72 79 28 |ry = Par|seQuery(|
|00000920| 41 64 64 72 2c 20 51 75 | 65 72 79 2c 20 51 75 65 |Addr, Qu|ery, Que|
|00000930| 72 79 4e 75 6d 2c 20 50 | 61 63 6b 65 74 4e 75 6d |ryNum, P|acketNum|
|00000940| 29 3b 0d 0a 09 09 69 66 | 20 28 51 75 65 72 79 20 |);....if| (Query |
|00000950| 3d 3d 20 22 22 29 0d 0a | 09 09 09 51 75 65 72 79 |== "")..|...Query|
|00000960| 52 65 6d 61 69 6e 69 6e | 67 20 3d 20 66 61 6c 73 |Remainin|g = fals|
|00000970| 65 3b 0d 0a 09 09 65 6c | 73 65 0d 0a 09 09 09 51 |e;....el|se.....Q|
|00000980| 75 65 72 79 52 65 6d 61 | 69 6e 69 6e 67 20 3d 20 |ueryRema|ining = |
|00000990| 74 72 75 65 3b 0d 0a 09 | 7d 0d 0a 7d 0d 0a 0d 0a |true;...|}..}....|
|000009a0| 66 75 6e 63 74 69 6f 6e | 20 62 6f 6f 6c 20 50 61 |function| bool Pa|
|000009b0| 72 73 65 4e 65 78 74 51 | 75 65 72 79 28 20 73 74 |rseNextQ|uery( st|
|000009c0| 72 69 6e 67 20 51 75 65 | 72 79 2c 20 6f 75 74 20 |ring Que|ry, out |
|000009d0| 73 74 72 69 6e 67 20 51 | 75 65 72 79 54 79 70 65 |string Q|ueryType|
|000009e0| 2c 20 6f 75 74 20 73 74 | 72 69 6e 67 20 51 75 65 |, out st|ring Que|
|000009f0| 72 79 56 61 6c 75 65 2c | 20 6f 75 74 20 73 74 72 |ryValue,| out str|
|00000a00| 69 6e 67 20 51 75 65 72 | 79 52 65 73 74 2c 20 6f |ing Quer|yRest, o|
|00000a10| 75 74 20 69 6e 74 20 62 | 46 69 6e 61 6c 50 61 63 |ut int b|FinalPac|
|00000a20| 6b 65 74 20 29 0d 0a 7b | 0d 0a 09 6c 6f 63 61 6c |ket )..{|...local|
|00000a30| 20 73 74 72 69 6e 67 20 | 54 65 6d 70 51 75 65 72 | string |TempQuer|
|00000a40| 79 3b 0d 0a 09 6c 6f 63 | 61 6c 20 69 6e 74 20 43 |y;...loc|al int C|
|00000a50| 6c 6f 73 69 6e 67 53 6c | 61 73 68 3b 0d 0a 0d 0a |losingSl|ash;....|
|00000a60| 09 69 66 20 28 51 75 65 | 72 79 20 3d 3d 20 22 22 |.if (Que|ry == ""|
|00000a70| 29 0d 0a 09 09 72 65 74 | 75 72 6e 20 66 61 6c 73 |)....ret|urn fals|
|00000a80| 65 3b 0d 0a 0d 0a 09 2f | 2f 20 51 75 65 72 79 20 |e;...../|/ Query |
|00000a90| 73 68 6f 75 6c 64 20 62 | 65 3a 0d 0a 09 2f 2f 20 |should b|e:...// |
|00000aa0| 20 20 5c 5b 74 79 70 65 | 5d 5c 3c 76 61 6c 75 65 | \[type|]\<value|
|00000ab0| 3e 0d 0a 09 69 66 20 28 | 4c 65 66 74 28 51 75 65 |>...if (|Left(Que|
|00000ac0| 72 79 2c 20 31 29 20 3d | 3d 20 22 5c 5c 22 29 0d |ry, 1) =|= "\\").|
|00000ad0| 0a 09 7b 0d 0a 09 09 2f | 2f 20 43 68 65 63 6b 20 |..{..../|/ Check |
|00000ae0| 74 6f 20 73 65 65 20 69 | 66 20 63 6c 6f 73 65 64 |to see i|f closed|
|00000af0| 2e 0d 0a 09 09 43 6c 6f | 73 69 6e 67 53 6c 61 73 |.....Clo|singSlas|
|00000b00| 68 20 3d 20 49 6e 53 74 | 72 28 52 69 67 68 74 28 |h = InSt|r(Right(|
|00000b10| 51 75 65 72 79 2c 20 4c | 65 6e 28 51 75 65 72 79 |Query, L|en(Query|
|00000b20| 29 2d 31 29 2c 20 22 5c | 5c 22 29 3b 0d 0a 09 09 |)-1), "\|\");....|
|00000b30| 69 66 20 28 43 6c 6f 73 | 69 6e 67 53 6c 61 73 68 |if (Clos|ingSlash|
|00000b40| 20 3d 3d 20 30 29 0d 0a | 09 09 09 72 65 74 75 72 | == 0)..|...retur|
|00000b50| 6e 20 66 61 6c 73 65 3b | 0d 0a 0d 0a 09 09 54 65 |n false;|......Te|
|00000b60| 6d 70 51 75 65 72 79 20 | 3d 20 51 75 65 72 79 3b |mpQuery |= Query;|
|00000b70| 0d 0a 0d 0a 09 09 2f 2f | 20 51 75 65 72 79 20 6c |......//| Query l|
|00000b80| 6f 6f 6b 73 20 6c 69 6b | 65 3a 0d 0a 09 09 2f 2f |ooks lik|e:....//|
|00000b90| 20 20 5c 5b 74 79 70 65 | 5d 5c 0d 0a 09 09 51 75 | \[type|]\....Qu|
|00000ba0| 65 72 79 54 79 70 65 20 | 3d 20 52 69 67 68 74 28 |eryType |= Right(|
|00000bb0| 51 75 65 72 79 2c 20 4c | 65 6e 28 51 75 65 72 79 |Query, L|en(Query|
|00000bc0| 29 2d 31 29 3b 0d 0a 09 | 09 51 75 65 72 79 54 79 |)-1);...|.QueryTy|
|00000bd0| 70 65 20 3d 20 4c 65 66 | 74 28 51 75 65 72 79 54 |pe = Lef|t(QueryT|
|00000be0| 79 70 65 2c 20 43 6c 6f | 73 69 6e 67 53 6c 61 73 |ype, Clo|singSlas|
|00000bf0| 68 29 3b 0d 0a 0d 0a 09 | 09 51 75 65 72 79 52 65 |h);.....|.QueryRe|
|00000c00| 73 74 20 3d 20 52 69 67 | 68 74 28 51 75 65 72 79 |st = Rig|ht(Query|
|00000c10| 2c 20 4c 65 6e 28 51 75 | 65 72 79 29 20 2d 20 28 |, Len(Qu|ery) - (|
|00000c20| 4c 65 6e 28 51 75 65 72 | 79 54 79 70 65 29 20 2b |Len(Quer|yType) +|
|00000c30| 20 32 29 29 3b 0d 0a 0d | 0a 09 09 69 66 20 28 28 | 2));...|...if ((|
|00000c40| 51 75 65 72 79 52 65 73 | 74 20 3d 3d 20 22 22 29 |QueryRes|t == "")|
|00000c50| 20 7c 7c 20 28 4c 65 6e | 28 51 75 65 72 79 52 65 | || (Len|(QueryRe|
|00000c60| 73 74 29 20 3d 3d 20 31 | 29 29 0d 0a 09 09 7b 0d |st) == 1|))....{.|
|00000c70| 0a 09 09 09 62 46 69 6e | 61 6c 50 61 63 6b 65 74 |....bFin|alPacket|
|00000c80| 20 3d 20 31 3b 0d 0a 09 | 09 09 72 65 74 75 72 6e | = 1;...|..return|
|00000c90| 20 74 72 75 65 3b 0d 0a | 09 09 7d 20 65 6c 73 65 | true;..|..} else|
|00000ca0| 20 69 66 20 28 4c 65 66 | 74 28 51 75 65 72 79 52 | if (Lef|t(QueryR|
|00000cb0| 65 73 74 2c 20 31 29 20 | 3d 3d 20 22 5c 5c 22 29 |est, 1) |== "\\")|
|00000cc0| 0d 0a 09 09 09 72 65 74 | 75 72 6e 20 74 72 75 65 |.....ret|urn true|
|00000cd0| 3b 09 2f 2f 20 5c 74 79 | 70 65 5c 5c 0d 0a 0d 0a |;.// \ty|pe\\....|
|00000ce0| 09 09 2f 2f 20 51 75 65 | 72 79 20 6c 6f 6f 6b 73 |..// Que|ry looks|
|00000cf0| 20 6c 69 6b 65 3a 0d 0a | 09 09 2f 2f 20 20 5c 74 | like:..|..// \t|
|00000d00| 79 70 65 5c 76 61 6c 75 | 65 0d 0a 09 09 43 6c 6f |ype\valu|e....Clo|
|00000d10| 73 69 6e 67 53 6c 61 73 | 68 20 3d 20 49 6e 53 74 |singSlas|h = InSt|
|00000d20| 72 28 51 75 65 72 79 52 | 65 73 74 2c 20 22 5c 5c |r(QueryR|est, "\\|
|00000d30| 22 29 3b 0d 0a 09 09 69 | 66 20 28 43 6c 6f 73 69 |");....i|f (Closi|
|00000d40| 6e 67 53 6c 61 73 68 20 | 3e 3d 20 30 29 0d 0a 09 |ngSlash |>= 0)...|
|00000d50| 09 09 51 75 65 72 79 56 | 61 6c 75 65 20 3d 20 4c |..QueryV|alue = L|
|00000d60| 65 66 74 28 51 75 65 72 | 79 52 65 73 74 2c 20 43 |eft(Quer|yRest, C|
|00000d70| 6c 6f 73 69 6e 67 53 6c | 61 73 68 29 3b 0d 0a 09 |losingSl|ash);...|
|00000d80| 09 65 6c 73 65 0d 0a 09 | 09 09 51 75 65 72 79 56 |.else...|..QueryV|
|00000d90| 61 6c 75 65 20 3d 20 51 | 75 65 72 79 52 65 73 74 |alue = Q|ueryRest|
|00000da0| 3b 0d 0a 0d 0a 09 09 51 | 75 65 72 79 52 65 73 74 |;......Q|ueryRest|
|00000db0| 20 3d 20 52 69 67 68 74 | 28 51 75 65 72 79 2c 20 | = Right|(Query, |
|00000dc0| 4c 65 6e 28 51 75 65 72 | 79 29 20 2d 20 28 4c 65 |Len(Quer|y) - (Le|
|00000dd0| 6e 28 51 75 65 72 79 54 | 79 70 65 29 20 2b 20 4c |n(QueryT|ype) + L|
|00000de0| 65 6e 28 51 75 65 72 79 | 56 61 6c 75 65 29 20 2b |en(Query|Value) +|
|00000df0| 20 33 29 29 3b 0d 0a 09 | 09 69 66 20 28 51 75 65 | 3));...|.if (Que|
|00000e00| 72 79 52 65 73 74 20 3d | 3d 20 22 22 29 0d 0a 09 |ryRest =|= "")...|
|00000e10| 09 7b 0d 0a 09 09 09 62 | 46 69 6e 61 6c 50 61 63 |.{.....b|FinalPac|
|00000e20| 6b 65 74 20 3d 20 31 3b | 0d 0a 09 09 09 72 65 74 |ket = 1;|.....ret|
|00000e30| 75 72 6e 20 74 72 75 65 | 3b 0d 0a 09 09 7d 20 65 |urn true|;....} e|
|00000e40| 6c 73 65 0d 0a 09 09 09 | 72 65 74 75 72 6e 20 74 |lse.....|return t|
|00000e50| 72 75 65 3b 0d 0a 09 7d | 20 65 6c 73 65 20 7b 0d |rue;...}| else {.|
|00000e60| 0a 09 09 72 65 74 75 72 | 6e 20 66 61 6c 73 65 3b |...retur|n false;|
|00000e70| 0d 0a 09 7d 0d 0a 7d 0d | 0a 0d 0a 66 75 6e 63 74 |...}..}.|...funct|
|00000e80| 69 6f 6e 20 73 74 72 69 | 6e 67 20 50 61 72 73 65 |ion stri|ng Parse|
|00000e90| 51 75 65 72 79 28 20 49 | 70 41 64 64 72 20 41 64 |Query( I|pAddr Ad|
|00000ea0| 64 72 2c 20 63 6f 65 72 | 63 65 20 73 74 72 69 6e |dr, coer|ce strin|
|00000eb0| 67 20 51 75 65 72 79 2c | 20 69 6e 74 20 51 75 65 |g Query,| int Que|
|00000ec0| 72 79 4e 75 6d 2c 20 6f | 75 74 20 69 6e 74 20 50 |ryNum, o|ut int P|
|00000ed0| 61 63 6b 65 74 4e 75 6d | 20 29 0d 0a 7b 0d 0a 09 |acketNum| )..{...|
|00000ee0| 6c 6f 63 61 6c 20 73 74 | 72 69 6e 67 20 51 75 65 |local st|ring Que|
|00000ef0| 72 79 54 79 70 65 2c 20 | 51 75 65 72 79 56 61 6c |ryType, |QueryVal|
|00000f00| 75 65 2c 20 51 75 65 72 | 79 52 65 73 74 2c 20 56 |ue, Quer|yRest, V|
|00000f10| 61 6c 69 64 61 74 69 6f | 6e 53 74 72 69 6e 67 3b |alidatio|nString;|
|00000f20| 0d 0a 09 6c 6f 63 61 6c | 20 62 6f 6f 6c 20 52 65 |...local| bool Re|
|00000f30| 73 75 6c 74 3b 0d 0a 09 | 6c 6f 63 61 6c 20 69 6e |sult;...|local in|
|00000f40| 74 20 62 46 69 6e 61 6c | 50 61 63 6b 65 74 3b 0d |t bFinal|Packet;.|
|00000f50| 0a 09 0d 0a 09 62 46 69 | 6e 61 6c 50 61 63 6b 65 |.....bFi|nalPacke|
|00000f60| 74 20 3d 20 30 3b 0d 0a | 09 52 65 73 75 6c 74 20 |t = 0;..|.Result |
|00000f70| 3d 20 50 61 72 73 65 4e | 65 78 74 51 75 65 72 79 |= ParseN|extQuery|
|00000f80| 28 51 75 65 72 79 2c 20 | 51 75 65 72 79 54 79 70 |(Query, |QueryTyp|
|00000f90| 65 2c 20 51 75 65 72 79 | 56 61 6c 75 65 2c 20 51 |e, Query|Value, Q|
|00000fa0| 75 65 72 79 52 65 73 74 | 2c 20 62 46 69 6e 61 6c |ueryRest|, bFinal|
|00000fb0| 50 61 63 6b 65 74 29 3b | 0d 0a 09 69 66 28 20 21 |Packet);|...if( !|
|00000fc0| 52 65 73 75 6c 74 20 29 | 0d 0a 09 09 72 65 74 75 |Result )|....retu|
|00000fd0| 72 6e 20 22 22 3b 0d 0a | 0d 0a 09 2f 2f 4c 6f 67 |rn "";..|...//Log|
|00000fe0| 28 22 47 6f 74 20 20 51 | 75 65 72 79 3a 20 22 20 |("Got Q|uery: " |
|00000ff0| 20 24 20 51 75 65 72 79 | 4e 75 6d 20 24 20 22 2e | $ Query|Num $ ".|
|00001000| 22 20 24 20 50 61 63 6b | 65 74 4e 75 6d 20 24 20 |" $ Pack|etNum $ |
|00001010| 22 3a 22 20 24 20 51 75 | 65 72 79 54 79 70 65 29 |":" $ Qu|eryType)|
|00001020| 3b 0d 0a 0d 0a 09 69 66 | 28 20 51 75 65 72 79 54 |;.....if|( QueryT|
|00001030| 79 70 65 3d 3d 22 62 61 | 73 69 63 22 20 29 0d 0a |ype=="ba|sic" )..|
|00001040| 09 7b 0d 0a 09 09 52 65 | 73 75 6c 74 20 3d 20 53 |.{....Re|sult = S|
|00001050| 65 6e 64 51 75 65 72 79 | 50 61 63 6b 65 74 28 41 |endQuery|Packet(A|
|00001060| 64 64 72 2c 20 47 65 74 | 42 61 73 69 63 28 29 2c |ddr, Get|Basic(),|
|00001070| 20 51 75 65 72 79 4e 75 | 6d 2c 20 50 61 63 6b 65 | QueryNu|m, Packe|
|00001080| 74 4e 75 6d 2c 20 62 46 | 69 6e 61 6c 50 61 63 6b |tNum, bF|inalPack|
|00001090| 65 74 29 3b 0d 0a 09 7d | 0d 0a 09 65 6c 73 65 20 |et);...}|...else |
|000010a0| 69 66 28 20 51 75 65 72 | 79 54 79 70 65 3d 3d 22 |if( Quer|yType=="|
|000010b0| 69 6e 66 6f 22 20 29 0d | 0a 09 7b 0d 0a 09 09 52 |info" ).|..{....R|
|000010c0| 65 73 75 6c 74 20 3d 20 | 53 65 6e 64 51 75 65 72 |esult = |SendQuer|
|000010d0| 79 50 61 63 6b 65 74 28 | 41 64 64 72 2c 20 47 65 |yPacket(|Addr, Ge|
|000010e0| 74 49 6e 66 6f 28 29 2c | 20 51 75 65 72 79 4e 75 |tInfo(),| QueryNu|
|000010f0| 6d 2c 20 50 61 63 6b 65 | 74 4e 75 6d 2c 20 62 46 |m, Packe|tNum, bF|
|00001100| 69 6e 61 6c 50 61 63 6b | 65 74 29 3b 0d 0a 09 7d |inalPack|et);...}|
|00001110| 0d 0a 09 65 6c 73 65 20 | 69 66 28 20 51 75 65 72 |...else |if( Quer|
|00001120| 79 54 79 70 65 3d 3d 22 | 72 75 6c 65 73 22 20 29 |yType=="|rules" )|
|00001130| 0d 0a 09 7b 0d 0a 09 09 | 52 65 73 75 6c 74 20 3d |...{....|Result =|
|00001140| 20 53 65 6e 64 51 75 65 | 72 79 50 61 63 6b 65 74 | SendQue|ryPacket|
|00001150| 28 41 64 64 72 2c 20 47 | 65 74 52 75 6c 65 73 28 |(Addr, G|etRules(|
|00001160| 29 2c 20 51 75 65 72 79 | 4e 75 6d 2c 20 50 61 63 |), Query|Num, Pac|
|00001170| 6b 65 74 4e 75 6d 2c 20 | 62 46 69 6e 61 6c 50 61 |ketNum, |bFinalPa|
|00001180| 63 6b 65 74 29 3b 0d 0a | 09 7d 0d 0a 09 65 6c 73 |cket);..|.}...els|
|00001190| 65 20 69 66 28 20 51 75 | 65 72 79 54 79 70 65 3d |e if( Qu|eryType=|
|000011a0| 3d 22 70 6c 61 79 65 72 | 73 22 20 29 0d 0a 09 7b |="player|s" )...{|
|000011b0| 0d 0a 09 09 69 66 28 20 | 4c 65 76 65 6c 2e 47 61 |....if( |Level.Ga|
|000011c0| 6d 65 2e 4e 75 6d 50 6c | 61 79 65 72 73 20 3e 20 |me.NumPl|ayers > |
|000011d0| 30 20 29 0d 0a 09 09 09 | 52 65 73 75 6c 74 20 3d |0 ).....|Result =|
|000011e0| 20 53 65 6e 64 50 6c 61 | 79 65 72 73 28 41 64 64 | SendPla|yers(Add|
|000011f0| 72 2c 20 51 75 65 72 79 | 4e 75 6d 2c 20 50 61 63 |r, Query|Num, Pac|
|00001200| 6b 65 74 4e 75 6d 2c 20 | 62 46 69 6e 61 6c 50 61 |ketNum, |bFinalPa|
|00001210| 63 6b 65 74 29 3b 0d 0a | 09 09 65 6c 73 65 0d 0a |cket);..|..else..|
|00001220| 09 09 09 52 65 73 75 6c | 74 20 3d 20 53 65 6e 64 |...Resul|t = Send|
|00001230| 51 75 65 72 79 50 61 63 | 6b 65 74 28 41 64 64 72 |QueryPac|ket(Addr|
|00001240| 2c 20 22 22 2c 20 51 75 | 65 72 79 4e 75 6d 2c 20 |, "", Qu|eryNum, |
|00001250| 50 61 63 6b 65 74 4e 75 | 6d 2c 20 62 46 69 6e 61 |PacketNu|m, bFina|
|00001260| 6c 50 61 63 6b 65 74 29 | 3b 0d 0a 09 7d 0d 0a 09 |lPacket)|;...}...|
|00001270| 65 6c 73 65 20 69 66 28 | 20 51 75 65 72 79 54 79 |else if(| QueryTy|
|00001280| 70 65 3d 3d 22 73 74 61 | 74 75 73 22 20 29 0d 0a |pe=="sta|tus" )..|
|00001290| 09 7b 0d 0a 09 09 52 65 | 73 75 6c 74 20 3d 20 53 |.{....Re|sult = S|
|000012a0| 65 6e 64 51 75 65 72 79 | 50 61 63 6b 65 74 28 41 |endQuery|Packet(A|
|000012b0| 64 64 72 2c 20 47 65 74 | 42 61 73 69 63 28 29 2c |ddr, Get|Basic(),|
|000012c0| 20 51 75 65 72 79 4e 75 | 6d 2c 20 50 61 63 6b 65 | QueryNu|m, Packe|
|000012d0| 74 4e 75 6d 2c 20 30 29 | 3b 0d 0a 09 09 52 65 73 |tNum, 0)|;....Res|
|000012e0| 75 6c 74 20 3d 20 53 65 | 6e 64 51 75 65 72 79 50 |ult = Se|ndQueryP|
|000012f0| 61 63 6b 65 74 28 41 64 | 64 72 2c 20 47 65 74 49 |acket(Ad|dr, GetI|
|00001300| 6e 66 6f 28 29 2c 20 51 | 75 65 72 79 4e 75 6d 2c |nfo(), Q|ueryNum,|
|00001310| 20 50 61 63 6b 65 74 4e | 75 6d 2c 20 30 29 3b 0d | PacketN|um, 0);.|
|00001320| 0a 09 09 69 66 28 20 4c | 65 76 65 6c 2e 47 61 6d |...if( L|evel.Gam|
|00001330| 65 2e 4e 75 6d 50 6c 61 | 79 65 72 73 20 3d 3d 20 |e.NumPla|yers == |
|00001340| 30 20 29 0d 0a 09 09 7b | 0d 0a 09 09 09 52 65 73 |0 )....{|.....Res|
|00001350| 75 6c 74 20 3d 20 53 65 | 6e 64 51 75 65 72 79 50 |ult = Se|ndQueryP|
|00001360| 61 63 6b 65 74 28 41 64 | 64 72 2c 20 47 65 74 52 |acket(Ad|dr, GetR|
|00001370| 75 6c 65 73 28 29 2c 20 | 51 75 65 72 79 4e 75 6d |ules(), |QueryNum|
|00001380| 2c 20 50 61 63 6b 65 74 | 4e 75 6d 2c 20 62 46 69 |, Packet|Num, bFi|
|00001390| 6e 61 6c 50 61 63 6b 65 | 74 29 3b 0d 0a 09 09 7d |nalPacke|t);....}|
|000013a0| 0d 0a 09 09 65 6c 73 65 | 0d 0a 09 09 7b 0d 0a 09 |....else|....{...|
|000013b0| 09 09 52 65 73 75 6c 74 | 20 3d 20 53 65 6e 64 51 |..Result| = SendQ|
|000013c0| 75 65 72 79 50 61 63 6b | 65 74 28 41 64 64 72 2c |ueryPack|et(Addr,|
|000013d0| 20 47 65 74 52 75 6c 65 | 73 28 29 2c 20 51 75 65 | GetRule|s(), Que|
|000013e0| 72 79 4e 75 6d 2c 20 50 | 61 63 6b 65 74 4e 75 6d |ryNum, P|acketNum|
|000013f0| 2c 20 30 29 3b 0d 0a 09 | 09 09 52 65 73 75 6c 74 |, 0);...|..Result|
|00001400| 20 3d 20 53 65 6e 64 50 | 6c 61 79 65 72 73 28 41 | = SendP|layers(A|
|00001410| 64 64 72 2c 20 51 75 65 | 72 79 4e 75 6d 2c 20 50 |ddr, Que|ryNum, P|
|00001420| 61 63 6b 65 74 4e 75 6d | 2c 20 62 46 69 6e 61 6c |acketNum|, bFinal|
|00001430| 50 61 63 6b 65 74 29 3b | 0d 0a 09 09 7d 0d 0a 09 |Packet);|....}...|
|00001440| 7d 0d 0a 09 65 6c 73 65 | 20 69 66 28 20 51 75 65 |}...else| if( Que|
|00001450| 72 79 54 79 70 65 3d 3d | 22 65 63 68 6f 22 20 29 |ryType==|"echo" )|
|00001460| 0d 0a 09 7b 0d 0a 09 09 | 2f 2f 20 52 65 73 70 6f |...{....|// Respo|
|00001470| 6e 64 20 74 6f 20 61 6e | 20 65 63 68 6f 20 77 69 |nd to an| echo wi|
|00001480| 74 68 20 74 68 65 20 73 | 61 6d 65 20 73 74 72 69 |th the s|ame stri|
|00001490| 6e 67 0d 0a 09 09 52 65 | 73 75 6c 74 20 3d 20 53 |ng....Re|sult = S|
|000014a0| 65 6e 64 51 75 65 72 79 | 50 61 63 6b 65 74 28 41 |endQuery|Packet(A|
|000014b0| 64 64 72 2c 20 22 5c 5c | 65 63 68 6f 5c 5c 22 24 |ddr, "\\|echo\\"$|
|000014c0| 51 75 65 72 79 56 61 6c | 75 65 2c 20 51 75 65 72 |QueryVal|ue, Quer|
|000014d0| 79 4e 75 6d 2c 20 50 61 | 63 6b 65 74 4e 75 6d 2c |yNum, Pa|cketNum,|
|000014e0| 20 62 46 69 6e 61 6c 50 | 61 63 6b 65 74 29 3b 0d | bFinalP|acket);.|
|000014f0| 0a 09 7d 0d 0a 09 65 6c | 73 65 20 69 66 28 20 51 |..}...el|se if( Q|
|00001500| 75 65 72 79 54 79 70 65 | 3d 3d 22 73 65 63 75 72 |ueryType|=="secur|
|00001510| 65 22 20 29 0d 0a 09 7b | 0d 0a 09 09 56 61 6c 69 |e" )...{|....Vali|
|00001520| 64 61 74 69 6f 6e 53 74 | 72 69 6e 67 20 3d 20 22 |dationSt|ring = "|
|00001530| 5c 5c 76 61 6c 69 64 61 | 74 65 5c 5c 22 24 56 61 |\\valida|te\\"$Va|
|00001540| 6c 69 64 61 74 65 28 51 | 75 65 72 79 56 61 6c 75 |lidate(Q|ueryValu|
|00001550| 65 2c 20 47 61 6d 65 4e | 61 6d 65 29 3b 0d 0a 09 |e, GameN|ame);...|
|00001560| 09 52 65 73 75 6c 74 20 | 3d 20 53 65 6e 64 51 75 |.Result |= SendQu|
|00001570| 65 72 79 50 61 63 6b 65 | 74 28 41 64 64 72 2c 20 |eryPacke|t(Addr, |
|00001580| 56 61 6c 69 64 61 74 69 | 6f 6e 53 74 72 69 6e 67 |Validati|onString|
|00001590| 2c 20 51 75 65 72 79 4e | 75 6d 2c 20 50 61 63 6b |, QueryN|um, Pack|
|000015a0| 65 74 4e 75 6d 2c 20 62 | 46 69 6e 61 6c 50 61 63 |etNum, b|FinalPac|
|000015b0| 6b 65 74 29 3b 0d 0a 09 | 7d 0d 0a 09 65 6c 73 65 |ket);...|}...else|
|000015c0| 20 69 66 28 20 51 75 65 | 72 79 54 79 70 65 3d 3d | if( Que|ryType==|
|000015d0| 22 6c 65 76 65 6c 5f 70 | 72 6f 70 65 72 74 79 22 |"level_p|roperty"|
|000015e0| 20 29 0d 0a 09 7b 0d 0a | 09 09 52 65 73 75 6c 74 | )...{..|..Result|
|000015f0| 20 3d 20 53 65 6e 64 51 | 75 65 72 79 50 61 63 6b | = SendQ|ueryPack|
|00001600| 65 74 28 41 64 64 72 2c | 20 47 65 74 4c 65 76 65 |et(Addr,| GetLeve|
|00001610| 6c 50 72 6f 70 65 72 74 | 79 28 51 75 65 72 79 56 |lPropert|y(QueryV|
|00001620| 61 6c 75 65 29 2c 20 51 | 75 65 72 79 4e 75 6d 2c |alue), Q|ueryNum,|
|00001630| 20 50 61 63 6b 65 74 4e | 75 6d 2c 20 62 46 69 6e | PacketN|um, bFin|
|00001640| 61 6c 50 61 63 6b 65 74 | 29 3b 0d 0a 09 7d 0d 0a |alPacket|);...}..|
|00001650| 09 65 6c 73 65 20 69 66 | 28 20 51 75 65 72 79 54 |.else if|( QueryT|
|00001660| 79 70 65 3d 3d 22 67 61 | 6d 65 5f 70 72 6f 70 65 |ype=="ga|me_prope|
|00001670| 72 74 79 22 20 29 0d 0a | 09 7b 0d 0a 09 09 09 52 |rty" )..|.{.....R|
|00001680| 65 73 75 6c 74 20 3d 20 | 53 65 6e 64 51 75 65 72 |esult = |SendQuer|
|00001690| 79 50 61 63 6b 65 74 28 | 41 64 64 72 2c 20 47 65 |yPacket(|Addr, Ge|
|000016a0| 74 47 61 6d 65 50 72 6f | 70 65 72 74 79 28 51 75 |tGamePro|perty(Qu|
|000016b0| 65 72 79 56 61 6c 75 65 | 29 2c 20 51 75 65 72 79 |eryValue|), Query|
|000016c0| 4e 75 6d 2c 20 50 61 63 | 6b 65 74 4e 75 6d 2c 20 |Num, Pac|ketNum, |
|000016d0| 62 46 69 6e 61 6c 50 61 | 63 6b 65 74 29 3b 0d 0a |bFinalPa|cket);..|
|000016e0| 09 7d 0d 0a 09 65 6c 73 | 65 20 69 66 28 20 51 75 |.}...els|e if( Qu|
|000016f0| 65 72 79 54 79 70 65 3d | 3d 22 70 6c 61 79 65 72 |eryType=|="player|
|00001700| 5f 70 72 6f 70 65 72 74 | 79 22 20 29 0d 0a 09 7b |_propert|y" )...{|
|00001710| 0d 0a 09 09 52 65 73 75 | 6c 74 20 3d 20 53 65 6e |....Resu|lt = Sen|
|00001720| 64 51 75 65 72 79 50 61 | 63 6b 65 74 28 41 64 64 |dQueryPa|cket(Add|
|00001730| 72 2c 20 47 65 74 50 6c | 61 79 65 72 50 72 6f 70 |r, GetPl|ayerProp|
|00001740| 65 72 74 79 28 51 75 65 | 72 79 56 61 6c 75 65 29 |erty(Que|ryValue)|
|00001750| 2c 20 51 75 65 72 79 4e | 75 6d 2c 20 50 61 63 6b |, QueryN|um, Pack|
|00001760| 65 74 4e 75 6d 2c 20 62 | 46 69 6e 61 6c 50 61 63 |etNum, b|FinalPac|
|00001770| 6b 65 74 29 3b 0d 0a 09 | 7d 0d 0a 09 72 65 74 75 |ket);...|}...retu|
|00001780| 72 6e 20 51 75 65 72 79 | 52 65 73 74 3b 0d 0a 7d |rn Query|Rest;..}|
|00001790| 0d 0a 0d 0a 66 75 6e 63 | 74 69 6f 6e 20 62 6f 6f |....func|tion boo|
|000017a0| 6c 20 53 65 6e 64 41 50 | 61 63 6b 65 74 28 49 70 |l SendAP|acket(Ip|
|000017b0| 41 64 64 72 20 41 64 64 | 72 2c 20 69 6e 74 20 51 |Addr Add|r, int Q|
|000017c0| 75 65 72 79 4e 75 6d 2c | 20 6f 75 74 20 69 6e 74 |ueryNum,| out int|
|000017d0| 20 50 61 63 6b 65 74 4e | 75 6d 2c 20 69 6e 74 20 | PacketN|um, int |
|000017e0| 62 46 69 6e 61 6c 50 61 | 63 6b 65 74 29 0d 0a 7b |bFinalPa|cket)..{|
|000017f0| 0d 0a 09 6c 6f 63 61 6c | 20 62 6f 6f 6c 20 52 65 |...local| bool Re|
|00001800| 73 75 6c 74 3b 0d 0a 0d | 0a 09 52 65 70 6c 79 44 |sult;...|..ReplyD|
|00001810| 61 74 61 20 3d 20 52 65 | 70 6c 79 44 61 74 61 24 |ata = Re|plyData$|
|00001820| 22 5c 5c 71 75 65 72 79 | 69 64 5c 5c 22 24 51 75 |"\\query|id\\"$Qu|
|00001830| 65 72 79 4e 75 6d 24 22 | 2e 22 24 2b 2b 50 61 63 |eryNum$"|."$++Pac|
|00001840| 6b 65 74 4e 75 6d 3b 0d | 0a 09 69 66 20 28 62 46 |ketNum;.|..if (bF|
|00001850| 69 6e 61 6c 50 61 63 6b | 65 74 20 3d 3d 20 31 29 |inalPack|et == 1)|
|00001860| 20 7b 0d 0a 09 09 52 65 | 70 6c 79 44 61 74 61 20 | {....Re|plyData |
|00001870| 3d 20 52 65 70 6c 79 44 | 61 74 61 20 24 20 22 5c |= ReplyD|ata $ "\|
|00001880| 5c 66 69 6e 61 6c 5c 5c | 22 3b 0d 0a 09 7d 0d 0a |\final\\|";...}..|
|00001890| 09 52 65 73 75 6c 74 20 | 3d 20 53 65 6e 64 54 65 |.Result |= SendTe|
|000018a0| 78 74 28 41 64 64 72 2c | 20 52 65 70 6c 79 44 61 |xt(Addr,| ReplyDa|
|000018b0| 74 61 29 3b 0d 0a 09 52 | 65 70 6c 79 44 61 74 61 |ta);...R|eplyData|
|000018c0| 20 3d 20 22 22 3b 0d 0a | 09 0d 0a 09 72 65 74 75 | = "";..|....retu|
|000018d0| 72 6e 20 52 65 73 75 6c | 74 3b 0d 0a 0d 0a 7d 0d |rn Resul|t;....}.|
|000018e0| 0a 0d 0a 2f 2f 20 53 65 | 6e 64 51 75 65 72 79 50 |...// Se|ndQueryP|
|000018f0| 61 63 6b 65 74 20 69 73 | 20 61 20 77 72 61 70 70 |acket is| a wrapp|
|00001900| 65 72 20 66 6f 72 20 53 | 65 6e 64 54 65 78 74 20 |er for S|endText |
|00001910| 74 68 61 74 20 61 6c 6c | 6f 77 73 20 66 6f 72 20 |that all|ows for |
|00001920| 70 61 63 6b 65 74 20 6e | 75 6d 62 65 72 69 6e 67 |packet n|umbering|
|00001930| 2e 0d 0a 66 75 6e 63 74 | 69 6f 6e 20 62 6f 6f 6c |...funct|ion bool|
|00001940| 20 53 65 6e 64 51 75 65 | 72 79 50 61 63 6b 65 74 | SendQue|ryPacket|
|00001950| 28 49 70 41 64 64 72 20 | 41 64 64 72 2c 20 63 6f |(IpAddr |Addr, co|
|00001960| 65 72 63 65 20 73 74 72 | 69 6e 67 20 53 65 6e 64 |erce str|ing Send|
|00001970| 53 74 72 69 6e 67 2c 20 | 69 6e 74 20 51 75 65 72 |String, |int Quer|
|00001980| 79 4e 75 6d 2c 20 6f 75 | 74 20 69 6e 74 20 50 61 |yNum, ou|t int Pa|
|00001990| 63 6b 65 74 4e 75 6d 2c | 20 69 6e 74 20 62 46 69 |cketNum,| int bFi|
|000019a0| 6e 61 6c 50 61 63 6b 65 | 74 29 0d 0a 7b 0d 0a 09 |nalPacke|t)..{...|
|000019b0| 6c 6f 63 61 6c 20 62 6f | 6f 6c 20 52 65 73 75 6c |local bo|ol Resul|
|000019c0| 74 3b 0d 0a 09 0d 0a 09 | 2f 2f 4c 6f 67 28 22 53 |t;......|//Log("S|
|000019d0| 65 6e 64 20 51 75 65 72 | 79 3a 20 22 20 20 24 20 |end Quer|y: " $ |
|000019e0| 51 75 65 72 79 4e 75 6d | 20 24 20 22 2e 22 20 24 |QueryNum| $ "." $|
|000019f0| 20 50 61 63 6b 65 74 4e | 75 6d 20 24 20 22 3a 22 | PacketN|um $ ":"|
|00001a00| 20 24 20 62 46 69 6e 61 | 6c 50 61 63 6b 65 74 29 | $ bFina|lPacket)|
|00001a10| 3b 0d 0a 09 72 65 73 75 | 6c 74 20 3d 20 74 72 75 |;...resu|lt = tru|
|00001a20| 65 3b 0d 0a 09 69 66 20 | 28 6c 65 6e 28 52 65 70 |e;...if |(len(Rep|
|00001a30| 6c 79 44 61 74 61 29 20 | 2b 20 6c 65 6e 28 53 65 |lyData) |+ len(Se|
|00001a40| 6e 64 53 74 72 69 6e 67 | 29 20 3e 20 31 30 30 30 |ndString|) > 1000|
|00001a50| 29 0d 0a 09 09 72 65 73 | 75 6c 74 20 3d 20 53 65 |)....res|ult = Se|
|00001a60| 6e 64 41 50 61 63 6b 65 | 74 28 41 64 64 72 2c 20 |ndAPacke|t(Addr, |
|00001a70| 51 75 65 72 79 4e 75 6d | 2c 20 50 61 63 6b 65 74 |QueryNum|, Packet|
|00001a80| 4e 75 6d 2c 20 30 29 3b | 0d 0a 09 0d 0a 09 52 65 |Num, 0);|......Re|
|00001a90| 70 6c 79 44 61 74 61 20 | 3d 20 52 65 70 6c 79 44 |plyData |= ReplyD|
|00001aa0| 61 74 61 20 24 20 53 65 | 6e 64 53 74 72 69 6e 67 |ata $ Se|ndString|
|00001ab0| 3b 0d 0a 09 0d 0a 09 69 | 66 20 28 62 46 69 6e 61 |;......i|f (bFina|
|00001ac0| 6c 50 61 63 6b 65 74 20 | 3d 3d 20 31 29 0d 0a 09 |lPacket |== 1)...|
|00001ad0| 09 72 65 73 75 6c 74 20 | 3d 20 53 65 6e 64 41 50 |.result |= SendAP|
|00001ae0| 61 63 6b 65 74 28 41 64 | 64 72 2c 20 51 75 65 72 |acket(Ad|dr, Quer|
|00001af0| 79 4e 75 6d 2c 20 50 61 | 63 6b 65 74 4e 75 6d 2c |yNum, Pa|cketNum,|
|00001b00| 20 62 46 69 6e 61 6c 50 | 61 63 6b 65 74 29 3b 0d | bFinalP|acket);.|
|00001b10| 0a 09 09 0d 0a 09 72 65 | 74 75 72 6e 20 52 65 73 |......re|turn Res|
|00001b20| 75 6c 74 3b 0d 0a 7d 0d | 0a 0d 0a 2f 2f 20 52 65 |ult;..}.|...// Re|
|00001b30| 74 75 72 6e 20 61 20 73 | 74 72 69 6e 67 20 6f 66 |turn a s|tring of|
|00001b40| 20 62 61 73 69 63 20 69 | 6e 66 6f 72 6d 61 74 69 | basic i|nformati|
|00001b50| 6f 6e 2e 0d 0a 66 75 6e | 63 74 69 6f 6e 20 73 74 |on...fun|ction st|
|00001b60| 72 69 6e 67 20 47 65 74 | 42 61 73 69 63 28 29 20 |ring Get|Basic() |
|00001b70| 7b 0d 0a 09 6c 6f 63 61 | 6c 20 73 74 72 69 6e 67 |{...loca|l string|
|00001b80| 20 52 65 73 75 6c 74 53 | 65 74 3b 0d 0a 0d 0a 09 | ResultS|et;.....|
|00001b90| 2f 2f 20 54 68 65 20 6e | 61 6d 65 20 6f 66 20 74 |// The n|ame of t|
|00001ba0| 68 69 73 20 67 61 6d 65 | 2e 0d 0a 09 52 65 73 75 |his game|....Resu|
|00001bb0| 6c 74 53 65 74 20 3d 20 | 22 5c 5c 67 61 6d 65 6e |ltSet = |"\\gamen|
|00001bc0| 61 6d 65 5c 5c 22 24 47 | 61 6d 65 4e 61 6d 65 3b |ame\\"$G|ameName;|
|00001bd0| 0d 0a 0d 0a 09 2f 2f 20 | 54 68 65 20 76 65 72 73 |.....// |The vers|
|00001be0| 69 6f 6e 20 6f 66 20 74 | 68 69 73 20 67 61 6d 65 |ion of t|his game|
|00001bf0| 2e 0d 0a 09 52 65 73 75 | 6c 74 53 65 74 20 3d 20 |....Resu|ltSet = |
|00001c00| 52 65 73 75 6c 74 53 65 | 74 24 22 5c 5c 67 61 6d |ResultSe|t$"\\gam|
|00001c10| 65 76 65 72 5c 5c 22 24 | 4c 65 76 65 6c 2e 45 6e |ever\\"$|Level.En|
|00001c20| 67 69 6e 65 56 65 72 73 | 69 6f 6e 3b 0d 0a 0d 0a |gineVers|ion;....|
|00001c30| 09 2f 2f 20 54 68 65 20 | 6d 6f 73 74 20 72 65 63 |.// The |most rec|
|00001c40| 65 6e 74 20 6e 65 74 77 | 6f 72 6b 20 63 6f 6d 70 |ent netw|ork comp|
|00001c50| 61 74 69 62 6c 65 20 76 | 65 72 73 69 6f 6e 2e 0d |atible v|ersion..|
|00001c60| 0a 09 69 66 28 20 4d 69 | 6e 4e 65 74 56 65 72 20 |..if( Mi|nNetVer |
|00001c70| 3e 3d 20 49 6e 74 28 4c | 65 76 65 6c 2e 4d 69 6e |>= Int(L|evel.Min|
|00001c80| 4e 65 74 56 65 72 73 69 | 6f 6e 29 20 26 26 20 0d |NetVersi|on) && .|
|00001c90| 0a 09 09 4d 69 6e 4e 65 | 74 56 65 72 20 3c 3d 20 |...MinNe|tVer <= |
|00001ca0| 49 6e 74 28 4c 65 76 65 | 6c 2e 45 6e 67 69 6e 65 |Int(Leve|l.Engine|
|00001cb0| 56 65 72 73 69 6f 6e 29 | 20 29 0d 0a 09 09 52 65 |Version)| )....Re|
|00001cc0| 73 75 6c 74 53 65 74 20 | 3d 20 52 65 73 75 6c 74 |sultSet |= Result|
|00001cd0| 53 65 74 24 22 5c 5c 6d | 69 6e 6e 65 74 76 65 72 |Set$"\\m|innetver|
|00001ce0| 5c 5c 22 24 73 74 72 69 | 6e 67 28 4d 69 6e 4e 65 |\\"$stri|ng(MinNe|
|00001cf0| 74 56 65 72 29 3b 0d 0a | 09 65 6c 73 65 0d 0a 09 |tVer);..|.else...|
|00001d00| 09 52 65 73 75 6c 74 53 | 65 74 20 3d 20 52 65 73 |.ResultS|et = Res|
|00001d10| 75 6c 74 53 65 74 24 22 | 5c 5c 6d 69 6e 6e 65 74 |ultSet$"|\\minnet|
|00001d20| 76 65 72 5c 5c 22 24 4c | 65 76 65 6c 2e 4d 69 6e |ver\\"$L|evel.Min|
|00001d30| 4e 65 74 56 65 72 73 69 | 6f 6e 3b 0d 0a 0d 0a 09 |NetVersi|on;.....|
|00001d40| 2f 2f 20 54 68 65 20 72 | 65 67 69 6f 6e 61 6c 20 |// The r|egional |
|00001d50| 6c 6f 63 61 74 69 6f 6e | 20 6f 66 20 74 68 69 73 |location| of this|
|00001d60| 20 67 61 6d 65 2e 0d 0a | 09 52 65 73 75 6c 74 53 | game...|.ResultS|
|00001d70| 65 74 20 3d 20 52 65 73 | 75 6c 74 53 65 74 24 22 |et = Res|ultSet$"|
|00001d80| 5c 5c 6c 6f 63 61 74 69 | 6f 6e 5c 5c 22 24 4c 65 |\\locati|on\\"$Le|
|00001d90| 76 65 6c 2e 47 61 6d 65 | 2e 47 61 6d 65 52 65 70 |vel.Game|.GameRep|
|00001da0| 6c 69 63 61 74 69 6f 6e | 49 6e 66 6f 2e 52 65 67 |lication|Info.Reg|
|00001db0| 69 6f 6e 3b 0d 0a 09 0d | 0a 09 72 65 74 75 72 6e |ion;....|..return|
|00001dc0| 20 52 65 73 75 6c 74 53 | 65 74 3b 0d 0a 7d 0d 0a | ResultS|et;..}..|
|00001dd0| 0d 0a 2f 2f 20 52 65 74 | 75 72 6e 20 61 20 73 74 |..// Ret|urn a st|
|00001de0| 72 69 6e 67 20 6f 66 20 | 69 6d 70 6f 72 74 61 6e |ring of |importan|
|00001df0| 74 20 73 79 73 74 65 6d | 20 69 6e 66 6f 72 6d 61 |t system| informa|
|00001e00| 74 69 6f 6e 2e 0d 0a 66 | 75 6e 63 74 69 6f 6e 20 |tion...f|unction |
|00001e10| 73 74 72 69 6e 67 20 47 | 65 74 49 6e 66 6f 28 29 |string G|etInfo()|
|00001e20| 20 7b 0d 0a 09 6c 6f 63 | 61 6c 20 73 74 72 69 6e | {...loc|al strin|
|00001e30| 67 20 52 65 73 75 6c 74 | 53 65 74 3b 0d 0a 0d 0a |g Result|Set;....|
|00001e40| 09 2f 2f 20 54 68 65 20 | 73 65 72 76 65 72 20 6e |.// The |server n|
|00001e50| 61 6d 65 2c 20 69 2e 65 | 2e 3a 20 42 6f 62 27 73 |ame, i.e|.: Bob's|
|00001e60| 20 53 65 72 76 65 72 0d | 0a 09 52 65 73 75 6c 74 | Server.|..Result|
|00001e70| 53 65 74 20 3d 20 22 5c | 5c 68 6f 73 74 6e 61 6d |Set = "\|\hostnam|
|00001e80| 65 5c 5c 22 24 4c 65 76 | 65 6c 2e 47 61 6d 65 2e |e\\"$Lev|el.Game.|
|00001e90| 47 61 6d 65 52 65 70 6c | 69 63 61 74 69 6f 6e 49 |GameRepl|icationI|
|00001ea0| 6e 66 6f 2e 53 65 72 76 | 65 72 4e 61 6d 65 3b 0d |nfo.Serv|erName;.|
|00001eb0| 0a 0d 0a 09 2f 2f 20 54 | 68 65 20 73 68 6f 72 74 |....// T|he short|
|00001ec0| 20 73 65 72 76 65 72 20 | 6e 61 6d 65 0d 0a 09 2f | server |name.../|
|00001ed0| 2f 52 65 73 75 6c 74 53 | 65 74 20 3d 20 52 65 73 |/ResultS|et = Res|
|00001ee0| 75 6c 74 53 65 74 24 22 | 5c 5c 73 68 6f 72 74 6e |ultSet$"|\\shortn|
|00001ef0| 61 6d 65 5c 5c 22 24 4c | 65 76 65 6c 2e 47 61 6d |ame\\"$L|evel.Gam|
|00001f00| 65 2e 47 61 6d 65 52 65 | 70 6c 69 63 61 74 69 6f |e.GameRe|plicatio|
|00001f10| 6e 49 6e 66 6f 2e 53 68 | 6f 72 74 4e 61 6d 65 3b |nInfo.Sh|ortName;|
|00001f20| 0d 0a 0d 0a 09 2f 2f 20 | 54 68 65 20 73 65 72 76 |.....// |The serv|
|00001f30| 65 72 20 70 6f 72 74 2e | 0d 0a 09 52 65 73 75 6c |er port.|...Resul|
|00001f40| 74 53 65 74 20 3d 20 52 | 65 73 75 6c 74 53 65 74 |tSet = R|esultSet|
|00001f50| 24 22 5c 5c 68 6f 73 74 | 70 6f 72 74 5c 5c 22 24 |$"\\host|port\\"$|
|00001f60| 4c 65 76 65 6c 2e 47 61 | 6d 65 2e 47 65 74 53 65 |Level.Ga|me.GetSe|
|00001f70| 72 76 65 72 50 6f 72 74 | 28 29 3b 0d 0a 0d 0a 09 |rverPort|();.....|
|00001f80| 2f 2f 20 28 6f 70 74 69 | 6f 6e 61 6c 29 20 54 68 |// (opti|onal) Th|
|00001f90| 65 20 73 65 72 76 65 72 | 20 49 50 0d 0a 09 2f 2f |e server| IP...//|
|00001fa0| 20 69 66 20 28 53 65 72 | 76 65 72 49 50 20 21 3d | if (Ser|verIP !=|
|00001fb0| 20 22 22 29 0d 0a 09 2f | 2f 09 52 65 73 75 6c 74 | "").../|/.Result|
|00001fc0| 53 65 74 20 3d 20 52 65 | 73 75 6c 74 53 65 74 24 |Set = Re|sultSet$|
|00001fd0| 22 5c 5c 68 6f 73 74 69 | 70 5c 5c 22 24 53 65 72 |"\\hosti|p\\"$Ser|
|00001fe0| 76 65 72 49 50 3b 0d 0a | 0d 0a 09 2f 2f 20 54 68 |verIP;..|...// Th|
|00001ff0| 65 20 6d 61 70 2f 6c 65 | 76 65 6c 20 74 69 74 6c |e map/le|vel titl|
|00002000| 65 0d 0a 09 52 65 73 75 | 6c 74 53 65 74 20 3d 20 |e...Resu|ltSet = |
|00002010| 52 65 73 75 6c 74 53 65 | 74 24 22 5c 5c 6d 61 70 |ResultSe|t$"\\map|
|00002020| 74 69 74 6c 65 5c 5c 22 | 24 4c 65 76 65 6c 2e 54 |title\\"|$Level.T|
|00002030| 69 74 6c 65 3b 0d 0a 09 | 0d 0a 09 2f 2f 20 4d 61 |itle;...|...// Ma|
|00002040| 70 20 6e 61 6d 65 0d 0a | 09 52 65 73 75 6c 74 53 |p name..|.ResultS|
|00002050| 65 74 20 3d 20 52 65 73 | 75 6c 74 53 65 74 24 22 |et = Res|ultSet$"|
|00002060| 5c 5c 6d 61 70 6e 61 6d | 65 5c 5c 22 24 4c 65 66 |\\mapnam|e\\"$Lef|
|00002070| 74 28 73 74 72 69 6e 67 | 28 4c 65 76 65 6c 29 2c |t(string|(Level),|
|00002080| 20 49 6e 53 74 72 28 73 | 74 72 69 6e 67 28 4c 65 | InStr(s|tring(Le|
|00002090| 76 65 6c 29 2c 20 22 2e | 22 29 29 3b 0d 0a 0d 0a |vel), ".|"));....|
|000020a0| 09 2f 2f 20 54 68 65 20 | 6d 6f 64 20 6f 72 20 67 |.// The |mod or g|
|000020b0| 61 6d 65 20 74 79 70 65 | 0d 0a 09 52 65 73 75 6c |ame type|...Resul|
|000020c0| 74 53 65 74 20 3d 20 52 | 65 73 75 6c 74 53 65 74 |tSet = R|esultSet|
|000020d0| 24 22 5c 5c 67 61 6d 65 | 74 79 70 65 5c 5c 22 24 |$"\\game|type\\"$|
|000020e0| 47 65 74 49 74 65 6d 4e | 61 6d 65 28 73 74 72 69 |GetItemN|ame(stri|
|000020f0| 6e 67 28 4c 65 76 65 6c | 2e 47 61 6d 65 2e 43 6c |ng(Level|.Game.Cl|
|00002100| 61 73 73 29 29 3b 0d 0a | 0d 0a 09 2f 2f 20 54 68 |ass));..|...// Th|
|00002110| 65 20 6e 75 6d 62 65 72 | 20 6f 66 20 70 6c 61 79 |e number| of play|
|00002120| 65 72 73 0d 0a 09 52 65 | 73 75 6c 74 53 65 74 20 |ers...Re|sultSet |
|00002130| 3d 20 52 65 73 75 6c 74 | 53 65 74 24 22 5c 5c 6e |= Result|Set$"\\n|
|00002140| 75 6d 70 6c 61 79 65 72 | 73 5c 5c 22 24 4c 65 76 |umplayer|s\\"$Lev|
|00002150| 65 6c 2e 47 61 6d 65 2e | 4e 75 6d 50 6c 61 79 65 |el.Game.|NumPlaye|
|00002160| 72 73 3b 0d 0a 0d 0a 09 | 2f 2f 20 54 68 65 20 6d |rs;.....|// The m|
|00002170| 61 78 69 6d 75 6d 20 6e | 75 6d 62 65 72 20 6f 66 |aximum n|umber of|
|00002180| 20 70 6c 61 79 65 72 73 | 0d 0a 09 52 65 73 75 6c | players|...Resul|
|00002190| 74 53 65 74 20 3d 20 52 | 65 73 75 6c 74 53 65 74 |tSet = R|esultSet|
|000021a0| 24 22 5c 5c 6d 61 78 70 | 6c 61 79 65 72 73 5c 5c |$"\\maxp|layers\\|
|000021b0| 22 24 4c 65 76 65 6c 2e | 47 61 6d 65 2e 4d 61 78 |"$Level.|Game.Max|
|000021c0| 50 6c 61 79 65 72 73 3b | 0d 0a 0d 0a 09 2f 2f 20 |Players;|.....// |
|000021d0| 54 68 65 20 67 61 6d 65 | 20 6d 6f 64 65 3a 20 6f |The game| mode: o|
|000021e0| 70 65 6e 70 6c 61 79 69 | 6e 67 0d 0a 09 52 65 73 |penplayi|ng...Res|
|000021f0| 75 6c 74 53 65 74 20 3d | 20 52 65 73 75 6c 74 53 |ultSet =| ResultS|
|00002200| 65 74 24 22 5c 5c 67 61 | 6d 65 6d 6f 64 65 5c 5c |et$"\\ga|memode\\|
|00002210| 6f 70 65 6e 70 6c 61 79 | 69 6e 67 22 3b 0d 0a 0d |openplay|ing";...|
|00002220| 0a 09 2f 2f 20 54 68 65 | 20 76 65 72 73 69 6f 6e |..// The| version|
|00002230| 20 6f 66 20 74 68 69 73 | 20 67 61 6d 65 2e 0d 0a | of this| game...|
|00002240| 09 52 65 73 75 6c 74 53 | 65 74 20 3d 20 52 65 73 |.ResultS|et = Res|
|00002250| 75 6c 74 53 65 74 24 22 | 5c 5c 67 61 6d 65 76 65 |ultSet$"|\\gameve|
|00002260| 72 5c 5c 22 24 4c 65 76 | 65 6c 2e 45 6e 67 69 6e |r\\"$Lev|el.Engin|
|00002270| 65 56 65 72 73 69 6f 6e | 3b 0d 0a 0d 0a 09 2f 2f |eVersion|;.....//|
|00002280| 20 54 68 65 20 6d 6f 73 | 74 20 72 65 63 65 6e 74 | The mos|t recent|
|00002290| 20 6e 65 74 77 6f 72 6b | 20 63 6f 6d 70 61 74 69 | network| compati|
|000022a0| 62 6c 65 20 76 65 72 73 | 69 6f 6e 2e 0d 0a 09 69 |ble vers|ion....i|
|000022b0| 66 28 20 4d 69 6e 4e 65 | 74 56 65 72 20 3e 3d 20 |f( MinNe|tVer >= |
|000022c0| 49 6e 74 28 4c 65 76 65 | 6c 2e 4d 69 6e 4e 65 74 |Int(Leve|l.MinNet|
|000022d0| 56 65 72 73 69 6f 6e 29 | 20 26 26 20 0d 0a 09 09 |Version)| && ....|
|000022e0| 4d 69 6e 4e 65 74 56 65 | 72 20 3c 3d 20 49 6e 74 |MinNetVe|r <= Int|
|000022f0| 28 4c 65 76 65 6c 2e 45 | 6e 67 69 6e 65 56 65 72 |(Level.E|ngineVer|
|00002300| 73 69 6f 6e 29 20 29 0d | 0a 09 09 52 65 73 75 6c |sion) ).|...Resul|
|00002310| 74 53 65 74 20 3d 20 52 | 65 73 75 6c 74 53 65 74 |tSet = R|esultSet|
|00002320| 24 22 5c 5c 6d 69 6e 6e | 65 74 76 65 72 5c 5c 22 |$"\\minn|etver\\"|
|00002330| 24 73 74 72 69 6e 67 28 | 4d 69 6e 4e 65 74 56 65 |$string(|MinNetVe|
|00002340| 72 29 3b 0d 0a 09 65 6c | 73 65 0d 0a 09 09 52 65 |r);...el|se....Re|
|00002350| 73 75 6c 74 53 65 74 20 | 3d 20 52 65 73 75 6c 74 |sultSet |= Result|
|00002360| 53 65 74 24 22 5c 5c 6d | 69 6e 6e 65 74 76 65 72 |Set$"\\m|innetver|
|00002370| 5c 5c 22 24 4c 65 76 65 | 6c 2e 4d 69 6e 4e 65 74 |\\"$Leve|l.MinNet|
|00002380| 56 65 72 73 69 6f 6e 3b | 0d 0a 0d 0a 09 52 65 73 |Version;|.....Res|
|00002390| 75 6c 74 53 65 74 20 3d | 20 52 65 73 75 6c 74 53 |ultSet =| ResultS|
|000023a0| 65 74 24 4c 65 76 65 6c | 2e 47 61 6d 65 2e 47 65 |et$Level|.Game.Ge|
|000023b0| 74 49 6e 66 6f 28 29 3b | 0d 0a 0d 0a 09 72 65 74 |tInfo();|.....ret|
|000023c0| 75 72 6e 20 52 65 73 75 | 6c 74 53 65 74 3b 0d 0a |urn Resu|ltSet;..|
|000023d0| 7d 0d 0a 0d 0a 2f 2f 20 | 52 65 74 75 72 6e 20 61 |}....// |Return a|
|000023e0| 20 73 74 72 69 6e 67 20 | 6f 66 20 6d 69 73 63 65 | string |of misce|
|000023f0| 6c 6c 61 6e 65 6f 75 73 | 20 69 6e 66 6f 72 6d 61 |llaneous| informa|
|00002400| 74 69 6f 6e 2e 0d 0a 2f | 2f 20 47 61 6d 65 20 73 |tion.../|/ Game s|
|00002410| 70 65 63 69 66 69 63 20 | 69 6e 66 6f 72 6d 61 74 |pecific |informat|
|00002420| 69 6f 6e 2c 20 75 73 65 | 72 20 64 65 66 69 6e 65 |ion, use|r define|
|00002430| 64 20 64 61 74 61 2c 20 | 63 75 73 74 6f 6d 20 70 |d data, |custom p|
|00002440| 61 72 61 6d 65 74 65 72 | 73 20 66 6f 72 20 74 68 |arameter|s for th|
|00002450| 65 20 63 6f 6d 6d 61 6e | 64 20 6c 69 6e 65 2e 0d |e comman|d line..|
|00002460| 0a 66 75 6e 63 74 69 6f | 6e 20 73 74 72 69 6e 67 |.functio|n string|
|00002470| 20 47 65 74 52 75 6c 65 | 73 28 29 0d 0a 7b 0d 0a | GetRule|s()..{..|
|00002480| 09 6c 6f 63 61 6c 20 73 | 74 72 69 6e 67 20 52 65 |.local s|tring Re|
|00002490| 73 75 6c 74 53 65 74 3b | 0d 0a 0d 0a 09 52 65 73 |sultSet;|.....Res|
|000024a0| 75 6c 74 53 65 74 20 3d | 20 4c 65 76 65 6c 2e 47 |ultSet =| Level.G|
|000024b0| 61 6d 65 2e 47 65 74 52 | 75 6c 65 73 28 29 3b 0d |ame.GetR|ules();.|
|000024c0| 0a 0d 0a 09 2f 2f 20 41 | 64 6d 69 6e 27 73 20 4e |....// A|dmin's N|
|000024d0| 61 6d 65 0d 0a 09 69 66 | 28 20 4c 65 76 65 6c 2e |ame...if|( Level.|
|000024e0| 47 61 6d 65 2e 47 61 6d | 65 52 65 70 6c 69 63 61 |Game.Gam|eReplica|
|000024f0| 74 69 6f 6e 49 6e 66 6f | 2e 41 64 6d 69 6e 4e 61 |tionInfo|.AdminNa|
|00002500| 6d 65 20 21 3d 20 22 22 | 20 29 0d 0a 09 09 52 65 |me != ""| )....Re|
|00002510| 73 75 6c 74 53 65 74 20 | 3d 20 52 65 73 75 6c 74 |sultSet |= Result|
|00002520| 53 65 74 24 22 5c 5c 41 | 64 6d 69 6e 4e 61 6d 65 |Set$"\\A|dminName|
|00002530| 5c 5c 22 24 4c 65 76 65 | 6c 2e 47 61 6d 65 2e 47 |\\"$Leve|l.Game.G|
|00002540| 61 6d 65 52 65 70 6c 69 | 63 61 74 69 6f 6e 49 6e |ameRepli|cationIn|
|00002550| 66 6f 2e 41 64 6d 69 6e | 4e 61 6d 65 3b 0d 0a 09 |fo.Admin|Name;...|
|00002560| 0d 0a 09 2f 2f 20 41 64 | 6d 69 6e 27 73 20 45 6d |...// Ad|min's Em|
|00002570| 61 69 6c 0d 0a 09 69 66 | 28 20 4c 65 76 65 6c 2e |ail...if|( Level.|
|00002580| 47 61 6d 65 2e 47 61 6d | 65 52 65 70 6c 69 63 61 |Game.Gam|eReplica|
|00002590| 74 69 6f 6e 49 6e 66 6f | 2e 41 64 6d 69 6e 45 6d |tionInfo|.AdminEm|
|000025a0| 61 69 6c 20 21 3d 20 22 | 22 20 29 0d 0a 09 09 52 |ail != "|" )....R|
|000025b0| 65 73 75 6c 74 53 65 74 | 20 3d 20 52 65 73 75 6c |esultSet| = Resul|
|000025c0| 74 53 65 74 24 22 5c 5c | 41 64 6d 69 6e 45 4d 61 |tSet$"\\|AdminEMa|
|000025d0| 69 6c 5c 5c 22 24 4c 65 | 76 65 6c 2e 47 61 6d 65 |il\\"$Le|vel.Game|
|000025e0| 2e 47 61 6d 65 52 65 70 | 6c 69 63 61 74 69 6f 6e |.GameRep|lication|
|000025f0| 49 6e 66 6f 2e 41 64 6d | 69 6e 45 6d 61 69 6c 3b |Info.Adm|inEmail;|
|00002600| 0d 0a 0d 0a 09 72 65 74 | 75 72 6e 20 52 65 73 75 |.....ret|urn Resu|
|00002610| 6c 74 53 65 74 3b 0d 0a | 7d 0d 0a 0d 0a 2f 2f 20 |ltSet;..|}....// |
|00002620| 52 65 74 75 72 6e 20 61 | 20 73 74 72 69 6e 67 20 |Return a| string |
|00002630| 6f 66 20 69 6e 66 6f 72 | 6d 61 74 69 6f 6e 20 6f |of infor|mation o|
|00002640| 6e 20 61 20 70 6c 61 79 | 65 72 2e 0d 0a 66 75 6e |n a play|er...fun|
|00002650| 63 74 69 6f 6e 20 73 74 | 72 69 6e 67 20 47 65 74 |ction st|ring Get|
|00002660| 50 6c 61 79 65 72 28 20 | 50 6c 61 79 65 72 50 61 |Player( |PlayerPa|
|00002670| 77 6e 20 50 2c 20 69 6e | 74 20 50 6c 61 79 65 72 |wn P, in|t Player|
|00002680| 4e 75 6d 20 29 0d 0a 7b | 0d 0a 09 6c 6f 63 61 6c |Num )..{|...local|
|00002690| 20 73 74 72 69 6e 67 20 | 52 65 73 75 6c 74 53 65 | string |ResultSe|
|000026a0| 74 3b 0d 0a 09 6c 6f 63 | 61 6c 20 73 74 72 69 6e |t;...loc|al strin|
|000026b0| 67 20 53 6b 69 6e 4e 61 | 6d 65 3b 2f 2f 2c 20 46 |g SkinNa|me;//, F|
|000026c0| 61 63 65 4e 61 6d 65 3b | 0d 0a 0d 0a 09 2f 2f 20 |aceName;|.....// |
|000026d0| 4e 61 6d 65 0d 0a 09 52 | 65 73 75 6c 74 53 65 74 |Name...R|esultSet|
|000026e0| 20 3d 20 22 5c 5c 70 6c | 61 79 65 72 5f 22 24 50 | = "\\pl|ayer_"$P|
|000026f0| 6c 61 79 65 72 4e 75 6d | 24 22 5c 5c 22 24 50 2e |layerNum|$"\\"$P.|
|00002700| 50 6c 61 79 65 72 52 65 | 70 6c 69 63 61 74 69 6f |PlayerRe|plicatio|
|00002710| 6e 49 6e 66 6f 2e 50 6c | 61 79 65 72 4e 61 6d 65 |nInfo.Pl|ayerName|
|00002720| 3b 0d 0a 0d 0a 09 2f 2f | 20 46 72 61 67 73 0d 0a |;.....//| Frags..|
|00002730| 09 52 65 73 75 6c 74 53 | 65 74 20 3d 20 52 65 73 |.ResultS|et = Res|
|00002740| 75 6c 74 53 65 74 24 22 | 5c 5c 66 72 61 67 73 5f |ultSet$"|\\frags_|
|00002750| 22 24 50 6c 61 79 65 72 | 4e 75 6d 24 22 5c 5c 22 |"$Player|Num$"\\"|
|00002760| 24 69 6e 74 28 50 2e 50 | 6c 61 79 65 72 52 65 70 |$int(P.P|layerRep|
|00002770| 6c 69 63 61 74 69 6f 6e | 49 6e 66 6f 2e 53 63 6f |lication|Info.Sco|
|00002780| 72 65 29 3b 0d 0a 0d 0a | 09 2f 2f 20 50 69 6e 67 |re);....|.// Ping|
|00002790| 0d 0a 09 52 65 73 75 6c | 74 53 65 74 20 3d 20 52 |...Resul|tSet = R|
|000027a0| 65 73 75 6c 74 53 65 74 | 24 22 5c 5c 70 69 6e 67 |esultSet|$"\\ping|
|000027b0| 5f 22 24 50 6c 61 79 65 | 72 4e 75 6d 24 22 5c 5c |_"$Playe|rNum$"\\|
|000027c0| 22 24 50 2e 43 6f 6e 73 | 6f 6c 65 43 6f 6d 6d 61 |"$P.Cons|oleComma|
|000027d0| 6e 64 28 22 47 45 54 50 | 49 4e 47 22 29 3b 0d 0a |nd("GETP|ING");..|
|000027e0| 0d 0a 09 2f 2f 20 54 65 | 61 6d 0d 0a 09 52 65 73 |...// Te|am...Res|
|000027f0| 75 6c 74 53 65 74 20 3d | 20 52 65 73 75 6c 74 53 |ultSet =| ResultS|
|00002800| 65 74 24 22 5c 5c 74 65 | 61 6d 5f 22 24 50 6c 61 |et$"\\te|am_"$Pla|
|00002810| 79 65 72 4e 75 6d 24 22 | 5c 5c 22 24 50 2e 50 6c |yerNum$"|\\"$P.Pl|
|00002820| 61 79 65 72 52 65 70 6c | 69 63 61 74 69 6f 6e 49 |ayerRepl|icationI|
|00002830| 6e 66 6f 2e 54 65 61 6d | 3b 0d 0a 0d 0a 09 2f 2f |nfo.Team|;.....//|
|00002840| 20 43 6c 61 73 73 0d 0a | 09 52 65 73 75 6c 74 53 | Class..|.ResultS|
|00002850| 65 74 20 3d 20 52 65 73 | 75 6c 74 53 65 74 24 22 |et = Res|ultSet$"|
|00002860| 5c 5c 6d 65 73 68 5f 22 | 24 50 6c 61 79 65 72 4e |\\mesh_"|$PlayerN|
|00002870| 75 6d 24 22 5c 5c 22 24 | 50 2e 4d 65 6e 75 6e 61 |um$"\\"$|P.Menuna|
|00002880| 6d 65 3b 0d 0a 0d 0a 09 | 2f 2f 20 53 6b 69 6e 0d |me;.....|// Skin.|
|00002890| 0a 09 69 66 28 50 2e 53 | 6b 69 6e 20 3d 3d 20 4e |..if(P.S|kin == N|
|000028a0| 6f 6e 65 29 0d 0a 09 7b | 0d 0a 09 09 50 2e 73 74 |one)...{|....P.st|
|000028b0| 61 74 69 63 2e 47 65 74 | 4d 75 6c 74 69 53 6b 69 |atic.Get|MultiSki|
|000028c0| 6e 28 50 2c 20 53 6b 69 | 6e 4e 61 6d 65 29 3b 2f |n(P, Ski|nName);/|
|000028d0| 2f 2c 20 46 61 63 65 4e | 61 6d 65 29 3b 0d 0a 09 |/, FaceN|ame);...|
|000028e0| 09 52 65 73 75 6c 74 53 | 65 74 20 3d 20 52 65 73 |.ResultS|et = Res|
|000028f0| 75 6c 74 53 65 74 24 22 | 5c 5c 73 6b 69 6e 5f 22 |ultSet$"|\\skin_"|
|00002900| 24 50 6c 61 79 65 72 4e | 75 6d 24 22 5c 5c 22 24 |$PlayerN|um$"\\"$|
|00002910| 53 6b 69 6e 4e 61 6d 65 | 3b 0d 0a 09 09 2f 2f 52 |SkinName|;....//R|
|00002920| 65 73 75 6c 74 53 65 74 | 20 3d 20 52 65 73 75 6c |esultSet| = Resul|
|00002930| 74 53 65 74 24 22 5c 5c | 66 61 63 65 5f 22 24 50 |tSet$"\\|face_"$P|
|00002940| 6c 61 79 65 72 4e 75 6d | 24 22 5c 5c 22 24 46 61 |layerNum|$"\\"$Fa|
|00002950| 63 65 4e 61 6d 65 3b 0d | 0a 09 7d 0d 0a 09 65 6c |ceName;.|..}...el|
|00002960| 73 65 0d 0a 09 7b 0d 0a | 09 09 52 65 73 75 6c 74 |se...{..|..Result|
|00002970| 53 65 74 20 3d 20 52 65 | 73 75 6c 74 53 65 74 24 |Set = Re|sultSet$|
|00002980| 22 5c 5c 73 6b 69 6e 5f | 22 24 50 6c 61 79 65 72 |"\\skin_|"$Player|
|00002990| 4e 75 6d 24 22 5c 5c 22 | 24 73 74 72 69 6e 67 28 |Num$"\\"|$string(|
|000029a0| 50 2e 53 6b 69 6e 29 3b | 0d 0a 09 09 52 65 73 75 |P.Skin);|....Resu|
|000029b0| 6c 74 53 65 74 20 3d 20 | 52 65 73 75 6c 74 53 65 |ltSet = |ResultSe|
|000029c0| 74 24 22 5c 5c 66 61 63 | 65 5f 22 24 50 6c 61 79 |t$"\\fac|e_"$Play|
|000029d0| 65 72 4e 75 6d 24 22 5c | 5c 4e 6f 6e 65 22 3b 0d |erNum$"\|\None";.|
|000029e0| 0a 09 7d 0d 0a 09 69 66 | 28 20 50 2e 50 6c 61 79 |..}...if|( P.Play|
|000029f0| 65 72 52 65 70 6c 69 63 | 61 74 69 6f 6e 49 6e 66 |erReplic|ationInf|
|00002a00| 6f 2e 62 49 73 41 42 6f | 74 20 29 0d 0a 09 09 52 |o.bIsABo|t )....R|
|00002a10| 65 73 75 6c 74 53 65 74 | 20 3d 20 52 65 73 75 6c |esultSet| = Resul|
|00002a20| 74 53 65 74 24 22 5c 5c | 6e 67 73 65 63 72 65 74 |tSet$"\\|ngsecret|
|00002a30| 5f 22 24 50 6c 61 79 65 | 72 4e 75 6d 24 22 5c 5c |_"$Playe|rNum$"\\|
|00002a40| 62 6f 74 22 3b 0d 0a 09 | 65 6c 73 65 0d 0a 09 69 |bot";...|else...i|
|00002a50| 66 28 20 50 2e 52 65 63 | 65 69 76 65 64 53 65 63 |f( P.Rec|eivedSec|
|00002a60| 72 65 74 43 68 65 63 6b | 73 75 6d 20 29 0d 0a 09 |retCheck|sum )...|
|00002a70| 09 52 65 73 75 6c 74 53 | 65 74 20 3d 20 52 65 73 |.ResultS|et = Res|
|00002a80| 75 6c 74 53 65 74 24 22 | 5c 5c 6e 67 73 65 63 72 |ultSet$"|\\ngsecr|
|00002a90| 65 74 5f 22 24 50 6c 61 | 79 65 72 4e 75 6d 24 22 |et_"$Pla|yerNum$"|
|00002aa0| 5c 5c 74 72 75 65 22 3b | 0d 0a 09 65 6c 73 65 0d |\\true";|...else.|
|00002ab0| 0a 09 09 52 65 73 75 6c | 74 53 65 74 20 3d 20 52 |...Resul|tSet = R|
|00002ac0| 65 73 75 6c 74 53 65 74 | 24 22 5c 5c 6e 67 73 65 |esultSet|$"\\ngse|
|00002ad0| 63 72 65 74 5f 22 24 50 | 6c 61 79 65 72 4e 75 6d |cret_"$P|layerNum|
|00002ae0| 24 22 5c 5c 66 61 6c 73 | 65 22 3b 0d 0a 09 72 65 |$"\\fals|e";...re|
|00002af0| 74 75 72 6e 20 52 65 73 | 75 6c 74 53 65 74 3b 0d |turn Res|ultSet;.|
|00002b00| 0a 7d 0d 0a 0d 0a 2f 2f | 20 53 65 6e 64 20 64 61 |.}....//| Send da|
|00002b10| 74 61 20 66 6f 72 20 65 | 61 63 68 20 70 6c 61 79 |ta for e|ach play|
|00002b20| 65 72 0d 0a 66 75 6e 63 | 74 69 6f 6e 20 62 6f 6f |er..func|tion boo|
|00002b30| 6c 20 53 65 6e 64 50 6c | 61 79 65 72 73 28 49 70 |l SendPl|ayers(Ip|
|00002b40| 41 64 64 72 20 41 64 64 | 72 2c 20 69 6e 74 20 51 |Addr Add|r, int Q|
|00002b50| 75 65 72 79 4e 75 6d 2c | 20 6f 75 74 20 69 6e 74 |ueryNum,| out int|
|00002b60| 20 50 61 63 6b 65 74 4e | 75 6d 2c 20 69 6e 74 20 | PacketN|um, int |
|00002b70| 62 46 69 6e 61 6c 50 61 | 63 6b 65 74 29 0d 0a 7b |bFinalPa|cket)..{|
|00002b80| 0d 0a 09 6c 6f 63 61 6c | 20 50 61 77 6e 20 50 3b |...local| Pawn P;|
|00002b90| 0d 0a 09 6c 6f 63 61 6c | 20 69 6e 74 20 69 3b 0d |...local| int i;.|
|00002ba0| 0a 09 6c 6f 63 61 6c 20 | 62 6f 6f 6c 20 52 65 73 |..local |bool Res|
|00002bb0| 75 6c 74 2c 20 53 65 6e | 64 52 65 73 75 6c 74 3b |ult, Sen|dResult;|
|00002bc0| 0d 0a 09 0d 0a 09 52 65 | 73 75 6c 74 20 3d 20 66 |......Re|sult = f|
|00002bd0| 61 6c 73 65 3b 0d 0a 0d | 0a 09 50 20 3d 20 4c 65 |alse;...|..P = Le|
|00002be0| 76 65 6c 2e 50 61 77 6e | 4c 69 73 74 3b 0d 0a 09 |vel.Pawn|List;...|
|00002bf0| 77 68 69 6c 65 28 20 69 | 20 3c 20 4c 65 76 65 6c |while( i| < Level|
|00002c00| 2e 47 61 6d 65 2e 4e 75 | 6d 50 6c 61 79 65 72 73 |.Game.Nu|mPlayers|
|00002c10| 20 29 0d 0a 09 7b 0d 0a | 09 09 69 66 20 28 50 2e | )...{..|..if (P.|
|00002c20| 49 73 41 28 27 50 6c 61 | 79 65 72 50 61 77 6e 27 |IsA('Pla|yerPawn'|
|00002c30| 29 29 0d 0a 09 09 7b 0d | 0a 09 09 09 69 66 28 20 |))....{.|....if( |
|00002c40| 69 3d 3d 4c 65 76 65 6c | 2e 47 61 6d 65 2e 4e 75 |i==Level|.Game.Nu|
|00002c50| 6d 50 6c 61 79 65 72 73 | 2d 31 20 26 26 20 62 46 |mPlayers|-1 && bF|
|00002c60| 69 6e 61 6c 50 61 63 6b | 65 74 3d 3d 31 29 0d 0a |inalPack|et==1)..|
|00002c70| 09 09 09 09 53 65 6e 64 | 52 65 73 75 6c 74 20 3d |....Send|Result =|
|00002c80| 20 53 65 6e 64 51 75 65 | 72 79 50 61 63 6b 65 74 | SendQue|ryPacket|
|00002c90| 28 41 64 64 72 2c 20 47 | 65 74 50 6c 61 79 65 72 |(Addr, G|etPlayer|
|00002ca0| 28 50 6c 61 79 65 72 50 | 61 77 6e 28 50 29 2c 20 |(PlayerP|awn(P), |
|00002cb0| 69 29 2c 20 51 75 65 72 | 79 4e 75 6d 2c 20 50 61 |i), Quer|yNum, Pa|
|00002cc0| 63 6b 65 74 4e 75 6d 2c | 20 31 29 3b 0d 0a 09 09 |cketNum,| 1);....|
|00002cd0| 09 65 6c 73 65 0d 0a 09 | 09 09 09 53 65 6e 64 52 |.else...|...SendR|
|00002ce0| 65 73 75 6c 74 20 3d 20 | 53 65 6e 64 51 75 65 72 |esult = |SendQuer|
|00002cf0| 79 50 61 63 6b 65 74 28 | 41 64 64 72 2c 20 47 65 |yPacket(|Addr, Ge|
|00002d00| 74 50 6c 61 79 65 72 28 | 50 6c 61 79 65 72 50 61 |tPlayer(|PlayerPa|
|00002d10| 77 6e 28 50 29 2c 20 69 | 29 2c 20 51 75 65 72 79 |wn(P), i|), Query|
|00002d20| 4e 75 6d 2c 20 50 61 63 | 6b 65 74 4e 75 6d 2c 20 |Num, Pac|ketNum, |
|00002d30| 30 29 3b 0d 0a 09 09 09 | 52 65 73 75 6c 74 20 3d |0);.....|Result =|
|00002d40| 20 53 65 6e 64 52 65 73 | 75 6c 74 20 7c 7c 20 52 | SendRes|ult || R|
|00002d50| 65 73 75 6c 74 3b 0d 0a | 09 09 09 69 2b 2b 3b 0d |esult;..|...i++;.|
|00002d60| 0a 09 09 7d 0d 0a 09 09 | 50 20 3d 20 50 2e 6e 65 |...}....|P = P.ne|
|00002d70| 78 74 50 61 77 6e 3b 0d | 0a 09 7d 0d 0a 0d 0a 09 |xtPawn;.|..}.....|
|00002d80| 72 65 74 75 72 6e 20 52 | 65 73 75 6c 74 3b 0d 0a |return R|esult;..|
|00002d90| 7d 0d 0a 0d 0a 2f 2f 20 | 47 65 74 20 61 6e 20 61 |}....// |Get an a|
|00002da0| 72 62 69 74 72 61 72 79 | 20 70 72 6f 70 65 72 74 |rbitrary| propert|
|00002db0| 79 20 66 72 6f 6d 20 74 | 68 65 20 6c 65 76 65 6c |y from t|he level|
|00002dc0| 20 6f 62 6a 65 63 74 2e | 0d 0a 66 75 6e 63 74 69 | object.|..functi|
|00002dd0| 6f 6e 20 73 74 72 69 6e | 67 20 47 65 74 4c 65 76 |on strin|g GetLev|
|00002de0| 65 6c 50 72 6f 70 65 72 | 74 79 28 20 73 74 72 69 |elProper|ty( stri|
|00002df0| 6e 67 20 50 72 6f 70 20 | 29 0d 0a 7b 0d 0a 09 6c |ng Prop |)..{...l|
|00002e00| 6f 63 61 6c 20 73 74 72 | 69 6e 67 20 52 65 73 75 |ocal str|ing Resu|
|00002e10| 6c 74 53 65 74 3b 0d 0a | 09 0d 0a 09 52 65 73 75 |ltSet;..|....Resu|
|00002e20| 6c 74 53 65 74 20 3d 20 | 22 5c 5c 22 24 50 72 6f |ltSet = |"\\"$Pro|
|00002e30| 70 24 22 5c 5c 22 24 4c | 65 76 65 6c 2e 47 65 74 |p$"\\"$L|evel.Get|
|00002e40| 50 72 6f 70 65 72 74 79 | 54 65 78 74 28 50 72 6f |Property|Text(Pro|
|00002e50| 70 29 3b 0d 0a 09 0d 0a | 09 72 65 74 75 72 6e 20 |p);.....|.return |
|00002e60| 52 65 73 75 6c 74 53 65 | 74 3b 0d 0a 7d 0d 0a 0d |ResultSe|t;..}...|
|00002e70| 0a 2f 2f 20 47 65 74 20 | 61 6e 20 61 72 62 69 74 |.// Get |an arbit|
|00002e80| 72 61 72 79 20 70 72 6f | 70 65 72 74 79 20 66 72 |rary pro|perty fr|
|00002e90| 6f 6d 20 74 68 65 20 67 | 61 6d 65 20 6f 62 6a 65 |om the g|ame obje|
|00002ea0| 63 74 2e 0d 0a 66 75 6e | 63 74 69 6f 6e 20 73 74 |ct...fun|ction st|
|00002eb0| 72 69 6e 67 20 47 65 74 | 47 61 6d 65 50 72 6f 70 |ring Get|GameProp|
|00002ec0| 65 72 74 79 28 20 73 74 | 72 69 6e 67 20 50 72 6f |erty( st|ring Pro|
|00002ed0| 70 20 29 0d 0a 7b 0d 0a | 09 6c 6f 63 61 6c 20 73 |p )..{..|.local s|
|00002ee0| 74 72 69 6e 67 20 52 65 | 73 75 6c 74 53 65 74 3b |tring Re|sultSet;|
|00002ef0| 0d 0a 0d 0a 09 52 65 73 | 75 6c 74 53 65 74 20 3d |.....Res|ultSet =|
|00002f00| 20 22 5c 5c 22 24 50 72 | 6f 70 24 22 5c 5c 22 24 | "\\"$Pr|op$"\\"$|
|00002f10| 4c 65 76 65 6c 2e 47 61 | 6d 65 2e 47 65 74 50 72 |Level.Ga|me.GetPr|
|00002f20| 6f 70 65 72 74 79 54 65 | 78 74 28 50 72 6f 70 29 |opertyTe|xt(Prop)|
|00002f30| 3b 0d 0a 09 0d 0a 09 72 | 65 74 75 72 6e 20 52 65 |;......r|eturn Re|
|00002f40| 73 75 6c 74 53 65 74 3b | 0d 0a 7d 0d 0a 0d 0a 2f |sultSet;|..}..../|
|00002f50| 2f 20 47 65 74 20 61 6e | 20 61 72 62 69 74 72 61 |/ Get an| arbitra|
|00002f60| 72 79 20 70 72 6f 70 65 | 72 74 79 20 66 72 6f 6d |ry prope|rty from|
|00002f70| 20 74 68 65 20 70 6c 61 | 79 65 72 73 2e 0d 0a 66 | the pla|yers...f|
|00002f80| 75 6e 63 74 69 6f 6e 20 | 73 74 72 69 6e 67 20 47 |unction |string G|
|00002f90| 65 74 50 6c 61 79 65 72 | 50 72 6f 70 65 72 74 79 |etPlayer|Property|
|00002fa0| 28 20 73 74 72 69 6e 67 | 20 50 72 6f 70 20 29 0d |( string| Prop ).|
|00002fb0| 0a 7b 0d 0a 09 6c 6f 63 | 61 6c 20 73 74 72 69 6e |.{...loc|al strin|
|00002fc0| 67 20 52 65 73 75 6c 74 | 53 65 74 3b 0d 0a 09 6c |g Result|Set;...l|
|00002fd0| 6f 63 61 6c 20 69 6e 74 | 20 69 3b 0d 0a 09 6c 6f |ocal int| i;...lo|
|00002fe0| 63 61 6c 20 50 6c 61 79 | 65 72 50 61 77 6e 20 50 |cal Play|erPawn P|
|00002ff0| 3b 0d 0a 0d 0a 09 66 6f | 72 65 61 63 68 20 41 6c |;.....fo|reach Al|
|00003000| 6c 41 63 74 6f 72 73 28 | 63 6c 61 73 73 27 50 6c |lActors(|class'Pl|
|00003010| 61 79 65 72 50 61 77 6e | 27 2c 20 50 29 20 7b 0d |ayerPawn|', P) {.|
|00003020| 0a 09 09 69 2b 2b 3b 0d | 0a 09 09 52 65 73 75 6c |...i++;.|...Resul|
|00003030| 74 53 65 74 20 3d 20 52 | 65 73 75 6c 74 53 65 74 |tSet = R|esultSet|
|00003040| 24 22 5c 5c 22 24 50 72 | 6f 70 24 22 5f 22 24 69 |$"\\"$Pr|op$"_"$i|
|00003050| 24 22 5c 5c 22 24 50 2e | 47 65 74 50 72 6f 70 65 |$"\\"$P.|GetPrope|
|00003060| 72 74 79 54 65 78 74 28 | 50 72 6f 70 29 3b 0d 0a |rtyText(|Prop);..|
|00003070| 09 7d 0d 0a 09 0d 0a 09 | 72 65 74 75 72 6e 20 52 |.}......|return R|
|00003080| 65 73 75 6c 74 53 65 74 | 3b 0d 0a 7d 0d 0a 0d 0a |esultSet|;..}....|
|00003090| 00 | |. | |
+--------+-------------------------+-------------------------+--------+--------+