1. // Emistry script
  2. // simple pvp system
  3.  
  4. - script pvp system 757,{
  5. OnStart:
  6. switch( select("Death Match:Normal Mode:Party Mode:GVG Mode") ){
  7. Case 1: // Death Match
  8. setarray .@MapName$[0],"Izlude","Morroc Ruins","The Laphine Village","Wootan Tribe's Village","Thor Camp";
  9. setarray .@Map$[0],"pvp_y_4-2","moc_ruins","mora","umbala","thor_camp";
  10. break;
  11. Case 2: // Normal Mode
  12. setarray .@MapName$[0],"Prontera","Alberta","Izlude","Payon","Morroc";
  13. setarray .@Map$[0],"pvp_y_1-1","pvp_y_1-4","pvp_y_1-2","pvp_y_1-3","pvp_y_1-5";
  14. break;
  15. Case 3: // Party Mode
  16. if( !getcharid(1) ){
  17. mes "Sorry, you dont have a Party with you.";
  18. close;
  19. }
  20. setarray .@MapName$[0],"Prontera","Alberta","Izlude","Payon","Morroc";
  21. setarray .@Map$[0],"pvp_y_2-1","pvp_y_2-4","pvp_y_2-2","pvp_y_2-3","pvp_y_2-5";
  22. break;
  23. Case 4: // GVG Mode
  24. if( !getcharid(2) ){
  25. mes "Sorry, you dont have a Guild with you.";
  26. close;
  27. }
  28. setarray .@MapName$[0],"Guild 1","Guild 2","Guild 3","Guild 4","Guild 5";
  29. setarray .@Map$[0],"guild_vs1","guild_vs2","guild_vs3","guild_vs4","guild_vs5";
  30. break;
  31. default: close;
  32. }
  33. set .@Map,( select( implode( .@MapName$,":" ) ) - 1 );
  34. warp .@Map$[.@Map],0,0;
  35. close;
  36.  
  37. OnInit:
  38. // your WAV file name.
  39. setarray .SoundEffect1$[0],"doublekill","triplekill","ultrakill";
  40. setarray .SoundEffect2$[0],"killingspree","dominating","megakill","unstoppable","wickedsick","monsterkill","godlike","holyshit";
  41. end;
  42.  
  43.  
  44. OnPCKilLEvent:
  45. // Disable if GM Level >= 80
  46. if( getgmlevel() >= 100 ) end;
  47. // Disable on these maps ( if any )
  48. set .@RestrictedMap$[0],"prontera";
  49. if( getarraysize( .@RestrictedMap$ ) )
  50. for( set .@i,0; .@i < getarraysize( .@RestrictedMap$ ); set .@i,.@i + 1 )
  51. if( strcharinfo(3) == .@RestrictedMap$[.@i] ) end;
  52.  
  53.  
  54. if( killerrid != getcharid(3) && ( getmapflag( strcharinfo(3),mf_pvp ) || getmapflag( strcharinfo(3),mf_gvg ) ) && !getmapflag( strcharinfo(3),mf_gvg_castle ) ){
  55. set @MultiKillCount,@MultiKillCount + 1;
  56. set @StreakKillCount,@StreakKillCount + 1;
  57. deltimer strnpcinfo(0)+"::OnResetCount";
  58. addtimer 18000,strnpcinfo(0)+"::OnResetCount";
  59.  
  60. announce "Player "+strcharinfo(0)+" killed "+rid2name(killedrid)+" in "+strcharinfo(3),bc_map;
  61. switch( @StreakKillCount ){
  62. Case 0: Case 1: break;
  63. Case 2: announce "Player "+strcharinfo(0)+" achieved Double Kills.",bc_map,0x776600; break;
  64. Case 3: announce "Player "+strcharinfo(0)+" achieved Triple Kills.",bc_map,0x776600; break;
  65. default:
  66. announce "Player "+strcharinfo(0)+" achieved Ultra Kills.",bc_map,0x776600;
  67. set @StreakKillCount,4;
  68. break;
  69. }
  70. if( @StreakKillCount > 1 ) soundeffectall .SoundEffect1$[@StreakKillCount-2]+".wav",0,strcharinfo(3);
  71. sleep2 2000;
  72. switch( @MultiKillCount ){
  73. Case 0: Case 1: Case 2: break;
  74. Case 3: announce "Player "+strcharinfo(0)+" is on Killing Spree.",bc_map,0x0055FF; break;
  75. Case 4: announce "Player "+strcharinfo(0)+" is on Dominating.",bc_map,0x0055FF; break;
  76. Case 5: announce "Player "+strcharinfo(0)+" is on Mega Kill.",bc_map,0x0055FF; break;
  77. Case 6: announce "Player "+strcharinfo(0)+" is on UnStoppable.",bc_map,0x0055FF; break;
  78. Case 7: announce "Player "+strcharinfo(0)+" is on Wicked Sick.",bc_map,0x0055FF; break;
  79. Case 8: announce "Player "+strcharinfo(0)+" is on M-m-m-m....Monster Kill.",bc_map,0x0055FF; break;
  80. Case 9: announce "Player "+strcharinfo(0)+" is on Godlike.",bc_map,0x0055FF; break;
  81. default:
  82. announce "Player "+strcharinfo(0)+" is on Beyond Godlike. ( Somebody kill him! )",bc_map,0x0055FF;
  83. set @MultiKillCount,10;
  84. break;
  85. }
  86. if( @MultiKillCount > 2 ) soundeffectall .SoundEffect2$[@MultiKillCount-3]+".wav",0,strcharinfo(3);
  87. }
  88. end;
  89.  
  90. OnPCDieEvent:
  91. set @MultiKillCount,0;
  92. OnResetCount:
  93. set @StreakKillCount,0;
  94. deltimer strnpcinfo(0)+"::OnResetCount";
  95. end;
  96. }
  97.  
  98.  
  99. malangdo,162,146,4 script Pvp Arena 651,{
  100. doevent "pvp system::OnStart";
  101. close;
  102. }
  103.  
  104. //prontera,155,171,5 duplicate(Pvp Arena) PVP NPC#1 757