Jump to content

Colored Quest Scrolls - V1


Recommended Posts

  • 2 weeks later...
  • 1 month later...
  • 5 weeks later...
  • Honorable Member

 

For files 40250:

 

interfacemodule:

		# QUEST_LETTER_IMAGE
		##!! 20061026.levites.Äù½ºÆ®_À̹ÌÁö_±³Ã¼
		import item
		if "item"==iconType:
			item.SelectItem(int(iconName))
			buttonImageFileName=item.GetIconImageFileName()
		else:
			buttonImageFileName=iconName

		if localeInfo.IsEUROPE():
			if name[0] == '*':
				btn.SetUpVisual("locale/cz/icon/scroll_close_green.tga")
				btn.SetOverVisual("locale/cz/icon/scroll_open_green.tga")
				btn.SetDownVisual("locale/cz/icon/scroll_open_green.tga")
				name = name[1:]
			elif name[0] == '&':
				btn.SetUpVisual("locale/cz/icon/scroll_close_blue.tga")
				btn.SetOverVisual("locale/cz/icon/scroll_open_blue.tga")
				btn.SetDownVisual("locale/cz/icon/scroll_open_blue.tga")
				name = name[1:]
			else:
				btn.SetUpVisual(localeInfo.GetLetterCloseImageName())
				btn.SetOverVisual(localeInfo.GetLetterOpenImageName())
				btn.SetDownVisual(localeInfo.GetLetterOpenImageName())				
				if "highlight" == iconType:
					btn.SetUpVisual("locale/ymir_ui/highlighted_quest.tga")
					btn.SetOverVisual("locale/ymir_ui/highlighted_quest_r.tga")
					btn.SetDownVisual("locale/ymir_ui/highlighted_quest_r.tga")
				else:
					btn.SetUpVisual(localeInfo.GetLetterCloseImageName())
					btn.SetOverVisual(localeInfo.GetLetterOpenImageName())
					btn.SetDownVisual(localeInfo.GetLetterOpenImageName())				
		else:
			btn.SetUpVisual(buttonImageFileName)
			btn.SetOverVisual(buttonImageFileName)
			btn.SetDownVisual(buttonImageFileName)
			btn.Flash()
		# END_OF_QUEST_LETTER_IMAGE

uicharacter:

		for i in questRange[:questCount]:
			(questName, questIcon, questCounterName, questCounterValue) = quest.GetQuestData(self.questShowingStartIndex+i)
			if questName[0] == '*':
				questName = questName[1:]
			elif questName[0] == '&':
				questName = questName[1:]
			elif questName[0] == '~':
				questName = questName[1:]
			self.questNameList[i].SetText(questName)
			self.questNameList[i].Show()
			self.questLastCountList[i].Show()
			self.questLastTimeList[i].Show()

;-) this work for 100% on 40250..

  • Love 2

plechi-frost-dungeon.gif

Link to comment
Share on other sites

 

 

 

For files 40250:

 

