playing a world Animations

im attempting to fix the old pills that are all over gmod.org my only issue is. i dont really understand lua. i can edit it here and there but as far as coding myself im at a bit of a stand still.

i was wondering if this is set up right
these animation names match up with the source sdk model viewers names

[lua]PILL.animations = {
attack = random_sequence(“attackA”, “attackB”, “attackC”, “attackD”, “attackE”, “attackF”, “swatleftmid”, “swatrightmid”, “swatleftlow”, “swatrightlow”, “BreakThrough”),
idle = “idle01”,
run = “firewalk”,
walk = “walk”
}
[/lua]

they should be playing when a zombie player attacks. but they dont. im wondering if the names have changed or if its something else involved entirely

(method used to play the animations)

[lua]function PILL:ChooseAnimation()
if self.attacking or CurTime() <= self.attackingTimer then
return nil
end
return self.base.ChooseAnimation(self)
end[/lua]

[lua]function PillClass:Animate()
local sequence, rate
if self.forced and CurTime() < self.forced.time then
sequence, rate = self.forced.sequence, self.forced.rate
else
self.forced = nil
sequence, rate = self:SequenceForAnimation(self:ChooseAnimation())
end
if sequence then
local sequenceIndex = self.player:LookupSequence(sequence)
if self.player:GetSequence() != sequenceIndex then
self.player:ResetSequence(sequenceIndex)
end
self.player:SetPlaybackRate(rate)
if self.ghost then
sequenceIndex = self.ghost:LookupSequence(sequence)
if self.ghost:GetSequence() != sequenceIndex then
self.ghost:Fire(“setanimation”, sequence, 0)
end
self.ghost:SetPlaybackRate(rate)
end
end
end[/lua]

may be missing pieces of it

the reason im thinking its an animation issue is because the models that should be playable (the gman pill) turn. and since they are the only ones that actually turn without an animation the turn and the head moves to follow the player eye pos. but as far as walking and crouching it does nothing

it seems noone is either willing to take up this project who know what they are doing. or its not possible to fix (probably the first option)

These functions are outdated and depreciated as far as i know.
use these.
http://wiki.garrysmod.com/?title=Gamemode.UpdateAnimation
http://wiki.garrysmod.com/?title=Gamemode.DoAnimationEvent

EDIT: The code above would be for a gamemode, my bad.
http://wiki.garrysmod.com/?title=Entity.LookupSequence
http://wiki.garrysmod.com/?title=Entity.SetSequence
http://wiki.garrysmod.com/?title=Entity.SetPlaybackRate
Those should help, sorry for the mix-up