viewing paste Unknown #546 | Plain text

Posted on the
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42
// = Made by Rikimaru
// = In Game Group ID Giver
// = This is only usable by rAthena Emulator Users , because of the group_id!
// ================================================================================
MAPNAME,XXX,YYY,Z       script  GM Level        NID,{
set .@n$,"^0000FF[ NPC NAME ]^000000";
if(getgroupid() > 98) {
mes .@n$;
mes "Hello "+strcharinfo(0)+",you're";
mes "an Administrator and you're";
mes "able to give a Player";
mes "a GM Level. Now please";
mes "input the ^FF0000ACCOUNT NAME^000000";
mes "of the Player!";
next;
input @accid$;
query_sql "SELECT COUNT(*) `login` WHERE `userid`='" + escape_sql(@accid$) + "'", @accountcount;
if(@accountcount >= 1) {
mes .@n$;
mes "Now Input the group ID,which you want the account to get!";
next;
input @group_id$;
if(group_id$ > 99) {
mes "That's too high!";
close;
}
query_sql "UPDATE `login` SET group_id='" + escape_sql(@group_id$) + "' WHERE `userid`='" + escape_sql(@accid$) + "'";
mes .@n$;
mes "Okay,tell the Person to relog now!";
close;
} else {
mes .@n$;
mes "That's a wrong account name!";
close;
}
}
if(getgroupid() <= 98) {
mes .@n$;
mes "....";
close;
}
}
Viewed 364 times, submitted by unknown.