Jump to content
Sign in to follow this  
Angelmelody

[Script CMD] s/getunitdir

Recommended Posts

get the direction  from an unit (pc、 npc or mob)
or
set the direction of an unit(pc、 npc or mob)
 
CMD to use:
getunitdir (<GID>{,<type>});
setunitdir(<GID>,<body direction>{,<head drection>});
the type and  head direction param  are only available for PC
the value of type 1  means head direction ,otherwise if type =0  or with no  type param means body direction
example:

prontera,155,177,5	script	testgetdirection	4W_SAILOR,{	if(!.mgid).mgid = bg_monster(1,strnpcinfo(4),157,179, "--ja--",1674,"");	mes "your body direction is "+getunitdir(getcharid(3));	mes "your head is "+getunitdir(getcharid(3),1);	mes "npc direction is "+getunitdir(getnpcid(0));	mes "mob direction is "+getunitdir(.mgid);	next;	mes "please input your body direction";	input .@pcbd;	next;	mes "please input your head direction";	input .@pchd;	next;	mes "please input npc body direction";	input .@npcbd;	next;	mes "please input mob body direction";	input .@mobbd;	next;	setunitdir(getcharid(3),.@pcbd,.@pchd);	setunitdir(getnpcid(0),.@npcbd);	setunitdir(.mgid,.@mobbd);	next;	mes "your body direction is "+getunitdir(getcharid(3));	mes "your head is "+getunitdir(getcharid(3),1);	mes "npc direction is "+getunitdir(getnpcid(0));	mes "mob direction is "+getunitdir(.mgid);	close;}

 


getunitdir.c

Edited by Angelmelody

Share this post


Link to post
Share on other sites

not bad,

keyworld made this mod before in eathena

http://www.eathena.ws/board/index.php?s=&showtopic=270771&view=findpost&p=1482575

but I don't see any copy-paste element here

 

how about adding another *setdir ?

http://rathena.org/board/topic/91278-make-newly-created-character-face-forward/?p=239171

Share this post


Link to post
Share on other sites

not bad,

keyworld made this mod before in eathena

http://www.eathena.ws/board/index.php?s=&showtopic=270771&view=findpost&p=1482575

but I don't see any copy-paste element here

 

how about adding another *setdir ?

http://rathena.org/board/topic/91278-make-newly-created-character-face-forward/?p=239171

 

ok, thank you, I try to add setdir command, still noob at  plugin system  -_-

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
Sign in to follow this  

×
×
  • Create New...

Important Information

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