• There is NO official Otland's Discord server and NO official Otland's server list. The Otland's Staff does not manage any Discord server or server list. Moderators or administrator of any Discord server or server lists have NO connection to the Otland's Staff. Do not get scammed!
  • 2026 staff recruitment is open! Check it out and consider applying!

Target Dummy push 1.0

narko

vertrauenswürdig ~
Joined
Oct 19, 2008
Messages
1,317
Solutions
2
Reaction score
132
Location
Unknown
Is there any way to convert this script from TFS 0.4 to TFS 1.0?

I'm getting this error on console.
[Error - CreatureEvent::configureEvent] Invalid type for creature event: AntiPush

Here's the script.
Code:
local targetlist, ret = {"Target Dummy"}, true

function onPush(cid, target, ground, position)
inArray = function (name) return isInArray(targetlist, name:lower()) end
if((isPlayer(target) and inArray(getCreatureName(getCreatureTarget(target)))) or inArray(getCreatureName(target))) then
ret = RETURNVALUE_NOTPOSSIBLE
end

return ret
end
 
In events/events.xml enable: onMoveCreature, by change 0 to 1

And in player.lua under function Player:onMoveCreature, add this:
Code:
    if creature:getName() == "Target Dummy" then
        return false
    end

also make sure its over the return true!
 
Back
Top