Ultima modifica da un moderatore:
questo è lo script fatto interamente da me
A Cosa Serve?
Seve per mandare in automatico ongi tot minuti un messaggio in chat GM ( quella gialla che vedono tutti i player )
Cosa potrete fare?
Potrete:
1- Attivare/Disativare L'AutoNotizia
2- Settare In Tempo Reale Il Messaggio Che Andrà In Notizia ( TESTATO )
3- Settare In Tempo Reale Il Tempo Tra Una Notizia E L'Altra ( TESTATO )
SE LO DOVETE POSTARE SU ALTRI SITI METTETE CREDITI
Aggiornato:
Script con piu righe
Come inserirlo nel server:
1-Percorso FTP usr/rain/channel/share/data/locale/hongkong/quest
2-create un nuovo FILE, nominatelo automex.quest
3-all'interno del file metteteci il mio script, chiudete e salvate
4-Apriamo la macchina o putty che si fa prima
5-digitiamo
premiamo INVIO
6-e digitiamo
premiamo INVIO
7-Riavviate oppure fate "reload q" in game
Appena loggherete troverete una pergamena delle missioni con scritt pannello gm e da li potrete settare ogni cosa riguardi l'autoallert
PHP:
quest automex begin
state start begin
when letter with pc . is_gm ( ) begin
send_letter ( "Pannello GM" )
end
when button or info begin
a = select ( "Attiva AutoMessaggio" , "Disattiva AutoMessaggio" , "Setta AutoMessaggio" , "Setta Tempo Tra Le Notizie" , "Chiudi" )
if a == 1 then
if game . get_event_flag ( "auto" ) >= 1 then
say ( "E' gia attivo" )
else
say ( "AutoMessaggio Attivato" )
game . set_event_flag ( "auto" , 1 )
server_timer ( "mex" , t )
end
elseif a == 2 then
say ( "AutoMessaggio Disattivato" )
game . set_event_flag ( "auto" , 0 )
clear_server_timer ( "mex" )
clear_server_timer ( "mex1" )
elseif a == 3 then
say ( "Inserisci il messaggio" )
s = input ( )
elseif a == 4 then
say ( "inserisci il tempo:" )
m = tonumber(input())
if m == nil then
say ( "Devi inserire un numero" )
elseif m < 1 then
say ( "Devi inserire un numero positivo" )
else
h = select ( "Secondi" , "Minuti" , "Ore" )
if h == 1 then
t = m
elseif h == 2 then
t = tonumber(m * 60)
elseif h == 3 then
t = tonumber(m * 60 * 60)
end
end
end
end
when mex.server_timer begin
if game . get_event_flag ( "auto" ) == 1 then
notice_all ( ""..s )
server_timer ( "mex1" , t )
else
end
end
when mex1.server_timer begin
if game . get_event_flag ( "auto" ) == 1 then
notice_all ( ""..s )
server_timer ( "mex" , t )
else
end
end
end
end
Seve per mandare in automatico ongi tot minuti un messaggio in chat GM ( quella gialla che vedono tutti i player )
Cosa potrete fare?
Potrete:
1- Attivare/Disativare L'AutoNotizia
2- Settare In Tempo Reale Il Messaggio Che Andrà In Notizia ( TESTATO )
3- Settare In Tempo Reale Il Tempo Tra Una Notizia E L'Altra ( TESTATO )
SE LO DOVETE POSTARE SU ALTRI SITI METTETE CREDITI
Aggiornato:
Script con piu righe
PHP:
quest automex begin
state start begin
when letter with pc . is_gm ( ) begin
send_letter ( "Pannello GM" )
end
when button or info begin
a = select ( "Attiva AutoMessaggio" , "Disattiva AutoMessaggio" , "Setta AutoMessaggio" , "Setta Tempo Tra Le Notizie" , "Chiudi" )
if a == 1 then
if game . get_event_flag ( "auto" ) >= 1 then
say ( "E' gia attivo" )
else
say ( "AutoMessaggio Attivato" )
game . set_event_flag ( "auto" , 1 )
server_timer ( "mex" , t )
end
elseif a == 2 then
say ( "AutoMessaggio Disattivato" )
game . set_event_flag ( "auto" , 0 )
clear_server_timer ( "mex" )
clear_server_timer ( "mex1" )
elseif a == 3 then
say ( "Inserisci il messaggio" )
s = input ( )
say ( "Altro Messaggio:" )
b = input ( )
say ( "Altro Messaggio:" )
c = input ( )
elseif a == 4 then
say ( "inserisci il tempo:" )
m = tonumber(input())
if m == nil then
say ( "Devi inserire un numero" )
elseif m < 1 then
say ( "Devi inserire un numero positivo" )
else
h = select ( "Secondi" , "Minuti" , "Ore" )
if h == 1 then
t = m
elseif h == 2 then
t = tonumber(m * 60)
elseif h == 3 then
t = tonumber(m * 60 * 60)
end
end
end
end
when mex.server_timer begin
if game . get_event_flag ( "auto" ) == 1 then
notice_all ( ""..s )
if b != "" then
notice_all ( ""..b )
end
if c != "" then
notice_all ( ""..c )
end
server_timer ( "mex1" , t )
else
end
end
when mex1.server_timer begin
if game . get_event_flag ( "auto" ) == 1 then
notice_all ( ""..s )
if b != "" then
notice_all ( ""..b )
end
if c != "" then
notice_all ( ""..c )
end
server_timer ( "mex" , t )
else
end
end
end
end
1-Percorso FTP usr/rain/channel/share/data/locale/hongkong/quest
2-create un nuovo FILE, nominatelo automex.quest
3-all'interno del file metteteci il mio script, chiudete e salvate
4-Apriamo la macchina o putty che si fa prima
5-digitiamo
Codice:
cd /usr/rain/channel/share_data/locale/hongkong/quest
6-e digitiamo
Codice:
./qc automex.quest
7-Riavviate oppure fate "reload q" in game
Appena loggherete troverete una pergamena delle missioni con scritt pannello gm e da li potrete settare ogni cosa riguardi l'autoallert



Ma siete sicuri che funziona?!? Io penso che la variabile del messaggio si perde e anche del tempo xkè non è salvato su event_flag! Avete testato??