|
Post by TinyTerror on Feb 15, 2005 21:17:39 GMT -5
Hmm. That means that FFACT and Autoterror arent really talking. Have you tried starting them up in different order? Make sure you are not running actool at the same time.
|
|
|
Post by Izlude on Feb 15, 2005 21:46:01 GMT -5
i cant run actool??? i thought i needed it to run ffact?
|
|
|
Post by Izlude on Feb 15, 2005 21:51:40 GMT -5
ok i cllosed actools, and restarted the stuff, and after tabbing a bunch of times i got some X's and some <>'s with some names inside them
|
|
|
Post by Izlude on Feb 15, 2005 22:12:16 GMT -5
ok tiny i got it to work on some bats, it seems to work well, i willl use this for a bit, thanks for ur help. i just need to make some more mods, which i think will be pretty good. jsut a quick question i know ffact uses xy for location, but what line could i use to make it return to that specific location? is it autoterror fun, which i am guessing or just auto it?
|
|
|
Post by Izlude on Feb 15, 2005 22:19:04 GMT -5
Here are my mods so far, this solowy turns left so it cannot turn 2 fast to over look ur mob, if tageted ur mob it will then follow it and then voke it, alost good enough for a afk bot. too bad i dont like them ><
AutoItSetOption("SendKeyDownDelay",200);
FFACTInit(); //Start up ffact interface $MyTarget="Ashmaker Gotblut"; //Set target name here
While 1=1; //Start infinite main loop
;//This loop sleeps until numlock is on. ;//This effectively pauses the script if numlock is off. ;//Even if numlock is on, the script will still sleep for 10ms per cycle.
Do Sleep(10); Until NumCheck()=1; //Do this until num lock is on
Send("{LEFT}"); Send("{TAB}"); //Aquire target Send("{Left}"); Send("{TAB}"); //Aquire target
FFACTTargetUpdate(); //Check target $mob = FFACTTargetGetName(); //Get mob name ConOut("<"); ConOut($Mob); ConOut(">"); Sleep(100);
;//Voke condition If $mob = $MyTarget Then; //Check to see if this is the right target. Send("^3"); /follow Send("^1"); voke macro Fight(); EndIf
;//This loop sleeps until the target is killed or untargetted While $mob=$MyTarget; //Do this until target lost FFACTTargetUpdate(); //Check target $mob = FFACTTargetGetName(); //Get mob name Sleep(2000); WEnd
WEnd; //End infinite main loop
Func Fight() Sleep(3000) Send("^2");macro for auto attack Send("^4"); lets me know that he is being attacked by me EndFunc
she works good so far, oped ur ffact debug window and autoterror run it.
|
|
|
Post by TinyTerror on Feb 15, 2005 22:50:36 GMT -5
Getting the coordinates where you are is autoterror. Actually making a bot that will run between points is autoit with a good bit of math.
|
|
|
Post by Duke Newrise on Feb 16, 2005 0:35:23 GMT -5
Friend: Whats your bot doing?
Me: It's running the funtion of F(x) = (x^3) + 2(x^2) + 11x
Friend: You have tainted Final Fantasy with math, you whore.
|
|
|
Post by Kelpinn on Feb 16, 2005 6:56:25 GMT -5
Hi Izlude, I like your use of the "/follow" function in your voke bot... Never thought of using that in mine
|
|
|
Post by TinyTerror on Feb 16, 2005 7:12:26 GMT -5
LOL! Horray for interpolation in an autoit script >_<
|
|
|
Post by Izlude on Feb 16, 2005 14:41:20 GMT -5
well i just want it to return to a specific area after fighting the mob. i dont want it to travel much. i am looking at the ffact funs right now, and i found a line for this. how could i use the line though if i have the numbres use a if statement?
these are the lines for pos: $XPos=FFACTPlayerGetX(); $YPos=FFACTPlayerGetY(); $ZPos=FFACTPlayerGetZ();
i have the numbers but, how could i integrate this?
also the ffact gives a hdg number which i belive is direction. but which line do i use?
$HeadingD=FFACTPlayerGetHeadingDeg(); $HeadingR=FFACTPlayerGetHeadingRad();
|
|
|
Post by TinyTerror on Feb 16, 2005 15:48:53 GMT -5
Alright, here are some general pointers for any attempt at writing navigation code.
1. Don't worry about the Z coordinate. This really isnt that important unless you want to get really sophisticated. As far as your script should be concerned, the game world is completely 2D.
2. I recomend a series of hardcoded positions that your navigation code will follow in order to get from one place to another.
3. You should use the FFACTPlayerGetHeadingDeg function to get your heading in degrees. That is unless you like radians.
4. The position data you get from the position functions is not the same as in-game coordinates on the world map. I am not even sure that the scale between game coordinates and FFACT position data is the same for all zones. I would recomend that you do not try to rely on such a relationship for nav code.
5. Do not try the timed run trick. This involves recording the ammount of time you ran in a certain direction in order to replicate a traveled path. This doesn't work right. There are too many things that can mess this up. Enemies getting in the way and error magnification are some of the big ones.
6. You may want to consider external data files for recording and storing path following data. This way you have less stuff hardcoded into your script, and more that can be easily used in other scripts.
7. Start with a simple connect the dots routine. Select points along the path you want to run that are in easy line of site to each other. For each point, turn your character until it is facing the next point. Run towards the next point until you get there. Repeat this process until you arrive at your destination. This is where some of the math comes in.
If I think of any more tips, I will post them. If I were you, I would focus on something a little more within your grasp, like maybe a simple autofight function for your voke script. I will warn you right now that this is alot more complex than a voke script, and I will not hold your hand through every step. Its just too complicated. You will need a pretty solid grip on how the language works to do this, so practice a bit more before you try it. I know you are going to try it anyway, so all I ask is that you make a new thread for it. We dont need this one exploding into a 50 page monster.
|
|
|
Post by Izlude on Feb 16, 2005 16:30:11 GMT -5
lol ok tiny. i will look into a autofighter, and put the location thing to the side.
here is the fight line:
_ffact_PlrStatus_Fighting = 1 but is this is u are attacking anything of if it is attacking you?
|
|
|
Post by TinyTerror on Feb 16, 2005 17:13:12 GMT -5
I've never used the player status functions for anything, but Im assuming that while you are fighting, FFACTPlayerGetStatus() will return 1. If I have to guess, I would say that while you are actively engaged with a target (your weapon is out) the game will report that you are fighting. A way to determine if you are being attacked would be to periodically check your HP to see if you are taking damage from anything.
|
|
|
Post by Izlude on Feb 16, 2005 17:24:32 GMT -5
how could i make it if my hp's drop that it will attack it? so put in something with these 2 lines:
$CurHP=FFACTPlayerGetCurrentHP(); $MaxHP=FFACTPlayerGetMaximumHP();
but what else could i put in, to make it so that if my hp's arent my max hp's it will attack the enemy?
|
|
|
Post by TinyTerror on Feb 16, 2005 17:36:22 GMT -5
I would use something like this:
FFACTPlayerUpdate(); Global $OldHP=FFACTPlayerGetCurrentHP();
Loop start. ... ... FFACTPlayerUpdate(); $CurHP=FFACTPlayerGetCurrentHP(); if($CurHP<$OldHP) Then ;//Something is attacking you EndIf $OldHP=$CurHP; ... ... Loop end
This will detect if your HP has decreased. It will only detect it once per decrease in HP, so make sure you set a flag or something so that your script knows that you are still under attack. You might try use this in combination with status, or a timer or something. Its up to you.
Keep in mind that this is not runable code. Dont stick it in your script and expect it to run. Also, remember that calling FFACTTargetUpdate or FFACTPlayerUpdate takes up to 100ms to run, so don't call it more than once per cycle of your loop if you can avoid it.
Please make a new thread before going any farther with this. Its a pain in the ass to read through a massive thread.
|
|