Hello,
I want npc to use the / pvp 2 command, but it doesn't work. I will add that with other commands such as / save or / clean it is ok.
Is there any way to do this?
I want npc to use the / pvp 2 command, but it doesn't work. I will add that with other commands such as / save or / clean it is ok.
Is there any way to do this?
Lua:
lastsave = 0
hasWarned = 0
focus = 0
talk_start = 0
target = 0
following = false
attacking = false
function onThingMove(creature, thing, oldpos, oldstackpos)
end
function onCreatureAppear(creature)
end
function onCreatureDisappear(cid, pos)
end
function onCreatureTurn(creature)
end
function onCreatureSay(cid, type, msg)
end
function onCreatureChangeOutfit(creature)
end
function onThink()
if lastsave == 0 then
lastsave = os.time()
end
if os.difftime(os.time(), lastsave) >= (1*2) and hasWarned == 0 then
selfSay('/pvp 2')
hasWarned = 1
end
if os.difftime (os.time(), lastsave) >= (1*2) then
selfSay('ok')
lastsave = os.time()
end