Jump to content
  • 0
G-RO

Basic Script Convert

Question

Hello! 🙂
 

Can someone help me to edit this script?

What I want is If player get killed on the pvp map, he will loose 100,000z, and the player who killed will got 100,000z and white potion.

but if the player who got died doesn't have a Zeny the killer will also not get any Zeny and a potion.

 

-	script	PVPPOINTS	-1,{

OnPCKillEvent:
[email protected]$,[email protected],[email protected],0;
if(getcharid(3) == killedrid) end;
if([email protected]$ != "pvp_y_1-2") end;

set [email protected], getcharid(3);
set [email protected], killedrid;

attachrid([email protected]);
set [email protected], #CASHPOINTS;
if([email protected]) {
 set #CASHPOINTS, #CASHPOINTS - 1;
 dispbottom "You Lost 1 Cash Point from "+rid2name(killerrid);
}
 emotion e_sob,1;

attachrid([email protected]);
if([email protected]) {
 set #CASHPOINTS, #CASHPOINTS + 1;
 dispbottom "You Gained 1 Cash Points from "+rid2name(killedrid);
}
else
 dispbottom "Sorry no cash points on the "+rid2name(killedrid);
 emotion e_meh,1;
end;
} 

 

Link to comment
Share on other sites

2 answers to this question

Recommended Posts

  • 0

try this, but not tested
 

-	script	PVPPOINTS	-1,{

OnPCKillEvent:
	[email protected]$,[email protected],[email protected],0;

	if (getcharid(3) == killedrid) end;
	if ([email protected]$ != "pvp_y_1-2") end;

	set [email protected], getcharid(3);
	set [email protected], killedrid;

	attachrid([email protected]);
	if (Zeny > 100000) {
		set Zeny, Zeny - 100000;
		dispbottom "You Lost 100.000 Zeny from "+rid2name(killerrid);
		emotion e_sob,1;
	}
	else {
		dispbottom "Sorry no Zeny on the "+rid2name(killedrid);
		emotion e_meh,1;
	}

	attachrid([email protected]);
	if (Zeny > 100000) {
		set Zeny, Zeny + 100000;
		getitem 504,1;
		dispbottom "You Gained 100.000 Zeny from "+rid2name(killedrid);
		dispbottom "You Gained 1 White Potion from "+rid2name(killedrid);
	}
	else {
		dispbottom "Sorry no Zeny on the "+rid2name(killedrid);
		emotion e_meh,1;
	}
end;
}

 

  • Upvote 1
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...

Important Information

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