• There is NO official Otland's Discord server and NO official Otland's server list. The Otland's Staff does not manage any Discord server or server list. Moderators or administrator of any Discord server or server lists have NO connection to the Otland's Staff. Do not get scammed!

Level and vocation instead of world name on character login

Account Manager is not added with iteration, your it is not declared. getCheckPlayerLevel is not even the function you want to use.
You might want to use std::stringstream to generate a string while iterating through charList.
 
Account Manager is not added with iteration, your it is not declared. getCheckPlayerLevel is not even the function you want to use.
You might want to use std::stringstream to generate a string while iterating through charList.
but i dont know how to script im just copying and pasting lol can u fix the script for me??
 
No, I can guide you in the right direction, thats all. charList does not hold much informations, you will need to use IOLogindata to get characters level. stringstream example would be following then:
Code:
std::stringstream str;
str << player->getVocation()->getName();
str << " " << player->getLevel();
output->putString(str.str());

player object would be created with ioogindata.
 
No, I can guide you in the right direction, thats all. charList does not hold much informations, you will need to use IOLogindata to get characters level. stringstream example would be following then:
Code:
std::stringstream str;
str << player->getVocation()->getName();
str << " " << player->getLevel();
output->putString(str.str());

player object would be created with ioogindata.
man is hard i dont know that to do :s
 
Remove your line, skip to other for-loop and below output->putString("Offline") replace the else-statement with:
Code:
			else
			{
				std::stringstream str;
				Player *player = g_game.getPlayerByName((*it));
				bool v = false;
				if(!player)
				{
					v = true;
					player = g_game.getPlayerByNameEx((*it));
				}

				str << player->getVocation()->getName();
				str << ", ";
				str << player->getLevel();
				output->putString(str.str());
				if(v)
					delete player;
			}
 
Remove your line, skip to other for-loop and below output->putString("Offline") replace the else-statement with:
Code:
			else
			{
				std::stringstream str;
				Player *player = g_game.getPlayerByName((*it));
				bool v = false;
				if(!player)
				{
					v = true;
					player = g_game.getPlayerByNameEx((*it));
				}

				str << player->getVocation()->getName();
				str << ", ";
				str << player->getLevel();
				output->putString(str.str());
				if(v)
					delete player;
			}

iohhh man u r genius works perfect
 
Back
Top