[Scripts] Automaton Scriptteile

06/23/2008 10:17 Tom94#61
nee man kann das net beschleunigen, da es von der attackspeed abhängt... besorg dir 100% attackspeed und es geht rasend schnell :D

zum thema wie lange ich schon lua lerne ^^
ich hab mich erst vorgestern mit LUA befasst und das auch nur mit wtfux script. da ich mich recht gut in c++ auskenne und lua relativ ähnlich ist konnte ich viel erschließen ;)
06/23/2008 10:38 Blacklotos#62
Code:
local tom = { } -- Functions
local tomv = { } -- Variables

RemoveCommand ( "Attackall" )

function tom.attackall ( Arguments , Device )
  local Actors = GetActors ()
	for k, Actor in pairs(Actors) do
		local Player = GetPlayer ()
		if ( Actor:Get ( "Attackable" ) ) and ( Actor ~= Player ) then
			if (Arguments == nil) or (Arguments == "") then
			  tomv.useskill = 0
      		          Attack (Actor, 0)
			else
			  tomv.useskill = 1
			  UseSkill (Actor, Arguments)
			end
		 end
	  end
	if (tomv.useskill == 0) then
	   OutputF ( Device, NAME_Log, "Started attacking all enemys around for 1 time", Arguments )
	 else
	   OutputF ( Device, NAME_Log, "Started using the Skill at all enemys around for 1 time", Arguments )
	end
    return true
end

Register ( tom, "tom" )
AddCommand ( tom.attackall, "Attackall", "<ID>", "Attacks everything around" )
dieser code ist ganz gut, leider greift es auch nur einmal an, ABER wenn man das hier SPAMMT...BOOOOOM : @ StartSpam @Attackall
06/23/2008 10:58 Tom94#63
das ist ja schließlich das gleiche wie wenn man meinen code unter ontick stellt nut ohne cycle protection ^^
hatte eig gehofft dass die anderen da auch druf kommen. es bringt halt net so viel, da es zwar dann 2-5 monster gleichzeitig angreift aber auch net mehr. außerdem macht das internet nach ner zeit net mehr mit :D
werd ma schauen ob ich das für 1 monster einstellen kann ^^

EDIT: Wenn ichs auf 1 monster einstelle, dann greifts nur einmal an, d.h. es ist das gleiche wie @startgrinding nur um einiges miserabler. ich werde die idee verwerfen ;)
06/23/2008 12:18 xChiccox#64
Mhh ok ich lern fleissig weiter lua bzw. hab 100%atsp ich versuchs mal mit @startspam attackall vllt. gehts ja dann^^

EDIT:// Tom mit was übst du eig. lua? kannst mir ja vllt. nen link schicken lerne atm nur mit einem Anfänger Programm x:
06/23/2008 12:51 Tom94#65
ich üb net lua xD
ich schau mir das script von wtfux an und merke mir die funktionen. die befehle sind fast immer gleich wie in c++ und so kann ich daraus schließen ^^

dann übertrage ich das ganze so wie ich es brauche und veränder es
06/23/2008 13:37 Gianotti#66
schade das es mitm blade nicht geht naja dann muss ich mir mal was anderes überlegen:)


PS: habt ihr schon gemerkt das in der automation präsentation alle befehle drinstehen die man dafür brauch um zu scripten ist ja mal voll leicht nur eben übersetzen dann gehts los mit dem scripten

es ist im Ordner:Programme\Flyff Automaton\documentation
06/23/2008 14:07 FlyStyler#67
Blacklotos ich hab jetzt ein Theard aufgemacht wo du mein scrippt loaden kannst, da ihr es
einfach scheinbar ügberliest, du brauchst es nicht spammen, im scrippt gibt es eine aoe funktion schon
06/23/2008 14:40 wowas#68
ähm, bin ein totaler noob und weiß überhaupt net wo man diesen code einbinden soll, kann mir das einer ausführlicher erklären xD ? muss ich mir wat laden oder sonstiges ?
06/23/2008 14:42 FlyStyler#69
Automaton+mein scrippt automaton starten flyff starten @help eingeben funktionen benutzten fertig
06/23/2008 17:40 321meins#70
kriegt einer nen Script hin, der die Petfoodbags ersetzt? O.o ...
Wär n1^^
06/23/2008 17:42 =NoVa=#71
du meinst jetzt nen Autopetfeeder oder?Sowas gibts/gabs hier wenn dann schon.
06/23/2008 18:11 TheNoob123#72
jo auf einer bekannten anderen seite sind glaub ich 3 verschiedene
Hier nochmal die MageGrinding von Blacklotos
MageGrinding:
Quote:
function Example.OnTick ( DeltaTime )
local Player = GetPlayer ()
if ( Player == nil ) then return end

