|
|
@ -449,7 +449,7 @@ bool checkBannerPriv(const string &sheetName, CEntityId eid)
|
|
|
|
// Not a banner
|
|
|
|
// Not a banner
|
|
|
|
return true;
|
|
|
|
return true;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
CPlayer* player = PlayerManager.getPlayer( PlayerManager.getPlayerId(eid) );
|
|
|
|
CPlayer* player = PlayerManager.getPlayer( PlayerManager.getPlayerId(eid) );
|
|
|
|
|
|
|
|
|
|
|
|
if (player == NULL)
|
|
|
|
if (player == NULL)
|
|
|
@ -483,28 +483,28 @@ bool checkBannerPriv(const string &sheetName, CEntityId eid)
|
|
|
|
return true;
|
|
|
|
return true;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
// VG uses SG banner for now
|
|
|
|
// VG uses SG banner for now
|
|
|
|
if (player->havePriv(":VG:"))
|
|
|
|
if (player->havePriv(":VG:"))
|
|
|
|
{
|
|
|
|
{
|
|
|
|
return true;
|
|
|
|
return true;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
else if (sheetName.find("_vgu") != string::npos)
|
|
|
|
else if (sheetName.find("_vgu") != string::npos)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
if (player->havePriv(":VG:"))
|
|
|
|
if (player->havePriv(":VG:"))
|
|
|
|
{
|
|
|
|
{
|
|
|
|
return true;
|
|
|
|
return true;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
else if (sheetName.find("_gm") != string::npos)
|
|
|
|
else if (sheetName.find("_gm") != string::npos)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
if (player->havePriv(":GM:"))
|
|
|
|
if (player->havePriv(":GM:"))
|
|
|
|
{
|
|
|
|
{
|
|
|
|
return true;
|
|
|
|
return true;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
else if (sheetName.find("_sgm") != string::npos)
|
|
|
|
else if (sheetName.find("_sgm") != string::npos)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
if (player->havePriv(":SGM:"))
|
|
|
|
if (player->havePriv(":SGM:"))
|
|
|
|
{
|
|
|
|
{
|
|
|
|
return true;
|
|
|
|
return true;
|
|
|
|
}
|
|
|
|
}
|
|
|
@ -698,7 +698,7 @@ string getStringFromHash(const string &hash)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
ucstring finaltext;
|
|
|
|
ucstring finaltext;
|
|
|
|
getUCstringFromHash(hash, finaltext);
|
|
|
|
getUCstringFromHash(hash, finaltext);
|
|
|
|
|
|
|
|
|
|
|
|
return finaltext.toUtf8();
|
|
|
|
return finaltext.toUtf8();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
@ -721,7 +721,7 @@ void getUCstringFromHash(const string &hash, ucstring &finaltext)
|
|
|
|
// Unexpected string format
|
|
|
|
// Unexpected string format
|
|
|
|
break;
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
finaltext.push_back((ucchar)ch);
|
|
|
|
finaltext.push_back((ucchar)ch);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
@ -4579,9 +4579,12 @@ NLMISC_COMMAND (connectLangChannel, "Connect to lang channel", "<user id> <lang>
|
|
|
|
|
|
|
|
|
|
|
|
string action;
|
|
|
|
string action;
|
|
|
|
string lang = args[1];
|
|
|
|
string lang = args[1];
|
|
|
|
if (lang != "en" && lang != "fr" && lang != "de" && lang != "ru" && lang != "es" && lang != "rf")
|
|
|
|
if (lang != "en" && lang != "fr" && lang != "de" && lang != "ru" && lang != "es" && lang != "rf"
|
|
|
|
|
|
|
|
&& lang != "rf-en" && lang != "rf-fr" && lang != "rf-de" && lang != "rf-ru" && lang != "rf-es")
|
|
|
|
return false;
|
|
|
|
return false;
|
|
|
|
bool leave = false;
|
|
|
|
|
|
|
|
|
|
|
|
bool leave = !c->havePriv(":DEV:"); // Since June 2020, no any lang channels, players only can leave it
|
|
|
|
|
|
|
|
|
|
|
|
if (args.size() > 2)
|
|
|
|
if (args.size() > 2)
|
|
|
|
leave = args[2] == "1";
|
|
|
|
leave = args[2] == "1";
|
|
|
|
TChanID channel = inst->getFactionDynChannel(lang);
|
|
|
|
TChanID channel = inst->getFactionDynChannel(lang);
|
|
|
@ -4613,7 +4616,7 @@ NLMISC_COMMAND (connectLangChannel, "Connect to lang channel", "<user id> <lang>
|
|
|
|
|
|
|
|
|
|
|
|
NLMISC_COMMAND (setDontTranslateLangs, "Set langs that a player dont want to see translated", "<user id> <langs>")
|
|
|
|
NLMISC_COMMAND (setDontTranslateLangs, "Set langs that a player dont want to see translated", "<user id> <langs>")
|
|
|
|
{
|
|
|
|
{
|
|
|
|
if (args.size() != 2)
|
|
|
|
if (args.size() != 2)
|
|
|
|
return false;
|
|
|
|
return false;
|
|
|
|
|
|
|
|
|
|
|
|
GET_CHARACTER
|
|
|
|
GET_CHARACTER
|
|
|
@ -4875,7 +4878,7 @@ NLMISC_COMMAND (webExecCommand, "Execute a web command", "<user id> <web_app_url
|
|
|
|
{
|
|
|
|
{
|
|
|
|
if ( (itemPtr->getSheetId() == sheetId) )
|
|
|
|
if ( (itemPtr->getSheetId() == sheetId) )
|
|
|
|
{
|
|
|
|
{
|
|
|
|
if (itemPtr->quality() == quality)
|
|
|
|
if (itemPtr->quality() == quality)
|
|
|
|
numberEqualItem += itemPtr->getStackSize();
|
|
|
|
numberEqualItem += itemPtr->getStackSize();
|
|
|
|
if (itemPtr->quality() >= quality)
|
|
|
|
if (itemPtr->quality() >= quality)
|
|
|
|
numberItem += itemPtr->getStackSize();
|
|
|
|
numberItem += itemPtr->getStackSize();
|
|
|
@ -5090,7 +5093,7 @@ NLMISC_COMMAND (webExecCommand, "Execute a web command", "<user id> <web_app_url
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
//*************************************************
|
|
|
|
//*************************************************
|
|
|
|
//***************** set_fame (need x6000 to change 1 point)
|
|
|
|
//***************** set_fame (need x6000 to change 1 point)
|
|
|
|
//*************************************************
|
|
|
|
//*************************************************
|
|
|
@ -5114,7 +5117,7 @@ NLMISC_COMMAND (webExecCommand, "Execute a web command", "<user id> <web_app_url
|
|
|
|
else if (command_args[2] == "del")
|
|
|
|
else if (command_args[2] == "del")
|
|
|
|
{
|
|
|
|
{
|
|
|
|
CFameManager::getInstance().setEntityFame(c->getId(), factionIndex, fame-value, false);
|
|
|
|
CFameManager::getInstance().setEntityFame(c->getId(), factionIndex, fame-value, false);
|
|
|
|
nlinfo("fame : %d => %d", fame, fame-value);
|
|
|
|
nlinfo("fame : %d => %d", fame, fame-value);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
else if (command_args[2] == "set")
|
|
|
|
else if (command_args[2] == "set")
|
|
|
|
{
|
|
|
|
{
|
|
|
@ -5133,12 +5136,12 @@ NLMISC_COMMAND (webExecCommand, "Execute a web command", "<user id> <web_app_url
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
//*************************************************
|
|
|
|
//*************************************************
|
|
|
|
//***************** check_target
|
|
|
|
//***************** check_target
|
|
|
|
//*************************************************
|
|
|
|
//*************************************************
|
|
|
|
else if (command_args[0] == "check_target")
|
|
|
|
else if (command_args[0] == "check_target")
|
|
|
|
{
|
|
|
|
{
|
|
|
|
const CEntityId &target = c->getTarget();
|
|
|
|
const CEntityId &target = c->getTarget();
|
|
|
|
|
|
|
|
|
|
|
|
if (command_args.size () < 2) return false;
|
|
|
|
if (command_args.size () < 2) return false;
|
|
|
|
|
|
|
|
|
|
|
|
if (command_args[1] == "leaguemate")
|
|
|
|
if (command_args[1] == "leaguemate")
|
|
|
@ -5189,7 +5192,7 @@ NLMISC_COMMAND (webExecCommand, "Execute a web command", "<user id> <web_app_url
|
|
|
|
return false;
|
|
|
|
return false;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
if (command_args.size () < 3) return false;
|
|
|
|
if (command_args.size () < 3) return false;
|
|
|
|
|
|
|
|
|
|
|
|
if (command_args[1] == "sheet")
|
|
|
|
if (command_args[1] == "sheet")
|
|
|
@ -5251,7 +5254,7 @@ NLMISC_COMMAND (webExecCommand, "Execute a web command", "<user id> <web_app_url
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
//*************************************************
|
|
|
|
//*************************************************
|
|
|
|
//***************** check_brick
|
|
|
|
//***************** check_brick
|
|
|
|
//*************************************************
|
|
|
|
//*************************************************
|
|
|
|
else if (command_args[0] == "check_brick")
|
|
|
|
else if (command_args[0] == "check_brick")
|
|
|
|
{
|
|
|
|
{
|
|
|
@ -5266,7 +5269,7 @@ NLMISC_COMMAND (webExecCommand, "Execute a web command", "<user id> <web_app_url
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
//*************************************************
|
|
|
|
//*************************************************
|
|
|
|
//***************** set_brick
|
|
|
|
//***************** set_brick
|
|
|
|
//*************************************************
|
|
|
|
//*************************************************
|
|
|
|
else if (command_args[0] == "set_brick")
|
|
|
|
else if (command_args[0] == "set_brick")
|
|
|
|
{
|
|
|
|
{
|
|
|
@ -5381,12 +5384,12 @@ NLMISC_COMMAND (webExecCommand, "Execute a web command", "<user id> <web_app_url
|
|
|
|
CSheetId outpostSheet(command_args[1]);
|
|
|
|
CSheetId outpostSheet(command_args[1]);
|
|
|
|
outpost = COutpostManager::getInstance().getOutpostFromSheet(outpostSheet);
|
|
|
|
outpost = COutpostManager::getInstance().getOutpostFromSheet(outpostSheet);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
if (outpost == NULL)
|
|
|
|
if (outpost == NULL)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
return false;
|
|
|
|
return false;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
if ((command_args[2] != "attacker") && (command_args[2] != "defender") && (command_args[2] != "attack") && (command_args[2] != "defend"))
|
|
|
|
if ((command_args[2] != "attacker") && (command_args[2] != "defender") && (command_args[2] != "attack") && (command_args[2] != "defend"))
|
|
|
|
return false;
|
|
|
|
return false;
|
|
|
|
|
|
|
|
|
|
|
@ -5459,7 +5462,7 @@ NLMISC_COMMAND (webExecCommand, "Execute a web command", "<user id> <web_app_url
|
|
|
|
|
|
|
|
|
|
|
|
if (command_args.size() > 7)
|
|
|
|
if (command_args.size() > 7)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
|
|
|
|
|
|
|
|
if (command_args[6] != "*") {
|
|
|
|
if (command_args[6] != "*") {
|
|
|
|
float userX;
|
|
|
|
float userX;
|
|
|
|
NLMISC::fromString(command_args[6], userX);
|
|
|
|
NLMISC::fromString(command_args[6], userX);
|
|
|
@ -5491,7 +5494,7 @@ NLMISC_COMMAND (webExecCommand, "Execute a web command", "<user id> <web_app_url
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
//[[inVillage=0/1][inOutpost=0/1][inStable=0/1][InAtys=0/1]]
|
|
|
|
//[[inVillage=0/1][inOutpost=0/1][inStable=0/1][InAtys=0/1]]
|
|
|
|
std::string validation;
|
|
|
|
std::string validation;
|
|
|
|
if (command_args.size() > 10)
|
|
|
|
if (command_args.size() > 10)
|
|
|
|
{
|
|
|
|
{
|
|
|
@ -5502,7 +5505,7 @@ NLMISC_COMMAND (webExecCommand, "Execute a web command", "<user id> <web_app_url
|
|
|
|
bool inOutpost = validation[1] == '1';
|
|
|
|
bool inOutpost = validation[1] == '1';
|
|
|
|
bool inStable = validation[2] == '1';
|
|
|
|
bool inStable = validation[2] == '1';
|
|
|
|
bool inAtys = validation[3] == '1';
|
|
|
|
bool inAtys = validation[3] == '1';
|
|
|
|
|
|
|
|
|
|
|
|
if (!c->isSpawnValid(inVillage, inOutpost, inStable, inAtys))
|
|
|
|
if (!c->isSpawnValid(inVillage, inOutpost, inStable, inAtys))
|
|
|
|
return false;
|
|
|
|
return false;
|
|
|
|
}
|
|
|
|
}
|
|
|
@ -5543,14 +5546,14 @@ NLMISC_COMMAND (webExecCommand, "Execute a web command", "<user id> <web_app_url
|
|
|
|
//*************************************************
|
|
|
|
//*************************************************
|
|
|
|
//***************** group_script
|
|
|
|
//***************** group_script
|
|
|
|
//*************************************************
|
|
|
|
//*************************************************
|
|
|
|
|
|
|
|
|
|
|
|
else if (command_args[0] == "group_script")
|
|
|
|
else if (command_args[0] == "group_script")
|
|
|
|
{
|
|
|
|
{
|
|
|
|
if (command_args.size () < 3) return false;
|
|
|
|
if (command_args.size () < 3) return false;
|
|
|
|
|
|
|
|
|
|
|
|
uint32 instanceNumber = c->getInstanceNumber();
|
|
|
|
uint32 instanceNumber = c->getInstanceNumber();
|
|
|
|
uint32 nbString = (uint32)command_args.size();
|
|
|
|
uint32 nbString = (uint32)command_args.size();
|
|
|
|
|
|
|
|
|
|
|
|
// See if it needs another AI instance
|
|
|
|
// See if it needs another AI instance
|
|
|
|
string botsName = command_args[1];
|
|
|
|
string botsName = command_args[1];
|
|
|
|
if ( ! getAIInstanceFromGroupName(botsName, instanceNumber))
|
|
|
|
if ( ! getAIInstanceFromGroupName(botsName, instanceNumber))
|
|
|
@ -5645,15 +5648,15 @@ NLMISC_COMMAND (webExecCommand, "Execute a web command", "<user id> <web_app_url
|
|
|
|
//*************************************************
|
|
|
|
//*************************************************
|
|
|
|
//***************** change_vpx
|
|
|
|
//***************** change_vpx
|
|
|
|
//*************************************************
|
|
|
|
//*************************************************
|
|
|
|
|
|
|
|
|
|
|
|
else if (command_args[0] == "change_vpx")
|
|
|
|
else if (command_args[0] == "change_vpx")
|
|
|
|
{
|
|
|
|
{
|
|
|
|
if (command_args.size () != 4) return false;
|
|
|
|
if (command_args.size () != 4) return false;
|
|
|
|
|
|
|
|
|
|
|
|
CCharacter *target = PlayerManager.getCharacterByName(CShardNames::getInstance().makeFullNameFromRelative(c->getHomeMainlandSessionId(), command_args[1]));
|
|
|
|
CCharacter *target = PlayerManager.getCharacterByName(CShardNames::getInstance().makeFullNameFromRelative(c->getHomeMainlandSessionId(), command_args[1]));
|
|
|
|
|
|
|
|
|
|
|
|
string name = command_args[2];
|
|
|
|
string name = command_args[2];
|
|
|
|
|
|
|
|
|
|
|
|
uint32 value;
|
|
|
|
uint32 value;
|
|
|
|
fromString(command_args[3], value);
|
|
|
|
fromString(command_args[3], value);
|
|
|
|
|
|
|
|
|
|
|
@ -5854,12 +5857,12 @@ NLMISC_COMMAND (webExecCommand, "Execute a web command", "<user id> <web_app_url
|
|
|
|
// Checks : PvP Flag, PvP Tag, Sitting, Water, Mount, Fear, Sleep, Invu, Stun
|
|
|
|
// Checks : PvP Flag, PvP Tag, Sitting, Water, Mount, Fear, Sleep, Invu, Stun
|
|
|
|
if (command_args.size () > 3)
|
|
|
|
if (command_args.size () > 3)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
bool pvpFlagValid = (c->getPvPRecentActionFlag() == false || c->getPVPFlag() == false);
|
|
|
|
bool pvpFlagValid = (c->getPvPRecentActionFlag() == false || c->getPVPFlag() == false);
|
|
|
|
if (command_args[3][0] == '1' && !pvpFlagValid) {
|
|
|
|
if (command_args[3][0] == '1' && !pvpFlagValid) {
|
|
|
|
CCharacter::sendDynamicSystemMessage(c->getEntityRowId(), "PVP_TP_FORBIDEN");
|
|
|
|
CCharacter::sendDynamicSystemMessage(c->getEntityRowId(), "PVP_TP_FORBIDEN");
|
|
|
|
return true;
|
|
|
|
return true;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
bool pvpTagValid = c->getPVPFlag() == false;
|
|
|
|
bool pvpTagValid = c->getPVPFlag() == false;
|
|
|
|
if (command_args[3].length() > 1 && command_args[3][1] == '1' && !pvpTagValid)
|
|
|
|
if (command_args[3].length() > 1 && command_args[3][1] == '1' && !pvpTagValid)
|
|
|
|
{
|
|
|
|
{
|
|
|
@ -5884,7 +5887,7 @@ NLMISC_COMMAND (webExecCommand, "Execute a web command", "<user id> <web_app_url
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
string value = command_args[1];
|
|
|
|
string value = command_args[1];
|
|
|
|
|
|
|
|
|
|
|
|
vector<string> res;
|
|
|
|
vector<string> res;
|
|
|
|
sint32 x = 0, y = 0, z = 0;
|
|
|
|
sint32 x = 0, y = 0, z = 0;
|
|
|
|
float h = 0;
|
|
|
|
float h = 0;
|
|
|
@ -6003,7 +6006,7 @@ NLMISC_COMMAND (webExecCommand, "Execute a web command", "<user id> <web_app_url
|
|
|
|
if (allowPetTp)
|
|
|
|
if (allowPetTp)
|
|
|
|
c->allowNearPetTp();
|
|
|
|
c->allowNearPetTp();
|
|
|
|
else
|
|
|
|
else
|
|
|
|
c->forbidNearPetTp();
|
|
|
|
c->forbidNearPetTp();
|
|
|
|
|
|
|
|
|
|
|
|
// Respawn player if dead
|
|
|
|
// Respawn player if dead
|
|
|
|
if (c->isDead())
|
|
|
|
if (c->isDead())
|
|
|
@ -6070,7 +6073,7 @@ NLMISC_COMMAND (webExecCommand, "Execute a web command", "<user id> <web_app_url
|
|
|
|
if (allowPetTp)
|
|
|
|
if (allowPetTp)
|
|
|
|
c->allowNearPetTp();
|
|
|
|
c->allowNearPetTp();
|
|
|
|
else
|
|
|
|
else
|
|
|
|
c->forbidNearPetTp();
|
|
|
|
c->forbidNearPetTp();
|
|
|
|
|
|
|
|
|
|
|
|
IBuildingPhysical * building = CBuildingManager::getInstance()->getBuildingPhysicalsByName(command_args[2]);
|
|
|
|
IBuildingPhysical * building = CBuildingManager::getInstance()->getBuildingPhysicalsByName(command_args[2]);
|
|
|
|
if ( building )
|
|
|
|
if ( building )
|
|
|
@ -6116,7 +6119,7 @@ NLMISC_COMMAND (webExecCommand, "Execute a web command", "<user id> <web_app_url
|
|
|
|
ucstring customName = ucstring(command_args[2]);
|
|
|
|
ucstring customName = ucstring(command_args[2]);
|
|
|
|
c->setAnimalName(petIndex, customName);
|
|
|
|
c->setAnimalName(petIndex, customName);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
//*************************************************
|
|
|
|
//*************************************************
|
|
|
|
//***************** organization
|
|
|
|
//***************** organization
|
|
|
|
//*************************************************
|
|
|
|
//*************************************************
|
|
|
@ -6127,7 +6130,7 @@ NLMISC_COMMAND (webExecCommand, "Execute a web command", "<user id> <web_app_url
|
|
|
|
string action = command_args[1]; // change, add_points, set_status, add_status
|
|
|
|
string action = command_args[1]; // change, add_points, set_status, add_status
|
|
|
|
sint32 value;
|
|
|
|
sint32 value;
|
|
|
|
fromString(command_args[2], value);
|
|
|
|
fromString(command_args[2], value);
|
|
|
|
|
|
|
|
|
|
|
|
if (action == "change" && value >= 0)
|
|
|
|
if (action == "change" && value >= 0)
|
|
|
|
c->setOrganization((uint32)value);
|
|
|
|
c->setOrganization((uint32)value);
|
|
|
|
else if (action == "add_points")
|
|
|
|
else if (action == "add_points")
|
|
|
@ -6137,7 +6140,7 @@ NLMISC_COMMAND (webExecCommand, "Execute a web command", "<user id> <web_app_url
|
|
|
|
else if (action == "add_status")
|
|
|
|
else if (action == "add_status")
|
|
|
|
c->changeOrganizationStatus(value);
|
|
|
|
c->changeOrganizationStatus(value);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
//*************************************************
|
|
|
|
//*************************************************
|
|
|
|
//***************** buildings
|
|
|
|
//***************** buildings
|
|
|
|
// /a webExecCommand debug 1 building!set_player_room!building_instance_ARCC_player_320 hmac 0
|
|
|
|
// /a webExecCommand debug 1 building!set_player_room!building_instance_ARCC_player_320 hmac 0
|
|
|
@ -6147,16 +6150,16 @@ NLMISC_COMMAND (webExecCommand, "Execute a web command", "<user id> <web_app_url
|
|
|
|
if (command_args.size() < 2) return false;
|
|
|
|
if (command_args.size() < 2) return false;
|
|
|
|
|
|
|
|
|
|
|
|
string action = command_args[1]; // trigger_in, trigger_out, add_guild_room, add_player_room
|
|
|
|
string action = command_args[1]; // trigger_in, trigger_out, add_guild_room, add_player_room
|
|
|
|
|
|
|
|
|
|
|
|
if (action == "trigger_in" && command_args.size () == 3)
|
|
|
|
if (action == "trigger_in" && command_args.size () == 3)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
uint32 liftId = atoi(command_args[2].c_str());
|
|
|
|
uint32 liftId = atoi(command_args[2].c_str());
|
|
|
|
CBuildingManager::getInstance()->addTriggerRequest(c->getEntityRowId(), liftId);
|
|
|
|
CBuildingManager::getInstance()->addTriggerRequest(c->getEntityRowId(), liftId);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
else if (action == "trigger_out")
|
|
|
|
else if (action == "trigger_out")
|
|
|
|
{
|
|
|
|
{
|
|
|
|
CBuildingManager::getInstance()->removeTriggerRequest(c->getEntityRowId());
|
|
|
|
CBuildingManager::getInstance()->removeTriggerRequest(c->getEntityRowId());
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
else if (action == "add_guild_room" && command_args.size () == 3)
|
|
|
|
else if (action == "add_guild_room" && command_args.size () == 3)
|
|
|
|
{
|
|
|
|
{
|
|
|
@ -6210,24 +6213,24 @@ NLMISC_COMMAND (webExecCommand, "Execute a web command", "<user id> <web_app_url
|
|
|
|
if (owner)
|
|
|
|
if (owner)
|
|
|
|
owner->addRoomAccessToPlayer(c->getId());
|
|
|
|
owner->addRoomAccessToPlayer(c->getId());
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
//*************************************************
|
|
|
|
//*************************************************
|
|
|
|
//***************** Skill
|
|
|
|
//***************** Skill
|
|
|
|
//*************************************************
|
|
|
|
//*************************************************
|
|
|
|
|
|
|
|
|
|
|
|
else if (command_args[0] == "skill")
|
|
|
|
else if (command_args[0] == "skill")
|
|
|
|
{
|
|
|
|
{
|
|
|
|
if (command_args.size() < 4) return false;
|
|
|
|
if (command_args.size() < 4) return false;
|
|
|
|
|
|
|
|
|
|
|
|
string action = command_args[1]; // check, best, add_xp
|
|
|
|
string action = command_args[1]; // check, best, add_xp
|
|
|
|
|
|
|
|
|
|
|
|
if (action == "check")
|
|
|
|
if (action == "check")
|
|
|
|
{
|
|
|
|
{
|
|
|
|
SKILLS::ESkills skillEnum = SKILLS::toSkill( command_args[2] );
|
|
|
|
SKILLS::ESkills skillEnum = SKILLS::toSkill( command_args[2] );
|
|
|
|
uint32 wantedValue;
|
|
|
|
uint32 wantedValue;
|
|
|
|
fromString(command_args[3], wantedValue);
|
|
|
|
fromString(command_args[3], wantedValue);
|
|
|
|
|
|
|
|
|
|
|
|
if (c->getSkillValue(skillEnum) < wantedValue) {
|
|
|
|
if (c->getSkillValue(skillEnum) < wantedValue) {
|
|
|
|
if (send_url)
|
|
|
|
if (send_url)
|
|
|
|
c->sendUrl(web_app_url+"&player_eid="+c->getId().toString()+"&event=failed&desc=no_enough_skill");
|
|
|
|
c->sendUrl(web_app_url+"&player_eid="+c->getId().toString()+"&event=failed&desc=no_enough_skill");
|
|
|
@ -6239,7 +6242,7 @@ NLMISC_COMMAND (webExecCommand, "Execute a web command", "<user id> <web_app_url
|
|
|
|
SKILLS::ESkills skillEnum = SKILLS::toSkill( command_args[2] );
|
|
|
|
SKILLS::ESkills skillEnum = SKILLS::toSkill( command_args[2] );
|
|
|
|
uint32 wantedValue;
|
|
|
|
uint32 wantedValue;
|
|
|
|
fromString(command_args[3], wantedValue);
|
|
|
|
fromString(command_args[3], wantedValue);
|
|
|
|
|
|
|
|
|
|
|
|
if (c->getBestChildSkillValue(skillEnum) < wantedValue) {
|
|
|
|
if (c->getBestChildSkillValue(skillEnum) < wantedValue) {
|
|
|
|
if (send_url)
|
|
|
|
if (send_url)
|
|
|
|
c->sendUrl(web_app_url+"&player_eid="+c->getId().toString()+"&event=failed&desc=no_best_skill");
|
|
|
|
c->sendUrl(web_app_url+"&player_eid="+c->getId().toString()+"&event=failed&desc=no_best_skill");
|
|
|
@ -6253,17 +6256,17 @@ NLMISC_COMMAND (webExecCommand, "Execute a web command", "<user id> <web_app_url
|
|
|
|
c->addXpToSkill(xp, command_args[2]);
|
|
|
|
c->addXpToSkill(xp, command_args[2]);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
//*************************************************
|
|
|
|
//*************************************************
|
|
|
|
//***************** Dead
|
|
|
|
//***************** Dead
|
|
|
|
//*************************************************
|
|
|
|
//*************************************************
|
|
|
|
|
|
|
|
|
|
|
|
else if (command_args[0] == "check_state")
|
|
|
|
else if (command_args[0] == "check_state")
|
|
|
|
{
|
|
|
|
{
|
|
|
|
if (command_args.size() < 3) return false;
|
|
|
|
if (command_args.size() < 3) return false;
|
|
|
|
|
|
|
|
|
|
|
|
string action = command_args[1]; // dead, alive, tag, flag
|
|
|
|
string action = command_args[1]; // dead, alive, tag, flag
|
|
|
|
|
|
|
|
|
|
|
|
if (action == "dead")
|
|
|
|
if (action == "dead")
|
|
|
|
{
|
|
|
|
{
|
|
|
|
if (!c->isDead()) {
|
|
|
|
if (!c->isDead()) {
|
|
|
@ -6297,17 +6300,17 @@ NLMISC_COMMAND (webExecCommand, "Execute a web command", "<user id> <web_app_url
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
//*************************************************
|
|
|
|
//*************************************************
|
|
|
|
//***************** Money
|
|
|
|
//***************** Money
|
|
|
|
//*************************************************
|
|
|
|
//*************************************************
|
|
|
|
|
|
|
|
|
|
|
|
else if (command_args[0] == "money")
|
|
|
|
else if (command_args[0] == "money")
|
|
|
|
{
|
|
|
|
{
|
|
|
|
if (command_args.size() < 3) return false;
|
|
|
|
if (command_args.size() < 3) return false;
|
|
|
|
|
|
|
|
|
|
|
|
string action = command_args[1]; // check, give, spend
|
|
|
|
string action = command_args[1]; // check, give, spend
|
|
|
|
|
|
|
|
|
|
|
|
if (action == "check")
|
|
|
|
if (action == "check")
|
|
|
|
{
|
|
|
|
{
|
|
|
|
uint64 wantedMoney;
|
|
|
|
uint64 wantedMoney;
|
|
|
@ -6339,7 +6342,7 @@ NLMISC_COMMAND (webExecCommand, "Execute a web command", "<user id> <web_app_url
|
|
|
|
else if (command_args[0] == "guild")
|
|
|
|
else if (command_args[0] == "guild")
|
|
|
|
{
|
|
|
|
{
|
|
|
|
if (command_args.size() < 3) return false;
|
|
|
|
if (command_args.size() < 3) return false;
|
|
|
|
|
|
|
|
|
|
|
|
CGuild * guild = CGuildManager::getInstance()->getGuildFromId(c->getGuildId());
|
|
|
|
CGuild * guild = CGuildManager::getInstance()->getGuildFromId(c->getGuildId());
|
|
|
|
if (guild == NULL)
|
|
|
|
if (guild == NULL)
|
|
|
|
{
|
|
|
|
{
|
|
|
@ -6347,9 +6350,9 @@ NLMISC_COMMAND (webExecCommand, "Execute a web command", "<user id> <web_app_url
|
|
|
|
c->sendUrl(web_app_url+"&player_eid="+c->getId().toString()+"&event=failed&desc=no_guild");
|
|
|
|
c->sendUrl(web_app_url+"&player_eid="+c->getId().toString()+"&event=failed&desc=no_guild");
|
|
|
|
return true;
|
|
|
|
return true;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
string action = command_args[1]; // check, give, spend
|
|
|
|
string action = command_args[1]; // check, give, spend
|
|
|
|
|
|
|
|
|
|
|
|
if (action == "check_money")
|
|
|
|
if (action == "check_money")
|
|
|
|
{
|
|
|
|
{
|
|
|
|
uint64 wantedMoney;
|
|
|
|
uint64 wantedMoney;
|
|
|
@ -6392,7 +6395,7 @@ NLMISC_COMMAND (webExecCommand, "Execute a web command", "<user id> <web_app_url
|
|
|
|
return true;
|
|
|
|
return true;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
//*************************************************
|
|
|
|
//*************************************************
|
|
|
@ -6402,9 +6405,9 @@ NLMISC_COMMAND (webExecCommand, "Execute a web command", "<user id> <web_app_url
|
|
|
|
else if (command_args[0] == "reset")
|
|
|
|
else if (command_args[0] == "reset")
|
|
|
|
{
|
|
|
|
{
|
|
|
|
if (command_args.size() < 2) return false;
|
|
|
|
if (command_args.size() < 2) return false;
|
|
|
|
|
|
|
|
|
|
|
|
string action = command_args[1]; // pvp, powers
|
|
|
|
string action = command_args[1]; // pvp, powers
|
|
|
|
|
|
|
|
|
|
|
|
if (action == "pvp")
|
|
|
|
if (action == "pvp")
|
|
|
|
{
|
|
|
|
{
|
|
|
|
c->resetPVPTimers();
|
|
|
|
c->resetPVPTimers();
|
|
|
@ -6422,10 +6425,10 @@ NLMISC_COMMAND (webExecCommand, "Execute a web command", "<user id> <web_app_url
|
|
|
|
else if (command_args[0] == "faction_points")
|
|
|
|
else if (command_args[0] == "faction_points")
|
|
|
|
{
|
|
|
|
{
|
|
|
|
if (command_args.size() < 4) return false;
|
|
|
|
if (command_args.size() < 4) return false;
|
|
|
|
|
|
|
|
|
|
|
|
string action = command_args[1]; // check, set, add, remove
|
|
|
|
string action = command_args[1]; // check, set, add, remove
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
PVP_CLAN::TPVPClan clan = PVP_CLAN::fromString(command_args[2]);
|
|
|
|
PVP_CLAN::TPVPClan clan = PVP_CLAN::fromString(command_args[2]);
|
|
|
|
if ((clan < PVP_CLAN::BeginClans) || (clan > PVP_CLAN::EndClans))
|
|
|
|
if ((clan < PVP_CLAN::BeginClans) || (clan > PVP_CLAN::EndClans))
|
|
|
|
{
|
|
|
|
{
|
|
|
@ -6434,7 +6437,7 @@ NLMISC_COMMAND (webExecCommand, "Execute a web command", "<user id> <web_app_url
|
|
|
|
|
|
|
|
|
|
|
|
uint32 value;
|
|
|
|
uint32 value;
|
|
|
|
fromString(command_args[3], value);
|
|
|
|
fromString(command_args[3], value);
|
|
|
|
|
|
|
|
|
|
|
|
if (action=="check")
|
|
|
|
if (action=="check")
|
|
|
|
{
|
|
|
|
{
|
|
|
|
if (c->getFactionPoint(clan) < value)
|
|
|
|
if (c->getFactionPoint(clan) < value)
|
|
|
@ -6458,7 +6461,7 @@ NLMISC_COMMAND (webExecCommand, "Execute a web command", "<user id> <web_app_url
|
|
|
|
c->setFactionPoint(clan, 0, true);
|
|
|
|
c->setFactionPoint(clan, 0, true);
|
|
|
|
else
|
|
|
|
else
|
|
|
|
c->setFactionPoint(clan, c->getFactionPoint(clan)-value, true);
|
|
|
|
c->setFactionPoint(clan, c->getFactionPoint(clan)-value, true);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
//*************************************************
|
|
|
|
//*************************************************
|
|
|
@ -6500,15 +6503,15 @@ NLMISC_COMMAND (webExecCommand, "Execute a web command", "<user id> <web_app_url
|
|
|
|
//*************************************************
|
|
|
|
//*************************************************
|
|
|
|
//***************** ios
|
|
|
|
//***************** ios
|
|
|
|
//*************************************************
|
|
|
|
//*************************************************
|
|
|
|
|
|
|
|
|
|
|
|
else if (command_args[0] == "ios")
|
|
|
|
else if (command_args[0] == "ios")
|
|
|
|
{
|
|
|
|
{
|
|
|
|
|
|
|
|
|
|
|
|
if (command_args.size() < 4)
|
|
|
|
if (command_args.size() < 4)
|
|
|
|
return false;
|
|
|
|
return false;
|
|
|
|
|
|
|
|
|
|
|
|
string action = command_args[1]; // single_phrase
|
|
|
|
string action = command_args[1]; // single_phrase
|
|
|
|
|
|
|
|
|
|
|
|
if (action == "single_phrase")
|
|
|
|
if (action == "single_phrase")
|
|
|
|
{
|
|
|
|
{
|
|
|
|
string phraseName = command_args[2];
|
|
|
|
string phraseName = command_args[2];
|
|
|
@ -6518,7 +6521,7 @@ NLMISC_COMMAND (webExecCommand, "Execute a web command", "<user id> <web_app_url
|
|
|
|
phraseContent += "(){[";
|
|
|
|
phraseContent += "(){[";
|
|
|
|
phraseContent += phraseText;
|
|
|
|
phraseContent += phraseText;
|
|
|
|
phraseContent += "]}";
|
|
|
|
phraseContent += "]}";
|
|
|
|
|
|
|
|
|
|
|
|
string msgname = "SET_PHRASE";
|
|
|
|
string msgname = "SET_PHRASE";
|
|
|
|
bool withLang = false;
|
|
|
|
bool withLang = false;
|
|
|
|
string lang = "";
|
|
|
|
string lang = "";
|
|
|
@ -6545,10 +6548,10 @@ NLMISC_COMMAND (webExecCommand, "Execute a web command", "<user id> <web_app_url
|
|
|
|
//*************************************************
|
|
|
|
//*************************************************
|
|
|
|
//***************** sendurl
|
|
|
|
//***************** sendurl
|
|
|
|
//*************************************************
|
|
|
|
//*************************************************
|
|
|
|
|
|
|
|
|
|
|
|
else if (command_args[0] == "sendurl")
|
|
|
|
else if (command_args[0] == "sendurl")
|
|
|
|
{
|
|
|
|
{
|
|
|
|
|
|
|
|
|
|
|
|
if (command_args.size() != 4)
|
|
|
|
if (command_args.size() != 4)
|
|
|
|
return false;
|
|
|
|
return false;
|
|
|
|
|
|
|
|
|
|
|
@ -6556,7 +6559,7 @@ NLMISC_COMMAND (webExecCommand, "Execute a web command", "<user id> <web_app_url
|
|
|
|
string app = command_args[2]; // app
|
|
|
|
string app = command_args[2]; // app
|
|
|
|
string params = command_args[3]; // params
|
|
|
|
string params = command_args[3]; // params
|
|
|
|
CCharacter *destPlayer;
|
|
|
|
CCharacter *destPlayer;
|
|
|
|
|
|
|
|
|
|
|
|
if (player != "_target_") {
|
|
|
|
if (player != "_target_") {
|
|
|
|
CEntityBase *entityBase = PlayerManager.getCharacterByName(CShardNames::getInstance().makeFullNameFromRelative(c->getHomeMainlandSessionId(), player));
|
|
|
|
CEntityBase *entityBase = PlayerManager.getCharacterByName(CShardNames::getInstance().makeFullNameFromRelative(c->getHomeMainlandSessionId(), player));
|
|
|
|
destPlayer = dynamic_cast<CCharacter*>(CEntityBaseManager::getEntityBasePtr(entityBase->getId()));
|
|
|
|
destPlayer = dynamic_cast<CCharacter*>(CEntityBaseManager::getEntityBasePtr(entityBase->getId()));
|
|
|
@ -6573,10 +6576,10 @@ NLMISC_COMMAND (webExecCommand, "Execute a web command", "<user id> <web_app_url
|
|
|
|
//***************** dt_bot
|
|
|
|
//***************** dt_bot
|
|
|
|
// /a webExecCommand debug 1 dt_bot!bejc hmac 0
|
|
|
|
// /a webExecCommand debug 1 dt_bot!bejc hmac 0
|
|
|
|
//*************************************************
|
|
|
|
//*************************************************
|
|
|
|
|
|
|
|
|
|
|
|
/* else if (command_args[0] == "dt_bot")
|
|
|
|
/* else if (command_args[0] == "dt_bot")
|
|
|
|
{
|
|
|
|
{
|
|
|
|
|
|
|
|
|
|
|
|
if (command_args.size() != 2)
|
|
|
|
if (command_args.size() != 2)
|
|
|
|
return false;
|
|
|
|
return false;
|
|
|
|
|
|
|
|
|
|
|
@ -6612,7 +6615,7 @@ NLMISC_COMMAND (webExecCommand, "Execute a web command", "<user id> <web_app_url
|
|
|
|
nlwarning ("'%s' has no eId. Is it Spawned???", botname.c_str());
|
|
|
|
nlwarning ("'%s' has no eId. Is it Spawned???", botname.c_str());
|
|
|
|
return true;
|
|
|
|
return true;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
}*/
|
|
|
|
}*/
|
|
|
|
|
|
|
|
|
|
|
|
//*************************************************
|
|
|
|
//*************************************************
|
|
|
@ -6709,7 +6712,7 @@ NLMISC_COMMAND (webExecCommand, "Execute a web command", "<user id> <web_app_url
|
|
|
|
{
|
|
|
|
{
|
|
|
|
uint32 nbString = (uint32)command_args.size();
|
|
|
|
uint32 nbString = (uint32)command_args.size();
|
|
|
|
string text = getStringFromHash(command_args[3]);
|
|
|
|
string text = getStringFromHash(command_args[3]);
|
|
|
|
|
|
|
|
|
|
|
|
for (uint32 i=4; i<nbString; ++i)
|
|
|
|
for (uint32 i=4; i<nbString; ++i)
|
|
|
|
text += "\n"+getStringFromHash(command_args[i]);
|
|
|
|
text += "\n"+getStringFromHash(command_args[i]);
|
|
|
|
c->setCustomMissionParams(command_args[2], text);
|
|
|
|
c->setCustomMissionParams(command_args[2], text);
|
|
|
@ -7919,7 +7922,7 @@ NLMISC_COMMAND(setFamePlayer, "set the fame value of a player in the given facti
|
|
|
|
|
|
|
|
|
|
|
|
uint32 factionIndex =CStaticFames::getInstance().getFactionIndex(args[1]);
|
|
|
|
uint32 factionIndex =CStaticFames::getInstance().getFactionIndex(args[1]);
|
|
|
|
if (factionIndex == CStaticFames::INVALID_FACTION_INDEX)
|
|
|
|
if (factionIndex == CStaticFames::INVALID_FACTION_INDEX)
|
|
|
|
return false;
|
|
|
|
return false;
|
|
|
|
|
|
|
|
|
|
|
|
sint32 fame;
|
|
|
|
sint32 fame;
|
|
|
|
NLMISC::fromString(args[2], fame);
|
|
|
|
NLMISC::fromString(args[2], fame);
|
|
|
@ -7961,7 +7964,7 @@ NLMISC_COMMAND(setOrganization, "set the organization of a player to the given f
|
|
|
|
|
|
|
|
|
|
|
|
uint32 factionIndex = CStaticFames::getInstance().getFactionIndex(args[1]);
|
|
|
|
uint32 factionIndex = CStaticFames::getInstance().getFactionIndex(args[1]);
|
|
|
|
if (factionIndex == CStaticFames::INVALID_FACTION_INDEX)
|
|
|
|
if (factionIndex == CStaticFames::INVALID_FACTION_INDEX)
|
|
|
|
return false;
|
|
|
|
return false;
|
|
|
|
|
|
|
|
|
|
|
|
c->setOrganization(factionIndex);
|
|
|
|
c->setOrganization(factionIndex);
|
|
|
|
|
|
|
|
|
|
|
@ -8168,7 +8171,7 @@ NLMISC_COMMAND(eScript, "executes a script on an event npc group", "<player eid>
|
|
|
|
uint32 instanceNumber = c->getInstanceNumber();
|
|
|
|
uint32 instanceNumber = c->getInstanceNumber();
|
|
|
|
|
|
|
|
|
|
|
|
uint32 nbString = (uint32)args.size();
|
|
|
|
uint32 nbString = (uint32)args.size();
|
|
|
|
|
|
|
|
|
|
|
|
string botsName = args[1];
|
|
|
|
string botsName = args[1];
|
|
|
|
if ( ! getAIInstanceFromGroupName(botsName, instanceNumber))
|
|
|
|
if ( ! getAIInstanceFromGroupName(botsName, instanceNumber))
|
|
|
|
{
|
|
|
|
{
|
|
|
@ -8506,7 +8509,7 @@ NLMISC_COMMAND(eventSpawnToxic, "Spawn a toxic cloud", "<player eid> <posXm> <po
|
|
|
|
return false;
|
|
|
|
return false;
|
|
|
|
|
|
|
|
|
|
|
|
GET_CHARACTER
|
|
|
|
GET_CHARACTER
|
|
|
|
|
|
|
|
|
|
|
|
float x = (float)c->getX();
|
|
|
|
float x = (float)c->getX();
|
|
|
|
float y = (float)c->getY();
|
|
|
|
float y = (float)c->getY();
|
|
|
|
|
|
|
|
|
|
|
@ -8538,7 +8541,7 @@ NLMISC_COMMAND(eventSpawnToxic, "Spawn a toxic cloud", "<player eid> <posXm> <po
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
CToxicCloud *tc = new CToxicCloud();
|
|
|
|
CToxicCloud *tc = new CToxicCloud();
|
|
|
|
float radius = (float)(iRadius*2 + 1); // {1, 3, 5} corresponding to the 3 sheets
|
|
|
|
float radius = (float)(iRadius*2 + 1); // {1, 3, 5} corresponding to the 3 sheets
|
|
|
|
tc->init( cloudPos, radius, dmgPerHit, updateFrequency, lifetime );
|
|
|
|
tc->init( cloudPos, radius, dmgPerHit, updateFrequency, lifetime );
|
|
|
@ -8572,9 +8575,9 @@ NLMISC_COMMAND(eventSpawnDamageLine, "Spawn a damage line", "<player eid> <name>
|
|
|
|
string dammage = "";
|
|
|
|
string dammage = "";
|
|
|
|
if (args.size() > 3 )
|
|
|
|
if (args.size() > 3 )
|
|
|
|
dammage = args[3];
|
|
|
|
dammage = args[3];
|
|
|
|
|
|
|
|
|
|
|
|
CZoneManager::getInstance().parseGooBorder( args[1], path, dammage );
|
|
|
|
CZoneManager::getInstance().parseGooBorder( args[1], path, dammage );
|
|
|
|
|
|
|
|
|
|
|
|
return true;
|
|
|
|
return true;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
@ -8946,17 +8949,17 @@ NLMISC_COMMAND(leagueKick, "kick a player character from league", "<eid> <member
|
|
|
|
|
|
|
|
|
|
|
|
// Kick
|
|
|
|
// Kick
|
|
|
|
user->setAfkState(false);
|
|
|
|
user->setAfkState(false);
|
|
|
|
|
|
|
|
|
|
|
|
CTeam * team = TeamManager.getTeam( user->getTeamId() );
|
|
|
|
CTeam * team = TeamManager.getTeam( user->getTeamId() );
|
|
|
|
if (!team)
|
|
|
|
if (!team)
|
|
|
|
return true;
|
|
|
|
return true;
|
|
|
|
|
|
|
|
|
|
|
|
if (team->getLeader() != eId )
|
|
|
|
if (team->getLeader() != eId )
|
|
|
|
return true;
|
|
|
|
return true;
|
|
|
|
|
|
|
|
|
|
|
|
if (user->getLeagueId() != invitedCharacter->getLeagueId())
|
|
|
|
if (user->getLeagueId() != invitedCharacter->getLeagueId())
|
|
|
|
return true;
|
|
|
|
return true;
|
|
|
|
|
|
|
|
|
|
|
|
team = TeamManager.getTeam( invitedCharacter->getTeamId() );
|
|
|
|
team = TeamManager.getTeam( invitedCharacter->getTeamId() );
|
|
|
|
if (!team) {
|
|
|
|
if (!team) {
|
|
|
|
invitedCharacter->setLeagueId(DYN_CHAT_INVALID_CHAN);
|
|
|
|
invitedCharacter->setLeagueId(DYN_CHAT_INVALID_CHAN);
|
|
|
@ -8964,7 +8967,7 @@ NLMISC_COMMAND(leagueKick, "kick a player character from league", "<eid> <member
|
|
|
|
team->setLeagueId(DYN_CHAT_INVALID_CHAN);
|
|
|
|
team->setLeagueId(DYN_CHAT_INVALID_CHAN);
|
|
|
|
team->updateLeague();
|
|
|
|
team->updateLeague();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
return true;
|
|
|
|
return true;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
@ -9058,7 +9061,7 @@ NLMISC_COMMAND(openTargetApp, "open target app", "<user_id>")
|
|
|
|
|
|
|
|
|
|
|
|
//----------------------------------------------------------------------------
|
|
|
|
//----------------------------------------------------------------------------
|
|
|
|
// (ulukyn) Very special case to use with ARK.
|
|
|
|
// (ulukyn) Very special case to use with ARK.
|
|
|
|
// !!! Never let user call openTargetUrl with a custom url or player
|
|
|
|
// !!! Never let user call openTargetUrl with a custom url or player
|
|
|
|
// will able to sign any url with server salt.
|
|
|
|
// will able to sign any url with server salt.
|
|
|
|
// It's why the url are hardcoded here
|
|
|
|
// It's why the url are hardcoded here
|
|
|
|
NLMISC_COMMAND(openTargetUrl, "Open target url", "<user_id> [bullying]")
|
|
|
|
NLMISC_COMMAND(openTargetUrl, "Open target url", "<user_id> [bullying]")
|
|
|
@ -9264,8 +9267,8 @@ NLMISC_COMMAND(characterInventoryDump, "Dump character inventory info", "<eid> <
|
|
|
|
string sheet = itemPtr->getSheetId().toString();
|
|
|
|
string sheet = itemPtr->getSheetId().toString();
|
|
|
|
uint32 quality = itemPtr->quality();
|
|
|
|
uint32 quality = itemPtr->quality();
|
|
|
|
uint32 stacksize = itemPtr->getStackSize();
|
|
|
|
uint32 stacksize = itemPtr->getStackSize();
|
|
|
|
|
|
|
|
|
|
|
|
msg += NLMISC::toString("- Slot %3d: SHEETID: %s QUALITY: %d QUANTITY: %d\n",
|
|
|
|
msg += NLMISC::toString("- Slot %3d: SHEETID: %s QUALITY: %d QUANTITY: %d\n",
|
|
|
|
i,
|
|
|
|
i,
|
|
|
|
sheet.c_str(),
|
|
|
|
sheet.c_str(),
|
|
|
|
quality,
|
|
|
|
quality,
|
|
|
@ -9273,7 +9276,7 @@ NLMISC_COMMAND(characterInventoryDump, "Dump character inventory info", "<eid> <
|
|
|
|
|
|
|
|
|
|
|
|
++j;
|
|
|
|
++j;
|
|
|
|
if ( ! (j % 3)) {
|
|
|
|
if ( ! (j % 3)) {
|
|
|
|
log.displayNL(msg.c_str());
|
|
|
|
log.displayNL(msg.c_str());
|
|
|
|
msg = "";
|
|
|
|
msg = "";
|
|
|
|
j = 0;
|
|
|
|
j = 0;
|
|
|
|
}
|
|
|
|
}
|
|
|
@ -9340,7 +9343,7 @@ NLMISC_COMMAND(deleteInventoryItem, "Delete an item from a characters inventory"
|
|
|
|
itemPtr->quality() == quality &&
|
|
|
|
itemPtr->quality() == quality &&
|
|
|
|
itemPtr->getStackSize() >= quantity)
|
|
|
|
itemPtr->getStackSize() >= quantity)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
log.displayNL("Deleted item '%s' in slot %d of inventory '%s'",
|
|
|
|
log.displayNL("Deleted item '%s' in slot %d of inventory '%s'",
|
|
|
|
itemPtr->getSheetId().toString().c_str(),
|
|
|
|
itemPtr->getSheetId().toString().c_str(),
|
|
|
|
slot,
|
|
|
|
slot,
|
|
|
|
INVENTORIES::toString(inventory->getInventoryId()).c_str()
|
|
|
|
INVENTORIES::toString(inventory->getInventoryId()).c_str()
|
|
|
@ -9454,7 +9457,7 @@ NLMISC_COMMAND (setLeague, "Set the League of the team", "<user id> [<name>]")
|
|
|
|
CCharacter::sendDynamicSystemMessage( c->getId(),"LEAGUE_INVITOR_NOT_LEADER" );
|
|
|
|
CCharacter::sendDynamicSystemMessage( c->getId(),"LEAGUE_INVITOR_NOT_LEADER" );
|
|
|
|
return true;
|
|
|
|
return true;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
if (team->getLeader() != c->getId())
|
|
|
|
if (team->getLeader() != c->getId())
|
|
|
|
{
|
|
|
|
{
|
|
|
|
CCharacter::sendDynamicSystemMessage( c->getId(),"LEAGUE_INVITOR_NOT_LEADER" );
|
|
|
|
CCharacter::sendDynamicSystemMessage( c->getId(),"LEAGUE_INVITOR_NOT_LEADER" );
|
|
|
@ -9472,10 +9475,10 @@ NLMISC_COMMAND (setLeague, "Set the League of the team", "<user id> [<name>]")
|
|
|
|
NLMISC_COMMAND(eventGiveControl, "Give control of entity A to entity B", "<eid> <master eid> <slave eid>")
|
|
|
|
NLMISC_COMMAND(eventGiveControl, "Give control of entity A to entity B", "<eid> <master eid> <slave eid>")
|
|
|
|
{
|
|
|
|
{
|
|
|
|
if (args.size() != 3) return false;
|
|
|
|
if (args.size() != 3) return false;
|
|
|
|
|
|
|
|
|
|
|
|
CEntityId masterEid(args[1]);
|
|
|
|
CEntityId masterEid(args[1]);
|
|
|
|
CEntityId slaveEid(args[2]);
|
|
|
|
CEntityId slaveEid(args[2]);
|
|
|
|
|
|
|
|
|
|
|
|
nlinfo("%s takes control of %s", args[1].c_str(), args[2].c_str());
|
|
|
|
nlinfo("%s takes control of %s", args[1].c_str(), args[2].c_str());
|
|
|
|
|
|
|
|
|
|
|
|
CMessage msgout("ACQUIRE_CONTROL");
|
|
|
|
CMessage msgout("ACQUIRE_CONTROL");
|
|
|
@ -9494,9 +9497,9 @@ NLMISC_COMMAND(eventGiveControl, "Give control of entity A to entity B", "<eid>
|
|
|
|
NLMISC_COMMAND(eventLeaveControl, "Leave control of entity", "<eid> <master eid>")
|
|
|
|
NLMISC_COMMAND(eventLeaveControl, "Leave control of entity", "<eid> <master eid>")
|
|
|
|
{
|
|
|
|
{
|
|
|
|
if (args.size() != 2) return false;
|
|
|
|
if (args.size() != 2) return false;
|
|
|
|
|
|
|
|
|
|
|
|
CEntityId masterEid(args[1]);
|
|
|
|
CEntityId masterEid(args[1]);
|
|
|
|
|
|
|
|
|
|
|
|
nlinfo("%s leaves control", args[1].c_str());
|
|
|
|
nlinfo("%s leaves control", args[1].c_str());
|
|
|
|
|
|
|
|
|
|
|
|
CMessage msgout("LEAVE_CONTROL");
|
|
|
|
CMessage msgout("LEAVE_CONTROL");
|
|
|
@ -9521,7 +9524,7 @@ NLMISC_COMMAND(setSimplePhrase, "Set an IOS phrase", "<id> <phrase> [<language c
|
|
|
|
string msgname = "SET_PHRASE";
|
|
|
|
string msgname = "SET_PHRASE";
|
|
|
|
bool withLang = false;
|
|
|
|
bool withLang = false;
|
|
|
|
string lang = "";
|
|
|
|
string lang = "";
|
|
|
|
if (args.size() == 3)
|
|
|
|
if (args.size() == 3)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
lang = args[2];
|
|
|
|
lang = args[2];
|
|
|
|
if (lang != "all")
|
|
|
|
if (lang != "all")
|
|
|
|