Quote:
Originally Posted by 321meins
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" )