Open Tibia Server

Forum Zostalo Stworzone By Pomagać Ludzią W Grze Tibia Ots


#1 2008-12-25 14:46:44

Michal

Administrator

Zarejestrowany: 2008-12-24
Posty: 51
Punktów :   

Zegarek

Wchodzimy w data/actions/scrpits trzeba zrobić notatnik , a w nim wpisujemy:

if (tibiantime == false) then
if (twentyfour == true) then
time = os.date('%H:%M')
else
time = os.date('%I:%M %p')
end
else
time = rl2tib(os.date('%M'), os.date('%S'), twentyfour)
end
doPlayerSendTextMessage(cid, 22, "The time is "..time..".")
return 1
end

function rl2tib(min, sec, twentyfour)
--zegarek - by Apitov (7.6)
suffix = ''
varh = (min*60+sec)/150
tibH = math.floor(varh) -- hour!
tibM = math.floor(60*(varh-tibH)) -- minute!

if (twentyfour == false) then
if (tonumber(tibH) > 11) then
tibH = tonumber(tibH) - 12
suffix = ' pm'
else
suffix = ' am'
end
if (tibH == 0) then
tibH = 12
end
end
if (tibH < 10) then
tibH = '0'..tibH
end
if (tibM < 10) then
tibM = '0'..tibM
end
return (tibH..':'..tibM..suffix)
end

Zapisujemy jako: watch.lua

Przechodzimy w data/actions/actions.xml

Dodajemy linijkę:

<action itemid="2036" script="watch.lua" />

Offline

 

Stopka forum

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


Darmowe Forum | Ciekawe Fora | Darmowe Fora
chustonoszenie pistolety co2 noclegi ciechocinek Specialiste boite de vitesses manuelle drewno kominkowe Kalwaria Zebrzydowska