Hi
I want to make .i u all command to reset an special instance or raid. for example when i type .i u all as a player only restart 5man raids like Forge of souls or pit of saoren.
Hi
I want to make .i u all command to reset an special instance or raid. for example when i type .i u all as a player only restart 5man raids like Forge of souls or pit of saoren.
There already is such command - .instance reset.
I know there is command but i want that command to reset only some dungeons like Forge of souls pit of saoren instead of all raids and dungeons. cause .i u all script restart all instance bounds but i want it to restart some bounds not all.
want kinda custom command.
You should specify the map ID as the command syntax provides, then it won’t reset every bind but only specific ones. That way you can reset specific instances, FoS, PoS or whichever one you’d like.
Ty for replay.
but i want a specific script that doesnt affect on .i u all . for example a player type .i u ress and they pay honor and emblems to restart Fos and Pos.
Restarting any one instance and paying emblems and honor to reset Forge of Souls and Pit of Sauron with “ress” (which I have no idea what stands for) are completely and totally different things. Lay out your request in detail and don’t use shortcuts like “i u ress”, write the full command.
forget about currency that take to reset i know how to put this in script.
i just dont know how to make ““intance unbind all”” to unbind only FoS and Pos instead of all raids an dungeons .
Take a look at this again:
You should specify the map ID as the command syntax provides, then it won’t reset every bind but only specific ones. That way you can reset specific instances, FoS, PoS or whichever one you’d like.
Option 1) Make a command that runs .instance unbind #mapid for each instance you want to reset.Option 2) Look at .instance unbind and just put it in your command except rather than have a dynamic argument, run it twice with each #mapid. example function:
static bool HandleInstanceResetKamka(ChatHandler* handler, char const* /args/)
{
Player* player = handler->getSelectedPlayer();
if (!player)
player = handler->GetSession()->GetPlayer();
int8 diff = -1;
uint8 counter = 0;
uint16 FoSId = forge of souls mapid;
uint16 PoSId = pit of sauron mapid;
if (player->GetMapId() == FoSId || player->GetMapId() == PoSId)
{
handler->SendSysMessage("You may not reset an instance you're already in.");
handler->SetSentErrorMessage(true);
return false;
}
for (uint8 i = 0; i < MAX_DIFFICULTY; ++i)
{
Player::BoundInstancesMap &binds = player->GetBoundInstances(Difficulty(i));
for (Player::BoundInstancesMap::iterator itr = binds.begin(); itr != binds.end()
{
InstanceSave* save = itr->second.save;
if (!FoSId == itr->first || PoSId == itr->first)
{
std::string timeleft = GetTimeString(save->GetResetTime() - time(NULL));
handler->PSendSysMessage(LANG_COMMAND_INST_UNBIND_UNBINDING, itr->first, save->GetInstanceId(), itr->second.perm ? "yes" : "no", save->GetDifficulty(), save->CanReset() ? "yes" : "no", timeleft.c_str());
player->UnbindInstance(itr, Difficulty(i));
counter++;
}
else
++itr;
}
}
handler->PSendSysMessage(LANG_COMMAND_INST_UNBIND_UNBOUND, counter);
return true;
}
If you want to create a new command with similar functionality to another, the only thing you need to do is go take a look at it.
@dagan I’ve compiled it i got this error
““Error 1 error C2065: ‘LANG_COMMAND_INST_UNBIND_UNBINDING’ : undeclared””
I take it you are using 335 then.
handler->PSendSysMessage(“unbinding map: %d inst: %d perm: %s diff: %d canReset: %s TTR: %s”, itr->first, save->GetInstanceId(), itr->second.perm ? “yes” : “no”, save->GetDifficulty(), save->CanReset() ? “yes” : “no”, timeleft.c_str());
handler->PSendSysMessage(“instances unbound: %d”, counter);
Use these instead.
I’ve tried this script today it was cool thank you But it have problem.
I’ve got Fos and Pos Saved and tried this as command but it unbound Pos, and still had fos bound.
Oops, there’s an errant ! before FoS in the condition. Get rid of that.
I have another question.
i dont know how to unbind icc10 normal but not other icc difficulty i tried to enter map id but all icc difficulties have same Map id and all of them reset instead of 10 normal.
This is because of the difficulty variable. Make a condition regarding i in the loop.