Openkore.com

OpenKore Forums
 It is currently 21 Jan 2019, 07:22

 All times are UTC - 5 hours [ DST ]

 Page 1 of 1 [ 1 post ]
 Print view Previous topic | Next topic
Author Message
 Post subject: Back Stab usage idea.Posted: 15 Oct 2012, 09:25
 Developers

Joined: 01 Nov 2008, 15:31
Posts: 361
I have an idea how to check if we are standing behind the back of the mob.

This is the minimal solution i could do:

Code:
my \$mld = \$target->{look}{body};
my \$mdf = ("0"=>1,"1"=>2,"2"=>1,"3"=>0,"4"=>-1,"5"=>-2,"6"=>-1,"7"=>0)->(\$mld);
my \$subx = \$char->{pos}{x} - \$target->{pos_to}{x};
my \$suby = \$char->{pos}{y} - \$target->{pos_to}{y};
if (\$subx < 0) \$subx = -1 elsif (\$subx > 0) \$subx = 1 else \$subx = 0;
if (\$suby < 0) \$suby = -1 elsif (\$suby > 0) \$suby = 1 else \$suby = 0;

if ((abs(\$odf - \$mdf) == 1) || ( \$odf == \$mdf && \$subx > \$suby && grep(/\$mld/,(2..4)) ) || ( \$odf == \$mdf && !grep(/\$mld/,(2..4)) ) ) my \$result = 1;

Please fix my code mistakes because i am realy bad at Perl x)

if \$result we are behind the back of the mob...
I can write the explanations if u wish.
I had not tested it yet.

_________________

Top

 Display posts from previous: All posts1 day7 days2 weeks1 month3 months6 months1 year Sort by AuthorPost timeSubject AscendingDescending
 Page 1 of 1 [ 1 post ]

 All times are UTC - 5 hours [ DST ]

Who is online

Users browsing this forum: No registered users and 1 guest

 You cannot post new topics in this forumYou cannot reply to topics in this forumYou cannot edit your posts in this forumYou cannot delete your posts in this forumYou cannot post attachments in this forum

Search for:
 Jump to:  Select a forum ------------------ Announcements    Announcements Support    Frequently Asked Questions & Guides    Resolved Questions    Official Servers       bRO       fRO       iRO       idRO       kRO       jRO       tRO       twRO       pRO       Private Servers       Other OpenKore support Discussions    Discussion    Tips & Tricks    Feature suggestions Plugins    Howto write plugins    Macro Plugin       Share your macro's    Other Plugins Technical    Developers Corner    Development Help    Tester's corner    Bug reports       Fixed bugs       Unresolvable bugs    Commit Queue Off Topic    Misc    Trashcan Links    OpenKore Manual    Official GitHub    Download Openkore .zip    AJAX IRC Client (Chat)    Developer Manual