interfacemodule:

		# QUEST_LETTER_IMAGE
		##!! 20061026.levites.Äù½ºÆ®_À̹ÌÁö_±³Ã¼
		import item
		if "item"==iconType:
			item.SelectItem(int(iconName))
			buttonImageFileName=item.GetIconImageFileName()
		else:
			buttonImageFileName=iconName

		if localeInfo.IsEUROPE():
			if name[0] == '*':
				btn.SetUpVisual("locale/cz/icon/scroll_close_green.tga")
				btn.SetOverVisual("locale/cz/icon/scroll_open_green.tga")
				btn.SetDownVisual("locale/cz/icon/scroll_open_green.tga")
				name = name[1:]
			elif name[0] == '&':
				btn.SetUpVisual("locale/cz/icon/scroll_close_blue.tga")
				btn.SetOverVisual("locale/cz/icon/scroll_open_blue.tga")
				btn.SetDownVisual("locale/cz/icon/scroll_open_blue.tga")
				name = name[1:]
			else:
				btn.SetUpVisual(localeInfo.GetLetterCloseImageName())
				btn.SetOverVisual(localeInfo.GetLetterOpenImageName())
				btn.SetDownVisual(localeInfo.GetLetterOpenImageName())				
				if "highlight" == iconType:
					btn.SetUpVisual("locale/ymir_ui/highlighted_quest.tga")
					btn.SetOverVisual("locale/ymir_ui/highlighted_quest_r.tga")
					btn.SetDownVisual("locale/ymir_ui/highlighted_quest_r.tga")
				else:
					btn.SetUpVisual(localeInfo.GetLetterCloseImageName())
					btn.SetOverVisual(localeInfo.GetLetterOpenImageName())
					btn.SetDownVisual(localeInfo.GetLetterOpenImageName())				
		else:
			btn.SetUpVisual(buttonImageFileName)
			btn.SetOverVisual(buttonImageFileName)
			btn.SetDownVisual(buttonImageFileName)
			btn.Flash()
		# END_OF_QUEST_LETTER_IMAGE

uicharacter:

		for i in questRange[:questCount]:
			(questName, questIcon, questCounterName, questCounterValue) = quest.GetQuestData(self.questShowingStartIndex+i)
			if questName[0] == '*':
				questName = questName[1:]
			elif questName[0] == '&':
				questName = questName[1:]
			elif questName[0] == '~':
				questName = questName[1:]
			self.questNameList[i].SetText(questName)
			self.questNameList[i].Show()
			self.questLastCountList[i].Show()
			self.questLastTimeList[i].Show()

;-) this work for 100% on 40250..

 

 

Some is worong, i put how you say and here a result.

 

SS1ge.png

Edited by Metin2 Dev
Core X - External 2 Internal
Link to comment
Share on other sites

  • Honorable Member

No you don't :)

 

If u want for example green Q icon.. you have this:

    if name[0] == '*':
        btn.SetUpVisual("locale/cz/icon/scroll_close_green.tga")
        btn.SetOverVisual("locale/cz/icon/scroll_open_green.tga")
        btn.SetDownVisual("locale/cz/icon/scroll_open_green.tga")

So use in the quest this: send_letter("*Test Quest")

  • Love 1

plechi-frost-dungeon.gif

Link to comment
Share on other sites

No you don't :)

 

If u want for example green Q icon.. you have this:

    if name[0] == '*':
        btn.SetUpVisual("locale/cz/icon/scroll_close_green.tga")
        btn.SetOverVisual("locale/cz/icon/scroll_open_green.tga")
        btn.SetDownVisual("locale/cz/icon/scroll_open_green.tga")

So use in the quest this: send_letter("*Test Quest")

 

Yes, now its work!!! 

Thanks you very much.

 

Mrdhe.jpg

Edited by Metin2 Dev
Core X - External 2 Internal
Link to comment
Share on other sites

  • 1 month later...
  • 1 month later...
  • 2 months later...
  • Premium

I have a small Problem ^-^

When I start the client

 

networkModule.py(line:208) SetSelectCharacterPhase
system.py(line:130) __pack_import
system.py(line:110) _process_result
introSelect.py(line:30) <module>
system.py(line:130) __pack_import
system.py(line:110) _process_result
interfaceModule.py(line:49) <module>
interfaceModule.py(line:1326) Interface

networkModule.SetSelectCharacterPhase - <type 'exceptions.NameError'>:name 'name' is not defined

0603 00:13:08553 :: ============================================================================================================
0603 00:13:08553 :: Abort!!!!

What's wrong? ^-^
Link to comment
Share on other sites

  • Former Staff

Thanks again ... finally i knew what is the problem for 40k files :) and i'll share my code to people

... thanks to denis and shogun and .plechito' (i copyed some of your codes)

