Jump to content

crazyarashi

Developer
  • Posts

    761
  • Joined

  • Last visited

  • Days Won

    19

Posts posted by crazyarashi

  1. Haven't tested this yet :))
     

    -	script	spawn_event	HIDDEN_WARP_NPC,{
    OnSun0000:
    OnMon0200:
    	if(gettime(DT_DAYOFWEEK) == SUNDAY)
    		.@map$ = "prt_fild03";
    	else
    		.@map$ = "pay_fild05";
    	monster .@map$,0,0,"Field Boss",.mob_id[rand(getarraysize(.mob_id))],1;
    	announce "System : A field boss appeared at" + .@map$;
    	end;
    		
    OnInit:
    	setarray .mob_id,1001,1002;
    	end;
    }
    	



     

  2. 1 hour ago, Skorm said:

    Here there might be a better way of doing this but this is the method I've come up with tested and it's working quite well.

    prontera,260,69,1	script	monsterspawner	100,{
    
    OnMinionSummon:
    	[email protected]_id = 1002;
    	[email protected]_count = 10;
    	monster "prontera",255,55,"Pink Evil Minions",[email protected]_id,[email protected]_count,strnpcinfo(0)+"::OnMinionKill";
    	copyarray .gid[getarraysize(.gid)], [email protected][0], [email protected]_count;
    	end;
    
    OnMinionKill:
    	[email protected] = getarraysize(.gid);
    	for([email protected] = 0; [email protected] < [email protected]; [email protected]++) {
    		if(unitexists(.gid[[email protected]])) {
    			getunitdata(.gid[[email protected]],[email protected]);
    			if([email protected][UMOB_HP]) {
    				dispbottom [email protected][UMOB_X]+" "[email protected][UMOB_Y]+" HP:"[email protected][UMOB_HP];
    				deletearray .gid[[email protected]], 1;
    				break;
    			}
    		} else {
    			deletearray .gid[[email protected]], 1;
    			[email protected];
    		}
    	}
    	
    }

     

    Big thanks! going to try it out :))

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use and Privacy Policy.