Ultima modifica:
[EPIC]Tutte le mie release - by S4LV0DM
Per implementarlo basta creare 3 file di nome change_empire.0.script, uno .arg e uno .when ( anche .1 .2 .3)
Nel file .when non scrivete niente (asd)
Nel file .arg scrivete
Nel file .script scrivete tutto il codice.
La soluzione fa rendere pietrabili gli item, sostituendoli.
Per far sì che questo script funzioni, al posto di metterlo in chat, dovete metterlo in take/forked_road.start, in modo che si sostituisca trascinando l'item.
LA GUIDA SI FERMA QUI.
TUTTE QUESTE GUIDE/RELEASES SONO CREATE DA ME. NESSUN RIP. NON DITE CHE SONO INUTILI, SENO ME NE VADO DI NUOVO, GRAZIE.
I +1 non fanno male a nessuno!
GUIDA:AUTOPATCHER VB.NET
Allora in primis create un nuovo progetto in vb.net (consiglio 2008)
Adesso aumentiamo la larghezza e l'altezza del form.
Se volete modificate dalla finestra proprietà BackGroundImage e Text.
Create 4 bottoni: Uno Avvia Game, Uno Avvia config, Uno registrati ed uno Aggiorna.
Clicchiamo 2 volte su Avvia Game e scriviamo
Adesso clicchiamo 2 volte su avvia config e scriviamo
Adesso clicchiamo 2 volte su registrati e scriviamo
Clicchiamo 2 volte su aggiorna e scriviamo
Ogni volta che volete aggiornare il client agli altri dovete aggiungere una versione a vers nell'ftp (prima è 1 poi 2 )
e creare un autoestraente con winrar per poi chiamarlo come il numero dell'ultima versione sull'ftp.
Adesso aumentiamo la larghezza e l'altezza del form.
Se volete modificate dalla finestra proprietà BackGroundImage e Text.
Create 4 bottoni: Uno Avvia Game, Uno Avvia config, Uno registrati ed uno Aggiorna.
Clicchiamo 2 volte su Avvia Game e scriviamo
Codice:
Shell("srvlol", AppWinStyle.NormalFocus) 'Quindi nella cartella del client il launcher si deve chiamare così.
Codice:
Shell("config.exe", AppWinStyle.NormalFocus) 'Stessa cosa di avvia game
Codice:
Process.Start("vostrosito/reg.php")
Codice:
Dim up As New System.Net.WebClient
up.DownloadFile ( "http://sito.com/vers.txt", "vers" )
Dim vers As String = My.Computer.FileSystem.ReadAllText("vers")
Dim ver As String = My.Computer.FileSystem.ReadAllText("ver")
If vers = ver Then
MsgBox("Stai usando l'ultima versione.")
Else
Dim agg As String = Val(ver) + 1
MsgBox ( "Scaricamento della versione " & agg & " in corso..." )
up.DownloadFile("http://sito.com/" & agg , "aggiornamento.exe" )
MsgBox ( "File Scaricato, apri aggiornamento.exe.")
My.Computer.FileSystem.WriteAllText("ver", agg, False )
End If
e creare un autoestraente con winrar per poi chiamarlo come il numero dell'ultima versione sull'ftp.
GUIDA:MODIFICARE MOB IN TORRE
1.
Creare nuovi gruppi in
usr/rain/channel/share_data/locale/hongkong/group.txt
2.
Adesso che avete settato i gruppi andate in data/dungeon
e prendete deviltowerx_regen.txt
(x sta per il numero)
3.
adesso aggiungete/sostituite i mob che avete creato prendendo spunto da quelli che ci sono e modificando l'ultimo numero con il value (vnum) del vostro gruppo.
Spero la guida vi sia stata utile.
Se non vi funziona vi posso anche aiutare.
Creare nuovi gruppi in
usr/rain/channel/share_data/locale/hongkong/group.txt
2.
Adesso che avete settato i gruppi andate in data/dungeon
e prendete deviltowerx_regen.txt
(x sta per il numero)
3.
adesso aggiungete/sostituite i mob che avete creato prendendo spunto da quelli che ci sono e modificando l'ultimo numero con il value (vnum) del vostro gruppo.
Spero la guida vi sia stata utile.
Se non vi funziona vi posso anche aiutare.
QUEST: UCCIDI I GEMMO******
Ecco una mia quest divertente 

Codice:
quest subquest_50 begin
state start begin
when login or levelup with pc.level >= 80 begin
set_state(information)
end
end
state information begin
when letter begin
local v = find_npc_by_vnum(20041)
if v != 0 then
target.vid("__TARGET__", v, "Vendica L'ubriaco")
end
send_letter("Vendica L'ubriaco")
end
when button or info begin
say_title ( "Il Cittadino Ubriaco Sta morendo:" )
say ( "Il cittadino ubriaco sta morendo!" )
say ( "Ha fumato troppe canne e ora sta male!" )
say ( "Va da lui e parlagli!" )
end
when __TARGET__.target.click or
20041.chat."Vendica L'ubriaco" begin
target.delete("__TARGET__")
say_title ( "Cittadino ubriaco:" )
say ( "Ciao " .. pc . get_name ( ) )
say ( "Aiutami... sto male... ti prego" )
say ( "Gemma del sud mi ha obbligato a fumare e a bere!" )
say ( "Ti prego, uccidi i suoi schiavi, i gemma******" )
say ( "Che sono i draghi blu" )
say ( "Grazie... non so se ci rivedremo" )
say ( "Quindi ti dico addio." )
pc . setqf ( "uccisigemma******" , 0 )
set_state(uccidi_gemma******)
end
end
state uccidi_gemma****** begin
when letter begin
send_letter("Uccidi i Gemma******!")
end
when button or info begin
say_title("Uccidi i Gemma******:")
say ( "Il cittadino ubriaco sta morendo," )
say ( "Vendicalo uccidendo 10 gemma******!" )
end
when 2493.kill begin
local uccisi = tonumber(pc . getqf ( "uccisigemma******" )) + tonumber(1)
pc . setqf ( "uccisigemma******" , uccisi )
if pc . getqf ( "uccisigemma******" ) == 10 then
say ( "Hai ucciso tutti i Gemma******!" )
say ( "Torna dal cittadino ubriaco" )
set_state ( "ritorna" )
else
say ( "Hai ucciso un gemma******." )
say ( "Ne hai uccisi " .. pc . getqf ( "uccisigemma******" ) )
end
end
end
state ritorna begin
when 20041.chat."Li hai uccisi tutti?" begin
say_title ( "Cittadino ubriaco:" )
say ( "Li hai uccisi tutti?" )
say ( "Ti ringrazio, ecco a te 10.000.000 di yang." )
pc . changegold ( 10000000 )
set_state ( "__COMPLETE__" )
end
end
state __COMPLETE__ begin
when letter begin
send_letter("Missione Completata!")
end
when button or info begin
say_title("Missione completata!")
say ( "Bravissimo! Hai completato la missione!" )
say ( "Un livello in + al tuo cavallo ;)" )
horse . advance ( )
clear_letter ( )
set_state ( "fine" )
end
end
state fine begin
end
end
SCRIPT: TOTOCALCIO
Ecco qui il totocalcio =) Questo funziona benissimo =)
In pratica lo script funziona che dovete puntare su 1 di 4 squadre.
Poi c'è un pannello gm e quindi il gm può scegliere se attivare evento controllo o evento punta, per l'evento punta lo script sceglierà una squadra random.
ISTRUZIONI:
Scaricare, estrarre nel desktop
Collegatevi con winscp al vostro server e andate in usr/rain(o game)/channel/share_data/locale/hongkong(o english o newcibin)/quest/object/"NPC Che volete"/chat/object/
ed inserite i file.
DOWNLOAD: MEGAUPLOAD - The leading online storage and file delivery service
Enjoy
In pratica lo script funziona che dovete puntare su 1 di 4 squadre.
Poi c'è un pannello gm e quindi il gm può scegliere se attivare evento controllo o evento punta, per l'evento punta lo script sceglierà una squadra random.
ISTRUZIONI:
Scaricare, estrarre nel desktop
Collegatevi con winscp al vostro server e andate in usr/rain(o game)/channel/share_data/locale/hongkong(o english o newcibin)/quest/object/"NPC Che volete"/chat/object/
ed inserite i file.
DOWNLOAD: MEGAUPLOAD - The leading online storage and file delivery service
Enjoy

