Advertisement
Guest User

Untitled

a guest
Feb 20th, 2019
89
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 31.56 KB | None | 0 0
  1.  
  2. - script DOTAPVP -1,{
  3. OnInit:
  4. // Config
  5. set .sound, 1; // soundeffect : 0 - disable, 1 - play soundeffect to all players on map, 2 - play soundeffect to an area around the killer, 3 - play soundeffect to killer only
  6. set .announce, 0; // announce to : 0 - global, 1 - map
  7. set .announcemap, 1; // announce the map name in the announcement ? : 0 - off, 1 - on
  8.  
  9. set .announcekill, 1; // announce who pawn who's head : 0 - off, 1 - on
  10. set .msg_die, 1; // show message who kill you when die : 0 - off, 1 - on
  11. set .msg_kill, 1; // show message you kill who when killed someone : 0 - off, 1 - on
  12.  
  13. set .gmnokill, 0; // GMs are not suppose to kill players. A GM with <this number> level or higher will do nothing. IF set to 60, GM60 and above kill any player will not get anything : 0 - off
  14.  
  15. set .killingspree, 3;
  16. set .dominating, 4;
  17. set .megakill, 5;
  18. set .unstoppable, 6;
  19. set .wickedsick, 7;
  20. set .monsterkill, 8;
  21. set .godlike, 9;
  22. set .holyshit, 10;
  23. set .continue, 1; // after beyond-godlike, every <this number> kills will make announcement again
  24.  
  25. set .owned, 5; // how many times the party/guild has to kill to announce ownage
  26. set .owncontinue, 1; // after ownage, every <this number> party/guild cumulative kills will make ownage announce again
  27.  
  28. set .min_gm_menu, 90; // minimum level of GM can use the GM menu on ladder npc
  29.  
  30. set .showtotal, 20; // show the length of ladder. Note : Maximum value = 128
  31. set .showpage, 10; // set the views per page. Note : Maximum value = 128
  32. set .loweststreak, 3; // mininum streak count allow to show in highest streak ladder. Default 3 means must at least have killing spree streak to display in ladder
  33. set .lowestownage, 5; // mininum ownage count allow to show in longest ownage ladder. Default 5 means must at least have 5 ownage counts to display in ladder
  34.  
  35. // *NEW* anti-sit-killer system
  36. // a player must kill another player with this minimum <this number> base level to get the announcement and in the ladder.
  37. // Otherwise only have streak ended announcement and killed player's streak reset.
  38. // Its possible for a level 1 novice to kill a level 99 player and he/she will still get in the ladder
  39. // but a level 99 kill a level 1 player will get nothing
  40. // 0 - off this system ( default is 55, pk setting )
  41. set .lvltokill, 0;
  42.  
  43. // when a player kill another same player <this number> times in a row, the player is warp back to save point.
  44. // and the player's streak, kills, and ownage count will deduct accordingly
  45. // 0 - off this system
  46. set .counttopunish, 6;
  47.  
  48. // minimum level range to kill another player
  49. // eg. when set to 20, player level 99 needs to kill another player with minimum level of 79 to get announcement and increase the kill rank.
  50. // but a player with base level 50 kills a level 99 will also get the announcement
  51. // higher base level cannot kill lower level, but lower level can kill higher level
  52. // 0 - off this system
  53. set .minlvlrange, 0;
  54.  
  55.  
  56. // Config ends ------------------------------------------------------------------------------------------
  57.  
  58. // to prevent bug happen
  59. if ( .announce < 0 || .announce > 1 ) set .announce, 0;
  60. if ( .continue < 1 ) set .continue, 1;
  61. if ( .owncontinue < 1 ) set .owncontinue, 1;
  62. if ( .gmnokill <= 0 ) set .gmnokill, 100;
  63. if ( .lvltokill <= 1 ) set .lvltokill, 0;
  64. if ( .counttopunish <= 1 ) set .counttopunish, 0;
  65. end;
  66.  
  67. // script start
  68. OnPCKillEvent:
  69. if ( getgmlevel() >= .gmnokill ) end;
  70. getmapxy .@map$,.@x,.@y,0;
  71. if ( !attachrid(killedrid) ) end;
  72. if ( killerrid != getcharid(3) && ( .msg_die || .msg_kill ) ) {
  73. if ( .msg_die ) message strcharinfo(0),"You have been killed by "+ rid2name(killerrid);
  74. if ( .msg_kill ) message rid2name(killerrid),"You just killed "+ strcharinfo(0);
  75. }
  76. if ( @PlayersKilledStreak >= .holyshit )
  77. set .@streakname$,"Beyond Godlike";
  78. else if ( @PlayersKilledStreak >= .godlike )
  79. set .@streakname$,"Godlike";
  80. else if ( @PlayersKilledStreak >= .monsterkill )
  81. set .@streakname$,"Monster Kill";
  82. else if ( @PlayersKilledStreak >= .wickedsick )
  83. set .@streakname$,"Wicked Sick";
  84. else if ( @PlayersKilledStreak >= .unstoppable )
  85. set .@streakname$,"Unstoppable";
  86. else if ( @PlayersKilledStreak >= .megakill )
  87. set .@streakname$,"Mega-kill";
  88. else if ( @PlayersKilledStreak >= .dominating )
  89. set .@streakname$,"Dominating";
  90. else if ( @PlayersKilledStreak >= .killingspree )
  91. set .@streakname$,"Killing Spree";
  92. if ( @PlayersKilledStreak >= .killingspree && killerrid == getcharid(3) )
  93. announce strcharinfo(0) +" has ended "+( (sex)?"him":"her" )+" own "+ .@streakname$ +"["+ @PlayersKilledStreak +"] streak "+( (.announcemap)?("at "+ .@map$):""),16|.announce;
  94. else if ( @PlayersKilledStreak >= .killingspree )
  95. announce rid2name(killerrid) +" has ended "+ strcharinfo(0) +"'s "+ .@streakname$ +"["+ @PlayersKilledStreak +"] streak "+( (.announcemap)?("at "+ .@map$):""),16|.announce;
  96. else if ( .announcekill )
  97. announce rid2name(killerrid) +" has pawned "+ strcharinfo(0) +" "+( (.announcemap)?("at "+ .@map$):""),16|.announce;
  98. set @PlayersKilledStreak,0;
  99. if ( query_sql("select char_id from pvpm_data where char_id = "+ getcharid(0), .@d_cid ) )
  100. query_sql "update pvpm_data set deaths = deaths + 1 where char_id = "+ getcharid(0);
  101. set @dota_multikills,0;
  102. if ( getcharid(2) ) {
  103. if ( query_sql("select guild_id from ownladder where guild_id = "+ getcharid(2), .@d_gid ) )
  104. query_sql "update ownladder set currentown = 0 where guild_id = "+ getcharid(2);
  105. set .@killedgroup, getcharid(2);
  106. }
  107. if ( killerrid == getcharid(3) || baselevel < .lvltokill ) end;
  108. if ( .minlvlrange ) set .@killedlvl, baselevel;
  109. if ( !attachrid(killerrid) ) end;
  110. if ( .minlvlrange && .@killedlvl + .minlvlrange < baselevel ) end;
  111. if ( .counttopunish ) {
  112. for ( set .@i,0; .@i < 60; set .@i, .@i +1 ) {
  113. if ( .@i == gettime(2) ) continue;
  114. deletearray getd("@sitkillid"+ .@i), 128;
  115. deletearray getd("@sitkilltimes"+ .@i), 128;
  116. }
  117. for ( set .@i,0; .@i < getarraysize( getd("@sitkillid"+ gettime(2)) ); set .@i, .@i +1 ) {
  118. if ( getd("@sitkillid"+ gettime(2) +"["+ .@i +"]") != killedrid )
  119. continue;
  120. else {
  121. set .@sitkillfound, 1;
  122. setd "@sitkilltimes"+ gettime(2) +"["+ .@i +"]", getd("@sitkilltimes"+ gettime(2) +"["+ .@i +"]") +1 ;
  123. if ( getd("@sitkilltimes"+ gettime(2) +"["+ .@i +"]") >= .counttopunish ) {
  124. warp "SavePoint",0,0;
  125. announce strcharinfo(0) +" , Stop killing "+ rid2name(killedrid) + " !!!",0;
  126. debugmes strcharinfo(0) +" is sit-killing "+ rid2name(killedrid) +" for "+ getd("@sitkilltimes"+ gettime(2) +"["+ .@i +"]") + " times";
  127. logmes "is sit-killing "+ rid2name(killedrid) +" for "+ getd("@sitkilltimes"+ gettime(2) +"["+ .@i +"]") +" times";
  128. query_sql "update pvpm_data set kills = kills - "+ ( .counttopunish -1 ) +" where char_id = "+ getcharid(0);
  129. query_sql "select streaks from pvpm_data where char_id = "+ getcharid(0), .@streak;
  130. if ( @PlayersKilledStreak == .@streak )
  131. query_sql "update pvpm_data set streaks = "+( @PlayersKilledStreak +1 - .counttopunish )+" where char_id = "+ getcharid(0);
  132. set @PlayersKilledStreak, @PlayersKilledStreak +1 - .counttopunish;
  133. if ( getcharid(2) ) {
  134. query_sql "select currentown, highestown from ownladder where guild_id = "+ getcharid(2), .@currentown, .@highestown;
  135. query_sql "update ownladder set currentown = currentown - "+ ( .counttopunish -1 ) +" where guild_id = "+ getcharid(2);
  136. if ( .@currentown == .@highestown )
  137. query_sql "update ownladder set highestown = currentown where guild_id = "+ getcharid(2);
  138. }
  139. end;
  140. }
  141. }
  142. }
  143. if ( !.@sitkillfound ) {
  144. setd "@sitkillid"+ gettime(2) +"["+ .@i +"]", killedrid;
  145. setd "@sitkilltimes"+ gettime(2) +"["+ .@i +"]", 1;
  146. }
  147. }
  148. set @PlayersKilledStreak, @PlayersKilledStreak + 1;
  149. if ( query_sql("select streaks from pvpm_data where char_id = "+ getcharid(0), .@streaks) )
  150. query_sql "update pvpm_data set kills = kills + 1 where char_id = "+ getcharid(0);
  151. else
  152. query_sql "insert into pvpm_data ( char_id, name, kills , streaktime ) values ( "+ getcharid(0) +", '"+ escape_sql( strcharinfo(0) ) +"', 1, now() )";
  153. if ( @PlayersKilledStreak > .@streaks ) {
  154. query_sql "update pvpm_data set streaks = "+ @PlayersKilledStreak +" where char_id = "+ getcharid(0);
  155. query_sql "update pvpm_data set streaktime = now() where char_id = "+ getcharid(0);
  156. }
  157. if ( @PlayersKilledStreak == .killingspree )
  158. setarray .@streakname$,"killingspree.wav","is on a KILLING SPREE",".";
  159. else if ( @PlayersKilledStreak == .dominating )
  160. setarray .@streakname$,"dominating.wav","is DOMINATING!",".";
  161. else if ( @PlayersKilledStreak == .megakill )
  162. setarray .@streakname$,"megakill.wav","has a MEGA-Kill!",".";
  163. else if ( @PlayersKilledStreak == .unstoppable )
  164. setarray .@streakname$,"unstoppable.wav","is UNSTOPPABLE!",".";
  165. else if ( @PlayersKilledStreak == .wickedsick )
  166. setarray .@streakname$,"wickedsick.wav","is WICKED SICK!",".";
  167. else if ( @PlayersKilledStreak == .monsterkill )
  168. setarray .@streakname$,"monsterkill.wav","has a MONSTER Kill!",".";
  169. else if ( @PlayersKilledStreak == .godlike )
  170. setarray .@streakname$,"godlike.wav","is GODLIKE!",". Will someone ever stop "+( (sex)?"him":"her" ) +"?";
  171. else if ( @PlayersKilledStreak >= .holyshit && ( (@PlayersKilledStreak - .holyshit) % .continue == 0 ) )
  172. setarray .@streakname$,"holyshit.wav","is BEYOND GODLIKE!",". Someone kill "+( (sex)?"him":"her" ) +"!";
  173. if ( .@streakname$[1] != "" ) {
  174. announce strcharinfo(0) +" "+ .@streakname$[1] +"["+ @PlayersKilledStreak +"] "+( (.announcemap)?("at "+ .@map$):"") + .@streakname$[2],16|.announce;
  175. if ( .sound == 1 ) soundeffectall .@streakname$[0],0,.@map$;
  176. else if ( .sound == 2 ) soundeffectall .@streakname$[0],0;
  177. else if ( .sound == 3 ) soundeffect .@streakname$[0],0;
  178. }
  179. set @dota_multikills, @dota_multikills + 1;
  180. deltimer "DOTAPVP::OnStreakReset";
  181. addtimer 5000,"DOTAPVP::OnStreakReset";
  182. if ( getcharid(2) ) {
  183. set .@sideid, getcharid(2);
  184. if ( .@sideid != .@killedgroup ) {
  185. if ( query_sql("select currentown, highestown from ownladder where guild_id = "+ getcharid(2), .@currentown, .@highestown) ) {
  186. set .@currentown, .@currentown + 1;
  187. query_sql "update ownladder set currentown = "+ .@currentown +" where guild_id = "+ getcharid(2);
  188. if ( .@currentown > .@highestown ) {
  189. query_sql "update ownladder set highestown = "+ .@currentown +" where guild_id = "+ getcharid(2);
  190. query_sql "update ownladder set owntime = now() where guild_id = "+ getcharid(2);
  191. }
  192. } else
  193. query_sql "insert into ownladder ( guild_id, name, currentown, highestown ) values ( "+ getcharid(2) +", '"+ escape_sql( strcharinfo(2) ) +"', 1 , 1 )";
  194. }
  195. }
  196. set .@dota_multikills, @dota_multikills;
  197. set .@origin, getcharid(3);
  198. sleep 1500;
  199. if ( .@sideid && .@sideid != .@killedgroup && .@currentown >= .owned && ( ( .@currentown - .owned ) % .owncontinue == 0 ) ) {
  200. if ( .announce ) mapannounce .@map$, "The guild ["+ getguildname(.@sideid) +"] is OWNING["+ .@currentown +"] !!!",16;
  201. else announce "The guild ["+ getguildname(.@sideid) +"] is OWNING["+ .@currentown +"] !!!",16;
  202. if ( .sound == 1 ) soundeffectall "ownage.wav",0,.@map$;
  203. else if ( .sound == 2 ) soundeffectall "ownage.wav",0;
  204. else if ( .sound == 3 && attachrid(.@origin) ) soundeffect "ownage.wav",0;
  205. }
  206. sleep 1250;
  207. if ( !attachrid(.@origin) ) end;
  208. if ( .@dota_multikills == 2 ) {
  209. if ( .announce ) mapannounce .@map$, strcharinfo(0) +" just got a Double Kill !",16;
  210. else announce strcharinfo(0) +" just got a Double Kill !",16;
  211. if ( .sound == 1 ) soundeffectall "doublekill.wav",0,.@map$;
  212. else if ( .sound == 2 ) soundeffectall "doublekill.wav",0;
  213. else if ( .sound == 3 ) soundeffect "doublekill.wav",0;
  214. }
  215. else if ( .@dota_multikills == 3 ) {
  216. if ( .announce ) mapannounce .@map$, strcharinfo(0) +" just got a TRIPLE KILL !!!!!!",16;
  217. else announce strcharinfo(0) +" just got a TRIPLE KILL !!!!!!",16;
  218. if ( .sound == 1 ) soundeffectall "triplekill.wav",0,.@map$;
  219. else if ( .sound == 2 ) soundeffectall "triplekill.wav",0;
  220. else if ( .sound == 3 ) soundeffect "triplekill.wav",0;
  221. }
  222. else if ( .@dota_multikills == 4 ) {
  223. if ( .announce ) mapannounce .@map$, strcharinfo(0) +" just got a ULTRA KILL !!!!!!",16;
  224. else announce strcharinfo(0) +" just got a ULTRA KILL !!!!!!",16;
  225. if ( .sound == 1 ) soundeffectall "ultrakill.wav",0,.@map$;
  226. else if ( .sound == 2 ) soundeffectall "ultrakill.wav",0;
  227. else if ( .sound == 3 ) soundeffect "ultrakill.wav",0;
  228. }
  229. else if ( .@dota_multikills >= 5 ) {
  230. if ( .announce ) mapannounce .@map$, strcharinfo(0) +" just got a RAMPAGE !!!!!!",16;
  231. else announce strcharinfo(0) +" just got a RAMPAGE !!!!!!",16;
  232. if ( .sound == 1 ) soundeffectall "rampage.wav",0,.@map$;
  233. else if ( .sound == 2 ) soundeffectall "rampage.wav",0;
  234. else if ( .sound == 3 ) soundeffect "rampage.wav",0;
  235. }
  236. end;
  237. OnWhisperGlobal:
  238. dispbottom "Your current Streak : "+ @PlayersKilledStreak;
  239. if ( query_sql("select kills from pvpm_data where char_id = "+ getcharid(0), .@kills) )
  240. dispbottom "Your total Kills : "+ .@kills;
  241. else
  242. dispbottom "You are not in the pvp ladder yet";
  243. if ( !getcharid(2) ) end;
  244. if ( query_sql("select currentown from ownladder where guild_id = "+ getcharid(2), .@currentown) )
  245. dispbottom "Your guild Own : "+ .@currentown;
  246. else
  247. dispbottom "Your guild is not in the ladder yet.";
  248. end;
  249. OnStreakReset:
  250. set @dota_multikills,0;
  251. end;
  252. }
  253.  
  254. ra_temple,132,152,5 script PvP-StatsViewer 57,{
  255. set .@npcname$, strnpcinfo(0);
  256. do {
  257. deletearray .@name$, 128;
  258. deletearray .@kills, 128;
  259. deletearray .@deaths, 128;
  260. deletearray .@streak, 128;
  261. deletearray .@owned, 128;
  262. deletearray .@time$, 128;
  263. set .@gid, 0;
  264. set .@cid, 0;
  265. set .@currentown, 0;
  266. mes "["+ .@npcname$ +"]";
  267. mes "Hello "+ strcharinfo(0) +"...";
  268. mes "If you want to I can show you your PVP stats.";
  269. if ( getgmlevel() >= getvariableofnpc(.min_gm_menu,"DOTAPVP") ) mes "And GM option for you.";
  270. next;
  271. if ( getgmlevel() >= getvariableofnpc(.min_gm_menu,"DOTAPVP") )
  272. select "Most Kills","Highest Streak","Longest Ownage","Own Information","Explanation","Reset Table","Modify a ladder value";
  273. else
  274. select "Most Kills","Highest Streak","Longest Ownage","Own Information","Explanation";
  275. switch (@menu) {
  276. case 1:
  277. query_sql "select name, kills, deaths from pvpm_data order by kills desc limit "+ getvariableofnpc(.showtotal,"DOTAPVP"), .@name$, .@kills, .@deaths;
  278. if ( !getarraysize(.@name$) ) {
  279. mes "["+ .@npcname$ +"]";
  280. mes "The ladder currently is empty";
  281. next;
  282. }
  283. for ( set .@j,0; .@j < getarraysize(.@name$); set .@j, .@j + getvariableofnpc(.showpage,"DOTAPVP") ) {
  284. mes "["+ .@npcname$ +"]";
  285. for ( set .@i, .@j; .@i < (getvariableofnpc(.showpage,"DOTAPVP") + .@j) && .@i < getarraysize(.@name$); set .@i, .@i + 1 ) {
  286. mes "^996600"+ (.@i+1) +": ^006699"+ .@name$[.@i] +" ^00AA00["+ .@kills[.@i] +"] ^FF0000<"+ .@deaths[.@i] +">^000000";
  287. }
  288. next;
  289. }
  290. break;
  291. case 2:
  292. query_sql "select name, streaks, date_format(streaktime,'%a %e/%c/%y %r') from pvpm_data where streaks >= "+ getvariableofnpc(.loweststreak,"DOTAPVP") +" order by streaks desc limit "+ getvariableofnpc(.showtotal,"DOTAPVP"), .@name$, .@streak, .@time$;
  293. if ( !getarraysize(.@name$) ) {
  294. mes "["+ .@npcname$ +"]";
  295. mes "The ladder currently is empty";
  296. next;
  297. }
  298. for ( set .@j,0; .@j < getarraysize(.@name$); set .@j, .@j + getvariableofnpc(.showpage,"DOTAPVP") ) {
  299. mes "["+ .@npcname$ +"]";
  300. for ( set .@i, .@j; .@i < (getvariableofnpc(.showpage,"DOTAPVP") + .@j) && .@i < getarraysize(.@name$); set .@i, .@i + 1 ) {
  301. mes "^996600"+ (.@i+1) +": ^006699"+ .@name$[.@i] +" ^70AC11{"+ .@streak[.@i] +"} ^000000on :";
  302. mes " ^EE8800"+ .@time$[.@i] +"^000000";
  303. }
  304. next;
  305. }
  306. break;
  307. case 3:
  308. query_sql "select name, highestown, date_format(owntime,'%a %e/%c/%y %r') from ownladder where highestown >= "+ getvariableofnpc(.lowestownage,"DOTAPVP") +" order by highestown desc limit "+ getvariableofnpc(.showtotal,"DOTAPVP"), .@name$, .@owned, .@time$;
  309. if ( !getarraysize(.@name$) ) {
  310. mes "["+ .@npcname$ +"]";
  311. mes "The ladder currently is empty";
  312. next;
  313. }
  314. for ( set .@j,0; .@j < getarraysize(.@name$); set .@j, .@j + getvariableofnpc(.showpage,"DOTAPVP") ) {
  315. mes "["+ .@npcname$ +"]";
  316. for ( set .@i, .@j; .@i < (getvariableofnpc(.showpage,"DOTAPVP") + .@j) && .@i < getarraysize(.@name$); set .@i, .@i + 1 ) {
  317. mes "^996600"+ (.@i+1) +": ^006699"+ .@name$[.@i] +" ^00AAAA("+ .@owned[.@i] +") ^000000on :";
  318. mes " ^EE8800"+ .@time$[.@i] +"^000000";
  319. }
  320. next;
  321. }
  322. break;
  323. case 4:
  324. query_sql "select char_id, streaks, kills, deaths, date_format(streaktime,'%a %e/%c/%y %r') from pvpm_data where char_id = "+ getcharid(0), .@cid, .@streak, .@kills, .@deaths, .@time$;
  325. mes "["+ .@npcname$ +"]";
  326. if ( !.@cid && !@PlayersKilledStreak )
  327. mes "You not yet kill any player";
  328. else {
  329. mes "Your Current Streak : ^70AC11{"+ @PlayersKilledStreak +"}^000000";
  330. mes "Your Total Kills : ^00AA00["+ .@kills +"]^000000";
  331. mes "Your Death Counts : ^FF0000<"+ .@deaths +">^000000";
  332. mes "Highest Streak was ^70AC11{"+ .@streak +"}^000000 on :";
  333. mes " ^EE8800"+ .@time$ +"^000000";
  334. set .@streak, 0;
  335. set .@kills, 0;
  336. set .@deaths, 0;
  337. set .@time$, "";
  338. }
  339. next;
  340. if ( getcharid(2) ) {
  341. mes "["+ .@npcname$ +"]";
  342. query_sql "select guild_id, currentown, highestown, date_format(owntime,'%a %e/%c/%y %r') from ownladder where guild_id = "+ getcharid(2), .@gid, .@currentown, .@owned, .@time$;
  343. if ( !.@gid )
  344. mes "Your guild not yet kill any player";
  345. else {
  346. mes "Your guild name : ^006699"+ strcharinfo(2) +"^000000";
  347. mes "Current Owning : ^00AAAA("+ .@currentown +")^000000";
  348. mes "Longest Ownage was ^00AAAA("+ .@owned + ")^000000 on :";
  349. mes " ^EE8800"+ .@time$ +"^000000";
  350. }
  351. next;
  352. }
  353. break;
  354. case 5:
  355. mes "["+ .@npcname$ +"]";
  356. mes "Explanation for Most Kills:";
  357. mes " ";
  358. mes "^996600Rank. ^006699NAME ^00AA00[Total Kills] ^FF0000<Deaths>^000000";
  359. mes " ";
  360. mes "--------------------------------";
  361. mes " ";
  362. mes "The ^00AA00Kills^000000 added when a player kills another player.";
  363. mes " ";
  364. mes "^FF0000Deaths^000000 count increase when a player killed by another player, or suicide (eg: Grand Cross).";
  365. mes " ";
  366. mes "A player killed by monsters, homunculus or pets will not add the kills or deaths count.";
  367. next;
  368. mes "["+ .@npcname$ +"]";
  369. mes "Explanation for Highest Streak:";
  370. mes " ";
  371. mes "^996600Rank. ^006699NAME ^70AC11{Highest Streak} ^000000on :";
  372. mes " ^EE8800TIME^000000";
  373. mes " ";
  374. mes "--------------------------------";
  375. mes " ";
  376. mes "The ^70AC11Streak^000000 are added every time a player kills another player. It will reset upon log out, killed by another player, or suicide (eg: Sacrifice).";
  377. mes " ";
  378. mes "Then it record in the server the ^EE8800TIME^000000 when that player got that highest streak.";
  379. mes " ";
  380. mes "A player killed by monsters, homunculus or pets will not reset the streak.";
  381. mes " ";
  382. mes "--------------------------------";
  383. mes " ";
  384. mes "The numbers of straight kills to get these announcements are :";
  385. mes "^70AC11"+ getvariableofnpc(.killingspree,"DOTAPVP") +"^000000 : Killing Spree";
  386. mes "^70AC11"+ getvariableofnpc(.dominating,"DOTAPVP") +"^000000 : Dominating";
  387. mes "^70AC11"+ getvariableofnpc(.megakill,"DOTAPVP") +"^000000 : Mega Kill";
  388. mes "^70AC11"+ getvariableofnpc(.unstoppable,"DOTAPVP") +"^000000 : Unstoppable";
  389. mes "^70AC11"+ getvariableofnpc(.wickedsick,"DOTAPVP") +"^000000 : Wicked Sick";
  390. mes "^70AC11"+ getvariableofnpc(.monsterkill,"DOTAPVP") +"^000000 : Monster Kill";
  391. mes "^70AC11"+ getvariableofnpc(.godlike,"DOTAPVP") +"^000000 : Godlike";
  392. mes "^70AC11"+ getvariableofnpc(.holyshit,"DOTAPVP") +"^000000 : Beyond Godlike";
  393.  
  394. next;
  395. mes "["+ .@npcname$ +"]";
  396. mes "Explanation for Longest Ownage:";
  397. mes " ";
  398. mes "^996600Rank. ^006699NAME ^00AAAA(Longest Ownage) ^000000on :";
  399. mes " ^EE8800TIME^000000";
  400. mes " ";
  401. mes "--------------------------------";
  402. mes " ";
  403. mes "The ^00AAAAOwnage^000000 added every time any guild members killed another player that doesn't belong to his/her guild. It will reset when any of the guild member was killed by ANY player, including his/her guild member.";
  404. mes " ";
  405. mes "Then it record in the server the ^EE8800TIME^000000 when the guild got that longest ownage.";
  406. mes " ";
  407. mes "If the server went under maintainance, the current ownage will survive after the server restart";
  408. mes " ";
  409. mes "Any guild member killed by monster, homunculus or pets will not reset the ownage count.";
  410. next;
  411. if ( getvariableofnpc(.lvltokill,"DOTAPVP") ) {
  412. mes "["+ .@npcname$ +"]";
  413. mes "You must kill another player with minimum base level of "+ getvariableofnpc(.lvltokill,"DOTAPVP") +", in order to get an announcement or get in the ladder.";
  414. mes " ";
  415. mes "It's possible for a base level 1 novice kills a base level 99 player and still can get in the ladder.";
  416. mes "However when a player level 99 kills a level 1 novice will get nothing.";
  417. next;
  418. }
  419. if ( getvariableofnpc(.counttopunish,"DOTAPVP") ) {
  420. mes "["+ .@npcname$ +"]";
  421.  
  422. mes "Some noob players try to kill the same person over and over again in hope of getting his/her name appear in the ladder.";
  423. mes "However if you trying to do the same thing on this ladder, your name will announce to the public, and your action will be recorded into the server to notify the GMs.";
  424. next;
  425. }
  426. if ( getvariableofnpc(.minlvlrange,"DOTAPVP") ) {
  427. mes "["+ .@npcname$ +"]";
  428. mes "When you kill another player thats lower base level than you, the base level gap between you and that player must not more than "+ getvariableofnpc(.minlvlrange,"DOTAPVP") +".";
  429. mes " ";
  430. if ( getvariableofnpc(.minlvlrange,"DOTAPVP") >= 200)
  431. mes "In other words, if your base level is 500, the player you killed must be at least level "+( 500 - getvariableofnpc(.minlvlrange,"DOTAPVP") )+" then only you will get the announcement and in the ladder.";
  432. else if ( getvariableofnpc(.minlvlrange,"DOTAPVP") >= 70)
  433. mes "In other words, if your base level is 255, the player you killed must be at least level "+( 255 - getvariableofnpc(.minlvlrange,"DOTAPVP") )+" then only you will get the announcement and in the ladder.";
  434. else
  435. mes "In other words, if your base level is 99, the player you killed must be at least level "+( 99 - getvariableofnpc(.minlvlrange,"DOTAPVP") )+" then only you will get the announcement and in the ladder.";
  436. mes "Higher base level kills lower level gets nothing, however lower level player kills higher level will get the announcement.";
  437. next;
  438. }
  439. break;
  440. case 6:
  441. if ( getgmlevel() < getvariableofnpc(.min_gm_menu,"DOTAPVP") ) break;
  442. mes "["+ .@npcname$ +"]";
  443. mes "Which table you want to reset ?";
  444. next;
  445. switch( select("Both","PVP ladder","Ownage ladder","Nope") ) {
  446. case 1:
  447. mes "["+ .@npcname$ +"]";
  448. mes "Are you sure you want to reset both ladder ?";
  449. next;
  450. if ( select("Nope:Yup") == 1 ) break;
  451. query_sql "delete from pvpm_data";
  452. query_sql "delete from ownladder";
  453. mes "["+ .@npcname$ +"]";
  454. mes "Both ladder are reset";
  455. next;
  456. break;
  457. case 2:
  458. case 3:
  459. set .@menu, @menu;
  460. mes "["+ .@npcname$ +"]";
  461. mes "Are you sure you want to reset "+( (.@menu ==2)?"PVP":"Ownage" )+" ladder ?";
  462. next;
  463. if ( select("Nope:Yup") == 1 ) break;
  464. query_sql "delete from "+( (.@menu ==2)?"pvp":"own" )+"ladder";
  465. mes "["+ .@npcname$ +"]";
  466. mes "The ladder is reset";
  467. next;
  468. break;
  469. default:
  470. }
  471. break;
  472. case 7:
  473. if ( getgmlevel() < getvariableofnpc(.min_gm_menu,"DOTAPVP") ) break;
  474. mes "["+ .@npcname$ +"]";
  475. mes "select which table you want to modify";
  476. next;
  477. switch( select ("PVP ladder","Ownage ladder","Back") ) {
  478. if ( @menu == 3 ) break;
  479. mes "["+ .@npcname$ +"]";
  480. mes "select input type";
  481. next;
  482. case 1:
  483. if ( select("Char ID","Char Name","Account ID") != 3) {
  484. if ( @menu == 1 )
  485. input .@id;
  486. else
  487. input .@id$;
  488. mes "["+ .@npcname$ +"]";
  489. query_sql "select char_id from `char` where "+( (@menu ==1)?("char_id = "+ .@id):("name = '"+ escape_sql(.@id$) +"'") ), .@cid;
  490. if ( !.@cid ) {
  491. mes "There is no such character "+( (@menu == 1)?"ID":"name");
  492. next;
  493. break;
  494. } else
  495. set .@cid, 0;
  496. query_sql "select char_id, name, streaks, kills, deaths, date_format(streaktime,'%a %e/%c/%y %r') from pvpm_data where "+( (@menu ==1)?("char_id = "+ .@id):("name = '"+ escape_sql(.@id$) +"'") ), .@cid, .@name$, .@streak, .@kills, .@deaths, .@time$;
  497. if ( !.@cid ) {
  498. mes "This player is not in the ladder";
  499. next;
  500. break;
  501. }
  502. } else {
  503. input .@id;
  504. query_sql "select char_id, name, char_num from `char` where account_id = "+ .@id +" order by char_num asc", .@cid, .@name$, .@gid;
  505. if ( !.@cid ) {
  506. mes "There is no such Account ID";
  507. next;
  508. break;
  509. }
  510. mes "["+ .@npcname$ +"]";
  511. for ( set .@i,0; .@i < getarraysize(.@cid); set .@i, .@i + 1 )
  512. mes (.@gid[.@i] +1) +". "+ .@cid[.@i] +" "+ .@name$[.@i];
  513. set .@menu$, (.@gid[.@i] +1) +". "+ .@cid;
  514. for ( set .@i,1; .@i < getarraysize(.@cid); set .@i, .@i + 1 )
  515. set .@menu$, .@menu$ +":"+ .@gid[.@i] +". "+ .@cid[.@i];
  516. next;
  517. select .@menu$;
  518. mes "["+ .@npcname$ +"]";
  519. set .@id, .@cid[@menu-1];
  520. deletearray .@cid, 9;
  521. query_sql "select char_id, name, streaks, kills, deaths, date_format(streaktime,'%a %e/%c/%y %r') from pvpm_data where char_id = "+ .@id, .@cid, .@name$, .@streak, .@kills, .@deaths, .@time$;
  522. if ( !.@cid ) {
  523. mes "This player is not in the ladder";
  524. next;
  525. break;
  526. }
  527. }
  528. mes "Char ID : ^006699"+ .@cid +"^000000";
  529. mes "Char Name : ^006699"+ .@name$ +"^000000";
  530. mes "Total Kills : ^00AA00["+ .@kills +"]^000000";
  531. mes "Deaths Counts : ^FF0000<"+ .@deaths +">^000000";
  532. mes "Highest Streak was ^70AC11{"+ .@streak +"}^000000 on :";
  533. mes " ^EE8800"+ .@time$ +"^000000";
  534. next;
  535. switch( select("Total Kills","Death Counts","Highest Streak & Highest Streak Time","Name") ) {
  536. case 1:
  537. setarray .@time$,"Total Kills",".@kills","kills","";
  538. break;
  539. case 2:
  540. setarray .@time$,"Death Counts",".@deaths","deaths","";
  541. break;
  542. case 3:
  543. setarray .@time$,"Highest Streak",".@streak","streaks","1";
  544. default:
  545. }
  546. if ( @menu < 4 ) {
  547. input .@num;
  548. mes "["+ .@npcname$ +"]";
  549. mes "Really change "+ .@name$ +"'s";
  550. mes .@time$[0] +" from "+ getd(.@time$[1]) +" to "+ .@num +" ?";
  551. if ( .@num >= getd(.@time$[1]) && .@time$[3] == "1" ) mes "and set Highest Streak Time to current time?";
  552. next;
  553. if ( select("Nope:Yup") == 1 ) break;
  554. mes "["+ .@npcname$ +"]";
  555. query_sql "update pvpm_data set "+ .@time$[2] +" = "+ .@num +" where char_id = "+ .@cid;
  556. if ( .@num >= getd(.@time$[1]) && .@time$[3] == "1" ) query_sql "update pvpm_data set streaktime = now()";
  557. mes "The "+ .@time$[0] +" for";
  558. mes .@name$ +" has set to "+ .@num;
  559. if ( .@num >= getd(.@time$[1]) && .@time$[3] == "1" ) mes "and the Highest Streak Time set to current time";
  560. next;
  561. break;
  562. } else {
  563. mes "["+ .@npcname$ +"]";
  564. mes "Refreshing name of this char :";
  565. mes .@name$ +" ......";
  566. mes " ";
  567. query_sql "select `char`.name, pvpm_data.name from `char` right join pvpm_data on `char`.char_id = pvpm_data.char_id where `char`.char_id = "+ .@cid, .@cid1$, .@cid2$;
  568. if ( .@cid1$ == "" )
  569. mes "The character has deleted, so can't be change anymore";
  570. else if ( .@cid1$ == .@cid2$ )
  571. mes "The name is still the same, so don't need to change";
  572. else {
  573. query_sql "update pvpm_data set name = '"+ escape_sql(.@cid1$) +"' where char_id = "+ .@cid;
  574. mes "Now it called : "+ .@cid1$;
  575. }
  576. set .@cid1$, "";
  577. set .@cid2$, "";
  578. next;
  579. }
  580. break;
  581. case 2:
  582. select "Guild ID","Guild Name";
  583. if ( @menu == 1 )
  584. input .@id;
  585. else
  586. input .@id$;
  587. mes "["+ .@npcname$ +"]";
  588. query_sql "select guild_id from guild where "+( (@menu ==1)?("guild_id = "+ .@id):("name = '"+ escape_sql(.@id$) +"'") ), .@gid;
  589. if ( !.@gid ) {
  590. mes "There is no such guild";
  591. next;
  592. break;
  593. } else
  594. set .@gid, 0;
  595. query_sql "select guild_id, name, currentown, highestown, date_format(owntime,'%a %e/%c/%y %r') from ownladder where "+( (@menu ==1)?("guild_id = "+ .@id):("name = '"+ escape_sql(.@id$) +"'") ), .@gid, .@name$, .@currentown, .@owned, .@time$;
  596. if ( !.@gid ) {
  597. mes "This guild is not in the ladder";
  598. next;
  599. break;
  600. }
  601. mes "Guild ID : ^006699"+ .@gid +"^000000";
  602. mes "Guild name : ^006699"+ .@name$ +"^000000";
  603. mes "Current Owning : ^00AAAA("+ .@currentown +")^000000";
  604. mes "Longest Ownage was ^00AAAA("+ .@owned +")^000000 on :";
  605. mes " ^EE8800"+ .@time$ +"^000000";
  606. next;
  607. switch( select("Current Owning","Longest Ownage & Longest Ownage Time","Name") ) {
  608. case 1:
  609. setarray .@time$,"Current Owning",".@currentown","currentown","";
  610. break;
  611. case 2:
  612. setarray .@time$,"Highest Ownage",".@owned","highestown","1";
  613. default:
  614. }
  615. if ( @menu < 3 ) {
  616. input .@num;
  617. mes "["+ .@npcname$ +"]";
  618. mes "Really change "+ .@name$ +"'s";
  619. mes .@time$[0] +" from "+ getd(.@time$[1]) +" to "+ .@num +" ?";
  620. if ( .@num >= getd(.@time$[1]) && .@time$[3] == "1" ) mes "and set Longest Ownage Time to current time?";
  621. next;
  622. if ( select("Nope:Yup") == 1 ) break;
  623. mes "["+ .@npcname$ +"]";
  624. query_sql "update ownladder set "+ .@time$[2] +" = "+ .@num +" where guild_id = "+ .@gid;
  625. if ( .@num >= getd(.@time$[1]) && .@time$[3] == "1" ) query_sql "update ownladder set owntime = now()";
  626. mes "The "+ .@time$[0] +" for";
  627. mes .@name$ +" guild has set to "+ .@num;
  628. if ( .@num >= getd(.@time$[1]) && .@time$[3] == "1" ) mes "and the Longest Ownage Time set to current time";
  629. next;
  630. break;
  631. } else {
  632. mes "["+ .@npcname$ +"]";
  633. mes "Refreshing name of this guild :";
  634. mes .@name$ +" ......";
  635. mes " ";
  636. query_sql "select guild.name, ownladder.name from guild right join ownladder on guild.guild_id = ownladder.guild_id where guild.guild_id = "+ .@gid, .@gid1$, .@gid2$;
  637. if ( .@gid1$ == "" )
  638. mes "The guild has deleted, so can't be change anymore";
  639. else if ( .@gid1$ == .@gid2$ )
  640. mes "The name is still the same, so don't need to change";
  641. else {
  642. query_sql "update ownladder set name = '"+ escape_sql(.@gid1$) +"' where guild_id = "+ .@gid;
  643. mes "Now it called : "+ .@gid1$;
  644. }
  645. set .@gid1$, "";
  646. set .@gid2$, "";
  647. next;
  648. }
  649. default:
  650. }
  651. default:
  652. }
  653. } while (1);
  654. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement