Since multiple arrowquests can be opened in new clients, sometimes it can be confused which arrow has which id and a confusion in the script can cause the arrow to remain on the screen for the duration of the game. These 2 triggers can be added to control ArrowQuestes more easily and to add additional features.
eg;
void CClient::addArrowQuest( int x, int y, int id, int uid ) const
{
ADDTOCALLSTACK("CClient::addArrowQuest");
CScriptTriggerArgs Args(x,y,id);
Args.m_VarsLocal.SetNumNew("X", x);
Args.m_VarsLocal.SetNumNew("Y", y);
Args.m_VarsLocal.SetNumNew("UID", uid);
if (this->GetNetState()->isClientVersion(MINCLIVER_HS) || this->GetNetState()->isClientEnhanced())
{
Args.m_VarsLocal.SetNumNew("ID", id);
}
else
{
Args.m_VarsLocal.SetNumNew("ID", 0);
}
if (x > 0)
{
if (IsTrigUsed(TRIGGER_ARROWQUEST_ADD))
{
m_pChar->OnTrigger(CTRIG_ArrowQuest_Add, m_pChar, &Args);
}
}
else
{
if (IsTrigUsed(TRIGGER_ARROWQUEST_CLOSE))
{
m_pChar->OnTrigger(CTRIG_ArrowQuest_Close, m_pChar, &Args);
}
}
new PacketArrowQuest(this, x, y, id);
}
The codes here are purely examples. Although many have been tested, some may need to be rewritten.
Since multiple arrowquests can be opened in new clients, sometimes it can be confused which arrow has which id and a confusion in the script can cause the arrow to remain on the screen for the duration of the game. These 2 triggers can be added to control ArrowQuestes more easily and to add additional features.
eg;
The codes here are purely examples. Although many have been tested, some may need to be rewritten.