local PPos = Player:Get ( "Position" )
local PLev = Player:Get ( "Level" )

if ( Follow ~= nil ) and ( not Grinding ) then
if ( not Follow:Get ( "Destroyed" ) ) then
local FPos = Follow:Get ( "Position" )
local FDist = Distance ( PPos, FPos )
if ( FDist > 1 ) then
Move ( FPos.x, FPos.y, FPos.z )
end
else
Follow = nil
end
end

if ( not Grinding ) then return end

if ( LastTarget == nil ) then
local Best = { Actor = nil, Distance = nil }
local Actors = GetActors ()
for k, Actor in pairs(Actors) do
local APos = Actor:Get ( "Position" )
local ALev = Actor:Get ( "Level" )
if ( not IsPlayer ( Actor ) ) and ( Actor:Get ( "Attackable" ) ) and ( PLev >= ( ALev - LevelRange ) ) then
local Dist = Distance ( PPos, APos )
if ( Best.Distance == nil ) or ( Best.Distance > Dist ) then
Best.Distance = Dist
Best.Actor = Actor
end
end
end

if ( Best.Actor ~= nil ) then
LastTarget = Best.Actor
LogF ( "Attacking %s!", LastTarget:Get ( "Name" ) )
local Position = LastTarget:Get ( "Position" )
Move ( Position.x, Position.y, Position. z )
UseSkill ( LastTarget, XX )
end
else
if ( LastTarget:Get ( "Destroyed" ) ) or ( not LastTarget:Get ( "Attackable" ) ) then
LastTarget = nil
else
LastCycle = LastCycle + DeltaTime
if ( LastCycle > CycleInterval ) then
local Position = LastTarget:Get ( "Position" )
Move ( Position.x, Position.y, Position.z )
UseSkill ( LastTarget, XX )
LastCycle = 0
end
end
end
end
Bei XX einfach die Nummern von den Skills einsetzen
Quote:
VAGRANT

0 - Clean Hit
1 - Brandish
2 - Overcutter


MERCENARY

3 - Splmash
4 - Protection
5 - Pan Barrier
6 - Keenwheel
7 - Bloody Strike
8 - Sneaker
9 - Impower Weapon
10 - Blindside
12 - Reflex Hit
13 - Smite Axe
14 - Axe Mastery
15 - Guillotine


KNIGHT

25 - Guard
28 - Rage
23 - Pain Dealer


BLADE

23 - Silent Strike
24 - Spring Attack
25 - Armor Penetrate
26 - Blade Dance
27 - Hawk Attack
28 - Berserk


MAGICIAN

Mental Strike 3
Blink Pool 14 ~~> ich glaub wohl keiner wird blinkpool zum grinden casten^^
Feuer 4 - 11 - 19
Wind 8 - 13 - 18
Wasser 7 - 12 - 17
Elektro 6 - 10 - 16
Erde 5 - 9 - 15


PSYCHIPER

Psykeeper Skills:
Crucio Spell - 23
Psychic Bomb - 24
Demonology - 25
Spirit Bomb - 26
Maximum Crisis - 27
Satanology - 28
Psychic Wall - 29


ELEMENTER

23 - Iceshark
24 - Stone Spear
25 - Thunder Strike
26 - Firebird
27 - Void
28 - Electric Shock
29 - Windfield
30 - Burning Field
31 - Earthquake
32 - Poison Cloud
33 - Fire Mastery
34 - Lightning Mastery
35 - Earth Mastery
36 - Wind Mastery
37 - Water Mastery
38 - MeteoShower
39 - Lightning Storm
40 - Sand Storm
41 - Blizzard


ACROBAT

3 - Slow Step
5 - Pulling
6 - Fast Walker
7 - Yoyo Mastery
8 - Bow Mastery
9 - Dark Illusion
10 - Silent Shot
11 - Crossline
12 - Aimed Shot
13 - Snitch
16 - Perfect Block
18 - Deadly Swing


JESTER

23 - Enchant Poison
24 - Enchant Blood
25 - Escape
26 - Critical Swing
27 - Backstep
28 - Enchante Asorbe
29 - Hop


