Angelmelody 221 Posted March 18, 2014 (edited) get the direction from an unit (pc、 npc or mob)orset 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 PCthe value of type 1 means head direction ,otherwise if type =0 or with no type param means body directionexample: 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 March 19, 2014 by Angelmelody 2 jaBote and evilpuncker reacted to this Quote Share this post Link to post Share on other sites
AnnieRuru 957 Posted March 18, 2014 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 Quote Share this post Link to post Share on other sites
Angelmelody 221 Posted March 19, 2014 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 Quote Share this post Link to post Share on other sites
evilpuncker 503 Posted March 19, 2014 nice one, I once needed this command for a request xD Quote Share this post Link to post Share on other sites