Есть такая вот лажа в скрипте, которая проверяет является ли юзвер випом (под випом - подразумевается определенный диапазон доступа), изначально в скрипте указан необходимый флаг доступа для админов:
Код:
LIVELLO_ACCESSO_GM = 1
затем спустя 2к строк кода, есть алгоритм который придумал какой то макаронник, и который как я понял не изменим (по крайней мере для моего ума..)
Код:
livelloGm = LIVELLO_ACCESSO_GM
if livelloGm < 1 or livelloGm > 7 : livelloGm = 1
livelloPlayer = player.getAccessLevel().getLevel()
if livelloPlayer != 0 and livelloPlayer <= livelloGm : playerAbilitato = True
Получается что админы могут получать доступ, а все остальные нет, хотя там есть некоторые сравнения, которые как я понимаю должны обеспечивать тот самый диапазон флагов доступа.
В общем суть вопроса-просьбы - как сделать что бы все смогли пользоватся этим квестом, начиная с доступа 0 - и заканчивая 7.
Лог ошибок, которые возникают при использовании квеста, в основном проблема в том, что только пользователи с одним флагом доступа могут получать доступ к квесту, остальные ошибки приведены ниже:
ОШИБКИ ЛОГИ ТРОЛОЛО БЛА БЛА БЛА
File "__init__.py", line 2857, in onFirstTalk
File "__init__.py", line 340, in costruisciHtmlPrincipale
TypeError: cannot concatenate 'str' and 'int' objects
at org.python.core.Py.TypeError(Unknown Source)
at org.python.core.PyObject._basic_add(Unknown Source)
at org.python.core.PyObject._add(Unknown Source)
at org.python.pycode.serializable._pyx1310419281679.costruisciHtmlPrincipale$1(__init__.py:342)
at org.python.pycode.serializable._pyx1310419281679.call_function(__init__.py)
at org.python.core.PyTableCode.call(Unknown Source)
at org.python.core.PyTableCode.call(Unknown Source)
at org.python.core.PyFunction.__call__(Unknown Source)
at org.python.pycode.serializable._pyx1310419281679.onFirstTalk$46(__init__.py:2857)
at org.python.pycode.serializable._pyx1310419281679.call_function(__init__.py)
at org.python.core.PyTableCode.call(Unknown Source)
at org.python.core.PyTableCode.call(Unknown Source)
at org.python.core.PyTableCode.call(Unknown Source)
at org.python.core.PyFunction.__call__(Unknown Source)
at org.python.core.PyMethod.__call__(Unknown Source)
at org.python.core.PyObject.__call__(Unknown Source)
at org.python.core.PyObject._jcallexc(Unknown Source)
at org.python.core.PyObject._jcall(Unknown Source)
at org.python.proxies.main$Quest$422.onFirstTalk(Unknown Source)
at com.l2jserver.gameserver.model.quest.Quest.notifyFirstTalk(Quest.java:506)
at handlers.actionhandlers.L2NpcAction.action(L2NpcAction.java:139)
at com.l2jserver.gameserver.model.L2Object.onAction(L2Object.java:275)
at com.l2jserver.gameserver.model.L2Object.onAction(L2Object.java:268)
at com.l2jserver.gameserver.network.clientpackets.Action.runImpl(Action.java:122)
at com.l2jserver.gameserver.network.clientpackets.L2GameClientPacket.run(L2GameClientPacket.java:62)
at com.l2jserver.gameserver.network.L2GameClient.run(L2GameClient.java:1001)
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
at java.lang.Thread.run(Thread.java:662)
ПС: пробовал вот так, безуспешно...
Код:
livelloPlayer = player.getAccessLevel().getLevel()
if livelloPlayer >= 0 : playerAbilitato = True
FUNCTION: FIRSTTALK
def onFirstTalk(self, npc, player) :
st = player.getQuestState(INFO_QUEST)
if not st : st = self.newQuestState(player)
if st.player.getPet() != None : petFuori = 1
else : petFuori = 0
st.set("presenzaPet", str(petFuori))
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 int(System.currentTimeMillis() / 1000) > st.getInt("bloccoAzioni") :
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")
elif st.player.getPvpFlag() > 0 :
CORPO = "You can't buff while you are <font color=\"FF00FF\">flagged!</font><br>Wait some time and try again!"
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.isInCombat() :
CORPO = "You can't buff while you are attacking!<br>Stop your fight and try again!"
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 : return costruisciHtmlPrincipale(st, playerAbilitato)
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")