viewing paste castle owner warp. | Athena

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
 
prontera,155,181,5  script  Sample#castle_warp  757,{
.@guild_id = getcharid(2);
 
if( .@guild_id ){
    while( .@map < .castle_map_size ){
        .@castle_owner = getcastledata( .castle_map$[.@map],1 );
        if( .@castle_owner == .@guild_id ){
            .@menu$ = .@menu$ + getcastlename( .castle_map$[.@map] );
            .@found++;
        }
        .@menu$ = .@menu$ + ":";
        .@map++;
    }
    if( .@found ){
        .@map = select( .@menu$ ) - 1;
        warp .castle_map$[.@map],0,0;
    
    }else{
        mes "Your guild didnt own any castle.";
    }
 
}else{
    mes "You dont have guild.";
}
close;
 
OnInit:
setarray .castle_map$,
    "prtg_cas01",
    "prtg_cas02",
    "prtg_cas03",
    "prtg_cas04",
    "prtg_cas05";
 
.castle_map_size = getarraysize( .castle_map$ );
end;
}
Viewed 1260 times, submitted by Emistry.