NPC Cleaner 8.10

Status
Zamknięty.

marcinekt

New User
Zarejestrowany
Dołączył
Lipiec 28, 2009
Posty
3
Liczba reakcji
0
Mam dla was npc Cleaner robi sam cleany co 30 min
Wchodzimy data/npc itworzymy plik o nazwie Cleaner.xml i wklejamy tam to:

<?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>


Nast?pnie wchodzimy data/npc/script i tworzymy plik o nazwie Cleaner.lua i wklejamy tam to:

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*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*60) then
selfSay('/clean')
lastclean = os.time()
end
end



(29*60*60) to znaczy clean co 30 min

Wrazie czego? piszcie na gg: 13641524

-----POMOG?EM DAJ REPUTA-----
 
Status
Zamknięty.
Back
Do góry