Search in sources :

Example 1 with MoneyItem

use of xyz.derkades.ublisk.money.MoneyItem in project Ublisk by Derkades.

the class Merek method talk.

@Override
public void talk(UPlayer player) {
    QuestParticipant qp = player.getQuestParticipant(Quest.INTRODUCTION, this);
    UInventory inv = qp.getInventory();
    if (inv.containsItems(new Item(Material.LOG, 10), new Item(Material.STRING, 16), new MoneyItem(MoneyItem.Type.DUST).setAmount(10))) {
        qp.sendMessage("Great! Now go to Ulric to craft a weapon.");
    } else if (inv.containsItems(new Item(Material.STRING, 16), new MoneyItem(MoneyItem.Type.DUST).setAmount(10))) {
        qp.sendMessage("Finally get 10 wood logs at the saw");
    } else if (inv.containsItems(new Item(Material.WOOL, 4), new MoneyItem(MoneyItem.Type.DUST).setAmount(10))) {
        qp.sendMessage("Great job, now please break down your wool into 16 string by using the windmill.");
    } else if (inv.contains(Material.GOLD_NUGGET, 10)) {
        qp.sendMessage("Now bring me 4 wool by killing sheep.");
    } else {
        qp.sendMessage("What are you doing out here? You don't even have a weapon yet! I'll tell you what you'll need to make a weapon. First, get 10 gold dust by killing animals.");
    }
}
Also used : QuestParticipant(xyz.derkades.ublisk.quest.QuestParticipant) MoneyItem(xyz.derkades.ublisk.money.MoneyItem) Item(xyz.derkades.ublisk.utils.inventory.Item) UInventory(xyz.derkades.ublisk.utils.inventory.UInventory) MoneyItem(xyz.derkades.ublisk.money.MoneyItem)

Aggregations

MoneyItem (xyz.derkades.ublisk.money.MoneyItem)1 QuestParticipant (xyz.derkades.ublisk.quest.QuestParticipant)1 Item (xyz.derkades.ublisk.utils.inventory.Item)1 UInventory (xyz.derkades.ublisk.utils.inventory.UInventory)1