Jump to content
  • 0

script that detect monsters on area of x


joelolopez

Question


  • Group:  Members
  • Topic Count:  154
  • Topics Per Day:  0.03
  • Content Count:  493
  • Reputation:   46
  • Joined:  01/24/12
  • Last Seen:  

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
Link to comment
Share on other sites

3 answers to this question

Recommended Posts


  • Group:  Members
  • Topic Count:  18
  • Topics Per Day:  0.00
  • Content Count:  2044
  • Reputation:   682
  • Joined:  10/09/12
  • Last Seen:  

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
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  154
  • Topics Per Day:  0.03
  • Content Count:  493
  • Reputation:   46
  • Joined:  01/24/12
  • Last Seen:  

ahm so it requires source modification... no other way to have this w/o source mod?

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  18
  • Topics Per Day:  0.00
  • Content Count:  2044
  • Reputation:   682
  • Joined:  10/09/12
  • Last Seen:  

nope, rathena doesn't have this kind of feature, that's why some source modification are require

Link to comment
Share on other sites

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.

×
×
  • Create New...