.Incredible™ 8 Posted February 25, 2019 Share Posted February 25, 2019 Hello, is there an ox-event system where it's just random yes or no, and no questions? Link to comment Share on other sites More sharing options...
Premium WeedHex 635 Posted February 25, 2019 Premium Share Posted February 25, 2019 Are you copying from italian server??? Be careful where you copy. Link to comment Share on other sites More sharing options...
.Incredible™ 8 Posted February 25, 2019 Author Share Posted February 25, 2019 No I just want an OX-Event without questions because otherwise you always have to come up with new questions and half of the players already know the questions anyway Link to comment Share on other sites More sharing options...
Premium Syreldar 1875 Posted February 25, 2019 Premium Share Posted February 25, 2019 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 Share on other sites More sharing options...
.Incredible™ 8 Posted February 25, 2019 Author Share Posted February 25, 2019 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 Share on other sites More sharing options...
Premium Syreldar 1875 Posted February 25, 2019 Premium Share Posted February 25, 2019 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. 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 Share on other sites More sharing options...
Premium WeedHex 635 Posted February 25, 2019 Premium Share Posted February 25, 2019 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. 3 Link to comment Share on other sites More sharing options...
Premium tierrilopes 452 Posted February 26, 2019 Premium Share Posted February 26, 2019 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 Share on other sites More sharing options...
Forum Moderator VegaS™ 10267 Posted April 1, 2019 Forum Moderator Share Posted April 1, 2019 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 1 Check my GitHub Profile Click to find all the threads started by me [TOOL] Text file loader + JSON Link to comment Share on other sites More sharing options...
Recommended Posts
Please sign in to comment
You will be able to leave a comment after signing in
Sign In Now