NOME PG + DI 100 CARATTERI
Siete stanchi di non potere mettere [SGM] ad un player perchè ha il nome troppo lungo?
Allora questo fa al caso vostro =)
1.
Apriamo navicat e poi andiamo in player.
2.
Clicchiamo su player>player una sola volta e clicchiamo su Design Table
3.
Adesso andiamo nella riga name e modifichiamo la colonna lenght da 12 (o quello che è) a 100 (o quello che volete, ma c'è un massimo).
4.
Adesso salviamo e chiudiamo.
Una volta fatto questo possiamo nominare i player con massimo 100 lettere (o quello che abbiamo messo =))
Per mettere gm i player col lungo nick basta fare la stessa cosa con common>gmlist solo che al posto di modificare name si modificherà
mName
PS: Per poter modificare il nome del player il server non deve essere avviato... modifica raramente...
PS2: In caso non avreste capito potete sempre chiedere =)
PS3: Tramite client non si può nominare a 100 caratteri
Spero questa guida vi sia stata utile.
Allora questo fa al caso vostro =)
1.
Apriamo navicat e poi andiamo in player.
2.
Clicchiamo su player>player una sola volta e clicchiamo su Design Table
3.
Adesso andiamo nella riga name e modifichiamo la colonna lenght da 12 (o quello che è) a 100 (o quello che volete, ma c'è un massimo).
4.
Adesso salviamo e chiudiamo.
Una volta fatto questo possiamo nominare i player con massimo 100 lettere (o quello che abbiamo messo =))
Per mettere gm i player col lungo nick basta fare la stessa cosa con common>gmlist solo che al posto di modificare name si modificherà
mName
PS: Per poter modificare il nome del player il server non deve essere avviato... modifica raramente...
PS2: In caso non avreste capito potete sempre chiedere =)
PS3: Tramite client non si può nominare a 100 caratteri
Spero questa guida vi sia stata utile.
SCRIPT:BANCA CON PIN MIGLIORATA
Codice:
say_title ( "Banca by s4lv0dm:" ) -- Sei pregato di non rimuovere i crediti.
say ( "Ciao, sono la banca." )
say ( "Qui puoi depositare e ritirare i tuoi soldi." )
local bapin
bapin = pc . getqf ( "banca_pin" )
if bapin == 0 then
say ( "Non hai ancora creato il tuo pin!" )
say ( "Inserisci il tuo pin" )
local pin
pin = tonumber(input())
say ( "Il tuo nuovo pin è " .. pin )
say ( "Riapri la banca per poterla utilizzare." )
pc . setqf ( "banca_pin" , pin )
return
else
wait ( )
say ( "Inserisci il pin per entrare nella banca." )
local inseriscipin
inseriscipin = tonumber(input())
if inseriscipin != pc . getqf ( "banca_pin" ) then
say ( "PIN errato." )
return
elseif inseriscipin == pc . getqf ( "banca_pin" ) then
say ( "Cosa vuoi fare?" )
local fare = select ( "Deposita","Ritira","Modifica Pin","Chiudi" )
if fare == 4 then
say ( "A più tardi!" )
return
elseif fare == 1 then
local slot = select ( "Slot 1","Slot 2","Slot 3" )
if slot == 1 then
say ( "Bene, dimmi quanti soldi vuoi depositare." )
local soldi
soldi = tonumber(input())
if pc . gold < soldi then
say ( "Non puoi depositare i soldi se non hai" )
say ( "I soldi che hai scritto -.-''" )
elseif pc . gold >= soldi then
say ( "Bene." )
local soldix2 = soldi + pc . getqf ( "banca_soldi" )
pc . setqf ( "banca_soldi" , soldix2 )
pc . changegold ( - soldi )
say ( "Hai attualmente depositato " .. soldi .. " yang." )
say ( "Arrivederci!" )
return
end
elseif slot == 2 then
say ( "Bene, dimmi quanti soldi vuoi depositare." )
local soldi2
soldi2 = tonumber(input())
if pc . gold < soldi2 then
say ( "Non puoi depositare i soldi se non hai" )
say ( "I soldi che hai scritto -.-''" )
elseif pc . gold >= soldi2 then
say ( "Bene." )
local soldix22 = soldi2 + pc . getqf ( "banca_soldi2")
pc . setqf ( "banca_soldi2" , soldix22 )
pc . changegold ( - soldi2 )
say ( "Hai attualmente depositato " .. soldi2 .. " yang." )
say ( "Arrivederci!" )
return
end
elseif slot == 3 then
say ( "Bene, dimmi quanti soldi vuoi depositare." )
local soldi3
soldi3 = tonumber(input())
if pc . gold < soldi3 then
say ( "Non puoi depositare i soldi se non hai" )
say ( "I soldi che hai scritto -.-''" )
elseif pc . gold >= soldi3 then
say ( "Bene." )
local soldix23 = soldi3 + pc . getqf ( "banca_soldi3" )
pc . setqf ( "banca_soldi3" , soldix23 )
pc . changegold ( - soldi3 )
say ( "Hai attualmente depositato " .. soldi3 .. " yang." )
say ( "Arrivederci!" )
return
end
return
end
elseif fare == 2 then
local slotr = select ( "Slot 1","Slot 2","Slot 3" )
if slotr == 1 then
local depositati = pc . getqf ( "banca_soldi" )
say ( "Hai attualmente depositato " .. depositati .. " yang." )
say ( "Quanti soldi vuoi ritirare?" )
local ritira
ritira = tonumber(input())
if ritira > depositati then
say ( "Non ci sono abbastanza soldi in banca." )
return
elseif ritira <= depositati then
local prendi
prendi = depositati - ritira
pc . changegold ( ritira )
pc . setqf ( "banca_soldi", prendi )
say ( "Hai ritirato " .. ritira .. " yang." )
return
end
elseif slotr == 2 then
local depositati2 = pc . getqf ( "banca_soldi2" )
say ( "Hai attualmente depositato " .. depositati2 .. " yang." )
say ( "Quanti soldi vuoi ritirare?" )
local ritira2
ritira2 = tonumber(input())
if ritira2 > depositati2 then
say ( "Non ci sono abbastanza soldi in banca." )
return
elseif ritira2 <= depositati2 then
local prendi2
prendi2 = depositati2 - ritira2
pc . changegold ( ritira2 )
pc . setqf ( "banca_soldi2", prendi2 )
say ( "Hai ritirato " .. ritira2 .. " yang." )
return
end
elseif slotr == 3 then
local depositati3 = pc . getqf ( "banca_soldi3" )
say ( "Hai attualmente depositato " .. depositati3 .. " yang." )
say ( "Quanti soldi vuoi ritirare?" )
local ritira3
ritira3 = tonumber(input())
if ritira3 > depositati3 then
say ( "Non ci sono abbastanza soldi in banca." )
return
elseif ritira3 <= depositati3 then
local prendi3
prendi3 = depositati3 - ritira3
pc . changegold ( ritira3 )
pc . setqf ( "banca_soldi3", prendi3 )
say ( "Hai ritirato " .. ritira3 .. " yang." )
return
end
return
end
elseif fare == 3 then
say ( "Sei sicuro di voler modificare il PIN?" )
local sicuro = select ( "Si","No" )
if sicuro == 2 then
say ( "Ok..." )
return
elseif sicuro == 1 then
say ( "Inserisci un pin" )
local cambiapin
cambiapin = tonumber(input())
pc . setqf ( "banca_pin" , cambiapin )
say ( "Pin cambiato correttamente." )
return
end
return
end
return
end
return
end
Per implementarlo basta creare 3 file di nome change_empire.0.script, uno .arg e uno .when ( anche .1 .2 .3)
Nel file .when non scrivete niente (asd)
Nel file .arg scrivete
Codice:
"Titolo che volete"
"FIX":LEVARE BLOCCO DMGHACK O ALTRO INFINITYMETIN
Questa guida è stata postata settimane fa da me e ora la sto rimettendo.
Aprire intrologin.py e scrivere questo:
Aprire intrologin.py e scrivere questo:
Codice:
import os
import sys
import md5
import dbg
import app
import net
import ui
import snd
import wndMgr
import musicInfo
import serverInfo
import systemSetting
import ServerStateChecker
import locale
import constInfo
import uiCommon
import time
import ServerCommandParser
import ime
import uiScriptLocale
JAPAN_LOGIN = None
RUNUP_MATRIX_AUTH = FALSE
NEWCIBN_PASSPOD_AUTH = FALSE
LOGIN_DELAY_SEC = 0.0
SKIP_LOGIN_PHASE = FALSE
SKIP_LOGIN_PHASE_SUPPORT_CHANNEL = FALSE
FULL_BACK_IMAGE = FALSE
PASSPOD_MSG_DICT = {}
if locale.IsJAPAN():
SKIP_LOGIN_PHASE = TRUE
SKIP_LOGIN_PHASE_SUPPORT_CHANNEL = TRUE
elif locale.IsNEWCIBN():
LOGIN_DELAY_SEC = 20.0
FULL_BACK_IMAGE = TRUE
NEWCIBN_PASSPOD_AUTH = TRUE
PASSPOD_MSG_DICT = {
"PASERR1" : locale.LOGIN_FAILURE_PASERR1,
"PASERR2" : locale.LOGIN_FAILURE_PASERR2,
"PASERR3" : locale.LOGIN_FAILURE_PASERR3,
"PASERR4" : locale.LOGIN_FAILURE_PASERR4,
"PASERR5" : locale.LOGIN_FAILURE_PASERR5,
}
elif locale.IsYMIR() or locale.IsCHEONMA():
FULL_BACK_IMAGE = TRUE
elif locale.IsHONGKONG():
FULL_BACK_IMAGE = TRUE
RUNUP_MATRIX_AUTH = TRUE
PASSPOD_MSG_DICT = {
"NOTELE" : locale.LOGIN_FAILURE_NOTELEBLOCK,
}
elif locale.IsJAPAN():
FULL_BACK_IMAGE = TRUE
def IsFullBackImage():
global FULL_BACK_IMAGE
return FULL_BACK_IMAGE
def IsLoginDelay():
global LOGIN_DELAY_SEC
if LOGIN_DELAY_SEC > 0.0:
return TRUE
else:
return FALSE
def IsRunupMatrixAuth():
global RUNUP_MATRIX_AUTH
return RUNUP_MATRIX_AUTH
def IsNEWCIBNPassPodAuth():
global NEWCIBN_PASSPOD_AUTH
return NEWCIBN_PASSPOD_AUTH
def GetLoginDelay():
global LOGIN_DELAY_SEC
return LOGIN_DELAY_SEC
ui.SetMarkImage("mark/test.tga")
class ConnectingDialog(ui.ScriptWindow):
def __init__(self):
ui.ScriptWindow.__init__(self)
self.__LoadDialog()
self.eventTimeOver = lambda *arg: None
self.eventExit = lambda *arg: None
def __del__(self):
ui.ScriptWindow.__del__(self)
def __LoadDialog(self):
try:
PythonScriptLoader = ui.PythonScriptLoader()
PythonScriptLoader.LoadScriptFile(self, "UIScript/ConnectingDialog.py")
self.board = self.GetChild("board")
self.message = self.GetChild("message")
self.countdownMessage = self.GetChild("countdown_message")
except:
import exception
exception.Abort("ConnectingDialog.LoadDialog.BindObject")
def Open(self, waitTime):
curTime = time.clock()
self.endTime = curTime + waitTime
self.Lock()
self.SetCenterPosition()
self.SetTop()
self.Show()
def Close(self):
self.Unlock()
self.Hide()
def Destroy(self):
self.Hide()
self.ClearDictionary()
def SetText(self, text):
self.message.SetText(text)
def SetCountDownMessage(self, waitTime):
self.countdownMessage.SetText("%.0f%s" % (waitTime, locale.SECOND))
def SAFE_SetTimeOverEvent(self, event):
self.eventTimeOver = ui.__mem_func__(event)
def SAFE_SetExitEvent(self, event):
self.eventExit = ui.__mem_func__(event)
def OnUpdate(self):
lastTime = max(0, self.endTime - time.clock())
if 0 == lastTime:
self.Close()
self.eventTimeOver()
else:
self.SetCountDownMessage(self.endTime - time.clock())
def OnPressExitKey(self):
#self.eventExit()
return TRUE
class LoginWindow(ui.ScriptWindow):
IS_TEST = net.IsTest()
def __init__(self, stream):
print "NEW LOGIN WINDOW ----------------------------------------------------------------------------"
ui.ScriptWindow.__init__(self)
net.SetPhaseWindow(net.PHASE_WINDOW_LOGIN, self)
net.SetAccountConnectorHandler(self)
self.matrixInputChanceCount = 0
self.lastLoginTime = 0
self.inputDialog = None
self.connectingDialog = None
self.stream=stream
self.isNowCountDown=FALSE
self.isStartError=FALSE
self.xServerBoard = 0
self.yServerBoard = 0
self.loadingImage = None
def __del__(self):
net.ClearPhaseWindow(net.PHASE_WINDOW_LOGIN, self)
net.SetAccountConnectorHandler(0)
ui.ScriptWindow.__del__(self)
print "---------------------------------------------------------------------------- DELETE LOGIN WINDOW"
def Open(self):
ServerStateChecker.Create(self)
print "LOGIN WINDOW OPEN ----------------------------------------------------------------------------"
self.loginFailureMsgDict={
#"DEFAULT" : locale.LOGIN_FAILURE_UNKNOWN,
"ALREADY" : locale.LOGIN_FAILURE_ALREAY,
"NOID" : locale.LOGIN_FAILURE_NOT_EXIST_ID,
"WRONGPWD" : locale.LOGIN_FAILURE_WRONG_PASSWORD,
"FULL" : locale.LOGIN_FAILURE_TOO_MANY_USER,
"SHUTDOWN" : locale.LOGIN_FAILURE_SHUTDOWN,
"REPAIR" : locale.LOGIN_FAILURE_REPAIR_ID,
"BLOCK" : locale.LOGIN_FAILURE_BLOCK_ID,
"WRONGMAT" : locale.LOGIN_FAILURE_WRONG_MATRIX_CARD_NUMBER,
"QUIT" : locale.LOGIN_FAILURE_WRONG_MATRIX_CARD_NUMBER_TRIPLE,
"BESAMEKEY" : locale.LOGIN_FAILURE_BE_SAME_KEY,
"NOTAVAIL" : locale.LOGIN_FAILURE_NOT_AVAIL,
"NOBILL" : locale.LOGIN_FAILURE_NOBILL,
"BLKLOGIN" : locale.LOGIN_FAILURE_BLOCK_LOGIN,
"WEBBLK" : locale.LOGIN_FAILURE_WEB_BLOCK,
}
self.loginFailureFuncDict = {
"WRONGPWD" : self.__DisconnectAndInputPassword,
"WRONGMAT" : self.__DisconnectAndInputMatrix,
"QUIT" : app.Exit,
}
self.SetSize(wndMgr.GetScreenWidth(), wndMgr.GetScreenHeight())
self.SetWindowName("LoginWindow")
if not self.__LoadScript(uiScriptLocale.LOCALE_UISCRIPT_PATH + "LoginWindow.py"):
dbg.TraceError("LoginWindow.Open - __LoadScript Error")
return
self.__LoadLoginInfo("loginInfo.py")
if locale.IsCIBN():
# SERVER_LIST_BUG_FIX
visible_index = 1
for index, name in serverInfo.REGION_NAME_DICT.items():
self.regionGroupList.InsertItem(index, " %02d. %s" % (visible_index, name))
visible_index += 1
# END_OF_SERVER_LIST_BUG_FIX
if app.loggined:
self.loginFailureFuncDict = {
"WRONGPWD" : app.Exit,
"WRONGMAT" : app.Exit,
"QUIT" : app.Exit,
}
if musicInfo.loginMusic != "":
snd.SetMusicVolume(systemSetting.GetMusicVolume())
snd.FadeInMusic("BGM/"+musicInfo.loginMusic)
snd.SetSoundVolume(systemSetting.GetSoundVolume())
# pevent key "[" "]"
ime.AddExceptKey(91)
ime.AddExceptKey(93)
self.Show()
global SKIP_LOGIN_PHASE
if SKIP_LOGIN_PHASE:
if self.isStartError:
self.connectBoard.Hide()
self.loginBoard.Hide()
self.serverBoard.Hide()
self.PopupNotifyMessage(locale.LOGIN_CONNECT_FAILURE, self.__ExitGame)
return
if self.loginInfo:
self.serverBoard.Hide()
else:
self.__RefreshServerList()
self.__OpenServerBoard()
else:
connectingIP = self.stream.GetConnectAddr()
if connectingIP:
self.__OpenLoginBoard()
if IsFullBackImage():
self.GetChild("bg1").Hide()
self.GetChild("bg2").Show()
else:
if locale.IsCIBN():
self.__OpenRegionBoard()
else:
self.__RefreshServerList()
self.__OpenServerBoard()
app.ShowCursor()
def Close(self):
if self.connectingDialog:
self.connectingDialog.Close()
self.connectingDialog = None
ServerStateChecker.Destroy(self)
print "---------------------------------------------------------------------------- CLOSE LOGIN WINDOW "
#
# selectMusicÀÌ ¾øÀ¸¸é BGMÀÌ ²÷±â¹Ç·Î µÎ°³ ´Ù üũÇÑ´Ù.
#
if musicInfo.loginMusic != "" and musicInfo.selectMusic != "":
snd.FadeOutMusic("BGM/"+musicInfo.loginMusic)
## NOTE : idEditLine¿Í pwdEditLineÀº À̺¥Æ®°¡ ¼*·Î ¿¬°á µÇ¾îÀÖ¾î¼*
## Event¸¦ °*Á¦·Î ÃʱâÈ* ÇØÁÖ¾î¾ß¸¸ ÇÕ´Ï´Ù - [levites]
self.idEditLine.SetTabEvent(0)
self.idEditLine.SetReturnEvent(0)
self.pwdEditLine.SetReturnEvent(0)
self.pwdEditLine.SetTabEvent(0)
self.connectBoard = None
self.loginBoard = None
self.idEditLine = None
self.pwdEditLine = None
self.inputDialog = None
self.connectingDialog = None
self.loadingImage = None
self.settlementBoard = None
self.regionGroupList = None
self.serverListOnRegionBoard = None
self.serverBoard = None
self.serverList = None
self.channelList = None
# RUNUP_MATRIX_AUTH
self.matrixQuizBoard = None
self.matrixAnswerInput = None
self.matrixAnswerOK = None
self.matrixAnswerCancel = None
# RUNUP_MATRIX_AUTH_END
# NEWCIBN_PASSPOD_AUTH
self.passpodBoard = None
self.passpodAnswerInput = None
self.passpodAnswerOK = None
self.passpodAnswerCancel = None
# NEWCIBN_PASSPOD_AUTH_END
self.KillFocus()
self.Hide()
self.stream.popupWindow.Close()
self.loginFailureFuncDict=None
ime.ClearExceptKey()
app.HideCursor()
def __SaveChannelInfo(self):
try:
file=open("channel.inf", "w")
file.write("%d %d %d" % (self.__GetServerID(), self.__GetChannelID(), self.__GetRegionID()))
except:
print "LoginWindow.__SaveChannelInfo - SaveError"
def __LoadChannelInfo(self):
try:
file=open("channel.inf")
lines=file.readlines()
if len(lines)>0:
tokens=lines[0].split()
selServerID=int(tokens[0])
selChannelID=int(tokens[1])
if len(tokens)==3:
regionID=int(tokens[2])
return regionID, selServerID, selChannelID
except:
print "LoginWindow.__LoadChannelInfo - OpenError"
return -1, -1, -1
def __ExitGame(self):
app.Exit()
def SetIDEditLineFocus(self):
if self.idEditLine != None:
self.idEditLine.SetFocus()
def SetPasswordEditLineFocus(self):
if self.pwdEditLine != None:
self.pwdEditLine.SetFocus()
def OnEndCountDown(self):
self.isNowCountDown = FALSE
self.OnConnectFailure()
def OnConnectFailure(self):
if self.isNowCountDown:
return
snd.PlaySound("sound/ui/loginfail.wav")
if self.connectingDialog:
self.connectingDialog.Close()
self.connectingDialog = None
if app.loggined:
self.PopupNotifyMessage(locale.LOGIN_CONNECT_FAILURE, self.__ExitGame)
else:
self.PopupNotifyMessage(locale.LOGIN_CONNECT_FAILURE, self.SetPasswordEditLineFocus)
def OnHandShake(self):
if not IsLoginDelay():
snd.PlaySound("sound/ui/loginok.wav")
self.PopupDisplayMessage(locale.LOGIN_CONNECT_SUCCESS)
def OnLoginStart(self):
if not IsLoginDelay():
self.PopupDisplayMessage(locale.LOGIN_PROCESSING)
def OnLoginFailure(self, error):
if self.connectingDialog:
self.connectingDialog.Close()
self.connectingDialog = None
try:
loginFailureMsg = self.loginFailureMsgDict[error]
except KeyError:
if PASSPOD_MSG_DICT:
try:
loginFailureMsg = PASSPOD_MSG_DICT[error]
except KeyError:
loginFailureMsg = locale.LOGIN_FAILURE_UNKNOWN + error
else:
loginFailureMsg = locale.LOGIN_FAILURE_UNKNOWN + error
loginFailureFunc=self.loginFailureFuncDict.get(error, self.SetIDEditLineFocus)
if app.loggined:
self.PopupNotifyMessage(loginFailureMsg, self.__ExitGame)
else:
self.PopupNotifyMessage(loginFailureMsg, loginFailureFunc)
snd.PlaySound("sound/ui/loginfail.wav")
def __DisconnectAndInputID(self):
if self.connectingDialog:
self.connectingDialog.Close()
self.connectingDialog = None
self.SetIDEditLineFocus()
net.Disconnect()
def __DisconnectAndInputPassword(self):
if self.connectingDialog:
self.connectingDialog.Close()
self.connectingDialog = None
self.SetPasswordEditLineFocus()
net.Disconnect()
def __DisconnectAndInputMatrix(self):
if self.connectingDialog:
self.connectingDialog.Close()
self.connectingDialog = None
self.stream.popupWindow.Close()
self.matrixInputChanceCount -= 1
if self.matrixInputChanceCount <= 0:
self.__OnCloseInputDialog()
elif self.inputDialog:
self.inputDialog.Show()
def __LoadScript(self, fileName):
try:
pyScrLoader = ui.PythonScriptLoader()
pyScrLoader.LoadScriptFile(self, fileName)
except:
import exception
exception.Abort("LoginWindow.__LoadScript.LoadObject")
try:
GetObject=self.GetChild
self.serverBoard = GetObject("ServerBoard")
self.serverList = GetObject("ServerList")
self.channelList = GetObject("ChannelList")
self.serverSelectButton = GetObject("ServerSelectButton")
self.serverExitButton = GetObject("ServerExitButton")
self.connectBoard = GetObject("ConnectBoard")
self.loginBoard = GetObject("LoginBoard")
self.idEditLine = GetObject("ID_EditLine")
self.pwdEditLine = GetObject("Password_EditLine")
self.serverInfo = GetObject("ConnectName")
self.selectConnectButton = GetObject("SelectConnectButton")
self.loginButton = GetObject("LoginButton")
self.loginExitButton = GetObject("LoginExitButton")
# RUNUP_MATRIX_AUTH
if IsRunupMatrixAuth():
self.matrixQuizBoard = GetObject("RunupMatrixQuizBoard")
self.matrixAnswerInput = GetObject("RunupMatrixAnswerInput")
self.matrixAnswerOK = GetObject("RunupMatrixAnswerOK")
self.matrixAnswerCancel = GetObject("RunupMatrixAnswerCancel")
# RUNUP_MATRIX_AUTH_END
# NEWCIBN_PASSPOD_AUTH
if IsNEWCIBNPassPodAuth():
self.passpodBoard = GetObject("NEWCIBN_PASSPOD_BOARD")
self.passpodAnswerInput = GetObject("NEWCIBN_PASSPOD_INPUT")
self.passpodAnswerOK = GetObject("NEWCIBN_PASSPOD_OK")
self.passpodAnswerCancel= GetObject("NEWCIBN_PASSPOD_CANCEL")
# NEWCIBN_PASSPOD_AUTH_END
if locale.IsCIBN():
self.settlementBoard = GetObject("RegionBoard")
self.regionGroupList = GetObject("RegionGroupList")
self.serverListOnRegionBoard = GetObject("ServerListOnRegionBoard")
self.settlementSelectButton = GetObject("RegionSelectButton")
self.settlementExitButton = GetObject("RegionExitButton")
self.alertBoard = GetObject("AlertBoard")
except:
import exception
exception.Abort("LoginWindow.__LoadScript.BindObject")
if self.IS_TEST:
self.selectConnectButton.Hide()
else:
self.selectConnectButton.SetEvent(ui.__mem_func__(self.__OnClickSelectConnectButton))
self.serverBoard.OnKeyUp = ui.__mem_func__(self.__ServerBoard_OnKeyUp)
self.xServerBoard, self.yServerBoard = self.serverBoard.GetLocalPosition()
self.serverSelectButton.SetEvent(ui.__mem_func__(self.__OnClickSelectServerButton))
self.serverExitButton.SetEvent(ui.__mem_func__(self.__OnClickExitButton))
self.loginButton.SetEvent(ui.__mem_func__(self.__OnClickLoginButton))
self.loginExitButton.SetEvent(ui.__mem_func__(self.__OnClickExitButton))
self.serverList.SetEvent(ui.__mem_func__(self.__OnSelectServer))
self.idEditLine.SetReturnEvent(ui.__mem_func__(self.pwdEditLine.SetFocus))
self.idEditLine.SetTabEvent(ui.__mem_func__(self.pwdEditLine.SetFocus))
self.pwdEditLine.SetReturnEvent(ui.__mem_func__(self.__OnClickLoginButton))
self.pwdEditLine.SetTabEvent(ui.__mem_func__(self.idEditLine.SetFocus))
if locale.IsCIBN():
self.settlementSelectButton.SetEvent(ui.__mem_func__(self.__OnClickSelectRegionButton))
self.settlementExitButton.SetEvent(ui.__mem_func__(self.__OnClickExitButton))
self.regionGroupList.SetEvent(ui.__mem_func__(self.__OnSelectRegionGroup))
self.serverListOnRegionBoard.SetEvent(ui.__mem_func__(self.__OnSelectSettlementArea))
# RUNUP_MATRIX_AUTH
if IsRunupMatrixAuth():
self.matrixAnswerOK.SAFE_SetEvent(self.__OnClickMatrixAnswerOK)
self.matrixAnswerCancel.SAFE_SetEvent(self.__OnClickMatrixAnswerCancel)
self.matrixAnswerInput.SAFE_SetReturnEvent(self.__OnClickMatrixAnswerOK)
# RUNUP_MATRIX_AUTH_END
# NEWCIBN_PASSPOD_AUTH
if IsNEWCIBNPassPodAuth():
self.passpodAnswerOK.SAFE_SetEvent(self.__OnClickNEWCIBNPasspodAnswerOK)
self.passpodAnswerCancel.SAFE_SetEvent(self.__OnClickNEWCIBNPasspodAnswerCancel)
self.passpodAnswerInput.SAFE_SetReturnEvent(self.__OnClickNEWCIBNPasspodAnswerOK)
# NEWCIBN_PASSPOD_AUTH_END
if IsFullBackImage():
self.GetChild("bg1").Show()
self.GetChild("bg2").Hide()
return 1
def Connect(self, id, pwd):
if constInfo.SEQUENCE_PACKET_ENABLE:
net.SetPacketSequenceMode()
if IsLoginDelay():
loginDelay = GetLoginDelay()
self.connectingDialog = ConnectingDialog()
self.connectingDialog.Open(loginDelay)
self.connectingDialog.SAFE_SetTimeOverEvent(self.OnEndCountDown)
self.connectingDialog.SAFE_SetExitEvent(self.OnPressExitKey)
self.isNowCountDown = TRUE
else:
self.stream.popupWindow.Close()
self.stream.popupWindow.Open(locale.LOGIN_CONNETING, self.SetPasswordEditLineFocus, locale.UI_CANCEL)
self.stream.SetLoginInfo(id, pwd)
self.stream.Connect()
def __OnClickExitButton(self):
self.stream.SetPhaseWindow(0)
def __SetServerInfo(self, name):
net.SetServerInfo(name.strip())
self.serverInfo.SetText(name)
def __LoadLoginInfo(self, loginInfoFileName):
try:
loginInfo={}
execfile(loginInfoFileName, loginInfo)
except IOError:
print(\
"ÀÚµ¿ ·Î±×ÀÎÀ» ÇϽ÷Á¸é" + loginInfoFileName + "ÆÄÀÏÀ» ÀÛ¼ºÇØÁÖ¼¼¿ä\n"\
"\n"\
"³»¿ë:\n"\
"================================================================\n"\
"addr=ÁÖ¼Ò\n"\
"port=Æ÷Æ®\n"\
"id=¾ÆÀ̵ð\n"\
"pwd=ºñ¹Ð¹øÈ£\n"\
"slot=ij¸¯ÅÍ ¼±Åà À妽º (¾ø°Å³ª -1À̸é ÀÚµ¿ ¼±Åà ¾ÈÇÔ)\n"\
"autoLogin=ÀÚµ¿ Á¢¼Ó ¿©ºÎ\n"
"autoSelect=ÀÚµ¿ Á¢¼Ó ¿©ºÎ\n"
"locale=(ymir) LC_Ymir Àϰæ¿ì ymir·Î ÀÛµ¿. ÁöÁ¤ÇÏÁö ¾ÊÀ¸¸é korea·Î ÀÛµ¿\n"
);
id=loginInfo.get("id", "")
pwd=loginInfo.get("pwd", "")
if self.IS_TEST:
try:
addr=loginInfo["addr"]
port=loginInfo["port"]
account_addr=addr
account_port=port
net.SetMarkServer(addr, port)
self.__SetServerInfo(locale.CHANNEL_TEST_SERVER_ADDR % (addr, port))
except:
try:
addr=serverInfo.TESTADDR["ip"]
port=serverInfo.TESTADDR["tcp_port"]
net.SetMarkServer(addr, port)
self.__SetServerInfo(locale.CHANNEL_TEST_SERVER)
except:
import exception
exception.Abort("LoginWindow.__LoadLoginInfo - Å×½ºÆ®¼*¹ö ÁÖ¼Ò°¡ ¾ø½À´Ï´Ù")
else:
addr=loginInfo.get("addr", "")
port=loginInfo.get("port", 0)
account_addr=loginInfo.get("account_addr", addr)
account_port=loginInfo.get("account_port", port)
locale = loginInfo.get("locale", "")
if addr and port:
net.SetMarkServer(addr, port)
if locale == "ymir" :
net.SetServerInfo("õ¸¶ ¼*¹ö")
self.serverInfo.SetText("Y:"+addr+":"+str(port))
else:
net.SetServerInfo(addr+":"+str(port))
self.serverInfo.SetText("K:"+addr+":"+str(port))
slot=loginInfo.get("slot", 0)
isAutoLogin=loginInfo.get("auto", 0)
isAutoLogin=loginInfo.get("autoLogin", 0)
isAutoSelect=loginInfo.get("autoSelect", 0)
self.stream.SetCharacterSlot(slot)
self.stream.SetConnectInfo(addr, port, account_addr, account_port)
self.stream.isAutoLogin=isAutoLogin
self.stream.isAutoSelect=isAutoSelect
self.id = None
self.pwd = None
self.loginnedServer = None
self.loginnedChannel = None
app.loggined = FALSE
self.loginInfo = loginInfo
try:
if not loginInfo:
self.__AnalyzeConnectionInfoCommandLine(app.__COMMAND_LINE__)
except:
import exception
exception.Abort("LoginWindow.__LoadLoginInfo - Á¢¼Ó Á¤º¸¸¦ ÇØ¼®ÇÒ ¼ö ¾ø½À´Ï´Ù")
if self.id and self.pwd:
app.loggined = TRUE
if isAutoLogin:
self.Connect(id, pwd)
print "=================================================================================="
print "ÀÚµ¿ ·Î±×ÀÎ: %s - %s:%d %s" % (loginInfoFileName, addr, port, id)
print "=================================================================================="
def __AnalyzeConnectionInfoCommandLine(self, cmdLine):
if locale.IsJAPAN():
global JAPAN_LOGIN
if JAPAN_LOGIN:
(self.id, self.pwd) = JAPAN_LOGIN
else:
try:
ip, port, self.id, self.pwd = app.NetmarbleJP_DecryptString(cmdLine.strip()).split(",")[:4]
JAPAN_LOGIN = (self.id, self.pwd)
except:
cmdLine = cmdLine.strip()
if cmdLine:
dbg.LogBox(cmdLine)
self.isStartError = TRUE
self.loginnedServer, self.loginnedChannel = 1, 1
elif locale.IsLETSGAME():
(temp, prefix, self.loginnedServer, server.oginnedChannel, self.id, self.pwd) = cmdLine.split()
self.loginnedServer, self.loginnedChannel = int(self.loginnedServer), int(self.loginnedChannel)
else:
pass
def PopupDisplayMessage(self, msg):
self.stream.popupWindow.Close()
self.stream.popupWindow.Open(msg)
def PopupNotifyMessage(self, msg, func=0):
if not func:
func=self.EmptyFunc
self.stream.popupWindow.Close()
self.stream.popupWindow.Open(msg, func, locale.UI_OK)
# RUNUP_MATRIX_AUTH
def BINARY_OnRunupMatrixQuiz(self, quiz):
if not IsRunupMatrixAuth():
return
id = self.GetChild("RunupMatrixID")
id.SetText(self.idEditLine.GetText())
code = self.GetChild("RunupMatrixCode")
code.SetText("".join(["[%c,%c]" % (quiz[i], quiz[i+1]) for i in xrange(0, len(quiz), 2)]))
self.stream.popupWindow.Close()
self.serverBoard.Hide()
self.connectBoard.Hide()
self.loginBoard.Hide()
self.matrixQuizBoard.Show()
self.matrixAnswerInput.SetFocus()
def __OnClickMatrixAnswerOK(self):
answer = self.matrixAnswerInput.GetText()
print "matrix_quiz.ok"
net.SendRunupMatrixCardPacket(answer)
self.matrixQuizBoard.Hide()
self.stream.popupWindow.Close()
self.stream.popupWindow.Open("WAITING FOR MATRIX AUTHENTICATION",
self.__OnClickMatrixAnswerCancel,
locale.UI_CANCEL)
def __OnClickMatrixAnswerCancel(self):
print "matrix_quiz.cancel"
if self.matrixQuizBoard:
self.matrixQuizBoard.Hide()
if self.connectBoard:
self.connectBoard.Show()
if self.loginBoard:
self.loginBoard.Show()
# RUNUP_MATRIX_AUTH_END
# NEWCIBN_PASSPOD_AUTH
def BINARY_OnNEWCIBNPasspodRequest(self):
if not IsNEWCIBNPassPodAuth():
return
if self.connectingDialog:
self.connectingDialog.Close()
self.connectingDialog = None
self.stream.popupWindow.Close()
self.serverBoard.Hide()
self.connectBoard.Hide()
self.loginBoard.Hide()
self.passpodBoard.Show()
self.passpodAnswerInput.SetFocus()
def BINARY_OnNEWCIBNPasspodFailure(self):
if not IsNEWCIBNPassPodAuth():
return
def __OnClickNEWCIBNPasspodAnswerOK(self):
answer = self.passpodAnswerInput.GetText()
print "passpod.ok"
net.SendNEWCIBNPasspodAnswerPacket(answer)
self.passpodAnswerInput.SetText("")
self.passpodBoard.Hide()
self.stream.popupWindow.Close()
self.stream.popupWindow.Open(locale.WAIT_FOR_PASSPOD,
self.__OnClickNEWCIBNPasspodAnswerCancel,
locale.UI_CANCEL)
def __OnClickNEWCIBNPasspodAnswerCancel(self):
print "passpod.cancel"
if self.passpodBoard:
self.passpodBoard.Hide()
if self.connectBoard:
self.connectBoard.Show()
if self.loginBoard:
self.loginBoard.Show()
# NEWCIBN_PASSPOD_AUTH_END
def OnMatrixCard(self, row1, row2, row3, row4, col1, col2, col3, col4):
if self.connectingDialog:
self.connectingDialog.Close()
self.connectingDialog = None
self.matrixInputChanceCount = 3
self.stream.popupWindow.Close()
# CHINA_MATRIX_CARD_BUG_FIX
## A~Z ±îÁö 26 À̳»ÀÇ °ªÀÌ µé¾îÀÖ¾î¾ß¸¸ ÇÑ´Ù.
## Python Exception Log ¿¡¼* ±× ÀÌ»óÀÇ °ªÀÌ µé¾îÀÖ¾î¼* ¿¡·¯ ¹æÁö
## Çåµ¥ ¿Ö Çѱ¹ÂÊ ·Î±×¿¡¼* ÀÌ°Ô È°¿ëµÇ´ÂÁö´Â ¸ð¸£°ÚÀ½
row1 = min(30, row1)
row2 = min(30, row2)
row3 = min(30, row3)
row4 = min(30, row4)
# END_OF_CHINA_MATRIX_CARD_BUG_FIX
row1 = chr(row1 + ord('A'))
row2 = chr(row2 + ord('A'))
row3 = chr(row3 + ord('A'))
row4 = chr(row4 + ord('A'))
col1 = col1 + 1
col2 = col2 + 1
col3 = col3 + 1
col4 = col4 + 1
inputDialog = uiCommon.InputDialogWithDescription2()
inputDialog.SetMaxLength(8)
inputDialog.SetAcceptEvent(ui.__mem_func__(self.__OnAcceptMatrixCardData))
inputDialog.SetCancelEvent(ui.__mem_func__(self.__OnCancelMatrixCardData))
inputDialog.SetTitle(locale.INPUT_MATRIX_CARD_TITLE)
inputDialog.SetDescription1(locale.INPUT_MATRIX_CARD_NUMBER)
inputDialog.SetDescription2("%c%d %c%d %c%d %c%d" % (row1, col1,
row2, col2,
row3, col3,
row4, col4))
inputDialog.Open()
self.inputDialog = inputDialog
def __OnAcceptMatrixCardData(self):
text = self.inputDialog.GetText()
net.SendChinaMatrixCardPacket(text)
if self.inputDialog:
self.inputDialog.Hide()
self.PopupNotifyMessage(locale.LOGIN_PROCESSING)
return TRUE
def __OnCancelMatrixCardData(self):
self.SetPasswordEditLineFocus()
self.__OnCloseInputDialog()
self.__DisconnectAndInputPassword()
return TRUE
def __OnCloseInputDialog(self):
if self.inputDialog:
self.inputDialog.Close()
self.inputDialog = None
return TRUE
def __ShowAlertBoard(self):
if locale.IsCIBN():
self.alertBoard.Show()
def __HideAlertBoard(self):
if locale.IsCIBN():
self.alertBoard.Hide()
def OnPressExitKey(self):
self.stream.popupWindow.Close()
self.stream.SetPhaseWindow(0)
return TRUE
def OnExit(self):
self.stream.popupWindow.Close()
self.stream.popupWindow.Open(locale.LOGIN_FAILURE_WRONG_MATRIX_CARD_NUMBER_TRIPLE, app.Exit, locale.UI_OK)
def OnUpdate(self):
ServerStateChecker.Update()
def EmptyFunc(self):
pass
#####################################################################################
def __ServerBoard_OnKeyUp(self, key):
if self.serverBoard.IsShow():
if app.DIK_RETURN==key:
self.__OnClickSelectServerButton()
return TRUE
def __GetRegionID(self):
if not locale.IsCIBN():
return 0
return self.regionGroupList.GetSelectedItem()
def __GetServerID(self):
return self.serverList.GetSelectedItem()
def __GetChannelID(self):
return self.channelList.GetSelectedItem()
# SEVER_LIST_BUG_FIX
def __RegionIDToRegionIndex(self, regionID):
return regionID - 1
def __ServerIDToServerIndex(self, regionID, targetServerID):
try:
regionDict = serverInfo.REGION_DICT[regionID]
except KeyError:
return -1
retServerIndex = 0
for eachServerID, regionDataDict in regionDict.items():
if eachServerID == targetServerID:
return retServerIndex
retServerIndex += 1
return -1
def __ChannelIDToChannelIndex(self, channelID):
return channelID - 1
# END_OF_SEVER_LIST_BUG_FIX
def __OpenRegionBoard(self):
# SEVER_LIST_BUG_FIX
loadRegionID, loadServerID, loadChannelID = self.__LoadChannelInfo()
regionIndex = self.__RegionIDToRegionIndex(loadRegionID)
serverIndex = self.__ServerIDToServerIndex(loadRegionID, loadServerID)
channelIndex = self.__ChannelIDToChannelIndex(loadChannelID)
self.regionGroupList.SelectItem(regionIndex)
self.serverListOnRegionBoard.SelectItem(serverIndex)
self.serverList.SelectItem(serverIndex)
if channelIndex >= 0:
self.channelList.SelectItem(channelIndex)
# END_OF_SEVER_LIST_BUG_FIX
if locale.IsCIBN():
self.settlementBoard.Show()
## Show/Hide Äڵ忡 ¹®Á¦°¡ ÀÖ¾î¼* Àӽà - [levites]
self.serverBoard.SetPosition(self.xServerBoard, wndMgr.GetScreenHeight())
self.serverBoard.Hide()
self.connectBoard.Hide()
self.loginBoard.Hide()
self.__HideAlertBoard()
def __OpenServerBoard(self):
loadRegionID, loadServerID, loadChannelID = self.__LoadChannelInfo()
regionIndex = self.__RegionIDToRegionIndex(loadRegionID)
serverIndex = self.__ServerIDToServerIndex(loadRegionID, loadServerID)
channelIndex = self.__ChannelIDToChannelIndex(loadChannelID)
if locale.IsCIBN():
self.regionGroupList.SelectItem(regionIndex)
self.serverListOnRegionBoard.SelectItem(serverIndex)
self.settlementBoard.Hide()
# RUNUP_MATRIX_AUTH
if IsRunupMatrixAuth():
self.matrixQuizBoard.Hide()
# RUNUP_MATRIX_AUTH_END
# NEWCIBN_PASSPOD_AUTH
if IsNEWCIBNPassPodAuth():
self.passpodBoard.Hide()
# NEWCIBN_PASSPOD_AUTH_END
self.serverList.SelectItem(serverIndex)
if channelIndex >= 0:
self.channelList.SelectItem(channelIndex)
## Show/Hide Äڵ忡 ¹®Á¦°¡ ÀÖ¾î¼* Àӽà - [levites]
self.serverBoard.SetPosition(self.xServerBoard, self.yServerBoard)
self.serverBoard.Show()
self.connectBoard.Hide()
self.loginBoard.Hide()
self.__HideAlertBoard()
if app.loggined and not SKIP_LOGIN_PHASE_SUPPORT_CHANNEL:
self.serverList.SelectItem(self.loginnedServer-1)
self.channelList.SelectItem(self.loginnedChannel-1)
self.__OnClickSelectServerButton()
def __OpenLoginBoard(self):
self.serverExitButton.SetEvent(ui.__mem_func__(self.__OnClickExitServerButton))
self.serverExitButton.SetText(locale.UI_CLOSE)
if locale.IsCIBN():
self.settlementBoard.Hide()
# RUNUP_MATRIX_AUTH
if IsRunupMatrixAuth():
self.matrixQuizBoard.Hide()
# RUNUP_MATRIX_AUTH_END
# NEWCIBN_PASSPOD_AUTH
if IsNEWCIBNPassPodAuth():
self.passpodBoard.Hide()
# NEWCIBN_PASSPOD_AUTH_END
self.serverBoard.SetPosition(self.xServerBoard, wndMgr.GetScreenHeight())
self.serverBoard.Hide()
if app.loggined:
self.Connect(self.id, self.pwd)
self.connectBoard.Hide()
self.loginBoard.Hide()
elif not self.stream.isAutoLogin:
self.connectBoard.Show()
self.loginBoard.Show()
## if users have the login infomation, then don't initialize.2005.9 haho
if self.idEditLine == None:
self.idEditLine.SetText("")
if self.pwdEditLine == None:
self.pwdEditLine.SetText("")
self.idEditLine.SetFocus()
self.__ShowAlertBoard()
global SKIP_LOGIN_PHASE
if SKIP_LOGIN_PHASE:
if not self.loginInfo:
self.connectBoard.Hide()
def __OnSelectRegionGroup(self):
self.__RefreshRegionList()
self.__RefreshServerList()
def __RefreshRegionList(self):
regionID = self.__GetRegionID()
self.serverListOnRegionBoard.SelectItem(-1)
self.serverListOnRegionBoard.ClearItem()
regionList = serverInfo.REGION_DICT.get(regionID, {})
for id, regionDataDict in regionList.items():
name = regionDataDict.get("name", "Server" + str(id))
self.serverListOnRegionBoard.InsertItem(id, " %s" % name)
def __OnSelectSettlementArea(self):
# SEVER_LIST_BUG_FIX
regionID = self.__GetRegionID()
serverID = self.serverListOnRegionBoard.GetSelectedItem()
serverIndex = self.__ServerIDToServerIndex(regionID, serverID)
self.serverList.SelectItem(serverIndex)
# END_OF_SEVER_LIST_BUG_FIX
self.__OnSelectServer()
def __RefreshServerList(self):
regionID = self.__GetRegionID()
if not serverInfo.REGION_DICT.has_key(regionID):
return
self.serverList.ClearItem()
regionDict = serverInfo.REGION_DICT[regionID]
# SEVER_LIST_BUG_FIX
visible_index = 1
for id, regionDataDict in regionDict.items():
name = regionDataDict.get("name", "noname")
self.serverList.InsertItem(id, " %02d. %s" % (visible_index, name))
visible_index += 1
# END_OF_SEVER_LIST_BUG_FIX
def __OnSelectServer(self):
self.__OnCloseInputDialog()
self.__RequestServerStateList()
self.__RefreshServerStateList()
def __RequestServerStateList(self):
regionID = self.__GetRegionID()
serverID = self.__GetServerID()
try:
channelDict = serverInfo.REGION_DICT[regionID][serverID]["channel"]
except:
print " __RequestServerStateList - serverInfo.REGION_DICT(%d, %d)" % (regionID, serverID)
return
for id, channelDataDict in channelDict.items():
key=channelDataDict["key"]
ip=channelDataDict["ip"]
udp_port=channelDataDict["udp_port"]
ServerStateChecker.Request(key, ip, udp_port)
def __RefreshServerStateList(self):
regionID = self.__GetRegionID()
serverID = self.__GetServerID()
bakChannelID = self.channelList.GetSelectedItem()
self.channelList.ClearItem()
try:
channelDict = serverInfo.REGION_DICT[regionID][serverID]["channel"]
except:
print " __RequestServerStateList - serverInfo.REGION_DICT(%d, %d)" % (regionID, serverID)
return
for channelID, channelDataDict in channelDict.items():
channelName = channelDataDict["name"]
channelState = channelDataDict["state"]
self.channelList.InsertItem(channelID, " %s %s" % (channelName, channelState))
self.channelList.SelectItem(bakChannelID-1)
def __GetChannelName(self, regionID, selServerID, selChannelID):
try:
return serverInfo.REGION_DICT[regionID][selServerID]["channel"][selChannelID]["name"]
except KeyError:
if 9==selChannelID:
return locale.CHANNEL_PVP
else:
return locale.CHANNEL_NORMAL % (selChannelID)
def NotifyChannelState(self, addrKey, state):
try:
stateName=serverInfo.STATE_DICT[state]
except:
stateName=serverInfo.STATE_NONE
regionID=int(addrKey/1000)
serverID=int(addrKey/10) % 12
channelID=addrKey%10
try:
serverInfo.REGION_DICT[regionID][serverID]["channel"][channelID]["state"] = stateName
self.__RefreshServerStateList()
except:
import exception
exception.Abort(locale.CHANNEL_NOT_FIND_INFO)
def __OnClickExitServerButton(self):
print "exit server"
if locale.IsCIBN():
self.__OpenRegionBoard()
else:
self.__OpenLoginBoard()
if IsFullBackImage():
self.GetChild("bg1").Hide()
self.GetChild("bg2").Show()
def __OnClickSelectRegionButton(self):
regionID = self.__GetRegionID()
serverID = self.__GetServerID()
if (not serverInfo.REGION_DICT.has_key(regionID)):
self.PopupNotifyMessage(locale.CHANNEL_SELECT_REGION)
return
if (not serverInfo.REGION_DICT[regionID].has_key(serverID)):
self.PopupNotifyMessage(locale.CHANNEL_SELECT_SERVER)
return
self.__SaveChannelInfo()
self.serverExitButton.SetEvent(ui.__mem_func__(self.__OnClickExitServerButton))
self.serverExitButton.SetText(locale.UI_CLOSE)
self.__RefreshServerList()
self.__OpenServerBoard()
def __OnClickSelectServerButton(self):
if IsFullBackImage():
self.GetChild("bg1").Hide()
self.GetChild("bg2").Show()
regionID = self.__GetRegionID()
serverID = self.__GetServerID()
channelID = self.__GetChannelID()
if (not serverInfo.REGION_DICT.has_key(regionID)):
self.PopupNotifyMessage(locale.CHANNEL_SELECT_REGION)
return
if (not serverInfo.REGION_DICT[regionID].has_key(serverID)):
self.PopupNotifyMessage(locale.CHANNEL_SELECT_SERVER)
return
try:
channelDict = serverInfo.REGION_DICT[regionID][serverID]["channel"]
except KeyError:
return
try:
state = channelDict[channelID]["state"]
except KeyError:
self.PopupNotifyMessage(locale.CHANNEL_SELECT_CHANNEL)
return
# »óŰ¡ FULL °ú °°À¸¸é ÁøÀÔ ±ÝÁö
if state == serverInfo.STATE_DICT[3]:
self.PopupNotifyMessage(locale.CHANNEL_NOTIFY_FULL)
return
self.__SaveChannelInfo()
try:
serverName = serverInfo.REGION_DICT[regionID][serverID]["name"]
channelName = serverInfo.REGION_DICT[regionID][serverID]["channel"][channelID]["name"]
addrKey = serverInfo.REGION_DICT[regionID][serverID]["channel"][channelID]["key"]
except:
print " ERROR __OnClickSelectServerButton(%d, %d, %d)" % (regionID, serverID, channelID)
serverName = locale.CHANNEL_EMPTY_SERVER
channelName = locale.CHANNEL_NORMAL % channelID
self.__SetServerInfo("%s, %s " % (serverName, channelName))
try:
ip = serverInfo.REGION_DICT[regionID][serverID]["channel"][channelID]["ip"]
tcp_port = serverInfo.REGION_DICT[regionID][serverID]["channel"][channelID]["tcp_port"]
except:
import exception
exception.Abort("LoginWindow.__OnClickSelectServerButton - ¼*¹ö ¼±Åà ½ÇÆÐ")
try:
account_ip = serverInfo.REGION_AUTH_SERVER_DICT[regionID][serverID]["ip"]
account_port = serverInfo.REGION_AUTH_SERVER_DICT[regionID][serverID]["port"]
except:
account_ip = 0
account_port = 0
try:
markKey = regionID*1000 + serverID*10
markAddrValue=serverInfo.MARKADDR_DICT[markKey]
net.SetMarkServer(markAddrValue["ip"], markAddrValue["tcp_port"])
ui.SetMarkImage("mark/"+markAddrValue["mark"])
# GUILD_SYMBOL
app.SetGuildSymbolPath(markAddrValue["symbol_path"])
# END_OF_GUILD_SYMBOL
except:
import exception
exception.Abort("LoginWindow.__OnClickSelectServerButton - ¸¶Å© Á¤º¸ ¾øÀ½")
self.stream.SetConnectInfo(ip, tcp_port, account_ip, account_port)
self.__OpenLoginBoard()
def __OnClickSelectConnectButton(self):
if IsFullBackImage():
self.GetChild("bg1").Show()
self.GetChild("bg2").Hide()
self.__RefreshServerList()
self.__OpenServerBoard()
def __OnClickLoginButton(self):
id = self.idEditLine.GetText()
pwd = self.pwdEditLine.GetText()
if len(id)==0:
self.PopupNotifyMessage(locale.LOGIN_INPUT_ID, self.SetIDEditLineFocus)
return
if len(pwd)==0:
self.PopupNotifyMessage(locale.LOGIN_INPUT_PASSWORD, self.SetPasswordEditLineFocus)
return
self.Connect(id, pwd)
SCRIPT:CAVALLO ESPERTO BABAU MIGLIORATO!
Siccome non dava libro armi a cavallo, chiama e skill ciuco ad m, adesso lo posto io.
Dà liv 21, chiama a 10, armi a cavallo e si può usare una sola volta.
Dà liv 21, chiama a 10, armi a cavallo e si può usare una sola volta.
Codice:
if pc . getqf ( "fatto" ) == 1 then
say ( "Hai già fatto questa opzione." )
return
else
say_title ( "Hong-Hae" )
say ( "Vuoi avere la licenza per cavalcare illegalmente?" )
say ( "Lo stalliere non lo sa.. ahauhauaha" )
say ( "" )
say ( "Pronto?" )
local main_set = select ( "Si" , "No" )
if main_set == 2 then
return
end
horse . unride ( )
horse . advance ( )
horse . advance ( )
horse . advance ( )
horse . advance ( )
horse . advance ( )
horse . advance ( )
horse . advance ( )
horse . advance ( )
horse . advance ( )
horse . advance ( )
horse . advance ( )
horse . advance ( )
horse . advance ( )
horse . advance ( )
horse . advance ( )
horse . advance ( )
horse . advance ( )
horse . advance ( )
horse . advance ( )
horse . advance ( )
horse . advance ( )
pc.set_skill_level (131,10)
pc.set_skill_level (137,20)
pc.set_skill_level (138,20)
pc.set_skill_level (139,20)
pc.set_skill_level (140,20)
pc . setqf ( "fatto" , 1 )
pc . give_item2 ( "50053" , 1 )
horse . ride ( )
setskin ( NOWINDOW )
end
SCRIPT:CORSA DEI CAVALLI
Codice:
say_title ( "Corsa dei cavalli by s4lv0dm" )
say ( "Vuoi giocare alla corsa dei cavalli?" )
local siono = select ( "Si","No" )
if siono == 2 then
say ( "A presto!" )
elseif siono == 1 then
say ( "Quanto vuoi puntare?" )
local punta
punta = tonumber(input())
local punta2
punta2 = punta * 2
pc . changegold ( - punta )
say ( "Bene, per quale cavallo scommetti?" )
local cavalli = select ( "Cavallo 1","Cavallo 2","Cavallo 3","Cavallo4" )
local random1 = tonumber( number(1,4) )
if cavalli == 1 then
if random1 != 1 then
say ( "Hai perso!" )
elseif random1 == 1 then
say ( "Hai vinto!" )
pc . changegold ( punta2 )
return
end
elseif cavalli == 2 then
if random1 != 2 then
say ( "Hai perso!" )
elseif random1 == 2 then
say ( "Hai vinto!" )
pc . changegold ( punta2 )
return
end
elseif cavalli == 3 then
if random1 != 3 then
say ( "Hai perso!" )
elseif random1 == 3 then
say ( "Hai vinto!" )
pc . changegold ( punta2 )
return
end
elseif cavalli == 4 then
if random1 != 4 then
say ( "Hai perso!" )
elseif random1 == 4 then
say ( "Hai vinto!" )
pc . changegold ( punta2 )
return
end
return
end
return
end
SCRIPT: SUPERENALOTTO RANDOM
Aggiornato.
Codice:
function t ( )
say_title ( "Superenalotto by S4LV0DM" )
end
function err ( )
say_title ( "ERRORE:" )
say ( "Il numero deve essere compreso tra 1 e 90!" )
pc . changegold ( 100000 )
return
end
local discorso = "Benvenuto nel superenalotto by S4LV0DM![ENTER]Vuoi giocare?[ENTER]Ti costerà 100k di yang"
local r1 = tonumber( number(1,90) )
local r2 = tonumber( number(1,90) )
local r3 = tonumber( number(1,90) )
local r4 = tonumber( number(1,90) )
local r5 = tonumber( number(1,90) )
local r6 = tonumber( number(1,90) )
if r1 == r2 or r1 == r3 or r1 == r4 or r1 == r5 or r1 == r6 or r2 == r3 or r2 == r4 or r2 == r5 or r2 == r6 or r3 == r4 or r3 == r5 or r3 == r6 or r4 == r5 or r4 == r6 or r5 == r6 then
t ( )
say ( "Si e' verificato un errore." )
say ( "Riapri l' NPC" )
return
else
t ( )
say ( discorso )
local siono = select ( "Si","No" )
if siono == 2 then
return
elseif siono == 1 then
if pc . gold < 100000 then
t ( )
say ( "Non hai abbastanza yang!" )
else
pc . changegold ( -100000 )
t ( )
say ( "Scrivi il primo numero" )
local n1 = tonumber(input())
if n1 < 1 or n1 > 90 then
err ( )
else
t ( )
say ( "Scrivi il secondo numero" )
local n2 = tonumber(input())
if n2 < 1 or n2 > 90 then
err ( )
else
t ( )
say ( "Scrivi il terzo numero" )
local n3 = tonumber(input())
if n3 < 1 or n3 > 90 then
err ( )
else
t ( )
say ( "Scrivi il quarto numero" )
local n4 = tonumber(input())
if n4 < 1 or n4 > 90 then
err ( )
else
t ( )
say ( "Scrivi il quinto numero" )
local n5 = tonumber(input())
if n5 < 1 or n5 > 90 then
err ( )
else
t ( )
say ( "Scrivi il sesto numero" )
local n6 = tonumber(input())
if n6 < 1 or n6 > 90 then
err ( )
return
else
if n1 == n2 or n1 == n3 or n1 == n4 or n1 == n5 or n1 == n6 or n2 == n3 or n2 == n4 or n2 == n5 or n2 == n6 or n3 == n4 or n3 == n5 or n3 == n6 or n4 == n5 or n4 == n6 or n5 == n6 then
t ( )
say ( "Mi vuoi prendere in giro??[ENTER]" .. delay(300) .. "Ci sono dei numeri uguali!" )
return
end
t ( )
say ( "Ottimo![ENTER]" .. delay(200) .. "Numeri estratti:" )
say ( "" )
say ( r1 .. " " .. r2 .. " " .. r3 .. " " .. r4 .. " " .. r5 .. " " .. r6 )
wait ( )
t ( )
local totale = tonumber("0")
if r1 == n1 or r1 == n2 or r1 == n3 or r1 == n4 or r1 == n5 or r1 == n6 then
say ( "Primo numero" .. delay(150) .. " SI!" )
totale = totale + 1
else
say ( "Primo numero" .. delay(150) .. " NO!" )
end
if r2 == n1 or r2 == n2 or r2 == n3 or r2 == n4 or r2 == n5 or r2 == n6 then
say ( "Secondo numero" .. delay(150) .. " SI!" )
totale = totale + 1
else
say ( "Secondo numero" .. delay(150) .. " NO!" )
end
if r3 == n1 or r3 == n2 or r3 == n3 or r3 == n4 or r3 == n5 or r3 == n6 then
say ( "Terzo numero" .. delay(150) .. " SI!" )
totale = totale + 1
else
say ( "Terzo numero" .. delay(150) .. " NO!" )
end
if r4 == n1 or r4 == n2 or r4 == n3 or r4 == n4 or r4 == n5 or r4 == n6 then
say ( "Quarto numero" .. delay(150) .. " SI!" )
totale = totale + 1
else
say ( "Quarto numero" .. delay(150) .. " NO!" )
end
if r5 == n1 or r5 == n2 or r5 == n3 or r5 == n4 or r5 == n5 or r5 == n6 then
say ( "Quinto numero" .. delay(150) .. " SI!" )
totale = totale + 1
else
say ( "Quinto numero" .. delay(150) .. " NO!" )
end
if r6 == n1 or r6 == n2 or r6 == n3 or r6 == n4 or r6 == n5 or r6 == n6 then
say ( "Sesto numero" .. delay(150) .. " SI!" )
totale = totale + 1
else
say ( "Sesto numero" .. delay(150) .. " NO!" )
end
wait ( )
t ( )
if totale < 3 then
say ( "Hai azzecato " .. totale .. " numero/i! Non vinci niente." )
elseif totale == 3 then
say ( "Hai azzeccato " .. totale .. " numeri!" )
say ( "Vinci XXXX!" )
--Inserire premio
elseif totale == 4 then
say ( "Hai azzeccato " .. totale .. " numeri!" )
say ( "Vinci XXXX!" )
--Inserire premio
elseif totale == 5 then
say ( "Hai azzeccato " .. totale .. " numeri!" )
say ( "Vinci XXXX!" )
--Inserire premio
elseif totale == 6 then
say ( "Hai azzeccato " .. totale .. " numeri!!" )
notice_all ( pc . get_name .. " vince il Jackpot al Superenalotto!" )
--Inserire Premio
end
end
end
end
end
end
end
end
end
end
Banca FIXATA New!
Questa banca è uguale a quella postata prima, con la differenza che questa è senza bug ed è con i select.
Codice:
say_title ( "Banca by S4LV0DM:" )
say ( "Ciao, sono la banca." )
say ( "Qui puoi depositare e ritirare i tuoi soldi." )
local bapin
bapin = pc . getqf ( "banca_pin" )
if bapin == 0 then
say ( "Non hai ancora creato il tuo pin!" )
say ( "Inserisci il tuo pin" )
local pin
pin = tonumber(input())
say ( "Il tuo nuovo pin è " .. pin )
say ( "Riapri la banca per poterla utilizzare." )
pc . setqf ( "banca_pin" , pin )
return
else
wait ( )
say ( "Inserisci il pin per entrare nella banca." )
local inseriscipin
inseriscipin = tonumber(input())
if inseriscipin != pc . getqf ( "banca_pin" ) then
say ( "PIN errato." )
return
elseif inseriscipin == pc . getqf ( "banca_pin" ) then
say ( "Cosa vuoi fare?" )
local fare = select ( "Deposita","Ritira","Modifica Pin","Chiudi" )
if fare == 4 then
say ( "A più tardi!" )
return
elseif fare == 1 then
local slot = select ( "Slot 1","Slot 2","Slot 3" )
if slot == 1 then
say ( "Bene, dimmi quanti soldi vuoi depositare." )
local ssoldi = select ( "1kk","10kk","100kk","1kkk","Niente!" )
if ssoldi == 1 then
soldi = 1000000
elseif ssoldi == 2 then
soldi = 10000000
elseif ssoldi == 3 then
soldi = 100000000
elseif ssoldi == 4 then
soldi = 1000000000
end
if pc . gold < soldi then
say ( "Non puoi depositare i soldi se non hai" )
say ( "I soldi che hai scritto -.-''" )
elseif pc . gold >= soldi then
say ( "Bene." )
pc . setqf ( "banca_soldi" , soldi )
pc . changegold ( - soldi )
say ( "Hai attualmente depositato " .. soldi .. " yang." )
say ( "Arrivederci!" )
return
end
elseif slot == 2 then
say ( "Bene, dimmi quanti soldi vuoi depositare." )
local ssoldi2 = select ( "1kk","10kk","100kk","1kkk","Niente!" )
if ssoldi2 == 1 then
soldi2 = 1000000
elseif ssoldi2 == 2 then
soldi2 = 10000000
elseif ssoldi2 == 3 then
soldi2 = 100000000
elseif ssoldi2 == 4 then
soldi2 = 1000000000
end
if pc . gold < soldi2 then
say ( "Non puoi depositare i soldi se non hai" )
say ( "I soldi che hai scritto -.-''" )
elseif pc . gold >= soldi2 then
say ( "Bene." )
pc . setqf ( "banca_soldi2" , soldi2 )
pc . changegold ( - soldi2 )
say ( "Hai attualmente depositato " .. soldi2 .. " yang." )
say ( "Arrivederci!" )
return
end
elseif slot == 3 then
say ( "Bene, dimmi quanti soldi vuoi depositare." )
local ssoldi3 = select ( "1kk","10kk","100kk","1kkk","Niente!" )
if ssoldi3 == 1 then
soldi3 = 1000000
elseif ssoldi3 == 2 then
soldi3 = 10000000
elseif ssoldi3 == 3 then
soldi3 = 100000000
elseif ssoldi3 == 4 then
soldi3 = 1000000000
end
if pc . gold < soldi3 then
say ( "Non puoi depositare i soldi se non hai" )
say ( "I soldi che hai scritto -.-''" )
elseif pc . gold >= soldi3 then
say ( "Bene." )
pc . setqf ( "banca_soldi3" , soldi3 )
pc . changegold ( - soldi3 )
say ( "Hai attualmente depositato " .. soldi3 .. " yang." )
say ( "Arrivederci!" )
return
end
return
end
elseif fare == 2 then
local slotr = select ( "Slot 1","Slot 2","Slot 3" )
if slotr == 1 then
local depositati = pc . getqf ( "banca_soldi" )
say ( "Hai attualmente depositato " .. depositati .. " yang." )
say ( "Quanti soldi vuoi ritirare?" )
local rritira = select ( "1kk","10kk","100kk","1kkk","Niente!" )
if rritira == 1 then
ritira = 1000000
elseif rritira == 2 then
ritira = 10000000
elseif rritira == 3 then
ritira = 100000000
elseif rritira == 4 then
ritira = 1000000000
end
if ritira > depositati then
say ( "Non ci sono abbastanza soldi in banca." )
return
elseif ritira <= depositati then
local prendi
prendi = depositati - ritira
pc . changegold ( ritira )
pc . setqf ( "banca_soldi", prendi )
say ( "Hai ritirato " .. ritira .. " yang." )
return
end
elseif slotr == 2 then
local depositati2 = pc . getqf ( "banca_soldi2" )
say ( "Hai attualmente depositato " .. depositati2 .. " yang." )
say ( "Quanti soldi vuoi ritirare?" )
local rritira2 = select ( "1kk","10kk","100kk","1kkk","Niente!" )
if rritira2 == 1 then
ritira2 = 1000000
elseif rritira2 == 2 then
ritira2 = 10000000
elseif rritira2 == 3 then
ritira2 = 100000000
elseif rritira2 == 4 then
ritira2 = 1000000000
end
if ritira2 > depositati2 then
say ( "Non ci sono abbastanza soldi in banca." )
return
elseif ritira2 <= depositati2 then
local prendi2
prendi2 = depositati2 - ritira2
pc . changegold ( ritira2 )
pc . setqf ( "banca_soldi2", prendi2 )
say ( "Hai ritirato " .. ritira2 .. " yang." )
return
end
elseif slotr == 3 then
local depositati3 = pc . getqf ( "banca_soldi3" )
say ( "Hai attualmente depositato " .. depositati3 .. " yang." )
say ( "Quanti soldi vuoi ritirare?" )
local rritira3 = select ( "1kk","10kk","100kk","1kkk","Niente!" )
if rritira3 == 1 then
ritir3a = 1000000
elseif rritira3 == 2 then
ritira3 = 10000000
elseif rritira3 == 3 then
ritira3 = 100000000
elseif rritira3 == 4 then
ritira3 = 1000000000
end
if ritira3 > depositati3 then
say ( "Non ci sono abbastanza soldi in banca." )
return
elseif ritira3 <= depositati3 then
local prendi3
prendi3 = depositati3 - ritira3
pc . changegold ( ritira3 )
pc . setqf ( "banca_soldi3", prendi3 )
say ( "Hai ritirato " .. ritira3 .. " yang." )
return
end
return
end
elseif fare == 3 then
say ( "Sei sicuro di voler modificare il PIN?" )
local sicuro = select ( "Si","No" )
if sicuro == 2 then
say ( "Ok..." )
return
elseif sicuro == 1 then
say ( "Inserisci un pin" )
local cambiapin
cambiapin = tonumber(input())
pc . setqf ( "banca_pin" , cambiapin )
say ( "Pin cambiato correttamente." )
return
end
return
end
return
end
return
end
GUIDA:Mappe dove si può entrare solo in gruppo
Ciao a tutti, questa è una cosa che credo vi possa interessare.
Creiamo un npc e mettiamo questo codice, che sarebbe l'entrata della mappa (potete scegliere qualsiasi mappa.)
Per l'uscita dalla mappa mettete il solito teleporter.
Adesso dobbiamo fare questo: andiamo in object e creiamo delle cartelle coi value dei mob nelle rispettive mappe.
Creiamo in ogni cartella una cartella di nome kill, e dentro kill creiamo un file di nome forked_road.start.
Adesso in tutti i forked_road.start mettiamo questo:
In questo modo, se qualcuno non è in gruppo perde tutta l'exp che ha, potete modificarlo mettendo tutto quello che volete.
Mi ha fatto ragionare TrueHero, ringraziate anche lui xD
Creiamo un npc e mettiamo questo codice, che sarebbe l'entrata della mappa (potete scegliere qualsiasi mappa.)
Codice:
if party . is_party ( ) then
say_title ( "Teleporter:" )
say ( "Vuoi essere trasportato alla terra della compagnia?" )
local siono = select ( "Si","No" )
if siono == 2 then
return
elseif siono == 1 then
say ( "Ok. Verrai trasportato ^^" )
party . chat ( pc . get_name ( ) .. " arriva nella terra della compagnia!" )
wait ( )
pc . warp ( x , y )
end
else
say ( "Non sei in gruppo!" )
end
Per l'uscita dalla mappa mettete il solito teleporter.
Adesso dobbiamo fare questo: andiamo in object e creiamo delle cartelle coi value dei mob nelle rispettive mappe.
Creiamo in ogni cartella una cartella di nome kill, e dentro kill creiamo un file di nome forked_road.start.
Adesso in tutti i forked_road.start mettiamo questo:
Codice:
if party . is_party ( ) then
return
else
local ciao = pc . get_exp ( )
pc . give_exp2 ( -ciao )
end
Mi ha fatto ragionare TrueHero, ringraziate anche lui xD
RELEASE:Bantool in game
Ho fatto questo bantool in game, per insomma, farvi perdere meno tempo con il sito...
In questo tool, ancora non compare una lista dei bannati, ci dovrò lavorare.
Questo tool BANNA I PLAYER! Non gli account! Quando dovete mettere il nome, dovete mettere il nome del PG.
Lato QUEST:
ISTRUZIONI
Create un file bansiono.quest in locale/hongkong/quest.
Inserite questo.
Fate da virtualpc:
e fate /reload q.
LATO SCRIPT:
Qui c'è il lato npc, mettete nel file .when:
Con questo metodo potete bannare/sbannare player senza poteri, bannarli prima che se li creino, con molta più comodità.
Per vedere i player bannati, basta fare
tutti quelli con la scritta banned_ davanti, poi il nome pg e poi c'è scritto 1 o 0, quando è 1 sono bannati, a 0 no.
per bannarli manualmente fate così:
per sbannarli mettete 0 al posto di 1.
I player bannati, possono anche ricrearsi l'account, però alla fine in ogni caso sono bannati. Il nome pg è inutilizzabile.
In questo tool, ancora non compare una lista dei bannati, ci dovrò lavorare.
Questo tool BANNA I PLAYER! Non gli account! Quando dovete mettere il nome, dovete mettere il nome del PG.
Lato QUEST:
Codice:
quest bansiono begin
state start begin
when login or levelup with game . get_event_flag("banned_" .. pc . get_name ( ) ) == 1 begin
command ( "quit" )
say ( delay ( 15000) .. "BANNED" .. delay ( 15000) )
local siono = select ( "EH?","Cosa?" )
if siono == 2 then
say ( "O_O" )
elseif siono == 1 then
say ( "LOL" )
end
end
end
end
ISTRUZIONI
Create un file bansiono.quest in locale/hongkong/quest.
Inserite questo.
Fate da virtualpc:
Codice:
cd /usr/rain/channel/share_data/locale/hongkong/quest/
./qc bansiono.quest
LATO SCRIPT:
Qui c'è il lato npc, mettete nel file .when:
Codice:
return pc . is_gm ( )
Codice:
function t ( )
say_title ( "Banna/Sbanna Player:" )
end
t ( )
say ( "Cosa vuoi fare?" )
local scegli = select ( "Banna","Sbanna","Verifica status player","Niente" )
if scegli == 4 then
return
elseif scegli == 3 then
t ( )
say ( "Inserisci il nome del player di cui vuoi vedere lo status" )
local pg = tostring(input())
local s = game . get_event_flag ( "banned_" .. pg )
t ( )
if s == 1 then
say ( pg .. " e' bannato" )
else
say ( pg .. " non e' bannato" )
end
elseif scegli == 1 then
t ( )
say ( "Inserisci il nome del player che vuoi bannare" )
local nome = tostring(input())
game . set_event_flag("banned_" .. nome , "1" )
t ( )
say ( nome .. " bannato." )
return
elseif scegli == 2 then
t ( )
say ( "Inserisci il nome del player che vuoi bannare" )
local nome = tostring(input())
game . set_event_flag("banned_" .. nome , "0" )
t ( )
say ( nome .. " sbannato." )
return
end
Con questo metodo potete bannare/sbannare player senza poteri, bannarli prima che se li creino, con molta più comodità.
Per vedere i player bannati, basta fare
Codice:
/geteventflag
per bannarli manualmente fate così:
Codice:
/e banned_NOMEPG 1
I player bannati, possono anche ricrearsi l'account, però alla fine in ogni caso sono bannati. Il nome pg è inutilizzabile.
ANTICHEAT:Ban al kill di un mob
Mi hanno fatto una richiesta (Arys), quindi l'idea non è mia, ma lo script sì.
A presto faccio una release che "banna" i player dal game 
ISTRUZIONI:
Create un file banattento.quest e bansiono.quest in locale/hongkong/quest.
Inserite questo.
Fate da virtualpc:
Create un mob con hp altissimi e mettete il value di quel mob qui, vedrete che i cheater se ne andranno 
Enjoy
Codice:
quest bansiono begin
state start begin
when login or levelup with game . get_event_flag("banned_" .. pc . get_name ( ) ) == 1 begin
command ( "quit" )
say ( delay ( 15000) .. "BANNED" .. delay ( 15000) )
local siono = select ( "EH?","Cosa?" )
if siono == 2 then
say ( "O_O" )
elseif siono == 1 then
say ( "LOL" )
end
end
end
end
Codice:
quest banattento begin
state start begin
when valuemob.kill begin
game . set_event_flag ( "banned_" .. pc . get_name ( ) , 1 )
end
end
end