uicharacter.py

		for i in questRange[:questCount]:
			(questName, questIcon, questCounterName, questCounterValue) = quest.GetQuestData(self.questShowingStartIndex+i)
			# start colored scrolls
			if questName[0] == '*':
				questName = questName[1:]
			elif questName[0] == '&':
				questName = questName[1:]
			elif questName[0] == '~':
				questName = questName[1:]
			elif questName[0] == '+':
				questName = questName[1:]
			# end colored scrolls
			self.questNameList[i].SetText(questName)
			self.questNameList[i].Show()
			self.questLastCountList[i].Show()
			self.questLastTimeList[i].Show()

interfacemodule.py

		QUESTICON = "%s/ui/questicon/" %(app.GetLocalePath(),)
		
		if name[0] == '*':
			btn.SetUpVisual(QUESTICON + "scroll_close_green.tga")
			btn.SetOverVisual(QUESTICON + "scroll_open_green.tga")
			btn.SetDownVisual(QUESTICON + "scroll_open_green.tga")
			name = name[1:]
		elif name[0] == '&':
			btn.SetUpVisual(QUESTICON + "scroll_close_blue.tga")
			btn.SetOverVisual(QUESTICON + "scroll_open_blue.tga")
			btn.SetDownVisual(QUESTICON + "scroll_open_blue.tga")
			name = name[1:]
		elif name[0] == '~':
			btn.SetUpVisual(QUESTICON + "scroll_close_golden.tga")
			btn.SetOverVisual(QUESTICON + "scroll_open_golden.tga")
			btn.SetDownVisual(QUESTICON + "scroll_open_golden.tga")
			name = name[1:]
		elif name[0] == '+':
			btn.SetUpVisual(QUESTICON + "scroll_close_purple.tga")
			btn.SetOverVisual(QUESTICON + "scroll_open_purple.tga")
			btn.SetDownVisual(QUESTICON + "scroll_open_purple.tga")
			name = name[1:]
		else:
			btn.SetUpVisual(QUESTICON + "scroll_close_red.tga")
			btn.SetOverVisual(QUESTICON + "scroll_open_red.tga")
			btn.SetDownVisual(QUESTICON + "scroll_open_red.tga")

		# END_OF_QUEST_LETTER_IMAGE

just change the this line "QUESTICON = "%s/ui/questicon/" %(app.GetLocalePath(),)"

 

questlib.lua (send_letter function)

function send_letter(name)
	local files = 
	{
		["*"] = "scroll_open_green.tga",
		["~"] = "scroll_open_golden.tga",
		["&"] = "scroll_open_blue.tga",
		["+"] = "scroll_open_purple.tga",
	}
	local chr = string.sub(name,1,1)
	if chr == '*' or chr == '~' or chr == '&' or chr == '+' then
		q.set_icon(files[chr])
	end
	makequestbutton(name) 
	set_skin(NOWINDOW) 
	q.set_title(name) 
	q.start() 
end

ok every thing now must work if you put the .tga file in this folder "d:/ymir work/ui/game/quest/questicon/" .

if you put them in other folder the tut will fail .. open PlayerQuest.cpp in binary source

 

and search for "if (!pQuestInstance->strIconFileName.empty())" in "questGetQuestData"

and change the link to the folder

 

if you want to put them in locale like me change the code to this

	if (!pQuestInstance->strIconFileName.empty())
	{
		std::string strIconFileName (LocaleService_GetLocalePath());
		strIconFileName += "/ui/questicon/";
		strIconFileName += pQuestInstance->strIconFileName.c_str();
		pImage = (CGraphicImage *)CResourceManager::Instance().GetResourcePointer(strIconFileName.c_str());
	}

sorry for my bad english

best regards

 FlyGun :P

  • Love 1
Link to comment
Share on other sites

  • 3 weeks later...
  • 3 weeks later...
  • 1 month later...

Thanks again ... finally i knew what is the problem for 40k files :) and i'll share my code to people

... thanks to denis and shogun and .plechito' (i copyed some of your codes)

