E:\gry\pol\pvp097\pkg\systems\spawnpoint\spawnpointcontrol.src, Line 13 Program spawnpointcontrol( spawnpoint ) const VITALID_STAMINA := "Stamina"; 0: get arg 'spawnpoint' var spawn := GetObjProperty(spawnpoint, "Spawn"); 1: decl local #1 2: local #0 3: "Spawn" 4: Func(2,1): GetObjProperty 5: := 6: # var amount := GetObjProperty(spawnpoint, "Amount"); 7: decl local #2 8: local #0 9: "Amount" 10: Func(2,1): GetObjProperty 11: := 12: # var i, x; 13: decl local #3 14: # 15: decl local #4 16: # var spawnqueue := {}; 17: decl local #5 18: array 19: := 20: # var children := {}; 21: decl local #6 22: array 23: := 24: # spawn := GetObjProperty(spawnpoint, "Spawn"); 25: local #0 26: "Spawn" 27: Func(2,1): GetObjProperty 28: local1 := while(spawn == "NONE") 29: local #1 30: "NONE" 31: == 32: if false goto 41 sleep(10); 33: 10L 34: Func(3,1): Sleep 35: # spawn := GetObjProperty(spawnpoint, "Spawn"); 36: local #0 37: "Spawn" 38: Func(2,1): GetObjProperty 39: local1 := 40: goto29 i := RandomInt(20); 41: 20L 42: Func(4,0): RandomInt 43: local3 := sleep(i); 44: local #3 45: Func(3,1): Sleep 46: # while(1) 47: 1L 48: if false goto 232 var resetme := GetObjProperty(spawnpoint, "ResetMe"); 49: decl local #0 50: local #0 51: "ResetMe" 52: Func(2,1): GetObjProperty 53: := 54: # if(resetme) 55: local #7 56: if false goto 73 amount := GetObjProperty(spawnpoint, "Amount"); 57: local #0 58: "Amount" 59: Func(2,1): GetObjProperty 60: local2 := KillChildren(spawnpoint); 61: local #0 62: makelocal 63: jmp userfunc @381 64: # ResetSpawnQueue(spawnpoint); 65: local #0 66: makelocal 67: jmp userfunc @473 68: # EraseObjProperty(spawnpoint, "ResetMe"); 69: local #0 70: "ResetMe" 71: Func(2,2): EraseObjProperty 72: # spawn := GetObjProperty(spawnpoint, "Spawn"); 73: local #0 74: "Spawn" 75: Func(2,1): GetObjProperty 76: local1 := while(spawn == "NONE") 77: local #1 78: "NONE" 79: == 80: if false goto 89 sleep(10); 81: 10L 82: Func(3,1): Sleep 83: # spawn := GetObjProperty(spawnpoint, "Spawn"); 84: local #0 85: "Spawn" 86: Func(2,1): GetObjProperty 87: local1 := 88: goto77 children := GetObjProperty(spawnpoint, "Children"); 89: local #0 90: "Children" 91: Func(2,1): GetObjProperty 92: local6 := spawnqueue := GetObjProperty(spawnpoint, "SpawnQueue"); 93: local #0 94: "SpawnQueue" 95: Func(2,1): GetObjProperty 96: local5 := for(i:=1; i<=amount; i:=i+1); 97: local #3 98: 1L 99: := 100: # 101: local #3 102: local #2 103: <= 104: if false goto 145 if(children[i] != "Empty") 105: local #6 106: local #3 107: [] 1 108: "Empty" 109: <> 110: if false goto 138 x := SystemFindObjectBySerial(children[i]); 111: local #6 112: local #3 113: [] 1 114: 0L 115: Func(2,3): SystemFindObjectBySerial 116: local4 := if((!x) || (x.dead == 1) || (x.script=="tamed")) 117: local #4 118: ! 119: local #4 120: get member id 'dead' (39) 121: 1L 122: == 123: || 124: local #4 125: get member id 'script' (61) 126: "tamed" 127: == 128: || 129: if false goto 138 spawnqueue[i] := "Empty"; 130: local #5 131: local #3 132: "Empty" 133: [] := (1) # children[i] := "Empty"; 134: local #6 135: local #3 136: "Empty" 137: [] := (1) # 138: local #3 139: local #3 140: 1L 141: + 142: := 143: # 144: goto101 SetObjProperty(spawnpoint, "Children", children); 145: local #0 146: "Children" 147: local #6 148: Func(2,0): SetObjProperty 149: # SetObjProperty(spawnpoint, "SpawnQueue", spawnqueue); 150: local #0 151: "SpawnQueue" 152: local #5 153: Func(2,0): SetObjProperty 154: # ResetSpawnQueue(spawnpoint); 155: local #0 156: makelocal 157: jmp userfunc @473 158: # spawnqueue := GetObjProperty(spawnpoint, "SpawnQueue"); 159: local #0 160: "SpawnQueue" 161: Func(2,1): GetObjProperty 162: local5 := for(i:=1; i<=amount; i:=i+1) 163: local #3 164: 1L 165: := 166: # 167: local #3 168: local #2 169: <= 170: if false goto 211 x := spawnqueue[i]; 171: local #5 172: local #3 173: [] 1 174: local4 := if((x != "Empty") && (x != "Active")) 175: local #4 176: "Empty" 177: <> 178: local #4 179: "Active" 180: <> 181: && 182: if false goto 204 if(x == 0) 183: local #4 184: 0L 185: == 186: if false goto 198 children[i] := CreateSpawn(spawnpoint); 187: local #6 188: local #3 189: local #0 190: makelocal 191: jmp userfunc @234 192: [] := (1) # spawnqueue[i] := "Active"; 193: local #5 194: local #3 195: "Active" 196: [] := (1) # 197: goto204 spawnqueue[i] := x - 1; 198: local #5 199: local #3 200: local #4 201: 1L 202: - 203: [] := (1) # 204: local #3 205: local #3 206: 1L 207: + 208: := 209: # 210: goto167 SetObjProperty(spawnpoint, "SpawnQueue", spawnqueue); 211: local #0 212: "SpawnQueue" 213: local #5 214: Func(2,0): SetObjProperty 215: # SetObjProperty(spawnpoint, "Children", children); 216: local #0 217: "Children" 218: local #6 219: Func(2,0): SetObjProperty 220: # If( !spawnpoint.invisible ) 221: local #0 222: get member id 'invisible' (21) 223: if true goto 227 spawnpoint.invisible := 1; 224: local #0 225: 1L 226: set member id 'invisible' (21) # sleep(60); 227: 60L 228: Func(3,1): Sleep 229: # 230: leave block(1) 231: goto47 232: leave block(7) 233: progend E:\gry\pol\pvp097\pkg\systems\spawnpoint\spawnpointcontrol.src, Line 118 function CreateSpawn(spawnpoint) 234: pop param 'spawnpoint' var loscheck := GetObjProperty(spawnpoint, "IgnoreLOS"); 235: decl local #1 236: local #0 237: "IgnoreLOS" 238: Func(2,1): GetObjProperty 239: := 240: # var spawn := GetObjProperty(spawnpoint, "Spawn"); 241: decl local #2 242: local #0 243: "Spawn" 244: Func(2,1): GetObjProperty 245: := 246: # var range := GetObjProperty(spawnpoint, "Range"); 247: decl local #3 248: local #0 249: "Range" 250: Func(2,1): GetObjProperty 251: := 252: # var x, y, z, success := 0; 253: decl local #4 254: # 255: decl local #5 256: # 257: decl local #6 258: # 259: decl local #7 260: 0L 261: := 262: # var i := 1; 263: decl local #8 264: 1L 265: := 266: # while(success == 0) 267: local #7 268: 0L 269: == 270: if false goto 379 if(range == 0) 271: local #3 272: 0L 273: == 274: if false goto 285 x := spawnpoint.x; 275: local #0 276: get member id 'x' (0) 277: local4 := y := spawnpoint.y; 278: local #0 279: get member id 'y' (1) 280: local5 := z := spawnpoint.z; 281: local #0 282: get member id 'z' (2) 283: local6 := 284: goto310 x := spawnpoint.x + RandomInt(2 * range) - range; 285: local #0 286: get member id 'x' (0) 287: 2L 288: local #3 289: * 290: Func(4,0): RandomInt 291: + 292: local #3 293: - 294: local4 := y := spawnpoint.y + RandomInt(2 * range) - range; 295: local #0 296: get member id 'y' (1) 297: 2L 298: local #3 299: * 300: Func(4,0): RandomInt 301: + 302: local #3 303: - 304: local5 := z := GetWorldHeight(x, y); 305: local #4 306: local #5 307: "britannia" 308: Func(2,5): GetWorldHeight 309: local6 := if(!loscheck) 310: local #1 311: if true goto 335 if(CheckLosAt(spawnpoint, x, y, z)) 312: local #0 313: local #4 314: local #5 315: local #6 316: Func(2,6): CheckLosAt 317: if false goto 334 var i := CreateNpcFromTemplate(spawn, x, y, z); 318: decl local #0 319: local #2 320: local #4 321: local #5 322: local #6 323: 0L 324: "britannia" 325: Func(2,7): CreateNpcFromTemplate 326: := 327: # success := 1; 328: 1L 329: local7 := return i.serial; 330: local #9 331: get member id 'serial' (6) 332: return 333: leave block(1) 334: goto351 var i := CreateNpcFromTemplate(spawn, x, y, z); 335: decl local #0 336: local #2 337: local #4 338: local #5 339: local #6 340: 0L 341: "britannia" 342: Func(2,7): CreateNpcFromTemplate 343: := 344: # success := 1; 345: 1L 346: local7 := return i.serial; 347: local #9 348: get member id 'serial' (6) 349: return 350: leave block(1) i := i + 1; 351: local #8 352: 1L 353: + 354: local8 := if(i > 10) 355: local #8 356: 10L 357: > 358: if false goto 378 var i := CreateNpcFromTemplate(spawn, spawnpoint.x, spawnpoint.y, spawnpoint.z) 359: decl local #0 360: local #2 361: local #0 362: get member id 'x' (0) 363: local #0 364: get member id 'y' (1) 365: local #0 366: get member id 'z' (2) 367: 0L 368: "britannia" 369: Func(2,7): CreateNpcFromTemplate 370: := 371: # success := 1; 372: 1L 373: local7 := return i.serial; 374: local #9 375: get member id 'serial' (6) 376: return 377: leave block(1) 378: goto267 379: 0L 380: return E:\gry\pol\pvp097\pkg\systems\spawnpoint\spawnpointcontrol.src, Line 75 function KillChildren(spawnpoint) 381: pop param 'spawnpoint' var i, x; 382: decl local #1 383: # 384: decl local #2 385: # var children := GetObjProperty(spawnpoint, "Children"); 386: decl local #3 387: local #0 388: "Children" 389: Func(2,1): GetObjProperty 390: := 391: # if(children) 392: local #3 393: if false goto 426 foreach x in children 394: local #3 395: initforeach @424 if(x != "Empty") 396: local #4 397: "Empty" 398: <> 399: if false goto 424 x := CInt(x); 400: local #4 401: Func(0,0): CInt 402: local4 := i := SystemFindObjectBySerial(x); 403: local #4 404: 0L 405: Func(2,3): SystemFindObjectBySerial 406: local1 := RevokePrivilege( i, "invul" ); 407: local #1 408: "invul" 409: Func(2,4): RevokePrivilege 410: # SetObjProperty( i, "guardkill", 1); 411: local #1 412: "guardkill" 413: 1L 414: Func(2,0): SetObjProperty 415: # ApplyRawDamage( i, GetHp( i ) + 100 ); 416: local #1 417: local #1 418: makelocal 419: jmp userfunc @548 420: 100L 421: + 422: Func(6,5): ApplyRawDamage 423: # 424: stepforeach @396 425: leave block(3) var amount := GetObjProperty(spawnpoint, "Amount"); 426: decl local #4 427: local #0 428: "Amount" 429: Func(2,1): GetObjProperty 430: := 431: # var spawnqueue := {}; 432: decl local #5 433: array 434: := 435: # children := {}; 436: array 437: local3 := for(i:=1; i<=amount; i:=i+1); 438: local #1 439: 1L 440: := 441: # 442: local #1 443: local #4 444: <= 445: if false goto 461 spawnqueue[i] := "Empty"; 446: local #5 447: local #1 448: "Empty" 449: [] := (1) # children[i] := "Empty"; 450: local #3 451: local #1 452: "Empty" 453: [] := (1) # 454: local #1 455: local #1 456: 1L 457: + 458: := 459: # 460: goto442 SetObjProperty(spawnpoint, "Children", children); 461: local #0 462: "Children" 463: local #3 464: Func(2,0): SetObjProperty 465: # SetObjProperty(spawnpoint, "SpawnQueue", spawnqueue); 466: local #0 467: "SpawnQueue" 468: local #5 469: Func(2,0): SetObjProperty 470: # 471: 0L 472: return E:\gry\pol\pvp097\pkg\systems\spawnpoint\spawnpointcontrol.src, Line 100 function ResetSpawnQueue(spawnpoint) 473: pop param 'spawnpoint' var i; 474: decl local #1 475: # var amount := GetObjProperty(spawnpoint, "Amount"); 476: decl local #2 477: local #0 478: "Amount" 479: Func(2,1): GetObjProperty 480: := 481: # var mindelay := GetObjProperty(spawnpoint, "MinDelay"); 482: decl local #3 483: local #0 484: "MinDelay" 485: Func(2,1): GetObjProperty 486: := 487: # var maxdelay := GetObjProperty(spawnpoint, "MaxDelay"); 488: decl local #4 489: local #0 490: "MaxDelay" 491: Func(2,1): GetObjProperty 492: := 493: # var spawnqueue := GetObjProperty(spawnpoint, "SpawnQueue"); 494: decl local #5 495: local #0 496: "SpawnQueue" 497: Func(2,1): GetObjProperty 498: := 499: # for(i:=1; i<=amount; i:=i+1) 500: local #1 501: 1L 502: := 503: # 504: local #1 505: local #2 506: <= 507: if false goto 541 if(spawnqueue[i] == "Empty") 508: local #5 509: local #1 510: [] 1 511: "Empty" 512: == 513: if false goto 534 if(mindelay == maxdelay) 514: local #3 515: local #4 516: == 517: if false goto 523 spawnqueue[i] := mindelay; 518: local #5 519: local #1 520: local #3 521: [] := (1) # 522: goto534 spawnqueue[i] := RandomInt(maxdelay - mindelay) + mindelay + 1; 523: local #5 524: local #1 525: local #4 526: local #3 527: - 528: Func(4,0): RandomInt 529: local #3 530: + 531: 1L 532: + 533: [] := (1) # 534: local #1 535: local #1 536: 1L 537: + 538: := 539: # 540: goto504 SetObjProperty(spawnpoint, "SpawnQueue", spawnqueue); 541: local #0 542: "SpawnQueue" 543: local #5 544: Func(2,0): SetObjProperty 545: # 546: 0L 547: return e:/gry/pol/pvp097/scripts/include/attributes.inc, Line 324 function GetHp(who) 548: pop param 'who' return Cint(GetVital(who, VITALID_LIFE)/ 100); 549: local #0 550: "Life" 551: Func(6,1): GetVital 552: 100L 553: / 554: Func(0,0): CInt 555: return