Bonjour à tous mes frères muslim et les autres
Version des files : 2013 cousin
Domaine (Base de données, Core, etc.) : lol j'sais pas encore
Votre niveau (débutant, intermédiaire, avancé) : débutant pur
Description du problème :j'ai implanter le mode fantome sur le serveur, mais tmtc que en mode fantome tu peux y rester à l'infini donc qui sait commencer faire pour recommencer ici ou recommencer cité automatique au bout de 10 sec par exemple mes freres
Comment reproduire le problème : ?
Recherches et tests effectué : j'sais pas ou commencer
Résultat des recherches et tests : y'a pas de résultat
Message d'erreur, capture d'écran
vla le fichier uirestart.py du root :
import dbg
import app
import net
import ui
###################################################################################################
## Restart
class RestartDialog(ui.ScriptWindow):
def __init__(self):
ui.ScriptWindow.__init__(self)
def __del__(self):
ui.ScriptWindow.__del__(self)
def LoadDialog(self):
try:
pyScrLoader = ui.PythonScriptLoader()
pyScrLoader.LoadScriptFile(self, "uiscript/restartdialog.py")
except Exception, msg:
(type, msg, tb)=sys.exc_info()
dbg.TraceError("RestartDialog.LoadDialog - %s:%s" % (type, msg))
app.Abort()
return 0
try:
self.restartHereButton=self.GetChild("restart_here_button")
self.restartTownButton=self.GetChild("restart_town_button")
self.restartGhostButton=self.GetChild("restart_ghost_button")
except:
import sys
(type, msg, tb)=sys.exc_info()
dbg.TraceError("RestartDialog.LoadDialog - %s:%s" % (type, msg))
app.Abort()
return 0
self.restartHereButton.SetEvent(ui.__mem_func__(self.RestartHere))
self.restartTownButton.SetEvent(ui.__mem_func__(self.RestartTown))
self.restartGhostButton.SetEvent(ui.__mem_func__(self.RestartGhost))
return 1
def Destroy(self):
self.restartHereButton=0
self.restartTownButton=0
self.ClearDictionary()
def OpenDialog(self):
self.Show()
def Close(self):
self.Hide()
return TRUE
mode fantome 10 sec!
def RestartHere(self):
net.SendChatPacket("/restart_here")
def RestartTown(self):
net.SendChatPacket("/restart_town")
def RestartGhost(self):
import chr
chr.Revive()
def OnPressExitKey(self):
return TRUE
def OnPressEscapeKey(self):
return TRUE
ensuite vla le fichier restartdialog.py du fichier uiscript
import uiScriptLocale
ROOT = "d:/ymir work/ui/public/"
window = {
"name" : "RestartDialog",
"style" : ("float",),
"x" : 50,
"y" : 75,
"width" : 200,
"height" : 110,
"children" :
(
{
"name" : "board",
"type" : "thinboard",
"x" : 0,
"y" : 0,
"width" : 200,
"height" : 110,
"r" : 0.3333,
"g" : 0.2941,
"b" : 0.2588,
"a" : 1.0,
"children" :
(
{
"name" : "restart_here_button",
"type" : "button",
"x" : 10,
"y" : 17,
"text" : uiScriptLocale.RESTART_HERE,
"default_image" : ROOT + "XLarge_Button_01.sub",
"over_image" : ROOT + "XLarge_Button_02.sub",
"down_image" : ROOT + "XLarge_Button_03.sub",
},
{
"name" : "restart_town_button",
"type" : "button",
"x" : 10,
"y" : 47,
"text" : uiScriptLocale.RESTART_TOWN,
"default_image" : ROOT + "XLarge_Button_01.sub",
"over_image" : ROOT + "XLarge_Button_02.sub",
"down_image" : ROOT + "XLarge_Button_03.sub",
},
{
"name" : "restart_ghost_button",
"type" : "button",
"x" : 10,
"y" : 77,
"text_color" : "red",
"text" : "Mode fantôme",
"default_image" : ROOT + "XLarge_Button_01.sub",
"over_image" : ROOT + "XLarge_Button_02.sub",
"down_image" : ROOT + "XLarge_Button_03.sub",
},
),
},
),
}
En postant ma demande d'aide, j'affirme avoir lu et accepté le règlement des demandes d'aides.[Message d'introduction]
j'ai juré si vous m'aider vous etes de vrai gars, bon chance mes frere muslim