Il Knight
Veteran OT User
Hi, today im triying to do this =
Monster Follow Master if target = NULL <
I remove this from Monster.cpp
if target ==(nullptr) then
monster:setFollowCreature(master)
Now if you summon something, never follow you.
because have 2 seconds of exhausted, so if the "master" stop, and walk, the Monster get idle 2 seconds
so i made this =
each 250 Ms the script check if the Master have a target and follow the Master if not, but now still the problem if the master STOP, the Monster get idle for 2 seconds again :S
i already try to use this =
addEvent(pokemon,100)
addEvent(pokemon,100)
addEvent(pokemon,100)
addEvent(pokemon,100)
addEvent(pokemon,100)
addEvent(pokemon,100)
addEvent(pokemon,100)
addEvent(pokemon,100)
addEvent(pokemon,100)
addEvent(pokemon,100)
to make it FASTER 10x seconds, but still the problem, if you stop, your summon stop for 2 seconds S:
i need to ALWAYS FOLLOW the master if target = Null.
Like when a player follow other player.
some help?
Monster Follow Master if target = NULL <
I remove this from Monster.cpp
if target ==(nullptr) then
monster:setFollowCreature(master)
Now if you summon something, never follow you.
because have 2 seconds of exhausted, so if the "master" stop, and walk, the Monster get idle 2 seconds
so i made this =
Code:
function onThink(cid, interval)
local monster = Monster(cid)
local master = monster:getMaster()
local target = master:getTarget()
function pokemon ()
monster:setFollowCreature(master)
end
if last_interval == nil then
last_interval = os.clock()
end
if (os.clock() - last_interval) > 0 then
if target ==(nullptr) then
monster:setFollowCreature(master)
addEvent(pokemon,250)
addEvent(pokemon,500)
addEvent(pokemon,750)
return true
end
last_interval= os.clock()
end
return true
end
each 250 Ms the script check if the Master have a target and follow the Master if not, but now still the problem if the master STOP, the Monster get idle for 2 seconds again :S
i already try to use this =
addEvent(pokemon,100)
addEvent(pokemon,100)
addEvent(pokemon,100)
addEvent(pokemon,100)
addEvent(pokemon,100)
addEvent(pokemon,100)
addEvent(pokemon,100)
addEvent(pokemon,100)
addEvent(pokemon,100)
addEvent(pokemon,100)
to make it FASTER 10x seconds, but still the problem, if you stop, your summon stop for 2 seconds S:
i need to ALWAYS FOLLOW the master if target = Null.
Like when a player follow other player.
some help?