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

NPC that executes /clean

DedicatedOT

New Member
Joined
Jun 13, 2009
Messages
977
Reaction score
4
Location
USA
Is there anyway to make NPC do /clean?

I tried

doCreatureSay(cid, "/clean", TALKTYPE_SAY)

doesn't work. He just says /clean, but doesn't execute it.
 
Me too!

I tried with talkactions.

This error:

43885901.png


Script:

LUA:
function onSay(cid, words, param)
if getPlayerGroupId(cid) == -3 then
doPlayerSendTextMessage(cid,21,"You need higher access to do this.")
elseif getPlayerGroupId(cid) >= 1 then
cleanArea(frompos, topos)
addEvent(lolkurwamacjapierdole,30*60*1000)
end
return TRUE
end
 

function lolkurwamacjapierdole()
cleanArea(frompos, topos)
addEvent(lolkurwamacjapierdole,30*60*1000)
end
 
Have anyone solved this?
Im also trying to use a talkaction script for tfs 2.5 but it says that CleanMap() is on global is nill or something like that , what can I use instead of CleanMap()
 
XML:
<?xml version="1.0"?>
<npc name="Name" script="data/npc/scripts/clean.lua" access="3" lookdir="2" autowalk="25">
<mana now="800" max="800"/>
<health now="200" max="200"/>
<look type="266" head="78" body="113" legs="114" feet="0"/>
</npc>

LUA:
stime = 360 -- Time in seconds.
time = os.clock()

function onThink()
if (time + stime) < os.clock() then
time = os.clock()
selfSay("/clean")
end
end

Not tested. :~
 
Back
Top