uicharacter.py

		for i in questRange[:questCount]:
			(questName, questIcon, questCounterName, questCounterValue) = quest.GetQuestData(self.questShowingStartIndex+i)
			# start colored scrolls
			if questName[0] == '*':
				questName = questName[1:]
			elif questName[0] == '&':
				questName = questName[1:]
			elif questName[0] == '~':
				questName = questName[1:]
			elif questName[0] == '+':
				questName = questName[1:]
			# end colored scrolls
			self.questNameList[i].SetText(questName)
			self.questNameList[i].Show()
			self.questLastCountList[i].Show()
			self.questLastTimeList[i].Show()

interfacemodule.py

		QUESTICON = "%s/ui/questicon/" %(app.GetLocalePath(),)
		
		if name[0] == '*':
			btn.SetUpVisual(QUESTICON + "scroll_close_green.tga")
			btn.SetOverVisual(QUESTICON + "scroll_open_green.tga")
			btn.SetDownVisual(QUESTICON + "scroll_open_green.tga")
			name = name[1:]
		elif name[0] == '&':
			btn.SetUpVisual(QUESTICON + "scroll_close_blue.tga")
			btn.SetOverVisual(QUESTICON + "scroll_open_blue.tga")
			btn.SetDownVisual(QUESTICON + "scroll_open_blue.tga")
			name = name[1:]
		elif name[0] == '~':
			btn.SetUpVisual(QUESTICON + "scroll_close_golden.tga")
			btn.SetOverVisual(QUESTICON + "scroll_open_golden.tga")
			btn.SetDownVisual(QUESTICON + "scroll_open_golden.tga")
			name = name[1:]
		elif name[0] == '+':
			btn.SetUpVisual(QUESTICON + "scroll_close_purple.tga")
			btn.SetOverVisual(QUESTICON + "scroll_open_purple.tga")
			btn.SetDownVisual(QUESTICON + "scroll_open_purple.tga")
			name = name[1:]
		else:
			btn.SetUpVisual(QUESTICON + "scroll_close_red.tga")
			btn.SetOverVisual(QUESTICON + "scroll_open_red.tga")
			btn.SetDownVisual(QUESTICON + "scroll_open_red.tga")

		# END_OF_QUEST_LETTER_IMAGE

just change the this line "QUESTICON = "%s/ui/questicon/" %(app.GetLocalePath(),)"

 

questlib.lua (send_letter function)

function send_letter(name)
	local files = 
	{
		["*"] = "scroll_open_green.tga",
		["~"] = "scroll_open_golden.tga",
		["&"] = "scroll_open_blue.tga",
		["+"] = "scroll_open_purple.tga",
	}
	local chr = string.sub(name,1,1)
	if chr == '*' or chr == '~' or chr == '&' or chr == '+' then
		q.set_icon(files[chr])
	end
	makequestbutton(name) 
	set_skin(NOWINDOW) 
	q.set_title(name) 
	q.start() 
end

ok every thing now must work if you put the .tga file in this folder "d:/ymir work/ui/game/quest/questicon/" .

if you put them in other folder the tut will fail .. open PlayerQuest.cpp in binary source

 

and search for "if (!pQuestInstance->strIconFileName.empty())" in "questGetQuestData"

and change the link to the folder

 

if you want to put them in locale like me change the code to this

	if (!pQuestInstance->strIconFileName.empty())
	{
		std::string strIconFileName (LocaleService_GetLocalePath());
		strIconFileName += "/ui/questicon/";
		strIconFileName += pQuestInstance->strIconFileName.c_str();
		pImage = (CGraphicImage *)CResourceManager::Instance().GetResourcePointer(strIconFileName.c_str());
	}

sorry for my bad english

best regards

 FlyGun :P

I do like this but I have this problem:

https://metin2.download/picture/3bd8HCx86IrXXOLs5q61mT7Tb49TwhPy/.jpg

Edited by Metin2 Dev
Core X - External 2 Internal
Link to comment
Share on other sites

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.