PDA

View Full Version : [RO-QUEST] DayMode !



Mihai.!?
07-01-17, 17:08
un quest automat pentru zi/noapte , eu am gasit unul destul de stabil


quest daymode begin
state start begin
function ath_func()
local text = {
-------Textul care va aparea dimineata(ora 08:00).
{"[08:00]"},
{"Buna dimineata dragi playeri !"},
-------Textul care va aparea noaptea(ora 22:00).
{"[22:00]"},
{"Deci, a venit vremea sa dormiti. Echipa Just4Metin.ro va doreste noapte buna."},
}
local ata = number(1, 2)
local si = number(3, 4)
local atatext = text[ata][1]
local shitext = text[si][1]
local ata_ceas = os.date ("%H")
if ata_ceas >= "22" and game.get_event_flag("eclipse") == 0 then
notice_all(""..shitext.."")
game.set_event_flag("eclipse", 1 )
elseif ata_ceas >= "08" and game.get_event_flag("eclipse") == 1 then
notice_all(""..atatext.."")
game.set_event_flag("eclipse", 0 )
end
end

when login or levelup or logout begin
daymode.ath_func()
end

end
end

Tutorial instalare quest:
1. Salvaţi conţinutul quest-ului īntr-un fişier text numit de exemplu nume_quest.quest .
2. Vă conectaţi la filezilla / winscp şi īntrati īn /usr/home/game/share/locale/germany/quest (depinde ce server aveţi).
3. Īl puneţi acolo (să fie .quest) şi da-ţi permisiuni 777.
4. Te loghezi īn FreeBSD / putty şi scrii īn felul următor: cd /usr/home/game/share/locale/germany/quest apoi ./qc nume_quest.quest
5. Intraţi pe server şi scrieţi /reload q .
6. Testaţi quest-ul .