Register for your free account! | Forgot your password?

Go Back   elitepvpers > MMORPGs > Cabal Online > Cabal Guides & Templates
You last visited: Today at 12:40

  • Please register to post and access all features, it's quick, easy and FREE!

Advertisement



[Guide] How to find the angle of your character to your desired target

Discussion on [Guide] How to find the angle of your character to your desired target within the Cabal Guides & Templates forum part of the Cabal Online category.

Reply
 
Old   #1
 
168Atomica's Avatar
 
elite*gold: 0
Join Date: Jul 2008
Posts: 72
Received Thanks: 85
[Guide] How to find the angle of your character to your desired target

Hello guys,

For those who are eager to put Autoit into action for use with CABAL, you would be glad with this post.

Lots of people PMed me on how did I manage to rotate my character so that it faces the right direction when botting.

I do that using trigonometry! (oh no)

But don't run away - yet
Complicated as it seems, it is just this function in AutoIt that does the magic.

Code:
_Degree(_ATan2($targetY - $currentY, $targetX - $currentX)
the return value of that function is the angle between your current position and your target position.

But hey, how would I know my current location?
See my siggy

Ok, but how would I know the target location?
Huh? Just go there and record the coordinates!

Oh sorry, one last question. How would I know how long to press the 'a' for left or 'd' for right to rotate my character?
Good question.
Based on my experiments, one full character rotation is approx 7560 ms. Ok, I will not make you dizzy with computation.
Here is the code:

Code:
Func _rotateLeft($ntimes)
	AutoItSetOption("SendKeyDownDelay", $ntimes * 21)
	Send("a")
EndFunc   ;==>_rotateLeft
What it does is hold 'a' for a period of 21ms per degree - (assuming 1 degree is 21 ms hold of the key - then 360 degrees = 7560 ms. )

As an example, if you got 45 as a result of the _Degree function above, then call _rotateLeft(45)

The code for rotation to the right is just as simple
Code:
Func _rotateRight($ntimes)
	AutoItSetOption("SendKeyDownDelay", $ntimes * 21)
	Send("d")
EndFunc   ;==>_rotateRight
I hope this post is not confusing as it seems. I made it as simple as possible so others could learn.

Leechers will be confused. Learners will benefit from this post. Happy holidays!

UPDATE---Example:
If your current coordinate is (10,22) and you want to bot at location (100,120)

Degrees returns 47
we just need to call _rotateLeft(47) to rotate our character
168Atomica is offline  
Thanks
7 Users
Old 12/27/2012, 11:43   #2
 
elite*gold: 0
Join Date: Oct 2009
Posts: 115
Received Thanks: 14
At last! there you go!
majead123 is offline  
Old 04/07/2024, 20:56   #3
 
elite*gold: 0
Join Date: Feb 2018
Posts: 21
Received Thanks: 4
It's old thread but it doesn't really matter since movement didn't change in this game since that time. I'm not sure how it suppose to work because you don't know where you look at initial moment. What if your character is turned back to target location?
wladorvir is offline  
Reply


Similar Threads Similar Threads
Cannot find target
07/06/2010 - SRO Private Server - 2 Replies
Hello guys. After bot teleported to ht becuase he hasn't potions I stoped him. Then I put items to storage myself, bought drugs etc. Then I started bot and used return scroll. After teleport it cannot find target every four seconds. I stop bot and unchecked loop but it still says that and I can't walk and I don't want to relog. How to make him loop again?
[Help] Invalid Target/Cannot find Target(ZSZC)
05/29/2010 - SRO Private Server - 4 Replies
Some write they have Problems with ZSZC SRO-DB, by mobs for example "Ishade/Penon/Ujigi(lvl50-56)", in the Textbox right side down a message: "Invalid Target" or " Cannot Find Target", All have this Problem, a good message, i have the solution! You need Use SRO-DB Bot V0.8 and NOT V0.9a! +++Use this and you will have Fun by Botting+++
Cannot find a target ??? WTF ??!!!
08/25/2007 - Silkroad Online - 4 Replies
Hmm so my bot works corectly but i have 1 problem :P When my char is on a spot he wait about 5 sec for attack monster and 4 sec for take a drop ... WTF ??? aaa my char is a bowman if it's help :P
Character viewing angle
04/13/2007 - Conquer Online 2 - 3 Replies
Having just restarted playing conquer recently, I was a bit disappointed with the equipment window. One of the new patches have changed the character's viewing angle. Instead of seeing the character straight ahead, its now more of a top down view at an angle. I perfer the old view of the character, does anyone have any idea on how to get the old view back? For those who dont know what I mean, heres a screenshot http://img405.imageshack.us/img405/5052/conquerzg 7.jpg



All times are GMT +2. The time now is 12:41.


Powered by vBulletin®
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
SEO by vBSEO ©2011, Crawlability, Inc.
This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

Support | Contact Us | FAQ | Advertising | Privacy Policy | Terms of Service | Abuse
Copyright ©2024 elitepvpers All Rights Reserved.