Jump to content
  • 0

Basic Script Convert


Question

Posted

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:
getmapxy.@map$,.@x,.@y,0;
if(getcharid(3) == killedrid) end;
if(.@map$ != "pvp_y_1-2") end;

set .@player1, getcharid(3);
set .@player2, killedrid;

attachrid(.@player2);
set .@player2points, #CASHPOINTS;
if(.@player2points) {
 set #CASHPOINTS, #CASHPOINTS - 1;
 dispbottom "You Lost 1 Cash Point from "+rid2name(killerrid);
}
 emotion e_sob,1;

attachrid(.@player1);
if(.@player2points) {
 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;
} 

 

2 answers to this question

Recommended Posts

  • 0
Posted

try this, but not tested
 

-	script	PVPPOINTS	-1,{

OnPCKillEvent:
	getmapxy.@map$,.@x,.@y,0;

	if (getcharid(3) == killedrid) end;
	if (.@map$ != "pvp_y_1-2") end;

	set .@player1, getcharid(3);
	set .@player2, killedrid;

	attachrid(.@player2);
	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(.@player1);
	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

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