Jump to content
  • 0

PK Cash Points


bodibastos

Question


  • Group:  Members
  • Topic Count:  18
  • Topics Per Day:  0.00
  • Content Count:  45
  • Reputation:   0
  • Joined:  10/13/12
  • Last Seen:  

I'd like a script that gives cash points whenever a player kills another one, but with a twist: It should give 20 cash points per kill, minus the level difference between the players (so that you get less points if you kill someone weaker than you and more if you kill someone stronger). If possible, I'd also like it to not give points if the match happened with @duel, but that's not really necessary.

 

Thanks in advance!

Edited by bodibastos
Link to comment
Share on other sites

2 answers to this question

Recommended Posts


  • Group:  Developer
  • Topic Count:  10
  • Topics Per Day:  0.00
  • Content Count:  2407
  • Reputation:   613
  • Joined:  07/05/12
  • Last Seen:  

prontera,157,181,5	script	Soul L	-1,{
OnPCKillEvent:
	.@lvl_killer = BaseLevel;
	.@self_rid = getcharid(3);
	attachrid( killedrid );
	.@down = BaseLevel; // a readparam with an gid argument would be useful
	attachrid( .@self_rid );
	if( #CASHPOINTS + .cash_num <= ( .@lvl_killer - .@down ) )
		.@bonus = 0;
	else
		.@bonus = .cash_num - ( .@lvl_killer - .@down );
	dispbottom "You get "+ .@bonus +" Cash Points. Total: "+ #CASHPOINTS +".";
	#CASHPOINTS = #CASHPOINTS + .@bonus;
	end;
OnInit:
	.cash_num = 20;
	end;
}

If possible, I'd also like it to not give points if the match happened with @duel, but that's not really necessary

I don't find any idea to check if a player is dueling... except source modification

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  18
  • Topics Per Day:  0.00
  • Content Count:  45
  • Reputation:   0
  • Joined:  10/13/12
  • Last Seen:  

Thank you very much :)

Link to comment
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.   Paste as plain text instead

  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.

×
×
  • Create New...