RANGER



ASSIST

3 - Heal
4 - Mental Sign
5 - Patience
6 - Quick Step
7 - Heap Up
8 - Tamping Hole
9 - Ressurection
10 - Haste
11 - Circle Healing
12 - Beef Up
13 - Stonehand
14 - Burst Crack
15 - Cat's Reflex
16 - Prevention
17 - Accuracy
18 - Power Fist
19 - Cannon Ball


BILLPOSTER

23 - Asmodeus
24 - Belial Smashing
25 - Blood Fist
26 - Baraqijal Esna


RINGMASTER

23 - Holycross
24 - Protect
26 - Gvur Tialla
27 - Holyguard
28 - Spiriture Fortune
29 - Heal Rain
30 - Geburah Tiphreth
31 - Merkaba Hanzelrusha
06/23/2008 18:16 Tom94#73
Quote:
Originally Posted by 321meins View Post
kriegt einer nen Script hin, der die Petfoodbags ersetzt? O.o ...
Wär n1^^
automaton hat soweit ich weiss keine solchen funktionen drin ^^

btw: Hab mein Attackall cmd auch noch ne perm funktion gegeben

Kommando: startattackall / stopattackall
Effekt:
Fast gleich wie die AOE funktion aus GZP.
JEDOCH:
- greift einen nicht selber an
- man kann distanz einstellen
- man kann skill benutzen (jawohl es geht jetzt einigermaßen)

Code:
local tom = { } -- Functions
local tomv = { } -- Variables

-----Change here-----
tomv.range = 100      --Range of attackall command
-----Don't change here if you don't know what you do-----

tomv.grind = 0
tomv.skillid = nil
tomv.lcycle = 0
tomv.cinterval = 0.50

function tom.distance ( Source, Target )
	return math.sqrt ( math.pow ( Target.x - Source.x, 2 ) + math.pow ( Target.y - Source.y, 2 ) + math.pow ( Target.z - Source.z, 2 ) )
end


function wtfux.OnTick ( DeltaTime )
-----If you wanna add my script part to another script, then you have to put the code from now on till my next message into the OnTick function of the script-----
if (tomv.grind == 1) then

tomv.lcycle = tomv.lcycle + DeltaTime
if ( tomv.lcycle > tomv.cinterval ) then
  local Actors = GetActors ()
	for k, Actor in pairs(Actors) do
		local Player = GetPlayer ()
		local PPos = Player:Get ( "Position" )
		tomv.location = Actor:Get('Position')
		tomv.dist = tom.distance (PPos, tomv.location)
		if ( Actor:Get ( "Attackable" ) ) and ( Actor ~= Player ) and (tomv.dist < tomv.range) then
			if (tomv.skillid == nil) or (tomv.skillid == "") then
      		          Attack (Actor, 0)
			else
			  UseSkill (Actor, tomv.skillid)
			end
		 end
	  end
tomv.lcycle = 0
    end
    return true

 end
-----Stop copying the code here-----
end

function tom.startattackall ( Arguments, Device )
	Game:Set ( "CollisionDetection", false )
	tomv.grind = 1
if ( Arguments == nil ) or ( Arguments == "" ) then
	tomv.skillid = nil
else
	tomv.skillid = Arguments
end
    OutputF ( Device, NAME_Log, "Started perm using Attackall")
	return true
end

function tom.stopattackall ( Arguments, Device )
	Game:Set ( "CollisionDetection", true )
	tomv.grind = 0
	tomv.skillid = nil
	wtfuxv.lasttarget = nil
  OutputF ( Device, NAME_Log, "Stopped perm using Attackall")
	return true
end

Register ( tom, "tom" )
AddCommand ( tom.startattackall, "StartAttackall", "<ID>", "Attacks everything around permanently" )
AddCommand ( tom.stopattackall, "StopAttackall", "<ID>", "Stops Attacking everything around permanently" )
06/23/2008 18:33 Mark-#74
könnte man nich mit getitem irgend was instant hinbekommen das der pet foob benutzt???
06/23/2008 18:54 FlyStyler#75
@Item Petfood Id diese findest du im data.res DropItem irgendwas.
dann ein ´scrippt schreiben das nur noch die taste enter gedrückt wird fertig ^^.
Ja ich weis wie Enter per Bot gesendet wird, aber warum so nen aufwand machen und sie posten?
es Gibt eine Such Funktion und dort wirst du ein schon Fertigen Bot finden ^^