|
You last visited: Today at 13:39
Advertisement
Calculation formula for Mob Distance in Delphi
Discussion on Calculation formula for Mob Distance in Delphi within the Perfect World forum part of the MMORPGs category.
03/28/2013, 02:33
|
#1
|
elite*gold: 0
Join Date: Mar 2013
Posts: 17
Received Thanks: 3
|
Calculation formula for Mob Distance in Delphi
I got xyz cords like 1234.3245545454 and wonder how to calculate the distance to a Mob from that.
So how do you calculate the ingame distance to mob's in delphi ?
Distance between two points Tutorial:
|
|
|
03/28/2013, 11:04
|
#2
|
elite*gold: 20
Join Date: May 2009
Posts: 1,290
Received Thanks: 326
|
Code:
{$REGION 'Distance stuff'}
function TGrindThread.Distance(P1, P2, Q1, Q2: single): single;
begin
result := sqrt(Power(P1 - Q1, 2) + Power(P2 - Q2, 2))
end;
function TGrindThread.distanceline(l1, l2: Single): Single;
begin
result := Abs(l1 - l2);
end;
{$ENDREGION}
Cheers
|
|
|
03/29/2013, 00:27
|
#3
|
elite*gold: 0
Join Date: Mar 2013
Posts: 17
Received Thanks: 3
|
Thanks Swoosh,
i made it the same like you :-)
Quote:
|
Distance:=Round(Sqrt( power((CHAR_X-MOB_X),2)+ power((CHAR_Y-MOB_Y),2 ) ));
|
First without power, then see Error on - Numbers.
|
|
|
 |
Similar Threads
|
DELPHI - Who make Exploits, Hacks and Tools with DELPHI?
05/15/2013 - CO2 Programming - 13 Replies
Hi all.
Iwith DELPHI, but a dont now.
hello, I use Delphi to program and i like someone put here source code of make Exploits, Hacks and Tools bot here, or part of the code.
ty to all
|
Exp Calculation
08/21/2011 - CO2 Private Server - 4 Replies
I know this is not real exp calculation and it's custom.
Just wondering, if it would be a good way to do it custom.
static ulong GetExerience(ulong GainExperience, byte attLevel, byte oppLevel, byte Rate, uint Damage, byte Reborns, byte TeamMembers)
{
ulong Experience = (attLevel <= oppLevel) ? (GainExperience * Rate) : ((GainExperience / attLevel) * Rate);
Experience += (ulong)(Damage ^ (Reborns + oppLevel)) / TeamMembers;
return...
|
Exp calculation?
01/09/2011 - CO2 Programming - 3 Replies
Hey,
Does anyone has a decent exp calculation, or show me atleast how it is calculated? I really have no idea when it comes to conquer.
Thanks in advance,
ImmuneOne.
|
[DELPHI&METIN]Wie sind die Delphi Befehle für einen Bot?
03/07/2010 - General Coding - 3 Replies
Hallo liebe com,
ich habe mal eine Frage: Ich möchte einen Metin Bot in Delphi schreiben aber ich weiß nicht die Befehle für
eine bestimmte Taste senden etc.
könnt ihr mir die pls sagen oder per pn geben
MfGGGGGG
|
All times are GMT +1. The time now is 13:41.
|
|