BavariaN Posted June 21, 2014 Posted June 21, 2014 (edited) Hello guys .. Please help me .. I need a Script which will create a PK points in my server and a PK points NPC ..- For every Kill to the players = 1PK Point- NPC shop that use PK points - only in specific map like "guild_vs3"Thanks in advance! More power rAthena.. Please Help! Edited June 21, 2014 by BavariaN Quote
Skorm Posted November 6, 2014 Posted November 6, 2014 Hmm... - shop custom_seller2 -1,501:500 prontera.gat,95,99,5 script PK Points Dealer 100,{ mes "[PK Points Dealer]"; mes "I will sell you items for PK points."; mes "Each time you kill a player on "+.map$+" you'll get 1 PK point to spend here!"; next; mes "[PK Points Dealer]"; mes "You currently have [^0000ff"+pk_points+"^000000] PK points to spend."; callshop "custom_seller2",1; npcshopattach "custom_seller2"; end; OnBuyItem: for(set .@i,0; .@i<getarraysize(.customs); set .@i,.@i+1) { for(set .@d,0; .@d<getarraysize(@bought_nameid); set .@d,.@d+1) { if(@bought_nameid[.@d]==.customs[.@i]) { if(checkweight(@bought_nameid[.@d],@bought_quantity[.@d])) { if(pk_points >= .Price[.@i]*@bought_quantity[.@d]) { set pk_points, pk_points - .Price[.@i]*@bought_quantity[.@d]; getitem @bought_nameid[.@d],@bought_quantity[.@d]; } else dispbottom "You don't have enough PK points to purchase that item."; } else dispbottom "Purchasing these items will put you over the weight limit!"; } } } deletearray @bought_quantity, getarraysize(@bought_quantity); deletearray @bought_nameid, getarraysize(@bought_nameid); close; OnPCKillEvent: if( strcharinfo(3) != .map$ ) end; copyarray( @killed$[1], @killed$[0], .saved_l-1 ); @killed$ = ""+killedrid; if( countstr( implode( @killed$, "|" ), ""+killedrid, 0 ) <= .rstrk_l ) { pk_points++; dispbottom "You've gained one point! Your total is ["+pk_points+"] PK point(s)."; } end; OnInit: set .map$, "guild_vs3"; set .saved_l, 3; //Length of saved ids can be up to 127. set .rstrk_l, 2; //Level of restriction. setarray .customs[0], 12103, 607, 678; // Enter the ID of customs here... setarray .Price[0], 20 , 40 , 300; // Price for each custom here... npcshopitem "custom_seller2", 0 , 0; // Don't touch any coding beyond here.. for( set .i,0; .customs[.i]; set .i,.i+1 ) npcshopadditem "custom_seller2",.customs[.i],.Price[.i]; end; } 2 Quote
0 jacky Posted September 27, 2017 Posted September 27, 2017 On 11/7/2014 at 12:44 PM, Emistry said: - script pvp_point -1,{ OnPCKilLEvent: if ( killedrid == @last_killedrid ) @last_killedrid_count++; else @last_killedrid_count = 0; @last_killedrid = killedrid; if ( getcharid(3) != killedrid && strcharinfo(3) == "guild_vs3" && @last_killedrid_count < 3 ) { PVP_POINT++; dispbottom " +1 PVP Point."; } end; } i write the script based on 1st post, didnt check the rest of the post. anyway i was just try to show him how the shop can be done easily using the pointshop instead of still using dynamic npc shop script for it. btw , how to change value of PK point kill. i will per Killed get 2 PK point ? thanks u Quote
0 llchrisll Posted September 27, 2017 Posted September 27, 2017 Exchange PlayerName with "+rid2name(killedrid)+" Quote
0 Sallycantdance Posted March 23, 2021 Posted March 23, 2021 On 11/6/2014 at 4:09 PM, Skorm said: Hmm... - shop custom_seller2 -1,501:500 prontera.gat,95,99,5 script PK Points Dealer 100,{ mes "[PK Points Dealer]"; mes "I will sell you items for PK points."; mes "Each time you kill a player on "+.map$+" you'll get 1 PK point to spend here!"; next; mes "[PK Points Dealer]"; mes "You currently have [^0000ff"+pk_points+"^000000] PK points to spend."; callshop "custom_seller2",1; npcshopattach "custom_seller2"; end; OnBuyItem: for(set .@i,0; .@i<getarraysize(.customs); set .@i,.@i+1) { for(set .@d,0; .@d<getarraysize(@bought_nameid); set .@d,.@d+1) { if(@bought_nameid[.@d]==.customs[.@i]) { if(checkweight(@bought_nameid[.@d],@bought_quantity[.@d])) { if(pk_points >= .Price[.@i]*@bought_quantity[.@d]) { set pk_points, pk_points - .Price[.@i]*@bought_quantity[.@d]; getitem @bought_nameid[.@d],@bought_quantity[.@d]; } else dispbottom "You don't have enough PK points to purchase that item."; } else dispbottom "Purchasing these items will put you over the weight limit!"; } } } deletearray @bought_quantity, getarraysize(@bought_quantity); deletearray @bought_nameid, getarraysize(@bought_nameid); close; OnPCKillEvent: if( strcharinfo(3) != .map$ ) end; copyarray( @killed$[1], @killed$[0], .saved_l-1 ); @killed$ = ""+killedrid; if( countstr( implode( @killed$, "|" ), ""+killedrid, 0 ) <= .rstrk_l ) { pk_points++; dispbottom "You've gained one point! Your total is ["+pk_points+"] PK point(s)."; } end; OnInit: set .map$, "guild_vs3"; set .saved_l, 3; //Length of saved ids can be up to 127. set .rstrk_l, 2; //Level of restriction. setarray .customs[0], 12103, 607, 678; // Enter the ID of customs here... setarray .Price[0], 20 , 40 , 300; // Price for each custom here... npcshopitem "custom_seller2", 0 , 0; // Don't touch any coding beyond here.. for( set .i,0; .customs[.i]; set .i,.i+1 ) npcshopadditem "custom_seller2",.customs[.i],.Price[.i]; end; } can we set this script in a specific map Quote
Skorm Posted June 21, 2014 Posted June 21, 2014 No restrictions but here's the general idea. -- Code moved to final post -- Quote
BavariaN Posted June 22, 2014 Author Posted June 22, 2014 No restrictions but here's the general idea. Thank you so much for this script bro .. But i want something .. - for every killing players it will shows the points i gained on the main chat . - and also show the the total points i have on the NPC Thank you so much bro more power ! Skorm! Quote
Skorm Posted June 22, 2014 Posted June 22, 2014 Thank you so much for this script bro .. But i want something .. - for every killing players it will shows the points i gained on the main chat . - and also show the the total points i have on the NPC Thank you so much bro more power ! Skorm! I've modified my above post at your request. http://rathena.org/board/topic/95948-requesting-for-pvp-pk-points-and-pvp-npc-shop-script-ty/?p=260180 Quote
BavariaN Posted June 22, 2014 Author Posted June 22, 2014 Thank you so much for this script bro .. But i want something .. - for every killing players it will shows the points i gained on the main chat . - and also show the the total points i have on the NPC Thank you so much bro more power ! Skorm! I've modified my above post at your request. http://rathena.org/board/topic/95948-requesting-for-pvp-pk-points-and-pvp-npc-shop-script-ty/?p=260180 I hope it has restriction to stop PK points feeding . Anyways Thank you very much bro ! .. Its now working according to my preference .. More power ! Please help ! How to put a restriction for example .. If the Player kill twice the same players, for the third kill or succeeding kills in same players it will not give a Point .. Thanks .. Quote
radlican Posted November 5, 2014 Posted November 5, 2014 How to put a restriction for example ..If the Player kill twice the same players, for the third kill or succeeding kills in same players it will not give a Point .. Thanks .. please UP !! is this the script that we wishing bro Skorm? Quote
Emistry Posted November 7, 2014 Posted November 7, 2014 something like this ? - script pvp_point -1,{ OnPCKilLEvent: if ( getcharid(3) != killedrid && strcharinfo(3) == "guild_vs3" ) { PVP_POINT++; dispbottom " +1 PVP Point."; } end; } // npc shop. prontera,155,181,5 pointshop PVP Point Shop 757,PVP_POINT,909:-1,607:-1 1 Quote
Skorm Posted November 7, 2014 Posted November 7, 2014 something like this ? I don't see how that actually has like a player based restriction xD. is this the script that we wishing bro Skorm? Test it? Yes this is what you wanted... You can extend the number of players who were killed for the script to remember and also how lean or strict the condition is... Quote
Emistry Posted November 7, 2014 Posted November 7, 2014 - script pvp_point -1,{ OnPCKilLEvent: if ( killedrid == @last_killedrid ) @last_killedrid_count++; else @last_killedrid_count = 0; @last_killedrid = killedrid; if ( getcharid(3) != killedrid && strcharinfo(3) == "guild_vs3" && @last_killedrid_count < 3 ) { PVP_POINT++; dispbottom " +1 PVP Point."; } end; } i write the script based on 1st post, didnt check the rest of the post. anyway i was just try to show him how the shop can be done easily using the pointshop instead of still using dynamic npc shop script for it. Quote
Skorm Posted November 8, 2014 Posted November 8, 2014 i write the script based on 1st post, didnt check the rest of the post. anyway i was just try to show him how the shop can be done easily using the pointshop instead of still using dynamic npc shop script for it. Right the original shop is pretty old but still that's not a very good way to add a restriction to it... Instead do what I did. Create an array with the ids and count them then you can control how many times a player is killed and it adds an extra layer of protection because the player can't farm on 2 different characters. Quote
BavariaN Posted April 4, 2015 Author Posted April 4, 2015 Hmm... - shop custom_seller2 -1,501:500 prontera.gat,95,99,5 script PK Points Dealer 100,{ mes "[PK Points Dealer]"; mes "I will sell you items for PK points."; mes "Each time you kill a player on "+.map$+" you'll get 1 PK point to spend here!"; next; mes "[PK Points Dealer]"; mes "You currently have [^0000ff"+pk_points+"^000000] PK points to spend."; callshop "custom_seller2",1; npcshopattach "custom_seller2"; end; OnBuyItem: for(set .@i,0; .@i<getarraysize(.customs); set .@i,.@i+1) { for(set .@d,0; .@d<getarraysize(@bought_nameid); set .@d,.@d+1) { if(@bought_nameid[.@d]==.customs[.@i]) { if(checkweight(@bought_nameid[.@d],@bought_quantity[.@d])) { if(pk_points >= .Price[.@i]*@bought_quantity[.@d]) { set pk_points, pk_points - .Price[.@i]*@bought_quantity[.@d]; getitem @bought_nameid[.@d],@bought_quantity[.@d]; } else dispbottom "You don't have enough PK points to purchase that item."; } else dispbottom "Purchasing these items will put you over the weight limit!"; } } } deletearray @bought_quantity, getarraysize(@bought_quantity); deletearray @bought_nameid, getarraysize(@bought_nameid); close; OnPCKillEvent: if( strcharinfo(3) != .map$ ) end; copyarray( @killed$[1], @killed$[0], .saved_l-1 ); @killed$ = ""+killedrid; if( countstr( implode( @killed$, "|" ), ""+killedrid, 0 ) <= .rstrk_l ) { pk_points++; dispbottom "You've gained one point! Your total is ["+pk_points+"] PK point(s)."; } end; OnInit: set .map$, "guild_vs3"; set .saved_l, 3; //Length of saved ids can be up to 127. set .rstrk_l, 2; //Level of restriction. setarray .customs[0], 12103, 607, 678; // Enter the ID of customs here... setarray .Price[0], 20 , 40 , 300; // Price for each custom here... npcshopitem "custom_seller2", 0 , 0; // Don't touch any coding beyond here.. for( set .i,0; .customs[.i]; set .i,.i+1 ) npcshopadditem "custom_seller2",.customs[.i],.Price[.i]; end; } Please help me to change "You've gained 1 point! Your total is ["+pk_points+"] PK point(s)." Into this: "You've gained 1Point after killing [PlayerName] Your total is ["+pk_points+"] PK point(s). 1 Quote
Question
BavariaN
Hello guys ..
Please help me ..
I need a Script which will create a PK points in my server and a PK points NPC ..
- For every Kill to the players = 1PK Point
- NPC shop that use PK points
- only in specific map like "guild_vs3"
Edited by BavariaNThanks in advance!
More power rAthena..
Please Help!
14 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.