Teksty wyswietlajace sie dla wszystkich pomocy

Status
Zamknięty.

Patras_14

User
Zarejestrowany
Dołączył
Wrzesień 21, 2008
Posty
38
Liczba reakcji
0
Witam tak jak w tezie pisze nie moge nigdzie znalesc skrypta ot?z chce zrobic u siebie zeby co jakis czas wyswietlalo mi na monitorze np "Witamy cie na naszym ots" tak jak by TO GM! pisal na czerwono tylko ze automatycznie co jakis czas jezeli ktos wie o co chodzi niech napisze!

Kontakt : 1361693
 
Odp: Teksty wyswietlajace sie dla wszystkich pomocy

Poszukaj skryptu na NPC MESSAGNER, a nast?pnei dodaj na map?
pozdro
 
Odp: Teksty wyswietlajace sie dla wszystkich pomocy

O to skrypt na npc, kt?rego potem wstawiasz gdzie? na mapk?. Nie wiem czy b?dzie dzia?a?, poniewa? mo?e to by? inny npc system.
data/npc/scripts/message.lua
Kod:
local focus = 0
local talk_start = 0
local target = 0
local following = false
local attacking = false
lastSay = 0
local message = "Zapraszamy na nasz drugi serwer 8.42, ktory posiada rl mape. Znajdziecie go na: http://realot.noveriaots.pl/"
local typ = MESSAGE_STATUS_WARNING
local coIleSekund = 900
function onThingMove(creature, thing, oldpos, oldstackpos)
end
function onCreatureAppear(creature)
end
function onCreatureDisappear(cid, pos)
end
function onCreatureTurn(creature)
end
function msgcontains(txt, str)
  	return (string.find(txt, str) and not string.find(txt, '(%w+)' .. str) and not string.find(txt, str .. '(%w+)'))
end
function onCreatureSay(cid, type, msg)
  	msg = string.lower(msg)
end
function onCreatureChangeOutfit(creature)
end
function onThink()
if (os.time() >= lastSay) then
	lastSay = os.time()+coIleSekund
doBroadcastMessage(message)

end
end

data/npc/message.xml
Kod:
<?xml version="1.0" encoding="UTF-8"?>
<npc name="Message" script="data/npc/scripts/message.lua" walkinterval="2000" floorchange="0">
	<health now="100" max="100"/>
	<look type="134" head="78" body="88" legs="0" feet="88" addons="3"/>
</npc>

Mam nadzieje ?e pomog?em.

Regards,
Kowol
 
Odp: Teksty wyswietlajace sie dla wszystkich pomocy

W data/npc/scripts robimy takie co?:


Informator.lua


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) >= (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

Robimy Informator.xml w data/npc a w nim wklejamy to:



Kod:
    <?xml version="1.0"?>

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

Skrypt, nie m?j jednak edytowa? ?eby dzia?a?.

Pozdrawiam =)
 
Status
Zamknięty.
Back
Do góry