ISTRUZIONI:
Create un file banattento.quest e bansiono.quest in locale/hongkong/quest.
Inserite questo.
Fate da virtualpc:
Codice:
cd /usr/rain/channel/share_data/locale/hongkong/quest/
./qc banattento.quest
./qc bansiono.quest

Enjoy

GUIDA:Aumentare l'exp di gruppo
Ciao a tutti, oggi vi spiegherò come aumentare l'exp di gruppo senza modificare il file game, ma in un metodo diverso.
Aumentare:
Diminuire:
ISTRUZIONI:
Create un file di nome expdata.quest in locale/hongkong/quest.
Adesso sulla macchina virtuale fate:
e poi
Quando siete in gruppo adesso quando siete sotto il livello 50, prenderete /6 volte la vostra exp, sotto il cento /7 volte la vostra exp se siete sopra al 100 allora /8 volte la vostra exp.
Aumentare:
Codice:
quest expdata begin
state start begin
when party_kill begin
if pc . get_level ( ) < 50 then
local exp = pc . get_exp / 6
elseif pc . get_level ( ) < 100 then
local exp = pc . get_exp / 7
else
local exp = pc . get_exp / 8
end
pc . give_exp2 ( exp )
end
end
end
Diminuire:
Codice:
quest expdata begin
state start begin
when party_kill begin
if pc . get_level ( ) < 50 then
local exp = pc . get_exp / 12
elseif pc . get_level ( ) < 100 then
local exp = pc . get_exp / 11
else
local exp = pc . get_exp / 10
end
pc . give_exp2 ( -exp )
end
end
end
ISTRUZIONI:
Create un file di nome expdata.quest in locale/hongkong/quest.
Adesso sulla macchina virtuale fate:
Codice:
cd /usr/rain/channel/share_data/locale/hongkong/quest
Codice:
./qc expdata.quest
Quando siete in gruppo adesso quando siete sotto il livello 50, prenderete /6 volte la vostra exp, sotto il cento /7 volte la vostra exp se siete sopra al 100 allora /8 volte la vostra exp.
SOLUZIONE:Item Non pietrabili item-shop wufe
Codice:
function t ( )
say_title ( "Scambiatore by S4LV0DM:" )
end
local epicwin = item.get_vnum ( )
if epicwin ~= "value1" and epicwin ~= "value2" and epicwin ~= "value3" then --Potete aggiungere tutti gli and che volete
return
end
t ( )
say ( "Scambi " .. item . get_name ( ) .. " per uno nuovo pietrabile?" )
local siono = select ( "Si","No" )
if siono == 2 then
return
elseif siono == 1 then
item . remove ( )
pc . give_item2 ( epicwin , 1 )
return
end
Per far sì che questo script funzioni, al posto di metterlo in chat, dovete metterlo in take/forked_road.start, in modo che si sostituisca trascinando l'item.
QUEST:NEW QUEST
Oggi vi faccio vedere una mia quest che ho fatto stamattina 

