Pomoc OTS

Twój Pierwszy OTS


  • Index
  •  » Npc
  •  » NPC Dajacy Ogloszenia

#1 2008-02-27 17:27:24

Hoster

Administrator

Zarejestrowany: 2008-02-27
Posty: 7
Punktów :   

NPC Dajacy Ogloszenia

W data/npc/scripts robimy takie cos
Ogloszenie.lua:

a w nim wklejamy to :

Kod:

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) >= ([color=red]4[/color*1*60) then
selfSay('[color=green]'Tekst[/color')
')
lastclean = os.time()
end
end

Na czerwono zaznaczylem co ile minut ma sie wyswietlac tekst. Na zielono ustaw sobie jaki chcesz miec tekst  Ja polecam ogloszenia przy pomocy: /B, /bc lub /white; /green w zaleznosci czy masz owe.

No i oczywiscie NPC

Robimy Postman.xml w data/npc a w nim wklejamy to

Kod:

<?xml version="1.0"?>

<npc name="Postman" script="data/npc/scripts/ogloszenie.lua" access="5" lookdir="3" autowalk="1">
    <health now="1" max="1"/>
    <look type="128" head="20" body="100" legs="50" feet="99"/>
</npc>

[img]http://www.ubar.pl/www/img_14887_normal.gif[/img]

Offline

 
  • Index
  •  » Npc
  •  » NPC Dajacy Ogloszenia

Stopka forum

RSS
Powered by PunBB
© Copyright 2002–2008 PunBB
Polityka cookies - Wersja Lo-Fi


Darmowe Forum | Ciekawe Fora | Darmowe Fora
www.podgorna.pun.pl www.petz5forum.pun.pl www.wszystkonatelefon.pun.pl www.counter-zabijamy.pun.pl www.speedway-gra.pun.pl