- Dołączył
- Marzec 4, 2010
- Posty
- 227
- Liczba reakcji
- 3
- Wiek
- 29
Mam skrypt do npc clean
i po 2 min pisze /clean a nie robi clina
Kod:
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) >= (1*1*60) and hasWarned == 0 then
selfSay('/xB Clean in 1 minute! Take all yours items! Cleaning items in protection zone too!')
hasWarned = 1
end
if os.difftime (os.time(), lastclean) >= (2*2*60) then
selfSay('/clean')
selfSay('/xB Clean completed, next clean in 30 minutes.')
lastclean = os.time()
end
end