70 lines
1.5 KiB
Plaintext
70 lines
1.5 KiB
Plaintext
#include "mn_i_pwfunctions"
|
|
|
|
int StartingConditional()
|
|
{
|
|
int iResult;
|
|
int index = 10;
|
|
|
|
int performCheck = CheckExchangeBlocked(GetPCSpeaker(), OBJECT_SELF, index);
|
|
|
|
if (performCheck == EXCHANGE_ALLOWED)
|
|
{
|
|
Debug("allowed");
|
|
iResult = TRUE;
|
|
}
|
|
else
|
|
{
|
|
iResult = FALSE;
|
|
|
|
string failedBecause = "Index "+IntToString(index)+" failed because:\n";
|
|
|
|
if (performCheck & EXCHANGE_INSUFFICIENT_GOLD)
|
|
{
|
|
failedBecause += "Insufficient gold\n";
|
|
}
|
|
|
|
if (performCheck & EXCHANGE_INSUFFICIENT_ITEMS)
|
|
{
|
|
failedBecause += "Missing item\n";
|
|
}
|
|
|
|
if (performCheck & EXCHANGE_INSUFFICIENT_XP)
|
|
{
|
|
failedBecause += "Insufficient xp\n";
|
|
}
|
|
|
|
if (performCheck & EXCHANGE_LEVEL_TOO_HIGH)
|
|
{
|
|
failedBecause += "Level too high\n";
|
|
}
|
|
|
|
if (performCheck & EXCHANGE_LEVEL_TOO_LOW)
|
|
{
|
|
failedBecause += "Level too low\n";
|
|
}
|
|
|
|
if (performCheck & EXCHANGE_QUEST_UNKNOWN)
|
|
{
|
|
failedBecause += "Quest unknown\n";
|
|
}
|
|
|
|
if (performCheck & EXCHANGE_QUEST_BLOCKED)
|
|
{
|
|
failedBecause += "Quest blocked\n";
|
|
}
|
|
|
|
if (performCheck & EXCHANGE_QUEST_FAILED)
|
|
{
|
|
failedBecause += "Quest failed\n";
|
|
}
|
|
|
|
if (performCheck & EXCHANGE_QUEST_REJECTED)
|
|
{
|
|
failedBecause += "Quest rejected\n";
|
|
}
|
|
|
|
// Debug(failedBecause);
|
|
}
|
|
return iResult;
|
|
}
|