Jump to content
  • 0

script that detect monsters on area of x


Question

Posted (edited)

i nid some script that will detect a near by monsters like for example

 

when theres a poring monster  in front of you

 

displays Warning! there is a Poring monster ahead! something like that

 

 

 

like this

X= area

O=poring

U=you

 

X X OX X

X X X X X

X X U X X

Edited by joelolopez

3 answers to this question

Recommended Posts

Posted (edited)

mob_controller_r20131218.patch

-	script	poring_detect	-1,{
	attachrid .ai_action[AI_ACTION_TAR];
	getmobdata .ai_action[AI_ACTION_SRC], .@mob;
	getmapxy .@map$, .@x, .@y, 0;
	if ( distance( .@x, .@y, .@mob[6], .@mob[7] ) <= 3 ) {
		if ( !@display_msg ) {
			message strcharinfo(0), "Warning! there is a Poring monster ahead! something like that";
			@display_msg = 1;
		}
	}
	end;
OnInit:
	.@id = mobspawn( "Poring", 1002, "prontera", 155,180 );
	mobattach .@id, strnpcinfo(0);
	setmobdata .@id, 25, AI_ACTION_TYPE_DETECT;
	setmobdata .@id, 9, 1 | 4 | 64 | 128 | 256 ;
	end;
}
offtopic,

I just run a forum search "mob controller"

all result direct to my post <.<

it seems nobody else here has learn mob controller yet .... no doubt it does have a learning curve ...

edit : forgot to add distance check

Edited by AnnieRuru

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...