izlude_in,30,171,5 script gm_house 139,{ // This is where the gm house is.
end;
OnRefreshCount:
set(.gms,0); set(.usr,0);
deletearray .a_gms;
addrid(1);
if(getgmlevel()>=.gmlvl)
set .a_gms[set(.gms,.gms+1)], getcharid(3);
else set(.usr,.usr+1);
end;
/*
query_sql(
"SELECT `login`.`account_id`"+
"FROM `login`"+
"INNER JOIN `char`"+
"ON `login`.`account_id`=`char`.`account_id`"+
"WHERE `login`.`group_id`>="+.gmlvl+" AND `char`.`online`=1;",
.aid
);
for(set(.gms,0);.gms<getarraysize(.aid);set(.gms,.gms+1)) {
attachrid(.aid[.gms]);
if(strcharinfo(3)!=.map$)
deletearray .aid[.gms],1;
set(.gms,.gms-1);
}
set(.gms,.gms+1);
attachrid(.aid[0]);
addrid(1);
if(getgmlevel()<.gmlvl)
set(.usr,.usr+1);
end;*/
OnPlayerHelp:
if(getgmlevel()>=.gmlvl) {
warp .map$,.x,.y;
end;
}
donpcevent "gm_house::OnRefreshCount";
if(.gms&&!.usr&&!.que) {
donpcevent "gm_house::OnAttachGms";
message strcharinfo(0),"You'll be warped to the help desk in 10 seconds.";
set(.que,1);
showdigit -10,2;
sleep2(10000);
if(playerattached()) {
showdigit 0,0;
warp .map$,.x,.y;
}
set(.que,0);
} else {
message strcharinfo(0),"The GMs are currently busy or unavailable please try again later.";
}
end;
/*OnAttachGms:
for(set(.@a,0);.@a<.gms;set(.@a,.@a+1)) {
attachrid(.aid[.@a]);
showdigit 10,3;
soundeffect "¹öÆ°¼Ò¸®.wav",0;
message strcharinfo(0),"A player is entering you have 10 seconds to prepare.";
}
end;*/
OnAttachGms:
for(set(.@a,1);.@a<=.gms;set(.@a,.@a+1)) {
attachrid(.a_gms[.@a]);
showdigit -10,2;
soundeffect "aster_die.wav",0;
message strcharinfo(0),"A player is entering you have 10 seconds to prepare.";
sleep2(10000);
showdigit 0,0;
}
end;
OnInit:
bindatcmd "gmhelpme","gm_house::OnPlayerHelp";
getmapxy(.map$,.x,.y,1);
set .gmlvl, 60;
}
prontera,155,179,5 script gm_house 45,3,3,{ OnTouch: doevent("gm_house::OnPlayerHelp"); } // Warp Portal