Добавлено через 21 час 30 минут
уже как ток не пробовал не катит условие, может поможет кто составить:
кусок в скрипте где должно быть условие и есть другие условия выглядит так:
код
def onFirstTalk(self, npc, player) :
st = player.getQuestState(INFO_QUEST)
if not st : st = self.newQuestState(player)
if int(System.currentTimeMillis() / 1000) > st.getInt("bloccoAzioni") :
livelloGm = LIVELLO_ACCESSO_GM
if livelloGm < 1 or livelloGm > 7 : livelloGm = 1
livelloPlayer = player.getAccessLevel().getLevel()
if livelloPlayer != 0 and livelloPlayer <= livelloGm : playerAbilitato = True
else : playerAbilitato = False
if playerAbilitato == True and ABILITA_GM_BUFFER == True : accessoAmministrativo = True
else : accessoAmministrativo = False
if ABILITA_GM_BUFFER == False or accessoAmministrativo == True :
if BUFF_CON_KARMA == False and player.getKarma() > 0 :
CORPO = "You have too much <font color=\"FF0000\">karma!</font><br>Come back, when you don't have any karma!"
if playerAbilitato == True :
CORPO += "<br><br><font color=\"LEVEL\">As you are an authorised GM, this page is only to see if all works good.<br>You "
CORPO += "can go on pressing the button below.</font>"
return mostraTesto(st, "INFO:", CORPO, "True", "Go on", "script", "True")
else : return mostraTesto(st, "INFO:", CORPO, "False", "", "", "False")
elif st.player.getLevel() < LIVELLO_MIN :
CORPO = "Your level is too low!<br>You have to be at least level <font color\"LEVEL\">" + str(LIVELLO_MIN) + "</font>, to "
CORPO += "use my services!"
if playerAbilitato == True :
CORPO += "<br><br><font color=\"LEVEL\">As you are an authorised GM, this page is only to see if all works good.<br>You "
CORPO += "can go on pressing the button below.</font>"
return mostraTesto(st, "INFO:", CORPO, "True", "Go on", "script", "True")
else : return mostraTesto(st, "INFO:", CORPO, "False", "", "", "False")
else :
if playerAbilitato == True and RICARICA_SCRIPT == True : return ricaricaPannello("True")
else :
if playerAbilitato == True : return costruisciHtmlPrincipale(st, "True")
else : return costruisciHtmlPrincipale(st, "False")
else :
CORPO = "This buffer is only for VIP's!<br>Contact the administrator for more info!"
return mostraTesto(st, "SORRY!!", CORPO, "False", "", "", "False")
else :
CORPO = "You have to wait a while if you wish to use my services!"
return mostraTesto(st, "SORRY!!", CORPO, "False", "", "", "False")