Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- - script reward -1,{
- OnInit:
- // Configuration
- .reward_id = 7720;
- .amount = 5;
- .min_gm = 40;
- end;
- OnWhisperGlobal:
- // Check GM level
- if (getgmlevel() < .min_gm) {
- message strcharinfo(0), "You are not authorised to access this feature.";
- end;
- }
- // Check if reward session ended
- if (select("Reward a player:End session") == 2) {
- close;
- }
- do {
- // Input target player's name
- message strcharinfo(0), "Enter the name of the character to be rewarded.";
- input .@player_name$;
- // Check if specified player is logged in
- if (!isloggedin(getcharid(3, .@player_name$), getcharid(0, .@player_name$))) {
- message strcharinfo(0), "'"+ .@player_name$ +"' is either not logged in or does not exist.";
- }
- } while (!isloggedin(getcharid(3, .@player_name$), getcharid(0, .@player_name$)));
- // Reward specified player
- getitem .reward_id, .amount, getcharid(3, .@player_name$);
- // Announce reward
- announce "The GM '"+ strcharinfo(0) +"' has rewarded '"+ .@player_name$ +"' with "+ .amount +" "+ getitemname(.reward_id) +".", bc_all;
- close;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement