- script infinity_gauntlet_main -1,{
OnInit:
.item_id = 2604; // Glove itemID
bindatcmd("snap", strnpcinfo(3)+"::OnAtcommand", 99);
end;
OnAtcommand:
if (.item_id) {
if (!isequipped(.item_id)) {
dispbottom "You need to equip "+getitemname(.item_id)+" to use this feature.";
end;
}
}
if (!.status) {
.status = 1;
if (.@atcmd_parameters$ == "thanos") {
.@size = query_sql("SELECT `char_id`,`name`,`online` FROM `char` WHERE `account_id` IN (SELECT `account_id` FROM `login` WHERE `account_id` <> "+getcharid(3)+" AND `group_id` < "+getgroupid()+") ORDER BY RAND()", .@cid, .@name$, .@online);
.@size = (.@size / 2);
announce "<SYSTEM> '"+strcharinfo(0)+"' snapped his 'thanos' finger!! Half of the population from the server will be banned.", bc_all;
for (.@i = 0; .@i < .@size; .@i++) {
if (.@online[.@i]) {
atcommand "@kick "+.@name$[.@i];
}
query_sql("UPDATE `char` SET `unban_time` = 2147483647 WHERE `char_id` = "+.@cid[.@i]+" LIMIT 1");
}
dispbottom "You snapped "+.@size+" player(s)";
unittalk getcharid(3), "I...AM...INEVITABLE!!!";
percentheal -50,-50;
}
else if (.@atcmd_parameters$ == "ironman") {
announce "<SYSTEM> '"+strcharinfo(0)+"' snapped his 'ironman' finger!! All monsters in the map has been wiped.", bc_all;
unittalk getcharid(3), "I...AM...IRON-MAN!!!";
killmonsterall strcharinfo(3);
unitkill getcharid(3);
}
else if (.@atcmd_parameters$ == "hulk") {
announce "<SYSTEM> '"+strcharinfo(0)+"' snapped his 'hulk' finger!! The banned population has been saved.", bc_all;
.@size = query_sql("SELECT `name` FROM `char` WHERE `unban_time` > 0", .@name$);
// for (.@i = 0; .@i < .@size; .@i++)
// atcommand "@charunban "+.@name$[.@i];
query_sql("UPDATE `char` SET `unban_time` = 0 WHERE `unban_time` > 0");
dispbottom "You saved "+.@size+" player(s)";
unittalk getcharid(3), "AARRRGGGHHHHHHH";
percentheal -50,-50;
}
else {
dispbottom "Usage: "+.@atcmd_command$+" <thanos/ironman/hulk>";
dispbottom " - thanos - ban 50% of population";
dispbottom " - ironman - wipe all monster in the map.";
dispbottom " - hulk - unban everyone.";
}
.status = 0;
}
end;
}
Comments
0 B
|👍
/👎