Proponuje exhauscik + limit i rozjebke askary
Miałeś złe info, już wyjaśniliśmy sobie z ethanem, zapytaj.
Proponuje exhauscik + limit i rozjebke askary
fixo ?
XML/groups.xml maxVips=20
<?xml version="1.0" encoding="UTF-8"?>
<groups>
<group id="1" name="Player" maxVips="35"/>
<group id="2" name="Tutor" flags="16809984" customFlags="2" access="1"/>
<group id="3" name="Senior Tutor" flags="68736352256" customFlags="14" access="2" maxVips="200"/>
<group id="4" name="Gamemaster" flags="3808558964575" customFlags="257215" access="3" depotLimit="3000" maxVips="300" outfit="75"/>
<group id="5" name="Community Manager" flags="3840774348794" customFlags="781823" access="4" depotLimit="4000" maxVips="400" outfit="266"/>
<group id="6" name="God" flags="3845069447162" customFlags="50331647" access="5" depotLimit="5000" maxVips="500" outfit="302"/>
</groups>
Podziała, ale zauważ, że gdy robisz OTS na te 800 osób to liderzy pragną mieć swych 40-60 wrogów na VIP liście, dlatego polecam exhausted.
Na OpenTibię typu EVO(100 os.) - Fixo:
XML:<?xml version="1.0" encoding="UTF-8"?> <groups> <group id="1" name="Player" maxVips="35"/> <group id="2" name="Tutor" flags="16809984" customFlags="2" access="1"/> <group id="3" name="Senior Tutor" flags="68736352256" customFlags="14" access="2" maxVips="200"/> <group id="4" name="Gamemaster" flags="3808558964575" customFlags="257215" access="3" depotLimit="3000" maxVips="300" outfit="75"/> <group id="5" name="Community Manager" flags="3840774348794" customFlags="781823" access="4" depotLimit="4000" maxVips="400" outfit="266"/> <group id="6" name="God" flags="3845069447162" customFlags="50331647" access="5" depotLimit="5000" maxVips="500" outfit="302"/> </groups>
Osobiscie na serwerze mam zabezpieczone w pewny dobry sposob wszelkie spamowanie czegokolwiek i przyznam ze mimo to mialem takiego jednego crasha (aczkolwiek nie wiem czy nie wystapil podczas chwilowego wylaczenia tego). W kazdym badz razie inwob wchodzil do mnie na serwer i probowal to robic i odziwo 'jakies limity masz' takze to moze byc sposob na przylagowanie serwera.
Niestety nie likwiduje to crashbuga który serwera nie laguje a natychmiast go wywala w kosmos bez gdb.
Dodam ze tak samo jak sie je dodaje tak samo mozna je skasowac i dodac na nowo.
Miałeś złe info, już wyjaśniliśmy sobie z ethanem, zapytaj.
pytanie o funkcje do elfbota dodawajac do vipa, bo sobie wyprintowalem sporo rzeczy w src, zna ktos?
-- VIP list
separateVipListPerCharacter = false
vipListDefaultLimit = 20
vipListDefaultPremiumLimit = 100
bool Game::playerRequestAddVip(uint32_t playerId, const std::string& vipName)
{
Player* player = getPlayerByID(playerId);
if(!player || player->isRemoved())
return false;
uint32_t guid;
bool specialVip;
std::string name = vipName;
if(Condition* condition = Condition::createCondition(CONDITIONID_DEFAULT, CONDITION_EXHAUST, 3000, 0, false, 1))
{
player->addCondition(condition);
player->sendTextMessage(MSG_STATUS_SMALL, "Please wait few seconds before adding new player to your vip list.");
return false;
}
if(!IOLoginData::getInstance()->getGuidByNameEx(guid, specialVip, name))
{
player->sendTextMessage(MSG_STATUS_SMALL, "A player with that name does not exist.");
return false;
}
if(specialVip && !player->hasFlag(PlayerFlag_SpecialVIP))
{
player->sendTextMessage(MSG_STATUS_SMALL, "You cannot add this player.");
return false;
}
bool online = false;
if(Player* target = getPlayerByName(name))
online = player->canSeeCreature(target);
return player->addVIP(guid, name, online);
}
bool Game::playerRequestRemoveVip(uint32_t playerId, uint32_t guid)
{
Player* player = getPlayerByID(playerId);
if(!player || player->isRemoved())
return false;
if(Condition* condition = Condition::createCondition(CONDITIONID_DEFAULT, CONDITION_EXHAUST, 3000, 0, false, 1))
{
player->addCondition(condition);
player->sendTextMessage(MSG_STATUS_SMALL, "Please wait few seconds before deleting next player from your vip list.");
return false;
}
player->removeVIP(guid);
return true;
}
SELECT `id`, `name` FROM `players` WHERE `name` = '??z&z?@??x?\0[B]name[/B]?\0rdx}r\0\0?\0\0\0\0\0\0\0\0\0\ 0\
bool Game::playerRequestAddVip(uint32_t playerId, const std::string& vipName)
{
Player* player = getPlayerByID(playerId);
if(!player || player->isRemoved())
return false;
uint32_t guid;
bool specialVip;
std::string name = vipName;
if(Condition* condition = Condition::createCondition(CONDITIONID_DEFAULT, CONDITION_EXHAUST, 3000, 0, false, 1))
{
player->addCondition(condition);
player->sendTextMessage(MSG_STATUS_SMALL, "Please wait few seconds before adding new player to your vip list.");
return false;
}
if(!IOLoginData::getInstance()->getGuidByNameEx(guid, specialVip, name))
{
player->sendTextMessage(MSG_STATUS_SMALL, "A player with that name does not exist.");
return false;
}
if(specialVip && !player->hasFlag(PlayerFlag_SpecialVIP))
{
player->sendTextMessage(MSG_STATUS_SMALL, "You cannot add this player.");
return false;
}
bool online = false;
if(Player* target = getPlayerByName(name))
online = player->canSeeCreature(target);
return player->addVIP(guid, name, online);
}
bool Game::playerRequestRemoveVip(uint32_t playerId, uint32_t guid)
{
Player* player = getPlayerByID(playerId);
if(Condition* condition = Condition::createCondition(CONDITIONID_DEFAULT, CONDITION_EXHAUST, 3000, 0, false, 1))
{
player->addCondition(condition);
player->sendTextMessage(MSG_STATUS_SMALL, "Please wait few seconds before deleting next player from your vip list.");
return false;
}
if(!player || player->isRemoved())
return false;
player->removeVIP(guid);
return true;
}
Chyba lepsza będzie edycja źródeł mordeczki. Skoro już ogarnęliście tego buga to macie i fix'a:
game.cpp
Nie testowane, ale powinno działać.Code:bool Game::playerRequestAddVip(uint32_t playerId, const std::string& vipName) { Player* player = getPlayerByID(playerId); if(!player || player->isRemoved()) return false; uint32_t guid; bool specialVip; std::string name = vipName; if(Condition* condition = Condition::createCondition(CONDITIONID_DEFAULT, CONDITION_EXHAUST, 3000, 0, false, 1)) { player->addCondition(condition); player->sendTextMessage(MSG_STATUS_SMALL, "Please wait few seconds before adding new player to your vip list."); return false; } if(!IOLoginData::getInstance()->getGuidByNameEx(guid, specialVip, name)) { player->sendTextMessage(MSG_STATUS_SMALL, "A player with that name does not exist."); return false; } if(specialVip && !player->hasFlag(PlayerFlag_SpecialVIP)) { player->sendTextMessage(MSG_STATUS_SMALL, "You cannot add this player."); return false; } bool online = false; if(Player* target = getPlayerByName(name)) online = player->canSeeCreature(target); return player->addVIP(guid, name, online); } bool Game::playerRequestRemoveVip(uint32_t playerId, uint32_t guid) { Player* player = getPlayerByID(playerId); if(!player || player->isRemoved()) return false; if(Condition* condition = Condition::createCondition(CONDITIONID_DEFAULT, CONDITION_EXHAUST, 3000, 0, false, 1)) { player->addCondition(condition); player->sendTextMessage(MSG_STATUS_SMALL, "Please wait few seconds before deleting next player from your vip list."); return false; } player->removeVIP(guid); return true; }