• 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!

Lua command pvp

Old Times

New Member
Joined
Feb 11, 2015
Messages
24
Solutions
1
Reaction score
3
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?

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
 
Back
Top