Sauerworld Forum

Sauerbraten Content => Scripts => Topic started by: TЯISTAП on October 10, 2020, 06:44:57 PM

Title: Connessione Veloce ai Server OIT
Post by: TЯISTAП on October 10, 2020, 06:44:57 PM
Questo script ti permette di connetterti rapidamente ai server OIT attraverso un'interfaccia. Il codice è ispirato a una parte del lavoro di RaZgRiZ (BFTP - Favorite Servers GUI).

Installazione:

Metodo Rapido:
- Copia e incolla lo script direttamente nel file autoexec.cfg che si trova nella seguente directory:
  C:\Users\TuoNome\Documents\My Games\Sauerbraten
  Nota: Sostituisci TuoNome con il tuo nome utente.

Metodo Pulito:
- Crea una cartella chiamata scripts nella stessa directory del file autoexec.cfg.
- All'interno della cartella scripts, crea un file chiamato OITserver.cfg.
- Incolla lo script nel file OITserver.cfg.
- Aggiungi la seguente riga al file autoexec.cfg:
Code: [Select]
exec scripts/OITserver.cfg
Script:
Per aprirlo premi F3.
Code: [Select]
// @file fast_connection
// @author Tristan Traver
// @brief Script per connessione veloce ai server OIT con interfaccia grafica (tasto F3).
// @version 3.1
// @date 2020-10-01

// Binding del tasto per aprire l'interfaccia
bind "F3" [showgui Server]
editbind "F3" [showgui Server]

// Configurazione server
shared_ip = 192.168.1.114
f_port1 = 28785
f_port2 = 28787
f_port3 = 28789

f_serv1 = OgrosItalianTeam.serv1
f_serv2 = OgrosItalianTeam.serv2
f_serv3 = OgrosItalianTeam.serv3

// GUI per selezione server
newgui Server [
    guitext "^f7Seleziona server"
    guibar
    guibutton (concat "Connettiti a ^f2" $f_serv1) [
        connect $shared_ip $f_port1
    ]
    guibutton (concat "Connettiti a ^f2" $f_serv2) [
        connect $shared_ip $f_port2
    ]
    guibutton (concat "Connettiti a ^f2" $f_serv3) [
        connect $shared_ip $f_port3
    ]
    guitab "About"
    guitext "^f7Script creato da ^f2TЯISTAП"
    guitext "^f7Visita il sito del clan [^f0O^f7I^f3T^f7]: ^f2http://ogrositalianteam.servegame.com/^f7"
]
Title: Re: fast connection to clan servers [OIT]
Post by: RaZgRiZ on October 12, 2020, 06:35:55 AM
I like how part of the script is basically a small piece of my Favorite Servers GUI (http://sauerworld.org/forum/index.php?topic=455.0). You have lots to learn :P