What's new

Npc ktory mowi

Status
Not open for further replies.

skejter

User
Joined
Aug 4, 2009
Messages
16
Reaction score
0
Mam prozbe jak zrobic npc ktory pisze na czerwono do all graczy co 5 min np jakas widomosc prosze o fast o odp
 

Xevixo

Advanced User
Joined
Aug 26, 2009
Messages
432
Reaction score
98
Odp: Npc ktory mowi

Mam nadziej?, ?e pomog? ^ ^

Informator.lua
Code:
   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) >= (4*1*60) then
    selfSay(''Tekst')
    ')
    lastclean = os.time()
    end
    end

Tam gdzie pisze "tekst" wpisujemy co ma m?wic
(4*1*60)- 4 znaczy co ile minut ma wyswietla? tekst

Informator.xml w data/npc




<?xml version="1.0"?>

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

Pzdr =)
 

Bartpa

Active User
Joined
Aug 31, 2009
Messages
86
Reaction score
3
Odp: Npc ktory mowi

Dzi?ki Xevixo, przyda si? na pewno :)
U mnie dzia?a na TFSie 0.2.5
Reput dla Ciebie.
Bartpa
 
Status
Not open for further replies.
Top