L_sorry:
next;
mes "[ ^ff0000Warper^000000 ]";
mes "Désolé, la salle PVP est pleine.";
close;
}
//PVP Kill Counter
pvp_y_1-2,0,0,0 script PVPKillCounter -1,{
// This script tracks a player's number of kills on the PVP map
OnInit:
// Initialize kill counter
set .@kill_count, 0;
end;
OnPVPEvent: // Event for player-to-player kills
// Check if a player has been killed
if (killed_id != 0) {
//Increment the kill counter
set .@kill_count, .@kill_count + 1;
// Display number of kills to player
dispbottom "Nombre de kills: " + .@kill_count;
if (.@kill_count >= 5) { // If the player kills 5 enemies
getitem 22869, 1; // Give item with ID 22869
dispbottom "Congratulations! You've been awarded a Roulette Ticket for killing 5 enemies.";
set .@kill_count, 0; // Reset the kill counter to zero
}
}
end; // End of OnPVPEvent
} // End of PVPKillCounter script
Question
deafity
hello i would like to create a script to have a special item when i kill 5 players in pvp i have no error but it doesn't work
Thanks for your help
prontera,160,189,4 script PVP/MVP 467,{
mes "[PVP Warper]";
mes "Où veux-tu aller ?";
mes "PVP Arena [" + getmapusers("pvp_y_1-2") + " / 20]";
menu "PVP Room",P_room,"MVP Room",M_room,"Annuler",cancel;
close;
P_room:
next;
if (getmapusers("pvp_y_1-2") >= 20) goto L_sorry; // Retirer l'extension .gat
warp "pvp_y_1-2",0,0;
close;
M_room:
next;
warp "db_room",0,0;
close;
cancel:
close;
L_sorry:
next;
mes "[ ^ff0000Warper^000000 ]";
mes "Désolé, la salle PVP est pleine.";
close;
}
//PVP Kill Counter
pvp_y_1-2,0,0,0 script PVPKillCounter -1,{
// This script tracks a player's number of kills on the PVP map
OnInit:
// Initialize kill counter
set .@kill_count, 0;
end;
OnPVPEvent: // Event for player-to-player kills
// Check if a player has been killed
if (killed_id != 0) {
//Increment the kill counter
set .@kill_count, .@kill_count + 1;
// Display number of kills to player
dispbottom "Nombre de kills: " + .@kill_count;
if (.@kill_count >= 5) { // If the player kills 5 enemies
getitem 22869, 1; // Give item with ID 22869
dispbottom "Congratulations! You've been awarded a Roulette Ticket for killing 5 enemies.";
set .@kill_count, 0; // Reset the kill counter to zero
}
}
end; // End of OnPVPEvent
} // End of PVPKillCounter script
Link to comment
Share on other sites
5 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.