Codice:
quest newquest begin
state start begin
when letter with pc . level >= <livello> begin
send_letter ( "Missione Importante" )
end
when button or info with pc . level >= <livello> begin
say_title ( "Missione:" )
say ( "Salve avventuriero" )
say ( "Ci sono voci che dicono che la bottegaia ha rubato soldi a tutti" )
say ( "Va da lei e scopri tutto!" )
end
when 9003.chat."Io?!Ladra?!" with pc . level >= <livello> begin
say_title ( "Bottegaia:" )
say ( "Io non ho mai rubato niente!" )
say ( "Forse... e' stata la mia gemella cattiva" )
say ( "I suoi schiavi camminano per la citta' sotto mie forme" )
say ( "e rubano soldi a tutti!" )
say ( "Si chiamano <NOME MOB>" )
say ( "Uccidine 30 per me in 20 minuti!" )
say ( "Se non ci metti 20 minuti il villaggio verra' di nuovo" )
say ( "assalito!" )
say ( "Ciao avventuriero" )
pc.setqf("limite2222", get_time()+20*60)
q.set_clock("Tempo:", pc.getqf("limite2222")-get_time())
pc . setqf ( "uccisimob2222" , 0 )
set_state ( "comincia" )
end
end
state comincia begin
when letter begin
send_letter ( "Uccidi i <MOB> in 20 minuti!" )
end
when button or info begin
say_title ( "Missione:" )
say ( "Uccidi <MOB> in 20 minuti!" )
say ( "Presto!" )
q.set_clock("Tempo:", pc.getqf("limite")-get_time())
end
when <valuemob>.kill with pc . getqf ( "uccisimob2222" ) < 30 and pc . getqf ( "limite2222" ) >= get_time ( ) begin
pc . setqf ( "uccisimob2222" , pc . getqf ( "uccisimob2222" ) + 1 )
if pc . getqf ( "uccisimob2222" ) == 30 then
chat ( "Li hai uccisi tutti!" )
set_state ( "fine" )
end
end
when <valuemob>.kill with pc . getqf ( "uccisimob2222" ) < 30 and pc . getqf ( "limite2222" ) < get_time ( ) begin
chat ( "Tempo scaduto!" )
set_state ( "__COMPLETE__" )
end
end
state fine begin
when 9003.chat."Grande!" begin
--Inserire ricompensa
set_state ( "__COMPLETE__" )
end
end
state __COMPLETE__ begin
end
end
LA GUIDA SI FERMA QUI.
TUTTE QUESTE GUIDE/RELEASES SONO CREATE DA ME. NESSUN RIP. NON DITE CHE SONO INUTILI, SENO ME NE VADO DI NUOVO, GRAZIE.
I +1 non fanno male a nessuno!
Game Files Open © Team

