Rzn
Junior Member
Posts: 55
|
Post by Rzn on Nov 2, 2005 2:13:11 GMT -5
is there anyway to add the 3d distance from target? The current distance is from the center of the model.
I'm working on a ranger distance script and if i use the distance from center it will always be off a bit.
|
|
|
Post by TinyTerror on Nov 2, 2005 8:21:15 GMT -5
As cool as that would be, its just not possible. This would require a fairly complex computation involving the mob's model and clipping characteristics, among other things. Unless the game stores this distance in another memloc, there isnt any way I can add it.
|
|
Rzn
Junior Member
Posts: 55
|
Post by Rzn on Nov 2, 2005 8:23:21 GMT -5
I'm pretty sure it's in mem only because the old ver of ffassist had it working.
|
|
|
Post by TinyTerror on Nov 2, 2005 9:18:39 GMT -5
Well, if someone can get ahold of the memloc, I'll consider adding it.
|
|
petar113507
Full Member
Damn Straight. I Am the king of waffelagia.
Posts: 166
|
Post by petar113507 on Nov 2, 2005 10:03:59 GMT -5
a RNG script?
Wasnt there GetTargerPos() in the FFXI library?
I fuigure that if you use umm.... a little diamond shape, I think your range could be doable.
This is my Idea: Find out the Max distance from you and your target. Your target will be the center of the diamond.
Set up 2 variables (X1, X2) ( Y1, Y2 ) With thiose variables Say something like : X1 = GetTargetPos() - 15
(15 would be in this case the max distance between you and the Target)
X2= GetTargetPos() + 15 Y1= GetTargetPos - 15 Y2= GetTargetPos + 15
If you plug in both of those coordiantes into an equasion, that states range, I think This should work....
(I dont know what the command of your position is from memory of the FFXI library)
MePos=GetMyPos()
X1< MePos < X2
Y1< MePos < Y2
That's just the distance thing for it... I thought this was a pretty good Idea... Lemme know if it could work or anyting.
Made quite a few spelling errors, and I dont have the time to correct them... You could probally pop in a few IF statements and it would be real good auto Attack Script....
|
|
Rzn
Junior Member
Posts: 55
|
Post by Rzn on Nov 2, 2005 10:47:39 GMT -5
That would work great if all mobs were the same size it could still work but you would have to set a varable for every mob
|
|
petar113507
Full Member
Damn Straight. I Am the king of waffelagia.
Posts: 166
|
Post by petar113507 on Nov 2, 2005 12:21:47 GMT -5
Or what If you could mod it to fit it to be your POS. Then you calculate the monster POS, while you're in the center of the diamond. So Instead of the X1 - Y2 It would be X1-Y2 = Player_CurrentPOS() and the cariable that would be in the range would be x1< MonsterPos() < X2 Why are you saying anything about the monster size? I dont understand that little section, along with another thing: what if you could find the optimal range, and you use the "Diamond POs system" in the current POS tinyterror has. (Using Tinyterrors because it is so accurate.) If you could use that to demonstrate movement.... well using this system.... I think you could use movemnt in keystrokes, but when using the keystrokes, check the Diamond POS... Wait it just struck me, you could make a bot move in certian directions using this.... You could even monitor where they move.... Hmm. I will look into this, and repeatable quests....
|
|
petar113507
Full Member
Damn Straight. I Am the king of waffelagia.
Posts: 166
|
Post by petar113507 on Nov 2, 2005 15:53:37 GMT -5
Oh si~ And I thought of a solution of how that would work out just fine.
Set up a While Statement with
While Target_PosZ() < (Max height of Mob you want to fight)
Whend
or something like that. Im writing this in AutoIT similrly because I dont have much time, I neef to get to lunchtime.
|
|
|
Post by TinyTerror on Nov 2, 2005 16:14:45 GMT -5
Yeah, but how do you tell how tall a mob is?
|
|
Rzn
Junior Member
Posts: 55
|
Post by Rzn on Nov 2, 2005 21:14:13 GMT -5
better question: How do you figure how fat the mob is cuz thats what i really need to know
|
|
petar113507
Full Member
Damn Straight. I Am the king of waffelagia.
Posts: 166
|
Post by petar113507 on Nov 2, 2005 22:57:25 GMT -5
How Fat it is? Tiny, if I remember You added a Z co-ordinate, making this a 3D plane we're working with here....
Maybe you could check the mob height Using the Z co-ordinate, and with that little sucker you set up the While statement.
So like
While
Target_Zpos() < Max Height of certian mob.
Or perhaps a select case, (Of which I dont know how to do in Lua.)
func CheckGobName
--Variable Target Name -- GetTarget_Name()
IF TargetName = Goblin ***** (You could fill up lots of lines of code using a namechecker.)
EndFunc
GoblinMob= --Lowest Gob Height-- < Target_Zpos() < -- Max goblin height
CheckGobName()
(The numbers on a goblin for example, I can't spew out raw data of the Zpos, but I think that the numbers should be pretty darn close to each other for being a goblin, regardless of area, or type.)
(I dont know about the statements being nested in Lunar script, but this is the simplest thing I could think of.)
--Variable or Function for DiamondPlot Sweetspot--
X1 = GetPlayerPos() - 15 X2= GetPlayerPos() - 10 X3=GetPlayerPos() + 10 X4=GetPlayerPos() + 15
Y1=GetPlayerPos() - 15 Y2=GetPlayerPos() - 10 Y3=GetPlayerPos() + 10 Y4=GetPlayerPos() + 15
-- End DiamondPlot SweetSpot --
Case 1 = GoblinMob
While Target_Zpos() <= (GoblinMob) While X1 < GetTargetPos() < X2 [u]And[/u] Y1 < GetTargetPos() < Y2 --Trip Macro for Ranged Attack--
Whend
Keep in mind these are just Ideas, Im barreling them outta my head in algebra II class here. I dont think this stuff Is EVEN close to the real script. I think this stuff is pretty good ideas, hopefully accurate... But Im a novice in Lua scripting. I just understand most of the Syntax, and how to manapulate the data
The Zpos Should show the height... As far as a sweetspot Diamond Range... I dont know for sure If Im answering your Question correctly. Why would the Monster Height be important in this case? that's the only part I dont understand. If you could explain that, maybe I could help you out with it. ;D
|
|
petar113507
Full Member
Damn Straight. I Am the king of waffelagia.
Posts: 166
|
Post by petar113507 on Nov 2, 2005 23:03:19 GMT -5
Yeah, but how do you tell how tall a mob is? Wow. I wrote all of that.... and I just realised what Tiny was saying. I think you could use the TargetPos X , Y , along with the TartgetZPos, and that would give you the full height of the mob, from the center.... Wait the Mob has got the thing from the center of it, yessum? Is there a way to determine the width of a mob? Cause I mean, I think if someone has got a BLM high enough, you could stun the mob/sleep it... and run a few tests on the difference between the mob, and turn that data into... Hmm.... Wait, wouldnt it save time to check the names of the mob?
|
|
Rzn
Junior Member
Posts: 55
|
Post by Rzn on Nov 3, 2005 0:00:45 GMT -5
you could make a list of every mobs "offset" but it would be a huge list and would probly make the script very slow
|
|
petar113507
Full Member
Damn Straight. I Am the king of waffelagia.
Posts: 166
|
Post by petar113507 on Nov 3, 2005 0:09:50 GMT -5
OOf. So much for that idea, eh?
Anymoose, Expect to see some of the Diamond Plot stuff in my scripts, Hope it works. And Good luck getting them memlocks. I'll poke around with a few friends see if they know where they would be located, or in the general vincinity of such, but I think they wouldnt.
|
|
|
Post by TinyTerror on Nov 3, 2005 1:04:22 GMT -5
you could make a list of every mobs "offset" but it would be a huge list and would probly make the script very slow Actually it wouldn't. Lua's table code is all hash driven, so even if you have a very long list, finding a specific element is quite fast. It doesn't stop this from being a stupid idea though ;D
|
|