viewing paste castle owner rent map until next wo | 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 39 40 41 42 43
 
 
prontera,155,181,5  script  Sample#rentmap  757,{
if( select( "Rent Map","Cancel" ) == 1 ){
    .@gid = getcharid(2);
    if( !.@gid ){
        mes "You dont have guild.";
    }
    else if( getguildmasterid( .@gid ) != getcharid(0) ){
        mes "You're not guild leader";
    }
    else if( $rent_map_gid ){
        mes "Map has been rent by Guild "+getguildname( $rent_map_gid );
        mes "Contract end after next WOE";
    }
    else if( getcastledata( .castle_map$,1 ) != .@gid ){
        mes "Your guild didnt conquer castle "+getcastlename( .castle_map$ );
    }
    else{
        $rent_map_gid = .@gid;
        mes "You have rent a Map. Contract end after next WOE";
    }
}
close;
 
OnPCLoadMapEvent:
    if( strcharinfo(3) == .rent_map$ && getcharid(2) != $rent_map_gid ){
        mes "You cant access this map, it's belong to "+getguildname( $rent_map_gid );
        close2;
        warp "SavePoint",0,0;
    }
    end;
 
OnAgitEnd:
    $rent_map_gid = 0;
    end;
 
OnInit:
.castle_map$ = "prtg_cas01";
.rent_map$ = "payon";
setmapflag .rent_map$,mf_loadevent;
end;
}
Viewed 1311 times, submitted by Emistry.