Jump to content
  • 0
ShankS

PvP points script..

Question

please anyone im requesting this script to have a restriction like

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 ..

 

 

-	shop	custom_seller2	-1,501:500prontera,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;	pk_points++;	dispbottom "You've gained one point! Your total is ["+pk_points+"] PK point(s).";	end;		OnInit:	set .map$, "guild_vs3";	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;} 

 

Edited by ShankS

Share this post


Link to post
Share on other sites

8 answers to this question

Recommended Posts

  • 0

 

Change :
OnPCKillEvent:    if( strcharinfo(3)!=.map$ ) end;    pk_points++;    dispbottom "You've gained one point! Your total is ["+pk_points+"] PK point(s).";    end;

To :

OnPCKillEvent:	if ( strcharinfo( 3 ) != .map$ || killedrid == last_killed ) end;	last_killed = killedrid;	pk_points++;	dispbottom "You've gained one point! Your total is ["+pk_points+"] PK point(s).";	end;

thankyou bro patskie.. ur the man !!! 

Share this post


Link to post
Share on other sites
  • 0

Not spoonfeeding for today because of no time.

 

Just add a temporary char variable which is set to killedrid (which is account id of the killed user), check if this killedrid is the same as the old one and make it act accordingly.

 

You could also use the char id based on who's online on that account id, but it can be a waste of time.

Share this post


Link to post
Share on other sites
  • 0
Change :
OnPCKillEvent:    if( strcharinfo(3)!=.map$ ) end;    pk_points++;    dispbottom "You've gained one point! Your total is ["+pk_points+"] PK point(s).";    end;

To :

OnPCKillEvent:	if ( strcharinfo( 3 ) != .map$ || killedrid == last_killed ) end;	last_killed = killedrid;	pk_points++;	dispbottom "You've gained one point! Your total is ["+pk_points+"] PK point(s).";	end;

Share this post


Link to post
Share on other sites
  • 0

Hi again sir .. how about make the pvp points badge .. let say everytime i kill in pvp room, then the pvp points will go to my account not only to my charater that i use?

Share this post


Link to post
Share on other sites
  • 0

sir there is only one pk_points++; here..

 

bwt sir .. how about if i kill the player with same as my IP it wont give a pvp point?

this is to prevent points farming with 3ple login..

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Answer this question...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.