Jump to content

Metin2 İntro Help Me


Recommended Posts

Create intrologo.py and add these things ;

import app
import net
import ui
import snd
import wndMgr
import uiScriptLocale
import localeInfo

# 대부분의 실제 구현은 PythonApplicationLogo.cpp에 있다.

app.SetGuildMarkPath("test")

class LogoWindow(ui.ScriptWindow):

	# 보여 줄 동영상 목록 (배열 순서대로 보여줌)
	videoList = []
	
	def __init__(self, stream):
		print "NEW LOGO WINDOW  ----------------------------------------------------------------------------"
		ui.ScriptWindow.__init__(self)
		net.SetPhaseWindow(net.PHASE_WINDOW_LOGO, self)
		self.stream = stream
		self.playingVideo = 0
		self.bNeedUpdate = TRUE
		self.nextLogoIndex = 0
		
		if (localeInfo.IsEUROPE() or localeInfo.IsARABIC()) and (not localeInfo.IsCHEONMA() and not localeInfo.IsWE_KOREA()):
			self.videoList = ["gf.mpg", "ymir.mpg"]
		else:
			self.videoList = ["ymir.mpg"]

	def __del__(self):
		ui.ScriptWindow.__del__(self)
		net.SetPhaseWindow(net.PHASE_WINDOW_LOGO, 0)
		print "---------------------------------------------------------------------------- DELETE LOGO WINDOW"
		
	def Open(self):
		self.SetSize(wndMgr.GetScreenWidth(), wndMgr.GetScreenHeight())
		self.SetWindowName("SelectLogoWindow")
		self.Show()
		
		self.LoadNextVideo()

		app.ShowCursor()
		print "OPEN LOGO WINDOW  ----------------------------------------------------------------------------"
		
	def Close(self):
		print "---------------------------------------------------------------CLOSE LOGO WINDOW"
		app.OnLogoClose()
		self.KillFocus()
		self.Hide()
		
		app.HideCursor()
		
	# 영상 재생이 불가능한 환경이거나, 파일이 존재하지 않는 경우 introLogin으로 skip.
	def OnUpdate(self):
		if self.bNeedUpdate:
			if self.playingVideo == 0:
				if self.nextLogoIndex < len(self.videoList):
					self.CloseVideo()
					self.LoadNextVideo()
				else:
					self.bNeedUpdate = FALSE
					self.stream.SetLoginPhase()
			else:
				self.playingVideo = app.OnLogoUpdate()
		
		
	def OnRender(self):
		if self.playingVideo:
			app.OnLogoRender()
			
	def LoadNextVideo(self):
		if self.nextLogoIndex < len(self.videoList):
			self.playingVideo = app.OnLogoOpen(self.videoList[self.nextLogoIndex])
			self.nextLogoIndex = self.nextLogoIndex + 1
			
	def CloseVideo(self):
		app.OnLogoClose()
		

Open networkmodule.py and search CreatePopupDialog function after add these under that ;

	def SetLogoPhase(self):
		net.Disconnect()
		
		import introLogo
		self.SetPhaseWindow(introLogo.LogoWindow(self))

Prototype ; 

 

import dbg
import app
import localeInfo
import wndMgr
import systemSetting
import mouseModule
import networkModule
import uiCandidate
import constInfo
import musicInfo
import stringCommander



#bind_me(locals().values())

def RunApp():
	musicInfo.LoadLastPlayFieldMusic()
	
	app.SetHairColorEnable(constInfo.HAIR_COLOR_ENABLE)
	app.SetArmorSpecularEnable(constInfo.ARMOR_SPECULAR_ENABLE)
	app.SetWeaponSpecularEnable(constInfo.WEAPON_SPECULAR_ENABLE)

	app.SetMouseHandler(mouseModule.mouseController)
	wndMgr.SetMouseHandler(mouseModule.mouseController)
	wndMgr.SetScreenSize(systemSetting.GetWidth(), systemSetting.GetHeight())

	try:
		app.Create(localeInfo.APP_TITLE, systemSetting.GetWidth(), systemSetting.GetHeight(), 1)
	except RuntimeError, msg:
		msg = str(msg)
		if "CREATE_DEVICE" == msg:
			dbg.LogBox("Sorry, Your system does not support 3D graphics,rnplease check your hardware and system configerationrnthen try again.")
		else:
			dbg.LogBox("Metin2.%s" % msg)
		return

	app.SetCamera(1500.0, 30.0, 0.0, 180.0)

	#Gets and sets the floating-point control word
	#app.SetControlFP()

	if not mouseModule.mouseController.Create():
		return

	mainStream = networkModule.MainStream()
	mainStream.Create()	
	
	#mainStream.SetLoadingPhase()

	mainStream.SetLogoPhase()
	# mainStream.SetLoginPhase()
	# mainStream.SetSelectCharacterPhase()
	# mainStream.SetCreateCharacterPhase()
	#mainStream.SetSelectEmpirePhase()
	#mainStream.SetGamePhase()
	app.Loop()

	mainStream.Destroy()

RunApp() 

 

You need to some file ;

  • bdvid32.dll : for 32 bit systems.(x86)
  • bdvid64.dll : for 64 bit systems.(x64)

 

Best Regards

Ellie

  • Love 3

Do not be sorry, be better.

Link to comment
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now

Announcements



×
×
  • Create New...

Important Information

Terms of Use / Privacy Policy / Guidelines / We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.