Onairda Posted September 28, 2021 Posted September 28, 2021 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; } Quote
0 Start_ Posted September 28, 2021 Posted September 28, 2021 You can use my scripts (Make sure you modify it to your own way) https://raw.githubusercontent.com/kaninhot004/rathena/team-craft/npc/utilities/die_event.txt Quote
0 mR L Posted September 29, 2021 Posted September 29, 2021 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; } 1 Quote
Question
Onairda
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
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.