Yami Posted March 22, 2016 Group: Members Topic Count: 35 Topics Per Day: 0.01 Content Count: 111 Reputation: 2 Joined: 01/02/14 Last Seen: June 4, 2023 Share Posted March 22, 2016 I just need to add some more maps in this script, I'm not really good at adding arrays. Here's the script: - script PvP_System -1,{ OnPCKillEvent: if(strcharinfo(3) != "pvp_y_8-2") end; if(@LastKilled == killedrid) end; set .@Killer,getcharid(3); set .@Killed,killedrid; detachrid; if(attachrid(.@Killed)){ if(#PKPOINTS){ if(#PKPOINTS <= 1) end; set #PKPOINTS,#PKPOINTS-2; dispbottom "You Lost 2 PK Point from "+rid2name(.@Killer); dispbottom "Current PK Points = "+#PKPOINTS+" "; //emotion e_sob,1; detachrid; if(attachrid(.@Killer)){ set #PKPOINTS,#PKPOINTS+3; dispbottom "You Gained 3 PK Point from "+rid2name(.@Killed); dispbottom "Current PK Points = "+#PKPOINTS+" "; //emotion e_meh,1; set @LastKilled,.@Killed; attachnpctimer; initnpctimer; } } else { //emotion e_sob,1; detachrid; if(attachrid(.@Killer)){ dispbottom "Sorry No PK Point to get from "+rid2name(.@Killed); //emotion e_meh,1; set @LastKilled,.@Killed; attachnpctimer; initnpctimer; } } } end; OnTimer180000: set @LastKilled,0; stopnpctimer; detachnpctimer; end; } Thank you in Advance!! Quote Link to comment Share on other sites More sharing options...
0 PandaLovesHamster Posted March 22, 2016 Group: Members Topic Count: 51 Topics Per Day: 0.01 Content Count: 452 Reputation: 35 Joined: 12/18/14 Last Seen: May 30, 2016 Share Posted March 22, 2016 (edited) Add these few lines, not tested but should probably work. OnPCKillEvent: for(set .@i,0; .@i < getarraysize(.map$); .@i++){ if(strcharinfo(3) != .map$) end; } OnInit: setarray .map$,"pvp_y_8-2","payon","prontera","alberta"; end; Edited March 22, 2016 by PandaLovesHamster Quote Link to comment Share on other sites More sharing options...
0 Yami Posted March 22, 2016 Group: Members Topic Count: 35 Topics Per Day: 0.01 Content Count: 111 Reputation: 2 Joined: 01/02/14 Last Seen: June 4, 2023 Author Share Posted March 22, 2016 (edited) Thanks Panda! Will test this out later Edited March 22, 2016 by Yami Quote Link to comment Share on other sites More sharing options...
Question
Yami
I just need to add some more maps in this script, I'm not really good at adding arrays. Here's the script:
Thank you in Advance!!
Link to comment
Share on other sites
2 answers to this question
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.