def PyExec(): #eventually this can be a full help system TGEObject("MOM_VERSION_TEXT").setText(RPG_CLIENT_VERSION) r = HELPTEXT.replace('\n', '\\n') c = COMMANDTEXT.replace('\n', '\\n') f = FAQTEXT.replace('\n', '\\n') TGEEval(r'HelpWnd_KEYBOARDText.setText("%s");' % r) TGEEval(r'HelpWnd_CommandsText.setText("%s");' % c) TGEEval(r'HelpWnd_FaqText.setText("%s");' % f) TGEExport(OnHelpKeyboard, "Py", "OnHelpKeyboard", "desc", 1, 1) TGEExport(OnHelpCommands, "Py", "OnHelpCommands", "desc", 1, 1) TGEExport(OnHelpFAQ, "Py", "OnHelpFAQ", "desc", 1, 1) TGEObject("HELPKEYBOARDBUTTON").performClick() eula = EULATEXT.replace('\n', '\\n') credits = CREDITSTEXT.replace('\n', '\\n') TGEObject("EulaWND_window").setText("Licensing Agreement") TGEObject("CreditsWND_window").setText("Credits") TGEEval(r'Eulatext.setText("%s");' % eula) TGEEval(r'MoMCreditsText.setText("%s");' % credits)
def PyExec(): FRIENDSWND = FriendsWnd.instance FRIENDSWND.initTGEObjects() TGEExport(FRIENDSWND.onAddFriend, "Py", "OnAddFriend", "desc", 1, 1) TGEExport(FRIENDSWND.onRemoveFriend, "Py", "OnRemoveFriend", "desc", 1, 1) TGEExport(FRIENDSWND.onClickFriend, "Py", "OnClickFriend", "desc", 1, 1)
def PyExec(): global INNWND INNWND = InnWnd() TGEExport(PyOnInnAddToParty,"Py","OnInnAddToParty","desc",1,1) TGEExport(PyOnInnRemoveFromParty,"Py","OnInnRemoveFromParty","desc",1,1) TGEExport(PyOnInnWndClose,"Py","OnInnWndClose","desc",1,1)
def PyExec(): global ENCWND ENCWND = EncWindow() #read the encyclopedia try: tar = tarfile.open( "./%s/data/ui/encyclopedia/momworld.tar.gz" % GAMEROOT, 'r:gz') for tarinfo in tar: if tarinfo.name.startswith( "twiki/data/MoMWorld") and tarinfo.isreg(): f = tar.extractfile(tarinfo) data = f.read() ENCYC[tarinfo.name[20:-4]] = data tar.close() except: traceback.print_exc() ENCYC["Home"] = HOME ENCWND.setPage("Home") TGEExport(OnEncyclopediaOnURL, "Py", "OnEncyclopediaOnURL", "desc", 2, 2) TGEExport(externEncyclopediaLinkURL, "Py", "ExternEncyclopediaLinkURL", "desc", 2, 2) TGEExport(OnEncyclopediaHome, "Py", "OnEncyclopediaHome", "desc", 1, 1) TGEExport(OnEncyclopediaForward, "Py", "OnEncyclopediaForward", "desc", 1, 1) TGEExport(OnEncyclopediaBack, "Py", "OnEncyclopediaBack", "desc", 1, 1)
def PyExec(): global MASTER_LOGIN_PLAYER, MASTER_LOGIN_GUARDIAN, MASTER_LOGIN_IMMORTAL MASTER_LOGIN_PLAYER = TGEObject("MASTER_LOGIN_PLAYER") MASTER_LOGIN_GUARDIAN = TGEObject("MASTER_LOGIN_GUARDIAN") MASTER_LOGIN_IMMORTAL = TGEObject("MASTER_LOGIN_IMMORTAL") TGEExport(OnMasterSelectWorld, "Py", "OnMasterSelectWorld", "desc", 1, 1) TGEExport(OnMasterGuiLogout, "Py", "OnMasterGuiLogout", "desc", 1, 1) TGEExport(OnRefreshWorlds, "Py", "OnRefreshWorlds", "desc", 1, 1) TGEExport(OnMasterRequestWorldPassword, "Py", "OnMasterRequestWorldPassword", "desc", 1, 1) TGEExport(PyOnWorldChoose, "Py", "OnWorldChoose", "desc", 1, 1) TGEExport(PyOnDirectSelectWorld, "Py", "OnDirectSelectWorld", "desc", 1, 1) #TGEExport(PyOnDirectRequestPassword,"Py","OnDirectRequestPassword","desc",1,1) #Py::OnFreeServers(); #Py::OnPremiumServers(); #Py::OnPlayerServers(); #only premium TGEExport(PyOnFreeServers, "Py", "OnFreeServers", "desc", 1, 1) TGEExport(PyOnPremiumServers, "Py", "OnPremiumServers", "desc", 1, 1) TGEExport(PyOnPlayerServers, "Py", "OnPlayerServers", "desc", 1, 1) TGEExport(PyOnPGServers, "Py", "OnPGServers", "desc", 1, 1) #if RPG_BUILD_DEMO: # TGEObject("SERVER_FREE_BUTTON").performClick() #else: # TGEObject("SERVER_PREMIUM_BUTTON").performClick() TGEObject("SERVER_PGSERVERS_BUTTON").performClick()
def PyExec(): global TRACKINGWND TRACKINGWND = TrackingWnd() TGEExport(OnTrack, "Py", "OnTrack", "desc", 1, 1) TGEExport(OnAltClickTrackingList, "Py", "OnAltClickTrackingList", "desc", 1, 1) TGEExport(TRACKINGWND.OnToggleScale, "Py", "OnToggleTrackingScale", "desc", 1, 1)
def PyExec(): global CRAFTINGWND CRAFTINGWND = CraftingWnd() TGEExport(OnCraftingToggle, "Py", "OnCraftingToggle", "desc", 1, 1) TGEExport(OnCraft, "Py", "OnCraft", "desc", 1, 1) TGEExport(OnCraftEmpty, "Py", "OnCraftEmpty", "desc", 1, 1)
def PyExec(): OnLoadFontOptions() from playerSettings import PLAYERSETTINGS TGEEval("GameplayExtendedMacros.setValue(%i);" % PLAYERSETTINGS.useExtendedMacros) TGEExport(KeyCanBeRemapped, "Py", "KeyCanBeRemapped", "desc", 2, 2) TGEExport(OnRespawnTime, "Py", "OnRespawnTimeChanged", "desc", 1, 1) TGEExport(SetGameDifficulty, "Py", "SetGameDifficulty", "desc", 1, 1)
def PyExec(): global DEFAULTCOMMANDWND DEFAULTCOMMANDWND = DefaultCommandWnd() TGEExport(DEFAULTCOMMANDWND.OnDefaultCommand, "Py", "OnDefaultCommand", "desc", 2, 2) TGEExport(DEFAULTCOMMANDWND.OnDefaultCommandNext, "Py", "OnDefaultCommandNext", "desc", 1, 1) TGEExport(DEFAULTCOMMANDWND.OnDefaultCommandPrev, "Py", "OnDefaultCommandPrev", "desc", 1, 1)
def PyExec(): global ALLIANCEWND ALLIANCEWND = AllianceWnd() TGEExport(PyOnLeaveDeclineAlliance, "Py", "OnLeaveDeclineAlliance", "desc", 1, 1) TGEExport(PyOnJoinAlliance, "Py", "OnJoinAlliance", "desc", 1, 1) TGEExport(PyOnAllianceSelect, "Py", "AllianceSelect", "desc", 3, 3) TGEExport(OnAllianceSelectByIndex, "Py", "OnAllianceSelectByIndex", "desc", 2, 2)
def PyExec(): global CHARPORTRAITWND CHARPORTRAITWND = CharPortraitWnd() TGEExport(OnChoosePortrait, "Py", "OnChoosePortrait", "desc", 1, 1) TGEExport(OnPortraitButton, "Py", "OnPortraitButton", "desc", 2, 2) TGEExport(OnPrevPortraits, "Py", "OnPrevPortraits", "desc", 1, 1) TGEExport(OnNextPortraits, "Py", "OnNextPortraits", "desc", 1, 1) TGEExport(OnCloseCharPortraitWnd, "Py", "OnCloseCharPortraitWnd", "desc", 1, 1)
def PyExec(): ITEMCONTAINERWND = ItemContainerWnd.instance ITEMCONTAINERWND.initTGEObjects() TGEExport(ITEMCONTAINERWND.closeContainer, "Py", "OnItemContainerClose", "desc", 1, 1) TGEExport(ITEMCONTAINERWND.onSelect, "Py", "OnItemContainerSelect", "desc", 1, 1) TGEExport(ITEMCONTAINERWND.onInsert, "Py", "OnItemContainerInsert", "desc", 1, 1) TGEExport(ITEMCONTAINERWND.onExtract, "Py", "OnItemContainerExtract", "desc", 1, 1)
def PyExec(): TGEExport(OnNewCharacterSubmit, "Py", "OnNewCharacterSubmit", "desc", 1, 1) TGEExport(OnNewCharacterCancel, "Py", "OnNewCharacterCancel", "desc", 1, 1) TGEExport(OnAddStat, "Py", "OnAddStat", "desc", 2, 2) TGEExport(OnSubStat, "Py", "OnSubStat", "desc", 2, 2) TGEExport(OnRaceChanged, "Py", "OnRaceChanged", "desc", 1, 1) TGEExport(OnGenderChanged, "Py", "OnGenderChanged", "desc", 1, 1) TGEExport(OnLookChanged, "Py", "OnLookChanged", "desc", 1, 1) TGEExport(OnDefaultStats, "Py", "OnDefaultStats", "desc", 1, 1) TGEExport(OnNewCharChoosePortrait, "Py", "OnNewCharChoosePortrait", "desc", 1, 1)
def PyExec(): global BUTTONS BUTTONS = [] for x in xrange(0, 6): BUTTONS.append(TGEObject("PartyWnd_CharButton%i" % x)) BUTTONS[x].visible = False BUTTONS[x].setActive("false") TGEExport(OnCharButton, "Py", "OnCharButton", "desc", 2, 2)
def PyExec(): Setup() #TGEObject("SINGLEPLAYER_WORLDNAME").setText("MyWorld") TGEExport(OnNewSingleWorld, "Py", "OnNewSingleWorld", "desc", 1, 1) TGEExport(OnLoadSingleWorld, "Py", "OnLoadSingleWorld", "desc", 1, 1) TGEExport(OnReallyDeleteSingleWorld, "Py", "OnReallyDeleteSingleWorld", "desc", 1, 1) TGEExport(OnDeleteSingleWorld, "Py", "OnDeleteSingleWorld", "desc", 1, 1) TGEExport(OnSPGlobalChatLogin, "Py", "OnSPGlobalChatLogin", "desc", 1, 1) if RPG_BUILD_DEMO: TGESetGlobal("$Py::FREEEDITION", 1) TGEObject("NPN_ONE").visible = True TGEObject("NPN_TWO").visible = True else: TGESetGlobal("$Py::FREEEDITION", 0) TGEObject("NPN_ONE").visible = False TGEObject("NPN_TWO").visible = False
def PyExec(): global AUCTIONGUI AUCTIONGUI = AuctionGui() TGEExport(AUCTIONGUI.doSearch, "Py", "DoSearch", "desc", 2, 2) TGEExport(AUCTIONGUI.doBuyClick, "Py", "doBuyClick", "desc", 2, 2) TGEExport(AUCTIONGUI.doBuyout, "Py", "DoBuyout", "desc", 1, 1) TGEExport(AUCTIONGUI.doBuySwitch, "Py", "DoBuySwitch", "desc", 1, 1) TGEExport(AUCTIONGUI.doSellSwitch, "Py", "DoSellSwitch", "desc", 1, 1) TGEExport(AUCTIONGUI.doItemSlot, "Py", "DoItemSlot", "desc", 1, 1) TGEExport(AUCTIONGUI.doCreateAuction, "Py", "DoCreateAuction", "desc", 1, 1) TGEExport(AUCTIONGUI.doBid, "Py", "DoBid", "desc", 1, 1) TGEExport(AUCTIONGUI.doRemoveFromAuction, "Py", "DoRemoveFromAuction", "desc", 1, 1)
def PyExec(): global NPCWND NPCWND = NPCWnd() TGEExport(PyOnNPCWndChoose, "Py", "OnNPCWndChoose", "desc", 1, 1) TGEExport(PyOnCloseNPCWnd, "Py", "OnCloseNPCWnd", "desc", 1, 1) TGEExport(PyOnNPCTradeButton, "Py", "OnNPCTradeButton", "desc", 1, 1) TGEExport(PyOnNPCInteractButton, "Py", "OnNPCInteractButton", "desc", 1, 1) TGEExport(PyOnNPCBankButton, "Py", "OnNPCBankButton", "desc", 1, 1) TGEExport(PyOnNPCSellButton, "Py", "OnNPCWndSellButton", "desc", 1, 1) TGEExport(PyOnNPCBuyButton, "Py", "OnNPCWndBuyButton", "desc", 1, 1) TGEExport(PyOnInvSlotShift, "Py", "OnInvSlotShift", "desc", 2, 2) TGEExport(PyOnBankSlot, "Py", "OnBankSlot", "desc", 2, 2)
def PyExec(): global MAILGUI MAILGUI = MailGui() TGEExport(MAILGUI.doInboxSwitch, "Py", "DoInboxSwitch", "desc", 1, 1) TGEExport(MAILGUI.doSendSwitch, "Py", "DoSendSwitch", "desc", 1, 1) TGEExport(MAILGUI.doChangePage, "Py", "DoChangePage", "desc", 2, 2) TGEExport(MAILGUI.doSendMail, "Py", "DoSendMail", "desc", 1, 1) TGEExport(MAILGUI.doViewMail, "Py", "DoViewMail", "desc", 2, 2) TGEExport(MAILGUI.doMailSlot, "Py", "DoMailSlot", "desc", 1, 1)
def PyExec(): LOOTWND = LootWnd.instance LOOTWND.initTGEObjects() TGEExport(LOOTWND.close,"Py","OnCloseLootWnd","desc",1,1) TGEExport(LOOTWND.onLoot,"Py","OnLootButton","desc",2,2) TGEExport(LOOTWND.onReallyLoot,"Py","OnReallyLootButton","desc",3,3) TGEExport(LOOTWND.onLootAlt,"Py","OnLootButtonAlt","desc",2,2) TGEExport(LOOTWND.onReallyLootAlt,"Py","OnReallyLootButtonAlt","desc",3,3) TGEExport(LOOTWND.destroyCorpse,"Py","OnDestroyCorpse","desc",2,2) TGEExport(LOOTWND.reallyDestroyCorpse,"Py","OnReallyDestroyCorpse","desc",1,1)
def PyExec(): TGEExport(OnClearIcon, "Py", "OnClearIcon", "desc", 1, 1) TGEExport(OnChooseIcon, "Py", "OnChooseIcon", "desc", 1, 1) TGEExport(OnIconButton, "Py", "OnIconButton", "desc", 2, 2) TGEExport(OnPrevIcons, "Py", "OnPrevIcons", "desc", 1, 1) TGEExport(OnNextIcons, "Py", "OnNextIcons", "desc", 1, 1) TGEExport(OnCloseChooseIconWnd, "Py", "OnCloseChooseIconWnd", "desc", 1, 1) ChooseIconWndClass()
def PyExec(): global MACROEDITOR MACROEDITOR = MacroEditor() TGEExport(MACROEDITOR.OnMacroChooseIcon, "Py", "OnMacroChooseIcon", "desc", 1, 1) TGEExport(MACROEDITOR.saveMacro, "Py", "OnCustomMacroSave", "desc", 1, 1) TGEExport(MACROEDITOR.clearMacro, "Py", "OnCustomMacroClear", "desc", 1, 1) TGEExport(MACROEDITOR.copyMacro, "Py", "OnCustomMacroCopy", "desc", 1, 1) TGEExport(MACROEDITOR.pasteMacro, "Py", "OnCustomMacroPaste", "desc", 1, 1) TGEExport(MACROEDITOR.OnCustomMacroLine, "Py", "OnCustomMacroLine", "desc", 2, 2)
def PyExec(): # Instantiate one target description window, we don't need multiple global TGTDESCWND TGTDESCWND = TgtDescWnd() TGEExport(tgtDescWndOnSetMyDesc,"Py","TgtDescWndOnSetMyDesc","desc",1,1)
def PyExec(): TGEExport(OnRegister, "Py", "OnRegister", "desc", 1, 1)
def PyExec(): TGEEval("REALM_FOL_BUTTON.performClick();") TGEExport(OnReallyEnterWorld, "Py", "OnReallyEnterWorld", "desc", 1, 1) TGEExport(OnEnterWorld, "Py", "OnEnterWorld", "desc", 1, 1) TGEExport(OnAddToParty, "Py", "OnAddToParty", "desc", 1, 1) TGEExport(OnRemoveFromParty, "Py", "OnRemoveFromParty", "desc", 1, 1) TGEExport(OnNewCharacter, "Py", "OnNewCharacter", "desc", 1, 1) TGEExport(OnDeleteCharacter, "Py", "OnDeleteCharacter", "desc", 1, 1) TGEExport(OnReallyDeleteCharacter, "Py", "OnReallyDeleteCharacter", "desc", 1, 1) TGEExport(OnRealmFOL, "Py", "OnRealmFOL", "desc", 1, 1) TGEExport(OnRealmMOD, "Py", "OnRealmMOD", "desc", 1, 1) TGEExport(OnRealmMonster, "Py", "OnRealmMonster", "desc", 1, 1) TGEExport(PyOnMakeMonster, "Py", "OnMakeMonster", "desc", 1, 1) TGEExport(OnRenameCharacter, "Py", "OnRenameCharacter", "desc", 1, 1)
def PyExec(): TOMEGUI = TomeGui.instance TOMEGUI.initTGEObjects() TGEExport(TOMEGUI.onGameFontChanged, "Py", "OnGameFontChanged", "desc", 2, 2) TGEExport(TOMEGUI.onChatFontChanged, "Py", "OnChatFontChanged", "desc", 2, 2) TGEExport(TOMEGUI.onChatFontSizeChanged, "Py", "OnChatFontSizeChanged", "desc", 1, 1) TGEExport(TOMEGUI.onGameFontSizeChanged, "Py", "OnGameFontSizeChanged", "desc", 1, 1) TGEExport(TOMEGUI.onGlobalChannelToggle, "Py", "OnGlobalChannelToggle", "desc", 1, 1) TGEExport(TOMEGUI.onWorldChannelToggle, "Py", "OnWorldChannelToggle", "desc", 1, 1) TGEExport(TOMEGUI.onZoneChannelToggle, "Py", "OnZoneChannelToggle", "desc", 1, 1) TGEExport(TOMEGUI.onHelpChannelToggle, "Py", "OnHelpChannelToggle", "desc", 1, 1) TGEExport(TOMEGUI.onOffTopicChannelToggle, "Py", "OnOffTopicChannelToggle", "desc", 1, 1) TGEExport(TOMEGUI.onChatCommand, "Py", "OnChatCommand", "desc", 1, 1) from mud.client.irc import CycleReply TGEExport(CycleReply, "Py", "CycleReply", "desc", 2, 2)
def PyExec(): TGEExport(OnRequestLostPassword, "Py", "OnRequestLostPassword", "desc", 1, 1)
CLIENTCOMMANDS['MAP'] = CmdMap CLIENTCOMMANDS['UNMAP'] = CmdUnmap CLIENTCOMMANDS['STOPMACRO'] = CmdStopMacro CLIENTCOMMANDS['STOPMACROS'] = CmdStopMacros CLIENTCOMMANDS['CRAFT'] = CmdCraft CLIENTCOMMANDS['USEITEM'] = CmdUseItem CLIENTCOMMANDS['POISON'] = CmdPoison CLIENTCOMMANDS['CAMP'] = CmdCamp def DoClientCommand(cmd, indexHack=None): cmd = cmd[1] args = cmd.split(" ") cmd = args[0][1:].upper() if cmd == 'CLIENT' and len(args) > 1: args = args[1:] cmd = args[0].upper() try: CLIENTCOMMANDS[cmd](args[1:], indexHack) return True except KeyError: return False TGEExport(DoClientCommand, "Py", "DoClientCommand", "desc", 2, 2)
def PyExec(): global CHARMINIWND CHARMINIWND = CharMiniWnd() TGEExport(PyOnTargetPet, "Py", "OnTargetPet", "desc", 2, 2)
FIRST = True MUSICDEFFERED = None def PySongStopped(): #return global MUSICDEFFERED if MUSICDEFFERED: return MUSICDEFFERED = reactor.callLater(random.randint(30,180),PlayMusic) def PlayTrack(song): fullsong = ' '.join(song) filename = "%s/data/sound/music/%s"%(GAMEROOT,fullsong) eval = r'alxPlay(alxCreateSource(AudioMusic, "%s"));'%filename TGEEval(eval) TGEExport(PySongStopped,"Py","SongStopped","desc",1,1) reactor.callLater(0,PlayMusic)
def PyExec(): global JOURNALWND JOURNALWND = JournalWnd() TGEExport(JOURNALWND.OnJournalTopic,"Py","OnJournalTopic","desc",1,1) TGEExport(JOURNALWND.OnJournalEntry,"Py","OnJournalEntry","desc",1,1) TGEExport(JOURNALWND.OnJournalHideTopic,"Py","OnJournalHideTopic","desc",1,1) TGEExport(JOURNALWND.OnJournalHideEntry,"Py","OnJournalHideEntry","desc",1,1) TGEExport(JOURNALWND.OnJournalReallyClearTopic,"Py","OnJournalReallyClearTopic","desc",1,1) TGEExport(JOURNALWND.OnJournalReallyClearEntry,"Py","OnJournalReallyClearEntry","desc",1,1) TGEExport(JOURNALWND.OnJournalClearTopic,"Py","OnJournalClearTopic","desc",1,1) TGEExport(JOURNALWND.OnJournalClearEntry,"Py","OnJournalClearEntry","desc",1,1) TGEExport(JOURNALWND.OnJournalShowHidden,"Py","OnJournalShowHidden","desc",1,1) TGEExport(JOURNALWND.OnJournalApplyEntry,"Py","OnJournalApplyEntry","desc",1,1) TGEExport(JOURNALWND.OnJournalEditEntry,"Py","OnJournalEditEntry","desc",1,1)