Exported Functions: PC Args Name 24 2 NewAttack E:\gry\pol\pvp097\pkg\foundations\hooks\attack.src, Line 15 var wpn_a_elem, wpn_d_elem; 0: decl global #0 1: # 2: decl global #1 3: # var wpn_a, wpn_d; 4: decl global #2 5: # 6: decl global #3 7: # var npcfg := ReadConfigFile("::npcdesc"); 8: decl global #4 9: "::npcdesc" 10: Func(8,0): ReadConfigFile 11: := 12: # var itcfg := ReadConfigFile(":*:itemdesc"); 13: decl global #5 14: ":*:itemdesc" 15: Func(8,0): ReadConfigFile 16: := 17: # E:\gry\pol\pvp097\pkg\foundations\hooks\attack.src, Line 21 program attackhook() Print("New PvP Attack hook by qrak (base by Maeglin (c))"); 18: "New PvP Attack hook by qrak (base by Maeglin (c))" 19: Func(1,0): Print 20: # return 1; 21: 1L 22: progend 23: progend E:\gry\pol\pvp097\pkg\foundations\hooks\attack.src, Line 25 exported function NewAttack( attacker, defender) 24: makelocal 25: jmp userfunc @27 26: progend 27: pop param 'defender' 28: pop param 'attacker' var hit_chance; 29: decl local #2 30: # var skid; 31: decl local #3 32: # var defskid; 33: decl local #4 34: # var dmg; 35: decl local #5 36: # var weapon := attacker.weapon; 37: decl local #6 38: local #1 39: get member id 'weapon' (42) 40: := 41: # wpn_a := attacker.weapon; 42: local #1 43: get member id 'weapon' (42) 44: global2 := wpn_d := defender.weapon; 45: local #0 46: get member id 'weapon' (42) 47: global3 := wpn_a_elem := GetWpnCfgInfo(attacker, wpn_a); 48: local #1 49: global #2 50: makelocal 51: jmp userfunc @1016 52: global0 := wpn_d_elem := GetWpnCfgInfo(defender, wpn_d); 53: local #0 54: global #3 55: makelocal 56: jmp userfunc @1016 57: global1 := if(attacker.paralyzed) 58: local #1 59: get member id 'paralyzed' (35) 60: if false goto 63 return; 61: "" 62: return attacker.hidden := 0; 63: local #1 64: 0L 65: set member id 'hidden' (32) # SetObjProperty(defender, "LastHit", {attacker.name, attacker.serial, weapon }); 66: local #0 67: "LastHit" 68: array 69: local #1 70: get member id 'name' (3) 71: init{} 72: local #1 73: get member id 'serial' (6) 74: init{} 75: local #6 76: init{} 77: Func(6,0): SetObjProperty 78: # var skidbonus_a; 79: decl local #7 80: # var skidbonus_d; 81: decl local #8 82: # if(attacker.npctemplate) 83: local #1 84: get member id 'npctemplate' (62) 85: if false goto 103 skid := GetDexterity(attacker); 86: local #1 87: makelocal 88: jmp userfunc @1006 89: local3 := if(skid >= 80) 90: local #3 91: 80L 92: >= 93: if false goto 96 skid := 80; 94: 80L 95: local3 := dmg := npcfg[attacker.npctemplate].Attackdamage; 96: global #4 97: local #1 98: get member id 'npctemplate' (62) 99: [] 1 100: get member 'Attackdamage' 101: local5 := 102: goto119 skid := GetDexterity(attacker); 103: local #1 104: makelocal 105: jmp userfunc @1006 106: local3 := skidbonus_a := itcfg[weapon.objtype].Attribute; 107: global #5 108: local #6 109: get member id 'objtype' (4) 110: [] 1 111: get member id 'attribute' (92) 112: local7 := dmg := itcfg[weapon.objtype].Damage; 113: global #5 114: local #6 115: get member id 'objtype' (4) 116: [] 1 117: get member 'Damage' 118: local5 := if(defender.npctemplate) 119: local #0 120: get member id 'npctemplate' (62) 121: if false goto 133 defskid := GetDexterity(defender); 122: local #0 123: makelocal 124: jmp userfunc @1006 125: local4 := if(defskid >= 80) 126: local #4 127: 80L 128: >= 129: if false goto 132 defskid := 80; 130: 80L 131: local4 := 132: goto143 defskid := GetDexterity(defender); 133: local #0 134: makelocal 135: jmp userfunc @1006 136: local4 := skidbonus_d := itcfg[weapon.objtype].Attribute; 137: global #5 138: local #6 139: get member id 'objtype' (4) 140: [] 1 141: get member id 'attribute' (92) 142: local8 := if(!CheckLineOfSight(attacker, defender)) 143: local #1 144: local #0 145: Func(6,3): CheckLineOfSight 146: if true goto 155 SendSysMessage(attacker, "Nie widzisz tego.",3,40); 147: local #1 148: "Nie widzisz tego." 149: 3L 150: 40L 151: Func(6,1): SendSysMessage 152: # return 0; 153: 0L 154: return var bonushit_a := 0; 155: decl local #9 156: 0L 157: := 158: # var bonushit_d := 0; 159: decl local #10 160: 0L 161: := 162: # if(!attacker.npctemplate && !defender.npctemplate) 163: local #1 164: get member id 'npctemplate' (62) 165: ! 166: local #0 167: get member id 'npctemplate' (62) 168: ! 169: && 170: if false goto 183 bonushit_a := (GetAttribute( attacker , skidbonus_a)/10); 171: local #1 172: local #7 173: Func(5,2): GetAttribute 174: 10L 175: / 176: local9 := bonushit_d := (GetAttribute( defender , skidbonus_d)/10); 177: local #0 178: local #8 179: Func(5,2): GetAttribute 180: 10L 181: / 182: local10 := hit_chance := CInt( ((skid + bonushit_a + 50) * 100) / (2 * (defskid + bonushit 183: local #3 184: local #9 185: + 186: 50L 187: + 188: 100L 189: * 190: 2L 191: local #4 192: local #10 193: + 194: 50L 195: + 196: * 197: / 198: Func(0,0): CInt 199: local2 := if(getobjproperty(attacker, "DivineFury")) 200: local #1 201: "DivineFury" 202: Func(6,4): GetObjProperty 203: if false goto 208 hit_chance := hit_chance + 30; 204: local #2 205: 30L 206: + 207: local2 := var enemyoo := getobjproperty(attacker, "EnemyOfOne"); 208: decl local #11 209: local #1 210: "EnemyOfOne" 211: Func(6,4): GetObjProperty 212: := 213: # if(enemyoo == 1) 214: local #11 215: 1L 216: == 217: if false goto 238 if(defender.npctemplate) 218: local #0 219: get member id 'npctemplate' (62) 220: if false goto 238 EraseObjProperty(attacker, "EnemyOfOne"); 221: local #1 222: "EnemyOfOne" 223: Func(6,2): EraseObjProperty 224: # SetObjProperty(attacker, "#SWrog", defender.graphic); 225: local #1 226: "#SWrog" 227: local #0 228: get member id 'graphic' (5) 229: Func(6,0): SetObjProperty 230: # PrintTextAbovePrivate(attacker, "Ten typ NPCa stal sie Twoim smiertelnym wrogie 231: local #1 232: "Ten typ NPCa stal sie Twoim smiertelnym wrogiem." 233: local #1 234: 3L 235: 66L 236: Func(6,5): PrintTextAbovePrivate 237: # if(RandomInt(100) < hit_chance) 238: 100L 239: Func(4,0): RandomInt 240: local #2 241: < 242: if false goto 780 if(skidbonus_a == "Archery") 243: local #7 244: "Archery" 245: == 246: if false goto 259 if(!CheckForAmmo(attacker)); 247: local #1 248: makelocal 249: jmp userfunc @967 250: if true goto 259 SendSysMessage(attacker, "Zabraklo Ci amunicji.",3,40); 251: local #1 252: "Zabraklo Ci amunicji." 253: 3L 254: 40L 255: Func(6,1): SendSysMessage 256: # return 0; 257: 0L 258: return PlayMovingEffect(attacker, defender, wpn_a_elem.ProjectileAnim, 10, 10); 259: local #1 260: local #0 261: global #0 262: get member 'ProjectileAnim' 263: 10L 264: 10L 265: 0L 266: Func(6,6): PlayMovingEffect 267: # PlayHitSounds(attacker, defender); 268: local #1 269: local #0 270: makelocal 271: jmp userfunc @871 272: # var basedamage := RandomDiceRoll(dmg) + weapon.dmg_mod; 273: decl local #0 274: local #5 275: Func(4,1): RandomDiceRoll 276: local #6 277: get member id 'dmg_mod' (91) 278: + 279: := 280: # var damage_multiplier := GetStrength(attacker) + 50.0; 281: decl local #1 282: local #1 283: makelocal 284: jmp userfunc @1011 285: 50LF 286: + 287: := 288: # if(!attacker.npctemplate) 289: local #1 290: get member id 'npctemplate' (62) 291: if true goto 386 var damage_multiplier := GetStrength(attacker) + 50.0; 292: decl local #0 293: local #1 294: makelocal 295: jmp userfunc @1011 296: 50LF 297: + 298: := 299: # damage_multiplier := damage_multiplier + (CDbl(GetStrength(attacker))) * 0.2; 300: local #14 301: local #1 302: makelocal 303: jmp userfunc @1011 304: Func(0,2): CDbl 305: 0.2LF 306: * 307: + 308: local14 := damage_multiplier := CDbl(damage_multiplier) * 0.01; 309: local #14 310: Func(0,2): CDbl 311: 0.01LF 312: * 313: local14 := if(getobjproperty(attacker.weapon, "Consecrate")) 314: local #1 315: get member id 'weapon' (42) 316: "Consecrate" 317: Func(6,4): GetObjProperty 318: if false goto 323 damage_multiplier := damage_multiplier * 1.1; 319: local #14 320: 1.1LF 321: * 322: local14 := if(getobjproperty(attacker, "DivineFury")) 323: local #1 324: "DivineFury" 325: Func(6,4): GetObjProperty 326: if false goto 331 damage_multiplier := damage_multiplier * 1.1; 327: local #14 328: 1.1LF 329: * 330: local14 := if(Cint(getobjproperty(attacker, "horrificbeast"))) 331: local #1 332: "horrificbeast" 333: Func(6,4): GetObjProperty 334: Func(0,0): CInt 335: if false goto 340 damage_multiplier := damage_multiplier * 1.6; 336: local #14 337: 1.6LF 338: * 339: local14 := if(Cint(GetObjProperty(attacker, "#SWrog")) && Cint(GetObjProperty(attacker, "# 340: local #1 341: "#SWrog" 342: Func(6,4): GetObjProperty 343: Func(0,0): CInt 344: local #1 345: "#SWrog" 346: Func(6,4): GetObjProperty 347: Func(0,0): CInt 348: local #0 349: get member id 'graphic' (5) 350: == 351: && 352: if false goto 373 if(defender.npctemplate) 353: local #0 354: get member id 'npctemplate' (62) 355: if false goto 373 damage_multiplier := damage_multiplier * 1.3; 356: local #14 357: 1.3LF 358: * 359: local14 := PlayStationaryEffect( defender.x,defender.y,defender.z, FX_EXPLODE_3, 7, 0x10 ) 360: local #0 361: get member id 'x' (0) 362: local #0 363: get member id 'y' (1) 364: local #0 365: get member id 'z' (2) 366: 14000L 367: 7L 368: 16L 369: 0L 370: "britannia" 371: Func(6,7): PlayStationaryEffect 372: # if(!defender.npctemplate) 373: local #0 374: get member id 'npctemplate' (62) 375: if true goto 380 damage_multiplier := damage_multiplier * 0.5; 376: local #14 377: 0.5LF 378: * 379: local14 := basedamage := basedamage * damage_multiplier; 380: local #12 381: local #14 382: * 383: local12 := 384: leave block(1) 385: goto407 basedamage := basedamage * 1.3; // ----------------damage npc------------------ 386: local #12 387: 1.3LF 388: * 389: local12 := if(Cint(GetObjProperty(defender, "#SWrog")) && Cint(GetObjProperty(defender, "# 390: local #0 391: "#SWrog" 392: Func(6,4): GetObjProperty 393: Func(0,0): CInt 394: local #0 395: "#SWrog" 396: Func(6,4): GetObjProperty 397: Func(0,0): CInt 398: local #1 399: get member id 'graphic' (5) 400: <> 401: && 402: if false goto 407 basedamage := basedamage * 1.5; 403: local #12 404: 1.5LF 405: * 406: local12 := if(defender.shield) 407: local #0 408: get member id 'shield' (43) 409: if false goto 439 var parry_chance := GetDexterity(defender) / 4; 410: decl local #0 411: local #0 412: makelocal 413: jmp userfunc @1006 414: 4L 415: / 416: := 417: # if(RandomInt(100) < parry_chance) 418: 100L 419: Func(4,0): RandomInt 420: local #14 421: < 422: if false goto 438 PrintTextAbove(defender, "*blokuje cios tarcza*"); 423: local #0 424: "*blokuje cios tarcza*" 425: 3L 426: 1000L 427: Func(6,8): PrintTextAbove 428: # basedamage := basedamage - Cint(defender.shield.ar/2); 429: local #12 430: local #0 431: get member id 'shield' (43) 432: get member id 'ar' (40) 433: 2L 434: / 435: Func(0,0): CInt 436: - 437: local12 := 438: leave block(1) var hitscript := weapon.hitscript; 439: decl local #2 440: local #6 441: get member id 'hitscript' (94) 442: := 443: # var ar := 0; 444: decl local #3 445: 0L 446: := 447: # var hitzone := 0; 448: decl local #4 449: 0L 450: := 451: # var roll := RandomInt (100); 452: decl local #5 453: 100L 454: Func(4,0): RandomInt 455: := 456: # if (roll < 7) 457: local #17 458: 7L 459: < 460: if false goto 464 hitzone := LAYER_GLOVES; 461: 7L 462: local16 := 463: goto494 elseif (roll < 14) 464: local #17 465: 14L 466: < 467: if false goto 471 hitzone := LAYER_NECK; 468: 10L 469: local16 := 470: goto494 elseif (roll < 28) 471: local #17 472: 28L 473: < 474: if false goto 478 hitzone := LAYER_PANTS; 475: 4L 476: local16 := 477: goto494 elseif (roll < 42) 478: local #17 479: 42L 480: < 481: if false goto 485 hitzone := LAYER_HELM; 482: 6L 483: local16 := 484: goto494 elseif (roll < 56) 485: local #17 486: 56L 487: < 488: if false goto 492 hitzone := LAYER_ARMS; 489: 19L 490: local16 := 491: goto494 hitzone := LAYER_CHEST; 492: 13L 493: local16 := hitzone := GetEquipmentByLayer( defender, hitzone ); 494: local #0 495: local #16 496: Func(6,9): GetEquipmentByLayer 497: local16 := var zone_ar:=hitzone.ar; 498: decl local #6 499: local #16 500: get member id 'ar' (40) 501: := 502: # if(!hitzone) 503: local #16 504: if true goto 507 zone_ar:=0; 505: 0L 506: local18 := var typ := GetObjProperty(hitzone, "typ"); 507: decl local #7 508: local #16 509: "typ" 510: Func(6,4): GetObjProperty 511: := 512: # var level := Cint(GetObjProperty(hitzone, "level")); 513: decl local #8 514: local #16 515: "level" 516: Func(6,4): GetObjProperty 517: Func(0,0): CInt 518: := 519: # var ladunki := GetObjProperty(hitzone, "ladunki"); 520: decl local #9 521: local #16 522: "ladunki" 523: Func(6,4): GetObjProperty 524: := 525: # if(Cint(GetObjProperty(hitzone, "magik"))) 526: local #16 527: "magik" 528: Func(6,4): GetObjProperty 529: Func(0,0): CInt 530: if false goto 537 OdejmijLadunek(defender, hitzone, ladunki); // odejmowanie ladunkow z broni mag 531: local #0 532: local #16 533: local #21 534: makelocal 535: jmp userfunc @815 536: # if(typ == "reactive") 537: local #19 538: "reactive" 539: == 540: if false goto 557 PlayObjectCenteredEffect(defender, 0x22C6, 10,10); 541: local #0 542: 8902L 543: 10L 544: 10L 545: Func(6,10): PlayObjectCenteredEffect 546: # PlaySoundEffect(defender, 0x1f2); 547: local #0 548: 498L 549: Func(6,11): PlaySoundEffect 550: # basedamage := basedamage - (level * 4); 551: local #12 552: local #20 553: 4L 554: * 555: - 556: local12 := if (RandomInt (60) == 1 ) 557: 60L 558: Func(4,0): RandomInt 559: 1L 560: == 561: if false goto 608 if(Cint(!GetObjProperty(hitzone, "indes"))) 562: local #16 563: "indes" 564: Func(6,4): GetObjProperty 565: ! 566: Func(0,0): CInt 567: if false goto 577 if(!hitzone.newbie) 568: local #16 569: get member id 'newbie' (25) 570: if true goto 577 hitzone.hp := hitzone.hp - 1; 571: local #16 572: local #16 573: get member id 'hp' (88) 574: 1L 575: - 576: set member id 'hp' (88) # if(Cint(!GetObjProperty(weapon, "indes"))) 577: local #6 578: "indes" 579: Func(6,4): GetObjProperty 580: ! 581: Func(0,0): CInt 582: if false goto 592 if(!weapon.newbie) 583: local #6 584: get member id 'newbie' (25) 585: if true goto 592 weapon.hp := weapon.hp - 1; 586: local #6 587: local #6 588: get member id 'hp' (88) 589: 1L 590: - 591: set member id 'hp' (88) # if (hitzone.hp < 1) 592: local #16 593: get member id 'hp' (88) 594: 1L 595: < 596: if false goto 600 DestroyItem (hitzone); 597: local #16 598: Func(6,12): DestroyItem 599: # if (weapon.hp < 1) 600: local #6 601: get member id 'hp' (88) 602: 1L 603: < 604: if false goto 608 DestroyItem (weapon); 605: local #6 606: Func(6,12): DestroyItem 607: # if (defender.ar_mod) 608: local #0 609: get member id 'ar_mod' (31) 610: if false goto 618 zone_ar := zone_ar + (defender.ar_mod*1.7); 611: local #18 612: local #0 613: get member id 'ar_mod' (31) 614: 1.7LF 615: * 616: + 617: local18 := if(defender.npctemplate) 618: local #0 619: get member id 'npctemplate' (62) 620: if false goto 635 if(npcfg[defender.npctemplate].AR) 621: global #4 622: local #0 623: get member id 'npctemplate' (62) 624: [] 1 625: get member id 'ar' (40) 626: if false goto 635 zone_ar := ar + npcfg[defender.npctemplate].AR; 627: local #15 628: global #4 629: local #0 630: get member id 'npctemplate' (62) 631: [] 1 632: get member id 'ar' (40) 633: + 634: local18 := var rawdamage := basedamage - zone_ar; 635: decl local #10 636: local #12 637: local #18 638: - 639: := 640: # if(rawdamage < 1) 641: local #22 642: 1L 643: < 644: if false goto 647 rawdamage := 1; 645: 1L 646: local22 := if(Cint(GetObjProperty(attacker, "jailed"))) 647: local #1 648: "jailed" 649: Func(6,4): GetObjProperty 650: Func(0,0): CInt 651: if false goto 654 return 0; 652: 0L 653: return if(rawdamage > 150) 654: local #22 655: 150L 656: > 657: if false goto 660 rawdamage := 150; 658: 150L 659: local22 := var bloodoath := getobjproperty(attacker, "bloodoath"); 660: decl local #11 661: local #1 662: "bloodoath" 663: Func(6,4): GetObjProperty 664: := 665: # if(bloodoath) 666: local #23 667: if false goto 693 if(bloodoath == defender.serial) 668: local #23 669: local #0 670: get member id 'serial' (6) 671: == 672: if false goto 693 rawdamage := rawdamage - ((rawdamage*10)/100); 673: local #22 674: local #22 675: 10L 676: * 677: 100L 678: / 679: - 680: local22 := PlayObjectCenteredEffect(attacker, 0x374a, 20,15 ); 681: local #1 682: 14154L 683: 20L 684: 15L 685: Func(6,10): PlayObjectCenteredEffect 686: # PlayObjectCenteredEffect( defender, 0x374a, 20,15 ); 687: local #0 688: 14154L 689: 20L 690: 15L 691: Func(6,10): PlayObjectCenteredEffect 692: # var attune := getobjproperty(defender, "#attune"); 693: decl local #12 694: local #0 695: "#attune" 696: Func(6,4): GetObjProperty 697: := 698: # if(attune) 699: local #24 700: if false goto 721 rawdamage := rawdamage - ((rawdamage*15)/100); 701: local #22 702: local #22 703: 15L 704: * 705: 100L 706: / 707: - 708: local22 := PlayObjectCenteredEffect(attacker, 0x374a, 20,15 ); 709: local #1 710: 14154L 711: 20L 712: 15L 713: Func(6,10): PlayObjectCenteredEffect 714: # PlayObjectCenteredEffect( defender, 0x374a, 20,15 ); 715: local #0 716: 14154L 717: 20L 718: 15L 719: Func(6,10): PlayObjectCenteredEffect 720: # if(!hitscript) 721: local #14 722: if true goto 728 ApplyRawDamage(defender, rawdamage); 723: local #0 724: local #22 725: Func(3,5): ApplyRawDamage 726: # 727: goto778 var param := {}; 728: decl local #0 729: array 730: := 731: # param.+attacker := attacker; 732: local #25 733: "attacker" 734: .+ 735: local #1 736: := # param.+defender := defender; 737: local #25 738: "defender" 739: .+ 740: local #0 741: := # param.+weapon := weapon; 742: local #25 743: "weapon" 744: .+ 745: local #6 746: := # param.+armor := zone_ar; 747: local #25 748: "armor" 749: .+ 750: local #18 751: := # param.+basedamage := basedamage; 752: local #25 753: "basedamage" 754: .+ 755: local #12 756: := # param.+rawdamage := rawdamage; 757: local #25 758: "rawdamage" 759: .+ 760: local #22 761: := # if(hitscript[":"]) 762: local #14 763: ":" 764: [] 1 765: if false goto 771 Start_Script(hitscript , param); 766: local #14 767: local #25 768: Func(2,1): Start_Script 769: # 770: goto777 Start_Script(":combat:" + hitscript , param); 771: ":combat:" 772: local #14 773: + 774: local #25 775: Func(2,1): Start_Script 776: # 777: leave block(1) 778: leave block(13) 779: goto813 PlayMissSound(attacker); 780: local #1 781: makelocal 782: jmp userfunc @950 783: # if(wpn_a_elem.ProjectileType) 784: global #0 785: get member 'ProjectileType' 786: if false goto 813 PlayMovingEffectXYZ( attacker.x-4, attacker.y+4, attacker.z, defender.x, defend 787: local #1 788: get member id 'x' (0) 789: 4L 790: - 791: local #1 792: get member id 'y' (1) 793: 4L 794: + 795: local #1 796: get member id 'z' (2) 797: local #0 798: get member id 'x' (0) 799: local #0 800: get member id 'y' (1) 801: local #0 802: get member id 'z' (2) 803: global #0 804: get member 'ProjectileType' 805: Func(0,0): CInt 806: 8L 807: 0L 808: 0L 809: local #0 810: get member id 'realm' (113) 811: Func(6,13): PlayMovingEffectXYZ 812: # 813: 0L 814: return e:/gry/pol/pvp097/scripts/include/ladunki.inc, Line 4 function OdejmijLadunek(who, item, ladunki) 815: pop param 'ladunki' 816: pop param 'item' 817: pop param 'who' SetObjProperty(item, "ladunki", {ladunki[1] - 1, ladunki[2]}); 818: local #1 819: "ladunki" 820: array 821: local #0 822: 1L 823: [] 1 824: 1L 825: - 826: init{} 827: local #0 828: 2L 829: [] 1 830: init{} 831: Func(6,0): SetObjProperty 832: # if(ladunki[1] <= 0) 833: local #0 834: 1L 835: [] 1 836: 0L 837: <= 838: if false goto 869 SendSysMessage(who, "Magiczna sila przedmiotu " + item.name + " wyczerpala sie. 839: local #2 840: "Magiczna sila przedmiotu " 841: local #1 842: get member id 'name' (3) 843: + 844: " wyczerpala sie." 845: + 846: 3L 847: 40L 848: Func(6,1): SendSysMessage 849: # EraseObjProperty(item, "magik"); 850: local #1 851: "magik" 852: Func(6,2): EraseObjProperty 853: # EraseObjProperty(item, "typ"); 854: local #1 855: "typ" 856: Func(6,2): EraseObjProperty 857: # EraseObjProperty(item, "ladunki"); 858: local #1 859: "ladunki" 860: Func(6,2): EraseObjProperty 861: # EraseObjProperty(item, "level"); 862: local #1 863: "level" 864: Func(6,2): EraseObjProperty 865: # RecalcVitals(who); 866: local #2 867: Func(3,0): RecalcVitals 868: # 869: 0L 870: return E:\gry\pol\pvp097\pkg\foundations\hooks\attack.src, Line 371 function PlayHitSounds(attacker, defender) 871: pop param 'defender' 872: pop param 'attacker' if ( wpn_a_elem.HitSound ) 873: global #0 874: get member 'HitSound' 875: if false goto 882 PlaySoundEffect(attacker, wpn_a_elem.HitSound); 876: local #1 877: global #0 878: get member 'HitSound' 879: Func(6,11): PlaySoundEffect 880: # 881: goto887 PlaySoundEffect(attacker, wpn_a_elem.AttackHitSound); 882: local #1 883: global #0 884: get member 'AttackHitSound' 885: Func(6,11): PlaySoundEffect 886: # var damaged_sound; 887: decl local #2 888: # if ( defender.npctemplate ) 889: local #0 890: get member id 'npctemplate' (62) 891: if false goto 899 damaged_sound := npcfg[defender.npctemplate].DamageSound; 892: global #4 893: local #0 894: get member id 'npctemplate' (62) 895: [] 1 896: get member 'DamageSound' 897: local2 := 898: goto940 var sounds; 899: decl local #0 900: # if ( defender.gender == 0 ) 901: local #0 902: get member id 'gender' (28) 903: 0L 904: == 905: if false goto 919 sounds := array(341, 342, 343, 345, 346); 906: array 907: 341L 908: init{} 909: 342L 910: init{} 911: 343L 912: init{} 913: 345L 914: init{} 915: 346L 916: init{} 917: local3 := 918: goto931 sounds := array(332, 333, 334, 335, 336); 919: array 920: 332L 921: init{} 922: 333L 923: init{} 924: 334L 925: init{} 926: 335L 927: init{} 928: 336L 929: init{} 930: local3 := damaged_sound := sounds[RandomInt(sounds.size())+1]; 931: local #3 932: local #3 933: Call Method id size (#48, 0 params) 934: Func(4,0): RandomInt 935: 1L 936: + 937: [] 1 938: local2 := 939: leave block(1) PerformAction(defender, 0x0014); 940: local #0 941: 20L 942: Func(6,14): PerformAction 943: # PlaySoundEffect(defender, damaged_sound); 944: local #0 945: local #2 946: Func(6,11): PlaySoundEffect 947: # 948: 0L 949: return E:\gry\pol\pvp097\pkg\foundations\hooks\attack.src, Line 362 function PlayMissSound(attacker) 950: pop param 'attacker' if ( wpn_a_elem.MissSound ) 951: global #0 952: get member 'MissSound' 953: if false goto 960 PlaySoundEffect(attacker, wpn_a_elem.MissSound); 954: local #0 955: global #0 956: get member 'MissSound' 957: Func(6,11): PlaySoundEffect 958: # 959: goto965 PlaySoundEffect(attacker, wpn_a_elem.AttackMissSound); 960: local #0 961: global #0 962: get member 'AttackMissSound' 963: Func(6,11): PlaySoundEffect 964: # 965: 0L 966: return E:\gry\pol\pvp097\pkg\foundations\hooks\attack.src, Line 399 function CheckForAmmo (attacker) 967: pop param 'attacker' wpn_a := attacker.weapon; 968: local #0 969: get member id 'weapon' (42) 970: global2 := wpn_a_elem := GetWpnCfgInfo(attacker, wpn_a); 971: local #0 972: global #2 973: makelocal 974: jmp userfunc @1016 975: global0 := var default_ammotype := CINT (wpn_a_elem.ProjectileType); 976: decl local #1 977: global #0 978: get member 'ProjectileType' 979: Func(0,0): CInt 980: := 981: # if (!default_ammotype) 982: local #1 983: if true goto 986 return 0; 984: 0L 985: return foreach item in EnumerateItemsInContainer (attacker.backpack) 986: local #0 987: get member id 'backpack' (41) 988: 0L 989: Func(6,16): EnumerateItemsInContainer 990: initforeach @1002 if (item.objtype == default_ammotype) 991: local #2 992: get member id 'objtype' (4) 993: local #1 994: == 995: if false goto 1002 if (SubtractAmount (item, 1)) 996: local #2 997: 1L 998: Func(6,17): SubtractAmount 999: if false goto 1002 return 1; 1000: 1L 1001: return 1002: stepforeach @991 1003: leave block(3) return 0; 1004: 0L 1005: return e:/gry/pol/pvp097/scripts/include/attributes.inc, Line 299 function GetDexterity(who) 1006: pop param 'who' return GetAttribute(who, ATTRIBUTEID_DEXTERITY); 1007: local #0 1008: "dexterity" 1009: Func(5,2): GetAttribute 1010: return e:/gry/pol/pvp097/scripts/include/attributes.inc, Line 578 function GetStrength(who) 1011: pop param 'who' return GetAttribute(who, ATTRIBUTEID_STRENGTH); 1012: local #0 1013: "strength" 1014: Func(5,2): GetAttribute 1015: return E:\gry\pol\pvp097\pkg\foundations\hooks\attack.src, Line 354 function GetWpnCfgInfo(mobile, weapon) 1016: pop param 'weapon' 1017: pop param 'mobile' if ( mobile.IsA(POLCLASS_NPC) && weapon.objtype == GetObjTypeByName("Wrestling" 1018: local #1 1019: 4L 1020: Call Method id isa (#0, 1 params) 1021: local #0 1022: get member id 'objtype' (4) 1023: "Wrestling" 1024: Func(6,15): GetObjtypeByName 1025: == 1026: && 1027: if false goto 1034 return npcfg[mobile.npctemplate]; 1028: global #4 1029: local #1 1030: get member id 'npctemplate' (62) 1031: [] 1 1032: return 1033: goto1039 return itcfg[weapon.objtype]; 1034: global #5 1035: local #0 1036: get member id 'objtype' (4) 1037: [] 1 1038: return 1039: 0L 1040: return