[Script CMD] s/getunitdir

Angelmelody

(\ /) ( . .)
Messages
772
Points
0
Age
32
Location
new_1-1,53,111
Github
Angelmelody
Emulator
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

 

Attachments

Last edited by a moderator:
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 
default_sleep.png


 
nice one, I once needed this command for a request xD

 
Back
Top