Jump to content

Recommended Posts

  • Honorable Member

Make the questions yourself, regarding your server, and make them hard. It's not hard to do that..

 

What you're asking is to remove the questions from the OX event, which would only make the thing random, that would not be an OX event anymore.

 

"Nothing's free in this life.

Ignorant people have an obligation to make up for their ignorance by paying those who help them.

Either you got the brains or cash, if you lack both you're useless."

Syreldar

Link to comment
https://metin2.dev/topic/20729-ox-event/#findComment-112336
Share on other sites

vor 16 Minuten schrieb Syreldar:

Make the questions yourself, regarding your server, and make them hard. It's not hard to do that..

 

What you're asking is to remove the questions from the OX event, which would only make the thing random, that would not be an OX event anymore. 

Then tell me how you want to handle it differently on an international server? I just want to have random X or O
 
Link to comment
https://metin2.dev/topic/20729-ox-event/#findComment-112337
Share on other sites

  • Honorable Member
2 minutes ago, .Incredible™ said:
Then tell me how you want to handle it differently on an international server? I just want to have random X or O
 

Write the questions in English, we're in 2019. Everybody knows English.. I hope. That's how I would handle it.

If you want to have random OX delete the content of your oxquiz.lua file and only put in there 2 equal questions one being true and one being false..pretty simple.

  • Love 1

 

"Nothing's free in this life.

Ignorant people have an obligation to make up for their ignorance by paying those who help them.

Either you got the brains or cash, if you lack both you're useless."

Syreldar

Link to comment
https://metin2.dev/topic/20729-ox-event/#findComment-112338
Share on other sites

  • Premium

add_ox_quiz(1,"Only god knows!!! Ture or false?",true)
add_ox_quiz(1,"Only god knows!!! Ture or false?",false)
add_ox_quiz(1,"Omg is true or false???!?",false)
add_ox_quiz(1,"Omg is true or false???!?",true)

 

Solved your problem.

  • Love 3
Link to comment
https://metin2.dev/topic/20729-ox-event/#findComment-112339
Share on other sites

  • Premium

 

7 hours ago, .Incredible™ said:
Then tell me how you want to handle it differently on an international server?
 

How i did it:

The questions on the oxquix at serverfiles are in english;

When the client is in a language other then english (i got PT and DE besides english), it uses a file inside the locale (translate_ox.txt) to match the incoming question and display the translated one instead.

 

Example:

Ox selects the following question:

Is the sky blue?

People with the client in english will see:

Is the sky blue?

People with the client in PT will see (client checks the translate file)

O céu é azul?

People with the client in DE will see (client checks the translate file)

Ist der himmel blau?

 

Probably it would be simpler and faster to translate with multiple oxquiz like you do with multilanguage quests, but i did it that way.

 

_____

For the random, you got your answers above already

Link to comment
https://metin2.dev/topic/20729-ox-event/#findComment-112354
Share on other sites

  • 1 month later...
  • Forum Moderator

Try this. (not-tested!)

  • ..Src/Server/common/service.h
#define ENABLE_OXEVENT_STATIC_QUIZ
  • ..Src/Server/game/src/OxEvent.cpp
#ifdef ENABLE_OXEVENT_STATIC_QUIZ
bool COXEventManager::Quiz(unsigned char level, int timelimit)
{
	SendNoticeMap(LC_TEXT("문제 입니다."), OXEVENT_MAP_INDEX, true);
	SendNoticeMap("True or false?", OXEVENT_MAP_INDEX, true);
	SendNoticeMap(LC_TEXT("맞으면 O, 틀리면 X로 이동해주세요"), OXEVENT_MAP_INDEX, true);

	if (m_timedEvent)
		event_cancel(&m_timedEvent);

	OXEventInfoData * pkEventInfo = AllocEventInfo<OXEventInfoData>();
	pkEventInfo->answer = static_cast<bool>(number(0, 1));
	m_timedEvent = event_create(oxevent_timer, pkEventInfo, PASSES_PER_SEC(MINMAX(15, timelimit - 15, 60)));

	SetStatus(OXEVENT_QUIZ);
	return true;
}
#else
bool COXEventManager::Quiz(unsigned char level, int timelimit)
{
	if (m_vec_quiz.size() == 0) return false;
	if (level > m_vec_quiz.size()) level = m_vec_quiz.size() - 1;
	if (m_vec_quiz[level].size() <= 0) return false;

	if (timelimit < 0) timelimit = 30;

	int idx = number(0, m_vec_quiz[level].size()-1);

	SendNoticeMap(LC_TEXT("문제 입니다."), OXEVENT_MAP_INDEX, true);
	SendNoticeMap(m_vec_quiz[level][idx].Quiz, OXEVENT_MAP_INDEX, true);
	SendNoticeMap(LC_TEXT("맞으면 O, 틀리면 X로 이동해주세요"), OXEVENT_MAP_INDEX, true);

	if (m_timedEvent != NULL) {
		event_cancel(&m_timedEvent);
	}

	OXEventInfoData* answer = AllocEventInfo<OXEventInfoData>();
	answer->answer = m_vec_quiz[level][idx].answer;
	timelimit -= 15;
	m_timedEvent = event_create(oxevent_timer, answer, PASSES_PER_SEC(timelimit));

	SetStatus(OXEVENT_QUIZ);
	m_vec_quiz[level].erase(m_vec_quiz[level].begin()+idx);
	return true;
}
#endif

 

  • Love 1
Link to comment
https://metin2.dev/topic/20729-ox-event/#findComment-113568
Share on other sites

Don't use any images from : imgur, turkmmop, freakgamers, inforge, hizliresim... Or your content will be deleted without notice...
Use : https://metin2.download/media/add/

Please use https://metin2.download/ when uploading files smaller than 100MB, otherwise the approval will take longer due to manual upload.

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
×
×
  • 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.