Jump to content
  • 0

summon random?


Question

Posted (edited)

help me for script @summon random monster?

 

prt_in,64,140,3    script    Summoner    860,{

atcommand "@summon "random id" "seconds"";
}

Edited by domez86

9 answers to this question

Recommended Posts

  • 0
Posted (edited)

 

prt_in,64,140,3    script    Summoner    860,{
	.@mid = 1002 //Mob ID
	.@time = 3; // Mob Exist Duration
//	dispbottom .@mid + " " + .@time;
	atcommand "@summon "+.@mid+" "+.@time;
	end;
}

 

Edited by utofaery
  • 0
Posted
3 hours ago, utofaery said:

 


prt_in,64,140,3    script    Summoner    860,{
	.@mid = 1002 //Mob ID
	.@time = 3; // Mob Exist Duration
//	dispbottom .@mid + " " + .@time;
	atcommand "@summon "+.@mid+" "+.@time;
	end;
}

 

random monster pls ^_^ not specific monster.

  • 0
Posted (edited)
On 2/25/2019 at 4:46 AM, domez86 said:

random monster pls ^_^ not specific monster.

prt_in,64,140,3	script	Summoner	860,{
	setarray .@rmid[getarraysize(.@rmid)], 
	//Mob ID start
						1002,
						1113,
						1031; 
	//Mob ID End
	.@r = rand (getarraysize (.@rmid) );
	.@mid = .@rmid[.@r];
	.@time = 1; // Mob Exist Duration 1 one minute?

	atcommand "@summon "+ .@mid +" "+.@time;

	end;
}

 

Edited by utofaery
  • 0
Posted
.@sum = rand(1001,3788);
    freeloop(1);
    while(getmonsterinfo(.@sum,MOB_LV)==-1)
    .@sum = rand(1001,3788);
    freeloop(0);

monster "x_lhz",75,50,"Random Monster",.@sum,1;

 

  • 0
Posted (edited)
prontera,147,174,5	script	Change Dress	509,{
	monster "this", -1,-1, "--ja--", .mobid[ rand(.total_mob) ], 1;
	setunitdata $@mobid, UMOB_MASTERAID, getcharid(3);
	setunitdata $@mobid, UMOB_MODE, MD_CANMOVE | MD_CANATTACK | MD_AGGRESSIVE | MD_ASSIST;
	end;
OnInit:
	if (checkre(0)) {
		.@mob_db$  = "mob_db_re";
		.@item_db$ = "item_db_re";
	} else {
		.@mob_db$  = "mob_db";
		.@item_db$ = "item_db";
	}
	.total_mob = query_sql( "select id from "+ .@mob_db$ +" where mode & "+( MD_CANMOVE | MD_CANATTACK ), .mobid );
	end;
}

 

Edited by AnnieRuru
  • 0
Posted
5 hours ago, TARTs said:

.@sum = rand(1001,3788);
    freeloop(1);
    while(getmonsterinfo(.@sum,MOB_LV)==-1)
    .@sum = rand(1001,3788);
    freeloop(0);

monster "x_lhz",75,50,"Random Monster",.@sum,1;

 

not work...

  • 0
Posted
On 2/26/2019 at 2:11 PM, AnnieRuru said:

prontera,147,174,5	script	Change Dress	509,{
	monster "this", -1,-1, "--ja--", .mobid[ rand(.total_mob) ], 1;
	setunitdata $@mobid, UMOB_MASTERAID, getcharid(3);
	setunitdata $@mobid, UMOB_MODE, MD_CANMOVE | MD_CANATTACK | MD_AGGRESSIVE | MD_ASSIST;
	end;
OnInit:
	if (checkre(0)) {
		.@mob_db$  = "mob_db_re";
		.@item_db$ = "item_db_re";
	} else {
		.@mob_db$  = "mob_db";
		.@item_db$ = "item_db";
	}
	.total_mob = query_sql( "select id from "+ .@mob_db$ +" where mode & "+( MD_CANMOVE | MD_CANATTACK ), .mobid );
	end;
}

 

Hijack this for a moment.

 

what if excluding mvp miniboss from the list???

  • 0
Posted
On 2/26/2019 at 6:42 PM, domez86 said:

not work...

that script is only in part and you need npc header and closing for that script to work..

 

On 2/26/2019 at 12:59 PM, TARTs said:

prt_in,64,140,3	script	Summoner	860,{
  .@sum = rand(1001,3788);
    freeloop(1);
    while(getmonsterinfo(.@sum,MOB_LV)==-1)
    .@sum = rand(1001,3788);
    freeloop(0);

monster "x_lhz",75,50,"Random Monster",.@sum,1;
  end;
}

 

 

  • 0
Posted
33 minutes ago, utofaery said:

Hijack this for a moment.

 

what if excluding mvp miniboss from the list???

to block MVP list, add where ~mode & MD_MVP

I have absolutely no idea how to retrieve the list of miniboss in rathena ...
enlighten me please, because rathena changed monster mode already

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...