wingsofloveza Posted April 16, 2020 Group: Members Topic Count: 14 Topics Per Day: 0.01 Content Count: 32 Reputation: 13 Joined: 03/20/17 Last Seen: September 10, 2022 Share Posted April 16, 2020 (edited) npc for gm. send item or zeny with mail/Rodex to all player online in one click. Edited April 16, 2020 by wingsofloveza Quote Link to comment Share on other sites More sharing options...
1 Racaae Posted April 17, 2020 Group: Members Topic Count: 0 Topics Per Day: 0 Content Count: 131 Reputation: 53 Joined: 06/02/12 Last Seen: 8 hours ago Share Posted April 17, 2020 Spoiler - script rewardcommand HIDDEN_WARP_NPC,{ OnInit: //==== CONF ===== .sender$ = "GM Team"; .title$ = "Reward"; .body$ = "Here's something for you. Have fun!"; .zeny = 0; // Default zent sent setarray .mailitem[0], 607, 617; // Default items (Max.5) setarray .mailamount[0], 3, 1; // Default items quantity //=============== bindatcmd "reward", strnpcinfo(3)+"::OnAtcommand", 99; end; OnAtcommand: if (.@atcmd_parameters$[0] == "all") .@mode = 1; if (.@atcmd_parameters$[0] == "map") .@mode = 2; if (.@mode) { if (getarraysize(.mailitem) != getarraysize(.mailamount)) { dispbottom "Error."; end; } if (.@mode == 1) addrid(0, 0); else addrid(1, 0); if (checkvending(strcharinfo(0))) detachrid; if (.mailitem[0]) mail getcharid(0), .sender$, .title$, .body$, .zeny, .mailitem, .mailamount; else mail getcharid(0), .sender$, .title$, .body$, .zeny; detachrid; end; } mes "Use [@reward all] to send rodex to everyone online."; mes "Use [@reward map] to send rodex to everyone on your map."; while (true) { next; mes "RodEx contents:"; mes "" + callfunc("F_InsertComma",.zeny) + "z."; if (.mailitem[0]) { for ( .@i = 0; .@i < getarraysize(.mailitem); ++.@i ) mes "" + .mailamount[.@i] + "x " + getitemname(.mailitem[.@i]) + "."; } switch(select("Close.", "Change zeny.", "Change item(s).")) { case 1: close; case 2: input .zeny; break; case 3: do { next; mes "[Item list]"; if (.mailitem[0]) { for ( .@i = 0; .@i < getarraysize(.mailitem); ++.@i ) mes "" + .mailamount[.@i] + "x " + getitemname(.mailitem[.@i]) + "."; } else mes "Empty."; next; switch(select("Return", "Add item", "Remove item", "Remove all")) { case 1: break; case 2: if (getarraysize(.mailitem) > 4) { mes "You cannot add more items. Max 5."; break; } mes "Input item ID."; input .@newitem; if (getitemname(.@newitem) == "null") { mes "Item not found."; break; } mes "- " + getitemname(.@newitem); if (getiteminfo(.@newitem, 2) == 4 || getiteminfo(.@newitem, 2) == 5 || getiteminfo(.@newitem, 2) == 12) { .@newqut = 1; } else { mes "Input item quantity."; input .@newqut; if (.@newqut < 1 || .@newqut > 1000) { mes "Invalid quantity."; break; } } .mailitem[getarraysize(.mailitem)] = .@newitem; .mailamount[getarraysize(.mailamount)] = .@newqut; next; break; case 3: if (.mailitem[0]) { mes "Input index to remove."; for ( .@i = 0; .@i < getarraysize(.mailitem); ++.@i ) mes "" + .@i + ": " + .mailamount[.@i] + "x " + getitemname(.mailitem[.@i]) + "."; input .@i; if (.mailitem[.@i] == 0 || .mailamount[.@i] == 0) mes "Invalid index."; else { deletearray .mailitem[.@i], 1; deletearray .mailamount[.@i], 1; } } else mes "No item to remove."; break; case 4: deletearray .mailitem[0], getarraysize(.mailitem); deletearray .mailamount[0], getarraysize(.mailamount); break; } } while (@menu != 1); } } } Hi. I didn't test much. The command is @reward. 1 Quote Link to comment Share on other sites More sharing options...
0 wingsofloveza Posted April 17, 2020 Group: Members Topic Count: 14 Topics Per Day: 0.01 Content Count: 32 Reputation: 13 Joined: 03/20/17 Last Seen: September 10, 2022 Author Share Posted April 17, 2020 thank you. Quote Link to comment Share on other sites More sharing options...
0 Gidz Cross Posted April 13, 2021 Group: Members Topic Count: 123 Topics Per Day: 0.03 Content Count: 640 Reputation: 82 Joined: 04/07/14 Last Seen: 2 hours ago Share Posted April 13, 2021 On 4/17/2020 at 1:28 PM, Racaae said: Hide contents - script rewardcommand HIDDEN_WARP_NPC,{ OnInit: //==== CONF ===== .sender$ = "GM Team"; .title$ = "Reward"; .body$ = "Here's something for you. Have fun!"; .zeny = 0; // Default zent sent setarray .mailitem[0], 607, 617; // Default items (Max.5) setarray .mailamount[0], 3, 1; // Default items quantity //=============== bindatcmd "reward", strnpcinfo(3)+"::OnAtcommand", 99; end; OnAtcommand: if (.@atcmd_parameters$[0] == "all") .@mode = 1; if (.@atcmd_parameters$[0] == "map") .@mode = 2; if (.@mode) { if (getarraysize(.mailitem) != getarraysize(.mailamount)) { dispbottom "Error."; end; } if (.@mode == 1) addrid(0, 0); else addrid(1, 0); if (checkvending(strcharinfo(0))) detachrid; if (.mailitem[0]) mail getcharid(0), .sender$, .title$, .body$, .zeny, .mailitem, .mailamount; else mail getcharid(0), .sender$, .title$, .body$, .zeny; detachrid; end; } mes "Use [@reward all] to send rodex to everyone online."; mes "Use [@reward map] to send rodex to everyone on your map."; while (true) { next; mes "RodEx contents:"; mes "" + callfunc("F_InsertComma",.zeny) + "z."; if (.mailitem[0]) { for ( .@i = 0; .@i < getarraysize(.mailitem); ++.@i ) mes "" + .mailamount[.@i] + "x " + getitemname(.mailitem[.@i]) + "."; } switch(select("Close.", "Change zeny.", "Change item(s).")) { case 1: close; case 2: input .zeny; break; case 3: do { next; mes "[Item list]"; if (.mailitem[0]) { for ( .@i = 0; .@i < getarraysize(.mailitem); ++.@i ) mes "" + .mailamount[.@i] + "x " + getitemname(.mailitem[.@i]) + "."; } else mes "Empty."; next; switch(select("Return", "Add item", "Remove item", "Remove all")) { case 1: break; case 2: if (getarraysize(.mailitem) > 4) { mes "You cannot add more items. Max 5."; break; } mes "Input item ID."; input .@newitem; if (getitemname(.@newitem) == "null") { mes "Item not found."; break; } mes "- " + getitemname(.@newitem); if (getiteminfo(.@newitem, 2) == 4 || getiteminfo(.@newitem, 2) == 5 || getiteminfo(.@newitem, 2) == 12) { .@newqut = 1; } else { mes "Input item quantity."; input .@newqut; if (.@newqut < 1 || .@newqut > 1000) { mes "Invalid quantity."; break; } } .mailitem[getarraysize(.mailitem)] = .@newitem; .mailamount[getarraysize(.mailamount)] = .@newqut; next; break; case 3: if (.mailitem[0]) { mes "Input index to remove."; for ( .@i = 0; .@i < getarraysize(.mailitem); ++.@i ) mes "" + .@i + ": " + .mailamount[.@i] + "x " + getitemname(.mailitem[.@i]) + "."; input .@i; if (.mailitem[.@i] == 0 || .mailamount[.@i] == 0) mes "Invalid index."; else { deletearray .mailitem[.@i], 1; deletearray .mailamount[.@i], 1; } } else mes "No item to remove."; break; case 4: deletearray .mailitem[0], getarraysize(.mailitem); deletearray .mailamount[0], getarraysize(.mailamount); break; } } while (@menu != 1); } } } Hi. I didn't test much. The command is @reward. Wow its good. But it wont send mails to offline players. Can we have that option? Thanks! Quote Link to comment Share on other sites More sharing options...
0 Sinclaire Posted December 15, 2021 Group: Members Topic Count: 1 Topics Per Day: 0.00 Content Count: 4 Reputation: 0 Joined: 11/17/14 Last Seen: Thursday at 05:50 AM Share Posted December 15, 2021 thanks Quote Link to comment Share on other sites More sharing options...
Question
wingsofloveza
npc for gm.
send item or zeny with mail/Rodex to all player online in one click.
Link to comment
Share on other sites
4 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.