OTS Poswiencony Open tibi Serverowi
data/npc/robimy plik o nazwie Ogloszenia.xml
Cytat:
<?xml version="1.0"?>
<npc name="Ogloszenie" script="data/npc/scripts/ogloszenie.lua" access="3">
<look type="132" head="115" body="115" legs="114" feet="115"/>
</npc>
data/npc/scripts/robimy plik o nazwie Ogloszenie.lua
Cytat:
lastclean = 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*55*6) then
selfSay('/B Ogloszenie:Twoje ogłoszenie')
lastclean = os.time()
end
end
Teraz ustawiamy wiadomość i czas wyszczegulionym przezemnie kolorem! wstawiamy na mapke npc i mamy już automatyczne ogloszenie :]
Offline