http://www.eathena.ws/board/index.php?showtopic=239232
don't use `guild_member` table
this table updates periodically
its better to use `char` table, more accurate
- script kdjfskdjfhs -1,{
OnAgitEnd:
switch ( gettime(4) ) {
case 0: .@gid = getcastledata("prtg_cas03",1); break;
case 2: .@gid = getcastledata("prtg_cas01",1); break;
case 4: .@gid = getcastledata("prtg_cas02",1); break;
default: end;
}
.@nb = query_sql( "select account_id from `char` where guild_id = "+ .@gid +" and online = 1", .@aid );
for ( .@i = 0; .@i < .@nb; .@i++ ) {
attachrid .@aid[.@i];
getitem 7539,15;
dispbottom "You received 15 Poring Coins for his victory in the War of Emperium."; // google translator
}
end;
}