Jump to content

saiexe

Members
  • Posts

    3
  • Joined

  • Last visited

Posts posted by saiexe

  1. Hi, I would like to ask if theres a script that i can use mobs to spawn in castle and use them as guardian of castle owner? Been looking around on scripts and find a thread bout 7years ago

    I've tried using it on my emulator and cant seem to make this one work

    Any advice regarding this?

    -	script	spawn_woe	-1,{
    OnAgitStart:// when woe start
    	sleep 2;
    	for( .@i = 0; .@i < .size_mob; .@i++ ) {
    		for( .@j = 0; .@j < .size_map; .@j++ ) {
    			if( GetCastleData( .map_woe$[.@j],1 ) ) {
    				for( .@k = 0; .@k < .mob_count[.@i]; .@k++ )
    					guardian .map_woe$[.@j],0,0,"--ja--", .mob_ID[.@i];
    			}
    			else
    				monster .map_woe$[.@j],0,0,"--ja--", .mob_ID[.@i], .mob_count[.@i],"";
    		}
    	}
    	end;
    OnAgitEnd:// when woe end
    	sleep 2;
    	for( .@i = 0; .@i < .size_map; .@i++ ) {
    		sleep2 1;
    		killmonsterall .map_woe$[.@i];
    	}
    	end;
    OnNPCKillEvent:
    	sleep2 1;
    	if( agitcheck() && compare( .mob_id_c$, killedrid +"" ) && compare( .map_woe_c$, strcharinfo(3) ) ) {// check is woe on + if mob in .mob_ID list + map in .map_woe$ list
    		if( GetCastleData( strcharinfo(3),1 ) )
    			guardian strcharinfo(3),0,0,"--ja--", killedrid;
    		else
    			monster strcharinfo(3),0,0,"--ja--", killedrid,1,"";
    	}
    	end;
    
    OnInit:
    // ------- setting
    	setarray .mob_ID, 1638, 1639; // add more mob id
    	setarray .mob_count, 40, 40;// number of mobs summoned / .mob_ID array column
    	setarray .map_woe$, "prtg_cas01", "prtg_cas02"; // yours woe map
    //-------- end of setting
    	.size_mob = getarraysize( .mob_ID );
    	.size_map = getarraysize( .map_woe$ );
    	for( .@i = 0; .@i < .size_mob; .@i++ )
    		.@tmp$[.@i] = .mob_ID[.@i];
    	.mob_id_c$ = implode( .@tmp$, "|" );
    	.map_woe_c$ = implode( .map_woe$, "|" );
    	end;
    }
  2. On 3/26/2013 at 3:14 PM, Capuche said:

    Like guardian system ?

     

    
    -	script	spawn_woe	-1,{
    OnAgitStart:// when woe start
    	sleep 2;
    	for( .@i = 0; .@i < .size_mob; .@i++ ) {
    		for( .@j = 0; .@j < .size_map; .@j++ ) {
    			if( GetCastleData( .map_woe$[.@j],1 ) ) {
    				for( .@k = 0; .@k < .mob_count[.@i]; .@k++ )
    					guardian .map_woe$[.@j],0,0,"--ja--", .mob_ID[.@i];
    			}
    			else
    				monster .map_woe$[.@j],0,0,"--ja--", .mob_ID[.@i], .mob_count[.@i],"";
    		}
    	}
    	end;
    OnAgitEnd:// when woe end
    	sleep 2;
    	for( .@i = 0; .@i < .size_map; .@i++ ) {
    		sleep2 1;
    		killmonsterall .map_woe$[.@i];
    	}
    	end;
    OnNPCKillEvent:
    	sleep2 1;
    	if( agitcheck() && compare( .mob_id_c$, killedrid +"" ) && compare( .map_woe_c$, strcharinfo(3) ) ) {// check is woe on + if mob in .mob_ID list + map in .map_woe$ list
    		if( GetCastleData( strcharinfo(3),1 ) )
    			guardian strcharinfo(3),0,0,"--ja--", killedrid;
    		else
    			monster strcharinfo(3),0,0,"--ja--", killedrid,1,"";
    	}
    	end;
    
    OnInit:
    // ------- setting
    	setarray .mob_ID, 1638, 1639; // add more mob id
    	setarray .mob_count, 40, 40;// number of mobs summoned / .mob_ID array column
    	setarray .map_woe$, "aldeg_cas01", "aldeg_cas02"; // yours woe map
    //-------- end of setting
    	.size_mob = getarraysize( .mob_ID );
    	.size_map = getarraysize( .map_woe$ );
    	for( .@i = 0; .@i < .size_mob; .@i++ )
    		.@tmp$[.@i] = .mob_ID[.@i];
    	.mob_id_c$ = implode( .@tmp$, "|" );
    	.map_woe_c$ = implode( .map_woe$, "|" );
    	end;
    }

     

     

     

    Add in guild/agit_main.txt

    
    killmonsterall strcharinfo(3);

    after

    
    // The Emperium has been broken.
    OnAgitBreak:
    	set .@GID,getcharid(2);

     

     

    and

    
    donpcevent "spawn_woe::OnAgitStart";

    after

    
    announce "The [" + getcastlename(strnpcinfo(2)) + "] castle has been conquered by the [" + getguildName(.@GID) + "] guild.",bc_all|bc_woe;

    Hi i would like to ask, Cant seem to make this work. Followed everything. Really like to use this script using mobs as guardians. Been playing with my friends

     

    On 3/24/2013 at 1:25 PM, Capuche said:

    No when you kill a monster, you spawn 4 or 6 monsters in each map this way.

     

    Try this

    
    -	script	spawn_woe	-1,{
    OnAgitStart:// when woe start
    	sleep 2;
    	for( .@i = 0; .@i < .size_mob; .@i++ ) {
    		for( .@j = 0; .@j < .size_map; .@j++ )
    			monster .map_woe$[.@j],0,0,"--ja--", .mob_ID[.@i], .mob_count[.@i],"";
    	}
    	end;
    OnAgitEnd:// when woe end
    	sleep 2;
    	for( .@i = 0; .@i < .size_map; .@i++ )
    		killmonsterall .map_woe$[.@i];
    	end;
    
    OnNPCKillEvent:
    	if( agitcheck() && compare( .mob_id_c$, killedrid +"" ) && compare( .map_woe_c$, strcharinfo(3) ) )// check is woe on + if mob in .mob_ID list + map in .map_woe$ list
    		monster strcharinfo(3),0,0,"--ja--", killedrid,1,"";
    	end;
    
    OnInit:
    // ------- setting
    	setarray .mob_ID, 1638, 1639; // add more mob id
    	setarray .mob_count, 40, 40;// number of mobs summoned / .mob_ID array column
    	setarray .map_woe$, "aldeg_cas01", "aldeg_cas02"; // yours woe map
    //-------- end of setting
    	.size_mob = getarraysize( .mob_ID );
    	.size_map = getarraysize( .map_woe$ );
    	for( .@i = 0; .@i < .size_mob; .@i++ )
    		.@tmp$[.@i] = .mob_ID[.@i];
    	.mob_id_c$ = implode( .@tmp$, "|" );
    	.map_woe_c$ = implode( .map_woe$, "|" );
    	end;
    }

    But this one works fine. Any suggestions?

×
×
  • Create New...