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

Join the conversation

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

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  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.

Loading...
Sign in to follow this  

×
×
  • Create New...

Important Information

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