Ejemplo n.º 1
0
    public void QuestItemCheck(int item)
    {
        if (amountOf[item] == 0)
        {
            if (item == 10 && PlayerEngine.pCash >= 30)
            {
                PlayerEngine.pCash -= 30;
            }
            else if (item == 11 && PlayerEngine.pCash >= 75)
            {
                PlayerEngine.pCash -= 75;
            }
            else if (item == 12 && PlayerEngine.pCash >= 100)
            {
                PlayerEngine.pCash -= 100;
            }
            else if (item == 13 && PlayerEngine.pCash >= 300)
            {
                PlayerEngine.pCash -= 300;
            }
            else if (item == 14 && PlayerEngine.pCash >= 500)
            {
                PlayerEngine.pCash -= 500;
            }
            else
            {
                PlayerEngine.theDM.dLines      = new string[1];
                PlayerEngine.theDM.dLines[0]   = "You don't have enough ducats.";
                PlayerEngine.theDM.currentLine = 0;
                PlayerEngine.theDM.ShowDialog();
                return;
            }

            OnGetItem(item);

            if (item == 13)
            {
                BuyItems buyIt = GetComponent <BuyItems>();
                buyIt.AllowPurchaseOfDiary();
            }
        }
        else
        {
            PlayerEngine.theDM.dLines      = new string[1];
            PlayerEngine.theDM.dLines[0]   = "You already have this quest item.";
            PlayerEngine.theDM.currentLine = 0;
            PlayerEngine.theDM.ShowDialog();
        }
    }
Ejemplo n.º 2
0
 void Start()
 {
     shop = GetComponentInParent <BuyItems>();
 }