Checking If a Player is in Olympiad
Posted: Tue Apr 17, 2012 1:31 am
If you want to receive support we need this info to help you properly.
» Find Revision
L2J Revision Number:Custom Server Revision (High Five Part 1)
L2JDP Revision Number:Custom Server Revision (High Five Part 1)
Hi, I tried search, I know this belongs in the custom server requests but I don't have enough posts there. I want to make it so my python buffer won't buff if a character is registered in Olympiad. I've never been good with python, but haven't ever gotten my hands or time to make a java scheme buffer. I tried adding this as a condition; however, it doesn't work (people can still buff when registered in olympiad) resulting in an exploit. (Getting full buffs in olympiad if lucky, by buffing right when they're ported)
This is the condition I tried:
OlympiadManager.getInstance().isRegistered(player) I thought would be the method to check this; however, it's not working. Perhaps player in this case (since Python doesn't define what type of object "player" is), it may not be a L2PcInstance or am I using the wrong method to check for registration?
» Find Revision
L2J Revision Number:Custom Server Revision (High Five Part 1)
L2JDP Revision Number:Custom Server Revision (High Five Part 1)
Hi, I tried search, I know this belongs in the custom server requests but I don't have enough posts there. I want to make it so my python buffer won't buff if a character is registered in Olympiad. I've never been good with python, but haven't ever gotten my hands or time to make a java scheme buffer. I tried adding this as a condition; however, it doesn't work (people can still buff when registered in olympiad) resulting in an exploit. (Getting full buffs in olympiad if lucky, by buffing right when they're ported)
This is the condition I tried:
Code: Select all
def onFirstTalk (self,npc,player): st = player.getQuestState(QUEST_LOADING_INFO) if OlympiadManager.getInstance().isRegistered(player): return showText("Info","You can't buff when your registered in olympiad!","False","Return","main") if not st : st = self.newQuestState(player) if player.isGM() : return rebuildMainHtml(st) else : if player.getLevel() < int(getVar("minlevel")) :