Jump to content

Question

Posted (edited)

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

2 answers to this question

Recommended Posts

Posted
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

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.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...