Unmantained Guida [RELEASE]AutoNotizia Ogni Tot Tempo

Una guida contrassegnata come Unmantained contiene informazioni su un argomento obsoleto, non più utile o files non aggiornati da parte del creatore.
Stato
Discussione chiusa ad ulteriori risposte.

Superisi

Utente Electrum
7 Agosto 2010
412
17
53
151
Ultima modifica da un moderatore:
questo è lo script fatto interamente da me
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
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
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
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
Codice:
cd /usr/rain/channel/share_data/locale/hongkong/quest
premiamo INVIO
6-e digitiamo
Codice:
./qc automex.quest
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
 
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
if a = 2 then
say ( "AutoMessaggio Disattivato" )
game . set_event_flag ( "auto" , 0 )
clear_server_timer ( "mex" )
clear_server_timer ( "mex1" )
if a == 3 then
say ( "Inserisci il messaggio" )
s = input ( )
if a == 4 then
say ( "inserisci il tempo in minuti:" )
m = tonumber(input())
if m == nil then
say ( "Devi inserire un numero" )
if m < 1 then
say ( "Devi inserire un numero positivo" )
else
t = m * 60
end
end
when mex.server_timer begin
notice_all ( ""..s )
server_timer ( "mex1" , t )
end
when mex1.server_timer begin
notice_all ( ""..s )
server_timer ( "mex" , t )
end
end
end

ho messo così e mi dice Killed O.O

e poi out of swap space
 
no non va,metto setta automessaggio...ma...non spunta nessun mex

--- Aggiornamento Post ---

bah,ade funziona,ma ci so dovuto annà a comando

--- Aggiornamento Post ---

cmq per aggiungere altri mex non bisogna solo aggiungere altri input .-.
 
salvo che centra?? NN è CHE magicamente 1 script si attiva dopo 1 tot di tempo e scrive in notice_all (serve sempre e comunque l'account online)

ne ho fatti a milioni di questi test fidatevi...
 
o.O 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??
 
è sbagliato non solo per gli end, ma se inizi con quel when il game invia una lettera al "secondo" al gm..inizia con when login begin
 
Stato
Discussione chiusa ad ulteriori risposte.
Indietro
Top Bottom