Jump to content

crazyarashi

Developer
  • Posts

    763
  • Joined

  • Last visited

  • Days Won

    20

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:
    	.@minion_id = 1002;
    	.@minion_count = 10;
    	monster "prontera",255,55,"Pink Evil Minions",.@minion_id,.@minion_count,strnpcinfo(0)+"::OnMinionKill";
    	copyarray .gid[getarraysize(.gid)], $@mobid[0], .@minion_count;
    	end;
    
    OnMinionKill:
    	.@len = getarraysize(.gid);
    	for(.@a = 0; .@a < .@len; .@a++) {
    		if(unitexists(.gid[.@a])) {
    			getunitdata(.gid[.@a],.@mobdata);
    			if(!.@mobdata[UMOB_HP]) {
    				dispbottom .@mobdata[UMOB_X]+" "+.@mobdata[UMOB_Y]+" HP:"+.@mobdata[UMOB_HP];
    				deletearray .gid[.@a], 1;
    				break;
    			}
    		} else {
    			deletearray .gid[.@a], 1;
    			.@len--;
    		}
    	}
    	
    }

     

    Big thanks! going to try it out :))

×
×
  • Create New...