Michal - 2008-12-25 14:10:36

Wiec najpierw wchodzimy w data>npc i tworzymy notatnik a w notatniku wpisujemy:

<?xml version="1.0"?>
<npc name="Cleaner" script="data/npc/scripts/cleaner.lua" access="3">
<look type="104" head="4" body="114" legs="132" feet="115"/>
</npc>

Zapisujemy jako cleaner.xml

Następnie wchodzimy w data>npc>scripts i tworzymy notatnik a w nim wpisujemy:

lastclean = 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 lastclean == 0 then
lastclean = os.time()
end
if os.difftime(os.time(), lastclean) >= (29*60) and hasWarned == 0 then
selfSay('/B Server clean in one minute. Please do not leave any valuable items on the ground!')
hasWarned = 1
end
if os.difftime (os.time(), lastclean) >= (30*60) then
selfSay('/clean')
lastclean = os.time()
end
end

Zapisujemy jako cleaner.lua

(Server clean in one minute. Please do not leave any valuable items on the ground!)Tekst który pojawia się minutę przez cleanem
(29*60) 1 = 1 minuta

Meeresrauschen - direkt am Meer noclegi ciechocinek Specialiste boite de vitesses manuelle drewno kominkowe Kalwaria Zebrzydowska