E:\gry\pol\pvp097\scripts\ai\spellKillPCs.src, Line 8 var me := Self(); 0: decl global #0 1: Func(3,0): Self 2: := 3: # E:\gry\pol\pvp097\scripts\ai\include/eventy.inc, Line 4 var next_cast := ReadGameClock() + 5; // co ile bedzie czarowac 4: decl global #1 5: Func(2,3): ReadGameClock 6: 5L 7: + 8: := 9: # var next_wander := ReadGameClock() + 10; 10: decl global #2 11: Func(2,3): ReadGameClock 12: 10L 13: + 14: := 15: # var wanders := 0; 16: decl global #3 17: 0L 18: := 19: # var npccfgfile := ReadConfigFile( "npcdesc" ); 20: decl global #4 21: "npcdesc" 22: Func(6,0): ReadConfigFile 23: := 24: # var idlesnd1 := CInt(npccfgfile[me.npctemplate].idlesound1); 25: decl global #5 26: global #4 27: global #0 28: get member id 'npctemplate' (62) 29: [] 1 30: get member 'idlesound1' 31: Func(0,0): CInt 32: := 33: # var idlesnd2 := CInt(npccfgfile[me.npctemplate].idlesound2); 34: decl global #6 35: global #4 36: global #0 37: get member id 'npctemplate' (62) 38: [] 1 39: get member 'idlesound2' 40: Func(0,0): CInt 41: := 42: # E:\gry\pol\pvp097\scripts\ai\include/spellsetup.inc, Line 1 var spells := GetNpcSpells(); 43: decl global #7 44: makelocal 45: jmp userfunc @188 46: := 47: # E:\gry\pol\pvp097\scripts\ai\spellKillPCs.src, Line 17 var ev; 48: decl global #8 49: # E:\gry\pol\pvp097\scripts\ai\spellKillPCs.src, Line 27 program spellkill_ai() start_script("::NPCKeeper", me); 50: "::NPCKeeper" 51: global #0 52: Func(4,3): Start_Script 53: # EnableEvents(SYSEVENT_ENGAGED); 54: 2L 55: -1L 56: Func(2,21): EnableEvents 57: # EnableEvents(SYSEVENT_DAMAGED); 58: 8L 59: -1L 60: Func(2,21): EnableEvents 61: # EnableEvents(SYSEVENT_ENTEREDAREA, ENTERED_AREA); 62: 16L 63: 8L 64: Func(2,21): EnableEvents 65: # EnableEvents(SYSEVENT_LEFTAREA, LEFT_AREA); 66: 32L 67: 20L 68: Func(2,21): EnableEvents 69: # while(me) 70: global #0 71: if false goto 187 ev := wait_for_event(15); 72: 15L 73: Func(4,0): Wait_For_Event 74: global8 := if(ev) 75: global #8 76: if false goto 161 case(ev.type) 77: global #8 78: get member 'type' 79: casejmp 2: @80 8: @101 16: @122 32: @143 default: @161 if(!ev.source.concealed && !ev.source.hidden && !ev.source.npctemplate) 80: global #8 81: get member 'source' 82: get member id 'concealed' (33) 83: ! 84: global #8 85: get member 'source' 86: get member id 'hidden' (32) 87: ! 88: && 89: global #8 90: get member 'source' 91: get member id 'npctemplate' (62) 92: ! 93: && 94: if false goto 100 Walcz( ev.source ); 95: global #8 96: get member 'source' 97: makelocal 98: jmp userfunc @303 99: # 100: goto161 if(!ev.source.concealed && !ev.source.hidden && !ev.source.npctemplate) 101: global #8 102: get member 'source' 103: get member id 'concealed' (33) 104: ! 105: global #8 106: get member 'source' 107: get member id 'hidden' (32) 108: ! 109: && 110: global #8 111: get member 'source' 112: get member id 'npctemplate' (62) 113: ! 114: && 115: if false goto 121 Walcz( ev.source ); 116: global #8 117: get member 'source' 118: makelocal 119: jmp userfunc @303 120: # 121: goto161 if(!ev.source.concealed && !ev.source.hidden && !ev.source.npctemplate) 122: global #8 123: get member 'source' 124: get member id 'concealed' (33) 125: ! 126: global #8 127: get member 'source' 128: get member id 'hidden' (32) 129: ! 130: && 131: global #8 132: get member 'source' 133: get member id 'npctemplate' (62) 134: ! 135: && 136: if false goto 142 Walcz( ev.source ); 137: global #8 138: get member 'source' 139: makelocal 140: jmp userfunc @303 141: # 142: goto161 if(!ev.source.concealed && !ev.source.hidden && !ev.source.npctemplate) 143: global #8 144: get member 'source' 145: get member id 'concealed' (33) 146: ! 147: global #8 148: get member 'source' 149: get member id 'hidden' (32) 150: ! 151: && 152: global #8 153: get member 'source' 154: get member id 'npctemplate' (62) 155: ! 156: && 157: if false goto 161 SzukajPrzeciwnikow(); 158: makelocal 159: jmp userfunc @219 160: # if(ReadGameClock() > next_wander) 161: Func(2,3): ReadGameClock 162: global #2 163: > 164: if false goto 186 next_wander := ReadGameClock() + 10; 165: Func(2,3): ReadGameClock 166: 10L 167: + 168: global2 := SzukajPrzeciwnikow(); 169: makelocal 170: jmp userfunc @219 171: # if(RandomInt(2) == 1) 172: 2L 173: Func(5,0): RandomInt 174: 1L 175: == 176: if false goto 182 PlaySoundEffect(me, idlesnd1); 177: global #0 178: global #5 179: Func(2,9): PlaySoundEffect 180: # 181: goto186 PlaySoundEffect(me, idlesnd2); 182: global #0 183: global #6 184: Func(2,9): PlaySoundEffect 185: # 186: goto70 187: progend E:\gry\pol\pvp097\scripts\ai\include/eventy.inc, Line 55 function GetNpcSpells() var NpcCfg := ReadConfigFile("npcdesc"); 188: decl local #0 189: "npcdesc" 190: Func(6,0): ReadConfigFile 191: := 192: # if(NpcCfg[me.npctemplate].spell) 193: local #0 194: global #0 195: get member id 'npctemplate' (62) 196: [] 1 197: get member 'spell' 198: if false goto 217 spells := {}; 199: array 200: global7 := foreach Spell in GetConfigStringArray(NpcCfg[me.npctemplate], "spell") 201: local #0 202: global #0 203: get member id 'npctemplate' (62) 204: [] 1 205: "spell" 206: Func(6,1): GetConfigStringArray 207: initforeach @213 spells.append(CInt(Spell)); 208: global #7 209: local #1 210: Func(0,0): CInt 211: Call Method id append (#52, 1 params) 212: # 213: stepforeach @208 214: leave block(3) return spells; 215: global #7 216: return return 0; 217: 0L 218: return E:\gry\pol\pvp097\scripts\ai\include/eventy.inc, Line 141 function SzukajPrzeciwnikow() var enemies := Cint(GetObjProperty(me, "Enemies")); 219: decl local #0 220: global #0 221: "Enemies" 222: Func(2,5): GetObjProperty 223: Func(0,0): CInt 224: := 225: # if(!enemies) 226: local #0 227: if true goto 233 SetObjProperty(me, "Enemies", 1); 228: global #0 229: "Enemies" 230: 1L 231: Func(2,14): SetObjProperty 232: # if(enemies > 2) 233: local #0 234: 2L 235: > 236: if false goto 239 return 0; 237: 0L 238: return if(enemies > 1000) 239: local #0 240: 1000L 241: > 242: if false goto 245 enemies := 0; 243: 0L 244: local0 := SetWarMode(0); 245: 0L 246: Func(3,4): SetWarMode 247: # SetOpponent(0); 248: 0L 249: Func(3,5): SetOpponent 250: # foreach przeciwnik in ListMobilesInLineOfSight(me, ENTERED_AREA) 251: global #0 252: 8L 253: Func(2,4): ListMobilesInLineOfSight 254: initforeach @299 if(!przeciwnik.concealed && !przeciwnik.hidden && !przeciwnik.npctemplate && !p 255: local #1 256: get member id 'concealed' (33) 257: ! 258: local #1 259: get member id 'hidden' (32) 260: ! 261: && 262: local #1 263: get member id 'npctemplate' (62) 264: ! 265: && 266: local #1 267: get member id 'cmdlevel' (46) 268: ! 269: && 270: if false goto 280 EraseObjProperty(me, "Enemies"); 271: global #0 272: "Enemies" 273: Func(2,15): EraseObjProperty 274: # Walcz(przeciwnik); 275: local #1 276: makelocal 277: jmp userfunc @303 278: # 279: goto299 SetWarMode(0); 280: 0L 281: Func(3,4): SetWarMode 282: # SetOpponent(0); 283: 0L 284: Func(3,5): SetOpponent 285: # SetObjProperty(me, "Enemies", Cint(GetObjProperty(me, "Enemies")) + 1); 286: global #0 287: "Enemies" 288: global #0 289: "Enemies" 290: Func(2,5): GetObjProperty 291: Func(0,0): CInt 292: 1L 293: + 294: Func(2,14): SetObjProperty 295: # grabloot(); 296: makelocal 297: jmp userfunc @609 298: # 299: stepforeach @255 300: leave block(3) 301: 0L 302: return E:\gry\pol\pvp097\scripts\ai\spellKillPCs.src, Line 81 function Walcz(przeciwnik) 303: pop param 'przeciwnik' if ((przeciwnik.cmdlevel > 0) || (przeciwnik.serial == me.serial) || przeciwnik 304: local #0 305: get member id 'cmdlevel' (46) 306: 0L 307: > 308: local #0 309: get member id 'serial' (6) 310: global #0 311: get member id 'serial' (6) 312: == 313: || 314: local #0 315: get member id 'npctemplate' (62) 316: || 317: if false goto 325 SetWarMode(0); 318: 0L 319: Func(3,4): SetWarMode 320: # przeciwnik := 0; 321: 0L 322: local0 := return 0; 323: 0L 324: return SetWarMode(1); 325: 1L 326: Func(3,4): SetWarMode 327: # SetOpponent(przeciwnik); 328: local #0 329: Func(3,5): SetOpponent 330: # EraseObjProperty(me, "Enemies"); 331: global #0 332: "Enemies" 333: Func(2,15): EraseObjProperty 334: # var loops := 0; 335: decl local #1 336: 0L 337: := 338: # var megaloops := 0; 339: decl local #2 340: 0L 341: := 342: # var waittime := 0; 343: decl local #3 344: 0L 345: := 346: # while((przeciwnik) && (!przeciwnik.dead) && (!przeciwnik.hidden) && (!przeciwni 347: local #0 348: local #0 349: get member id 'dead' (39) 350: ! 351: && 352: local #0 353: get member id 'hidden' (32) 354: ! 355: && 356: local #0 357: get member id 'concealed' (33) 358: ! 359: && 360: local #0 361: get member id 'cmdlevel' (46) 362: ! 363: && 364: if false goto 486 ev := wait_for_event(waittime); 365: local #3 366: Func(4,0): Wait_For_Event 367: global8 := if(!Biegnij(me, przeciwnik)) 368: global #0 369: local #0 370: makelocal 371: jmp userfunc @491 372: if true goto 391 loops := loops + 1; 373: local #1 374: 1L 375: + 376: local1 := if(loops > 100) 377: local #1 378: 100L 379: > 380: if false goto 391 loops := 0; 381: 0L 382: local1 := TeleTo(me, przeciwnik); 383: global #0 384: local #0 385: makelocal 386: jmp userfunc @1157 387: # SzukajPrzeciwnikow(); 388: makelocal 389: jmp userfunc @219 390: # if(Distance(me, przeciwnik) <= 1) 391: global #0 392: local #0 393: Func(2,0): Distance 394: 1L 395: <= 396: if false goto 416 waittime := 1; 397: 1L 398: local3 := if(ReadGameClock() > next_cast) 399: Func(2,3): ReadGameClock 400: global #1 401: > 402: if false goto 415 next_cast := ReadGameClock() + 5; 403: Func(2,3): ReadGameClock 404: 5L 405: + 406: global1 := if(!przeciwnik.hidden) 407: local #0 408: get member id 'hidden' (32) 409: if true goto 415 Czaruj(me, przeciwnik); 410: global #0 411: local #0 412: makelocal 413: jmp userfunc @513 414: # 415: goto479 elseif(Distance(me,przeciwnik) > LEFT_AREA) 416: global #0 417: local #0 418: Func(2,0): Distance 419: 20L 420: > 421: if false goto 430 SetWarMode(0); 422: 0L 423: Func(3,4): SetWarMode 424: # SetOpponent(0); 425: 0L 426: Func(3,5): SetOpponent 427: # break; 428: goto486 429: goto479 waittime := 0; 430: 0L 431: local3 := if(CheckLineOfSight(me, przeciwnik) && (Distance(me, przeciwnik) > 1 && Distanc 432: global #0 433: local #0 434: Func(2,10): CheckLineOfSight 435: global #0 436: local #0 437: Func(2,0): Distance 438: 1L 439: > 440: global #0 441: local #0 442: Func(2,0): Distance 443: 8L 444: < 445: && 446: && 447: if false goto 479 megaloops := megaloops + 1; 448: local #2 449: 1L 450: + 451: local2 := if(megaloops > 50) 452: local #2 453: 50L 454: > 455: if false goto 466 RunRandom(przeciwnik); 456: local #0 457: 4L 458: makelocal 459: jmp userfunc @870 460: # LookForWalls(); 461: makelocal 462: jmp userfunc @824 463: # megaloops := 0; 464: 0L 465: local2 := if(ReadGameClock() > next_cast) 466: Func(2,3): ReadGameClock 467: global #1 468: > 469: if false goto 479 next_cast := ReadGameClock() + 5; 470: Func(2,3): ReadGameClock 471: 5L 472: + 473: global1 := Czaruj(me, przeciwnik); 474: global #0 475: local #0 476: makelocal 477: jmp userfunc @513 478: # if(przeciwnik.dead) 479: local #0 480: get member id 'dead' (39) 481: if false goto 485 SzukajPrzeciwnikow(); 482: makelocal 483: jmp userfunc @219 484: # 485: goto347 SzukajPrzeciwnikow(); 486: makelocal 487: jmp userfunc @219 488: # 489: 0L 490: return E:\gry\pol\pvp097\scripts\ai\include/distance.inc, Line 1 function Biegnij(me, przeciwnik) 491: pop param 'przeciwnik' 492: pop param 'me' case (Distance( me, przeciwnik )) 493: local #1 494: local #0 495: Func(2,0): Distance 496: casejmp 1: @497 0: @497 default: @500 return 1; 497: 1L 498: return 499: goto511 if(Distance(me, przeciwnik) > 1) 500: local #1 501: local #0 502: Func(2,0): Distance 503: 1L 504: > 505: if false goto 509 RunToward( przeciwnik ); 506: local #0 507: Func(3,1): RunToward 508: # return 0; 509: 0L 510: return 511: 0L 512: return E:\gry\pol\pvp097\scripts\ai\spellKillPCs.src, Line 159 function Czaruj(me, przeciwnik) 513: pop param 'przeciwnik' 514: pop param 'me' if(me.poisoned) 515: local #1 516: get member id 'poisoned' (36) 517: if false goto 527 CastSpell(me, me, 11); 518: local #1 519: local #1 520: 11L 521: makelocal 522: jmp userfunc @1249 523: # sleepms(250); 524: 250L 525: Func(4,5): Sleepms 526: # if((GetHp(me) < (GetMaxHP(me) / 4))) 527: local #1 528: makelocal 529: jmp userfunc @593 530: local #1 531: makelocal 532: jmp userfunc @601 533: 4L 534: / 535: < 536: if false goto 546 CastSpell(me, me, 29); 537: local #1 538: local #1 539: 29L 540: makelocal 541: jmp userfunc @1249 542: # sleepms(250); 543: 250L 544: Func(4,5): Sleepms 545: # foreach sumonowany in ListMobilesInLineOfSight(me, ENTERED_AREA) 546: local #1 547: 8L 548: Func(2,4): ListMobilesInLineOfSight 549: initforeach @564 if(Cint(GetObjProperty(sumonowany, "summoned"))) 550: local #2 551: "summoned" 552: Func(2,5): GetObjProperty 553: Func(0,0): CInt 554: if false goto 564 CastSpell(me, sumonowany, 41); 555: local #1 556: local #2 557: 41L 558: makelocal 559: jmp userfunc @1249 560: # sleepms(250); 561: 250L 562: Func(4,5): Sleepms 563: # 564: stepforeach @550 565: leave block(3) if(Cint(GetObjProperty(przeciwnik, "mr"))) 566: local #0 567: "mr" 568: Func(2,5): GetObjProperty 569: Func(0,0): CInt 570: if false goto 581 CastSpell(me, przeciwnik, 5); 571: local #1 572: local #0 573: 5L 574: makelocal 575: jmp userfunc @1249 576: # sleepms(250); 577: 250L 578: Func(4,5): Sleepms 579: # 580: goto591 if(RandomInt(2) == 0) 581: 2L 582: Func(5,0): RandomInt 583: 0L 584: == 585: if false goto 591 CastOffensiveSpell(me, przeciwnik); 586: local #1 587: local #0 588: makelocal 589: jmp userfunc @1209 590: # 591: 0L 592: return e:/gry/pol/pvp097/scripts/include/attributes.inc, Line 324 function GetHp(who) 593: pop param 'who' return Cint(GetVital(who, VITALID_LIFE)/ 100); 594: local #0 595: "Life" 596: Func(8,1): GetVital 597: 100L 598: / 599: Func(0,0): CInt 600: return e:/gry/pol/pvp097/scripts/include/attributes.inc, Line 340 function GetMaxHp(who) 601: pop param 'who' return Cint(GetVitalMaximumValue(who, VITALID_LIFE)/ 100); 602: local #0 603: "Life" 604: Func(8,2): GetVitalMaximumValue 605: 100L 606: / 607: Func(0,0): CInt 608: return E:\gry\pol\pvp097\scripts\ai\main/loot.inc, Line 12 function grabloot() if(GetObjProperty(me,"noloot") || GetObjProperty(me, "summoned")) 609: global #0 610: "noloot" 611: Func(2,5): GetObjProperty 612: global #0 613: "summoned" 614: Func(2,5): GetObjProperty 615: || 616: if false goto 619 return; 617: "" 618: return if((me.script == "animal") || (me.script == "meek") || (me.script == "barker") 619: global #0 620: get member id 'script' (61) 621: "animal" 622: == 623: global #0 624: get member id 'script' (61) 625: "meek" 626: == 627: || 628: global #0 629: get member id 'script' (61) 630: "barker" 631: == 632: || 633: global #0 634: get member id 'script' (61) 635: "wolf" 636: == 637: || 638: if false goto 641 return; 639: "" 640: return var numitems := 0; 641: decl local #0 642: 0L 643: := 644: # var mypack := 0; 645: decl local #1 646: 0L 647: := 648: # if(!GetObjProperty(me, "serial")) 649: global #0 650: "serial" 651: Func(2,5): GetObjProperty 652: if true goto 659 SetObjProperty(me, "serial", me.serial); 653: global #0 654: "serial" 655: global #0 656: get member id 'serial' (6) 657: Func(2,14): SetObjProperty 658: # mypack := FindMyPack(me.serial); 659: global #0 660: get member id 'serial' (6) 661: makelocal 662: jmp userfunc @1433 663: local1 := var near_items := ListItemsNearLocation(me.x, me.y, me.z,6); 664: decl local #2 665: global #0 666: get member id 'x' (0) 667: global #0 668: get member id 'y' (1) 669: global #0 670: get member id 'z' (2) 671: 6L 672: "britannia" 673: Func(2,16): ListItemsNearLocation 674: := 675: # foreach item in near_items 676: local #2 677: initforeach @820 if(CheckLineOfSight(me, item)) 678: global #0 679: local #3 680: Func(2,10): CheckLineOfSight 681: if false goto 820 var sh := GetStandingHeight(item.x, item.y, item.z); 682: decl local #0 683: local #3 684: get member id 'x' (0) 685: local #3 686: get member id 'y' (1) 687: local #3 688: get member id 'z' (2) 689: "britannia" 690: Func(2,20): GetStandingHeight 691: := 692: # if(sh.multi || sh.multi.serial) 693: local #6 694: get member id 'multi' (12) 695: local #6 696: get member id 'multi' (12) 697: get member id 'serial' (6) 698: || 699: if false goto 702 break; 700: leave block(1) 701: goto821 var info := CInt(GetMapInfo(item.x, item.y).landtile); 702: decl local #1 703: local #3 704: get member id 'x' (0) 705: local #3 706: get member id 'y' (1) 707: "britannia" 708: Func(2,2): GetMapInfo 709: get member 'landtile' 710: Func(0,0): CInt 711: := 712: # if((info > CInt(0x405)) &&(info < CInt(0x456))) 713: local #7 714: 1029L 715: Func(0,0): CInt 716: > 717: local #7 718: 1110L 719: Func(0,0): CInt 720: < 721: && 722: if false goto 725 return 0; 723: 0L 724: return if(Cint(GetObjProperty(item, "nopvp"))) 725: local #3 726: "nopvp" 727: Func(2,5): GetObjProperty 728: Func(0,0): CInt 729: if false goto 732 return 0; 730: 0L 731: return if(item.objtype == UOBJ_CORPSE) 732: local #3 733: get member id 'objtype' (4) 734: 8198L 735: == 736: if false goto 817 var items := { }; 737: decl local #0 738: array 739: := 740: # foreach thingie in EnumerateItemsInContainer(item) 741: local #3 742: 0L 743: Func(2,18): EnumerateItemsInContainer 744: initforeach @768 if((thingie.objtype < STARTHAIR || thingie.objtype > ENDHAIR) &&(!CInt(GetObjPr 745: local #9 746: get member id 'objtype' (4) 747: 8240L 748: < 749: local #9 750: get member id 'objtype' (4) 751: 8288L 752: > 753: || 754: local #9 755: "#ignoreit" 756: Func(2,5): GetObjProperty 757: Func(0,0): CInt 758: ! 759: && 760: if false goto 768 items[len(items) + 1] := thingie; 761: local #8 762: local #8 763: Func(0,1): Len 764: 1L 765: + 766: local #9 767: [] := (1) # 768: stepforeach @745 769: leave block(3) if(len(items)) 770: local #8 771: Func(0,1): Len 772: if false goto 811 RunToIt(me,item); 773: global #0 774: local #3 775: makelocal 776: jmp userfunc @1121 777: # if(Distance(me, item) < 2) 778: global #0 779: local #3 780: Func(2,0): Distance 781: 2L 782: < 783: if false goto 810 foreach thingie in items 784: local #8 785: initforeach @808 if(MoveItemToContainer(thingie, me.backpack)) 786: local #9 787: global #0 788: get member id 'backpack' (41) 789: -1L 790: -1L 791: Func(2,19): MoveItemToContainer 792: if false goto 803 say("*zbiera*"); 793: "*zbiera*" 794: "default" 795: 0L 796: Func(3,6): Say 797: # sleep(2); 798: 2L 799: Func(4,1): Sleep 800: # break; 801: goto809 802: goto808 SetObjProperty(thingie,"#ignoreit",1); 803: local #9 804: "#ignoreit" 805: 1L 806: Func(2,14): SetObjProperty 807: # 808: stepforeach @786 809: leave block(3) 810: goto816 SetObjProperty(item,"#ignoreit",1); 811: local #3 812: "#ignoreit" 813: 1L 814: Func(2,14): SetObjProperty 815: # 816: leave block(1) break; 817: leave block(2) 818: goto821 819: leave block(2) 820: stepforeach @678 821: leave block(3) 822: 0L 823: return E:\gry\pol\pvp097\scripts\ai\include/eventy.inc, Line 176 function LookForWalls() var murek := 0; 824: decl local #0 825: 0L 826: := 827: # foreach wall in ListItemsNearLocation(me.x, me.y, me.z, 10, me.realm) 828: global #0 829: get member id 'x' (0) 830: global #0 831: get member id 'y' (1) 832: global #0 833: get member id 'z' (2) 834: 10L 835: global #0 836: get member id 'realm' (113) 837: Func(2,16): ListItemsNearLocation 838: initforeach @856 if(wall.objtype == 0x3946 || wall.objtype == 0x1f7) 839: local #1 840: get member id 'objtype' (4) 841: 14662L 842: == 843: local #1 844: get member id 'objtype' (4) 845: 503L 846: == 847: || 848: if false goto 856 murek := murek + 1; 849: local #0 850: 1L 851: + 852: local0 := DestroyItem(wall); 853: local #1 854: Func(2,17): DestroyItem 855: # 856: stepforeach @839 857: leave block(3) if(murek > 0) 858: local #0 859: 0L 860: > 861: if false goto 868 CastSpell(me, me, 34); 862: global #0 863: global #0 864: 34L 865: makelocal 866: jmp userfunc @1249 867: # 868: 0L 869: return E:\gry\pol\pvp097\scripts\ai\include/distance.inc, Line 53 function RunRandom(byref przeciwnik, numruns := 4) 870: pop param 'numruns' 871: pop param byref 'przeciwnik' var stepstotake := numruns + 4; 872: decl local #2 873: local #0 874: 4L 875: + 876: := 877: # if(numruns > 3) 878: local #0 879: 3L 880: > 881: if false goto 885 RunAwayFrom(przeciwnik); 882: local #1 883: Func(3,2): RunAwayFrom 884: # var tox := me.x; 885: decl local #3 886: global #0 887: get member id 'x' (0) 888: := 889: # var toy := me.y; 890: decl local #4 891: global #0 892: get member id 'y' (1) 893: := 894: # var highx := tox - przeciwnik.x; 895: decl local #5 896: local #3 897: local #1 898: get member id 'x' (0) 899: - 900: := 901: # if ( highx < 0 ) 902: local #5 903: 0L 904: < 905: if false goto 910 highx := 0 - highx; 906: 0L 907: local #5 908: - 909: local5 := var highy := toy - przeciwnik.y; 910: decl local #6 911: local #4 912: local #1 913: get member id 'y' (1) 914: - 915: := 916: # if ( highy < 0 ) 917: local #6 918: 0L 919: < 920: if false goto 925 highy := 0 - highy; 921: 0L 922: local #6 923: - 924: local6 := if ( highy > highx ) 925: local #6 926: local #5 927: > 928: if false goto 998 if (!CheckLOSAt (me, (me.x - stepstotake), me.y, (GetMapInfo ((me.x - stepstota 929: global #0 930: global #0 931: get member id 'x' (0) 932: local #2 933: - 934: global #0 935: get member id 'y' (1) 936: global #0 937: get member id 'x' (0) 938: local #2 939: - 940: global #0 941: get member id 'y' (1) 942: "britannia" 943: Func(2,2): GetMapInfo 944: get member id 'z' (2) 945: Func(2,1): CheckLosAt 946: if true goto 953 tox := (me.x + stepstotake); 947: global #0 948: get member id 'x' (0) 949: local #2 950: + 951: local3 := 952: goto991 elseif (!CheckLOSAt (me, (me.x + stepstotake), me.y, (GetMapInfo ((me.x + steps 953: global #0 954: global #0 955: get member id 'x' (0) 956: local #2 957: + 958: global #0 959: get member id 'y' (1) 960: global #0 961: get member id 'x' (0) 962: local #2 963: + 964: global #0 965: get member id 'y' (1) 966: "britannia" 967: Func(2,2): GetMapInfo 968: get member id 'z' (2) 969: Func(2,1): CheckLosAt 970: if true goto 977 tox := (me.x - stepstotake); 971: global #0 972: get member id 'x' (0) 973: local #2 974: - 975: local3 := 976: goto991 elseif (RandomInt (2) ) 977: 2L 978: Func(5,0): RandomInt 979: if false goto 986 tox := (me.x - stepstotake); 980: global #0 981: get member id 'x' (0) 982: local #2 983: - 984: local3 := 985: goto991 tox := (me.x + stepstotake); 986: global #0 987: get member id 'x' (0) 988: local #2 989: + 990: local3 := if (randomint(2)) 991: 2L 992: Func(5,0): RandomInt 993: if false goto 997 toy := przeciwnik.y; 994: local #1 995: get member id 'y' (1) 996: local4 := 997: goto1066 if (!CheckLOSAt (me, me.x, (me.y - stepstotake), (GetMapInfo (me.x, (me.y - ste 998: global #0 999: global #0 1000: get member id 'x' (0) 1001: global #0 1002: get member id 'y' (1) 1003: local #2 1004: - 1005: global #0 1006: get member id 'x' (0) 1007: global #0 1008: get member id 'y' (1) 1009: local #2 1010: - 1011: "britannia" 1012: Func(2,2): GetMapInfo 1013: get member id 'z' (2) 1014: Func(2,1): CheckLosAt 1015: if true goto 1022 toy := (me.y + stepstotake); 1016: global #0 1017: get member id 'y' (1) 1018: local #2 1019: + 1020: local4 := 1021: goto1060 elseif (!CheckLOSAt (me, me.x, (me.y + stepstotake), (GetMapInfo (me.x, (me.y + 1022: global #0 1023: global #0 1024: get member id 'x' (0) 1025: global #0 1026: get member id 'y' (1) 1027: local #2 1028: + 1029: global #0 1030: get member id 'x' (0) 1031: global #0 1032: get member id 'y' (1) 1033: local #2 1034: + 1035: "britannia" 1036: Func(2,2): GetMapInfo 1037: get member id 'z' (2) 1038: Func(2,1): CheckLosAt 1039: if true goto 1046 toy := (me.y - stepstotake); 1040: global #0 1041: get member id 'y' (1) 1042: local #2 1043: - 1044: local4 := 1045: goto1060 elseif (RandomInt (2)) 1046: 2L 1047: Func(5,0): RandomInt 1048: if false goto 1055 toy := (me.y - stepstotake); 1049: global #0 1050: get member id 'y' (1) 1051: local #2 1052: - 1053: local4 := 1054: goto1060 toy := (me.y + stepstotake); 1055: global #0 1056: get member id 'y' (1) 1057: local #2 1058: + 1059: local4 := if (randomint(2)) 1060: 2L 1061: Func(5,0): RandomInt 1062: if false goto 1066 tox := przeciwnik.x; 1063: local #1 1064: get member id 'x' (0) 1065: local3 := var runs := 0; 1066: decl local #7 1067: 0L 1068: := 1069: # while ( (distance(me, przeciwnik) > 1) and (runs <= stepstotake) ) 1070: global #0 1071: local #1 1072: Func(2,0): Distance 1073: 1L 1074: > 1075: local #7 1076: local #2 1077: <= 1078: && 1079: if false goto 1119 if(RunTowardLocation (tox, toy)) 1080: local #3 1081: local #4 1082: Func(3,3): RunTowardLocation 1083: if false goto 1088 ev := wait_for_event(0); 1084: 0L 1085: Func(4,0): Wait_For_Event 1086: global8 := 1087: goto1091 ev := wait_for_event(1); 1088: 1L 1089: Func(4,0): Wait_For_Event 1090: global8 := runs := runs + 1; 1091: local #7 1092: 1L 1093: + 1094: local7 := if ((me.x == tox) and (me.y == toy) ) 1095: global #0 1096: get member id 'x' (0) 1097: local #3 1098: == 1099: global #0 1100: get member id 'y' (1) 1101: local #4 1102: == 1103: && 1104: if false goto 1107 return 0; 1105: 0L 1106: return if (CheckLOSAt (me, przeciwnik.x, przeciwnik.y, przeciwnik.z)) 1107: global #0 1108: local #1 1109: get member id 'x' (0) 1110: local #1 1111: get member id 'y' (1) 1112: local #1 1113: get member id 'z' (2) 1114: Func(2,1): CheckLosAt 1115: if false goto 1118 return 0; 1116: 0L 1117: return 1118: goto1070 return 0; 1119: 0L 1120: return E:\gry\pol\pvp097\scripts\ai\main/loot.inc, Line 73 function RunToIt(me,item) 1121: pop param 'item' 1122: pop param 'me' var numsteps; 1123: decl local #2 1124: # for(numsteps := 0; numsteps < 8; numsteps := numsteps +1) 1125: local #2 1126: 0L 1127: := 1128: # 1129: local #2 1130: 8L 1131: < 1132: if false goto 1155 if(Distance(me, item) < 2) 1133: local #1 1134: local #0 1135: Func(2,0): Distance 1136: 2L 1137: < 1138: if false goto 1142 return; 1139: "" 1140: return 1141: goto1145 walktoward(item); 1142: local #0 1143: Func(3,7): WalkToward 1144: # look_around(); 1145: makelocal 1146: jmp userfunc @1468 1147: # 1148: local #2 1149: local #2 1150: 1L 1151: + 1152: := 1153: # 1154: goto1129 1155: 0L 1156: return E:\gry\pol\pvp097\scripts\ai\include/eventy.inc, Line 22 function TeleTo(me, przeciwnik) 1157: pop param 'przeciwnik' 1158: pop param 'me' PlayStationaryEffect( me.x, me.y, me.z, 0x3728, speed:=0xa, loop:=0xa ); 1159: local #1 1160: get member id 'x' (0) 1161: local #1 1162: get member id 'y' (1) 1163: local #1 1164: get member id 'z' (2) 1165: 14120L 1166: 10L 1167: 10L 1168: 0L 1169: "britannia" 1170: Func(2,6): PlayStationaryEffect 1171: # MoveObjectToLocation( me, przeciwnik.x, przeciwnik.y, przeciwnik.z, przeciwnik. 1172: local #1 1173: local #0 1174: get member id 'x' (0) 1175: local #0 1176: get member id 'y' (1) 1177: local #0 1178: get member id 'z' (2) 1179: local #0 1180: get member id 'realm' (113) 1181: 0L 1182: Func(2,7): MoveObjectToLocation 1183: # PrintTextAbove(me, "*teleport*"); 1184: local #1 1185: "*teleport*" 1186: 3L 1187: 1000L 1188: Func(2,8): PrintTextAbove 1189: # PlayStationaryEffect( przeciwnik.x, przeciwnik.y, przeciwnik.z, 0x3728, speed:= 1190: local #0 1191: get member id 'x' (0) 1192: local #0 1193: get member id 'y' (1) 1194: local #0 1195: get member id 'z' (2) 1196: 14120L 1197: 10L 1198: 10L 1199: 0L 1200: "britannia" 1201: Func(2,6): PlayStationaryEffect 1202: # PlaySoundEffect( me, 0x01ff ); 1203: local #1 1204: 511L 1205: Func(2,9): PlaySoundEffect 1206: # 1207: 0L 1208: return E:\gry\pol\pvp097\scripts\ai\include/eventy.inc, Line 124 function CastOffensiveSpell(caster, cast_on) 1209: pop param 'cast_on' 1210: pop param 'caster' if(!spells.size() or !spells) 1211: global #7 1212: Call Method id size (#48, 0 params) 1213: ! 1214: global #7 1215: ! 1216: || 1217: if false goto 1220 return 0; 1218: 0L 1219: return var thespell := spells[RandomInt(len(spells)) + 1]; 1220: decl local #2 1221: global #7 1222: global #7 1223: Func(0,1): Len 1224: Func(5,0): RandomInt 1225: 1L 1226: + 1227: [] 1 1228: := 1229: # if(thespell == error or !thespell) 1230: local #2 1231: error 1232: == 1233: local #2 1234: ! 1235: || 1236: if false goto 1241 thespell := spells[1]; 1237: global #7 1238: 1L 1239: [] 1 1240: local2 := CastSpell(caster, cast_on, thespell); 1241: local #1 1242: local #0 1243: local #2 1244: makelocal 1245: jmp userfunc @1249 1246: # 1247: 0L 1248: return E:\gry\pol\pvp097\scripts\ai\include/eventy.inc, Line 67 function CastSpell(caster, cast_on, SpellID) 1249: pop param 'SpellID' 1250: pop param 'cast_on' 1251: pop param 'caster' if(!CheckLineOfSight(caster, cast_on) or GetMana(caster) < 14 or caster.paralyz 1252: local #2 1253: local #1 1254: Func(2,10): CheckLineOfSight 1255: ! 1256: local #2 1257: makelocal 1258: jmp userfunc @1461 1259: 14L 1260: < 1261: || 1262: local #2 1263: get member id 'paralyzed' (35) 1264: || 1265: local #2 1266: get member id 'frozen' (34) 1267: || 1268: if false goto 1271 return 0; 1269: 0L 1270: return if(Distance(caster, cast_on) > 8) 1271: local #2 1272: local #1 1273: Func(2,0): Distance 1274: 8L 1275: > 1276: if false goto 1279 return 0; 1277: 0L 1278: return SpellID := CInt(SpellID); 1279: local #0 1280: Func(0,0): CInt 1281: local0 := if(!caster or !cast_on or !SpellID) 1282: local #2 1283: ! 1284: local #1 1285: ! 1286: || 1287: local #0 1288: ! 1289: || 1290: if false goto 1293 return 0; 1291: 0L 1292: return var SpellsCfg; 1293: decl local #3 1294: # var przypisek := ""; 1295: decl local #4 1296: "" 1297: := 1298: # if(SpellID >= 101 && SpellID <= 116) // konfig dla czarow nekro 1299: local #0 1300: 101L 1301: >= 1302: local #0 1303: 116L 1304: <= 1305: && 1306: if false goto 1313 SpellsCfg := ReadConfigFile(":nekromancja:spells"); 1307: ":nekromancja:spells" 1308: Func(6,0): ReadConfigFile 1309: local3 := przypisek := ":nekromancja:"; 1310: ":nekromancja:" 1311: local4 := 1312: goto1346 elseif(SpellID >= 201 && SpellID <= 210) 1313: local #0 1314: 201L 1315: >= 1316: local #0 1317: 210L 1318: <= 1319: && 1320: if false goto 1327 SpellsCfg := ReadConfigFile(":paladynstwo:spells"); 1321: ":paladynstwo:spells" 1322: Func(6,0): ReadConfigFile 1323: local3 := przypisek := ":paladynstwo:"; 1324: ":paladynstwo:" 1325: local4 := 1326: goto1346 elseif(SpellID >= 601 && SpellID <= 616) // konfig dla czarow druidyzmu 1327: local #0 1328: 601L 1329: >= 1330: local #0 1331: 616L 1332: <= 1333: && 1334: if false goto 1341 SpellsCfg := ReadConfigFile(":druidyzm:spells"); 1335: ":druidyzm:spells" 1336: Func(6,0): ReadConfigFile 1337: local3 := przypisek := ":druidyzm:"; 1338: ":druidyzm:" 1339: local4 := 1340: goto1346 SpellsCfg := ReadConfigFile(":spells:spells"); 1341: ":spells:spells" 1342: Func(6,0): ReadConfigFile 1343: local3 := przypisek := ":spells:"; 1344: ":spells:" 1345: local4 := var SpellScript := SpellsCfg[SpellID].Script; 1346: decl local #5 1347: local #3 1348: local #0 1349: [] 1 1350: get member id 'script' (61) 1351: := 1352: # if(!SpellScript) 1353: local #5 1354: if true goto 1380 syslog("NPC "+caster.name+" chcial wyczarowac "+SpellsCfg[SpellID].Name+" SPID 1355: "NPC " 1356: local #2 1357: get member id 'name' (3) 1358: + 1359: " chcial wyczarowac " 1360: + 1361: local #3 1362: local #0 1363: [] 1 1364: get member id 'name' (3) 1365: + 1366: " SPID (" 1367: + 1368: local #0 1369: + 1370: ") ale brakuje SPScript (" 1371: + 1372: local #5 1373: + 1374: ") ." 1375: + 1376: Func(4,2): SysLog 1377: # return; 1378: "" 1379: return var SpellParms := {}; 1380: decl local #6 1381: array 1382: := 1383: # SpellParms[1] := "#MOB"; 1384: local #6 1385: 1L 1386: "#MOB" 1387: [] := (1) # SpellParms[2] := caster; 1388: local #6 1389: 2L 1390: local #2 1391: [] := (1) # SpellParms[3] := cast_on; 1392: local #6 1393: 3L 1394: local #1 1395: [] := (1) # if(!cast_on.hidden || !cast_on.dead) 1396: local #1 1397: get member id 'hidden' (32) 1398: ! 1399: local #1 1400: get member id 'dead' (39) 1401: ! 1402: || 1403: if false goto 1431 SpeakPowerwords(caster, SpellID); 1404: local #2 1405: local #0 1406: Func(2,13): SpeakPowerWords 1407: # if(RandomInt(2) == 1) 1408: 2L 1409: Func(5,0): RandomInt 1410: 1L 1411: == 1412: if false goto 1418 PerformAction( caster, 0x10 ); 1413: local #2 1414: 16L 1415: Func(2,11): PerformAction 1416: # 1417: goto1422 PerformAction( caster, 0x11 ); 1418: local #2 1419: 17L 1420: Func(2,11): PerformAction 1421: # sleep(1); 1422: 1L 1423: Func(4,1): Sleep 1424: # start_script(przypisek + SpellScript, SpellParms); 1425: local #4 1426: local #5 1427: + 1428: local #6 1429: Func(4,3): Start_Script 1430: # 1431: 0L 1432: return e:/gry/pol/pvp097/scripts/include/NPCBackpacks.inc, Line 18 function FindMyPack(myserial) 1433: pop param 'myserial' var mybank := OpenTamedStorageAreas(); 1434: decl local #1 1435: makelocal 1436: jmp userfunc @1502 1437: := 1438: # var bank_obj_name := "Bankbox " + Hex(myserial); 1439: decl local #2 1440: "Bankbox " 1441: local #0 1442: Func(0,4): Hex 1443: + 1444: := 1445: # var bankbox := FindRootItemInStorageArea(mybank, bank_obj_name); 1446: decl local #3 1447: local #1 1448: local #2 1449: Func(10,2): FindRootItemInStorageArea 1450: := 1451: # if(!bankbox) 1452: local #3 1453: if true goto 1459 bankbox := CreateRootItemInStorageArea(mybank, bank_obj_name, UOBJ_BANKBOX); 1454: local #1 1455: local #2 1456: 3648L 1457: Func(10,3): CreateRootItemInStorageArea 1458: local3 := return bankbox; 1459: local #3 1460: return e:/gry/pol/pvp097/scripts/include/attributes.inc, Line 336 function GetMana(who) 1461: pop param 'who' return(GetVital(who, "Mana")/ 100); 1462: local #0 1463: "Mana" 1464: Func(8,1): GetVital 1465: 100L 1466: / 1467: return E:\gry\pol\pvp097\scripts\ai\include/eventy.inc, Line 14 function look_around() foreach critter in ListMobilesInLineOfSight(me, ENTERED_AREA) 1468: global #0 1469: 8L 1470: Func(2,4): ListMobilesInLineOfSight 1471: initforeach @1498 if((!critter.npctemplate) ||(critter.script == "tamed") || (critter.script == " 1472: local #0 1473: get member id 'npctemplate' (62) 1474: ! 1475: local #0 1476: get member id 'script' (61) 1477: "tamed" 1478: == 1479: || 1480: local #0 1481: get member id 'script' (61) 1482: "employed" 1483: == 1484: || 1485: local #0 1486: "#journey" 1487: Func(2,5): GetObjProperty 1488: ! 1489: Func(0,0): CInt 1490: || 1491: if false goto 1498 Walcz(critter); 1492: local #0 1493: makelocal 1494: jmp userfunc @303 1495: # return; 1496: "" 1497: return 1498: stepforeach @1472 1499: leave block(3) 1500: 0L 1501: return e:/gry/pol/pvp097/scripts/include/NPCBackpacks.inc, Line 11 function OpenTamedStorageAreas() var bank := FindStorageArea("Tamed Storage"); 1502: decl local #0 1503: "Tamed Storage" 1504: Func(10,0): FindStorageArea 1505: := 1506: # if(!bank) 1507: local #0 1508: if true goto 1512 bank := CreateStorageArea("Tamed Storage"); 1509: "Tamed Storage" 1510: Func(10,1): CreateStorageArea 1511: local0 := return bank; 1512: local #0 1513: return