• logo_cipsoft
    Nowe serwery zostały otwarte 27 Paź 2025:
    Idyllia (Optional PvP) Hostera (Open PvP) us_logo Dracobra (Open PvP)

[8.1]npc

Status
Zamknięty.
Witam! Potrzebuj? skryptu na npc, kt?ry by sam m?wi?. Tak co minute by m?wi? jakie? s?owa. Potem bym sobie pozmienia?, ale po prostu potrzebny mi ten skrypt, ?eby urozmaici? ots.Wi?c prosz? o skrypt.
 
Ostatnio edytowane przez moderatora:

Our partners and their custom servers:

Niech jakich? Mod przeniesie ten temat do odpowiedniego dzia?u.

W data/npc/scripts robimy takie co?:


Informator.lua

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:

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

Poszuka?em znalaz?em...
 
Status
Zamknięty.
Back
Do góry Bottom