def handleEggMaking(player): if ItemAssistant.hasItemInInventory( player, egg_mould) and ItemAssistant.hasItemInInventory( player, bucket_of_chocolate): ItemAssistant.deleteItemFromInventory(player, bucket_of_chocolate, 1) ItemAssistant.addItemToInventoryOrDrop(player, 1925, 1) ItemAssistant.addItemToInventoryOrDrop(player, chocolate_egg, 1) player.getDH().sendItemChat( "", "You pour some chocolate into the mould. Somehow, it", "sets straight away and you are able to make a", "chocolate egg.", chocolate_egg, 200, 20, 0)
def first_click_object_2614(player): quest_stage = player.getQuest(7).getStage() if quest_stage == 4: if ItemAssistant.hasItemInInventory( player, garlic) and ItemAssistant.hasItemInInventory( player, stake) and ItemAssistant.hasItemInInventory( player, hammer): NpcHandler.spawnNpc(player, 3481, 3078, 9774, 0, True, True) else: player.getPA().sendMessage( "You should get a garlic clove, a stake and a hammer before doing this." ) else: player.getPA().sendMessage("Nothing interesting happens.")
def HandleSledRepair(player): stage = player.getQuest(2).getStage() #Added a check in for quest stage, players were getting bugged by trading plank over from main if stage == 4: if ItemAssistant.hasItemInInventory(player, hammer) and ItemAssistant.hasItemInInventory(player, plank): ItemAssistant.deleteItemFromInventory(player, plank, 1) ItemAssistant.deleteItemFromInventory(player, broken_sled, 1) ItemAssistant.addItemToInventoryOrDrop(player, sled, 1) player.getDH().sendItemChat("", "@blu@Congratulations, you just advanced a Sled fixing level!", "", "Your Sled fixing level is now 73.", "", 4084, 200, 20, 0); player.getPA().sendMessage("<col=0008f7>You should take the sled back to Santa.") player.gfx100(199) player.getQuest(2).setStage(5) QuestHandler.updateAllQuestTab(player); else: player.getPA().sendMessage("You need a hammer and a plank to fix the sled.") else: player.getPA().sendMessage("I should speak with the sawmill operator first before doing this.")
def chat_3008(player): player.getDH().sendNpcChat("Buy me a drrink pleassh...", 591) quest_stage = player.getQuest(7).getStage() if quest_stage == 2 and ItemAssistant.hasItemInInventory(player, 1917): player.nextDialogue = 3016 else: player.nextDialogue = 3009
def add_lamp_experience(level, player): if ItemAssistant.hasItemInInventory(player, 10586): ItemAssistant.deleteItemFromInventory(player, 10586, 1) player.getPA().closeInterfaces(True) amount = (125 + Misc.random(2000)) + player.skillExperience[level] / 50 name = ServerConstants.SKILL_NAME[level] Skilling.addSkillExperience(player, amount, level, True) player.getPA().sendMessage("You receive <col=bc0000>" + Misc.formatNumber(amount) + " <col=000000>experience in <col=bc0000>" + name + "<col=000000>!")
def first_click_object_7194(player): stage = player.getQuest(2).getStage()#If player loses sled before they finish quest they can get another. if stage == 2: player.getDH().sendDialogues(555555) elif stage >=3 and stage <=6 and not ItemAssistant.hasItemInInventory(player, broken_sled): player.getDH().sendItemChat("", "You search the drawers and find the broken sled.", broken_sled, 200, 20, 0); player.startAnimation(832) ItemAssistant.addItemToInventoryOrDrop(player, broken_sled, 1) else: player.getDH().sendStatement("The drawers are empty.")
def chat_73753(player): if ItemAssistant.hasItemInInventory(player, logs): amount = ItemAssistant.getItemAmount(player, logs) if ItemAssistant.hasItemAmountInInventory(player, logs, amount): ItemAssistant.deleteItemFromInventory(player, logs, amount) ItemAssistant.addItem(player, plank, amount) player.getDH().sendNpcChat("There you go sir.", 591) player.getPA().sendMessage("<col=0008f7>You should use the plank on the sled to repair it.") else: player.getDH().sendNpcChat("You don't have any logs for me to cut." , "I'm not a magician!", 591)
def chat_6031(player): if ItemAssistant.hasItemAmountInInventory( player, soul_rune, 500) and ItemAssistant.hasItemInInventory( player, pot) and ItemAssistant.hasItemInInventory( player, air) and ItemAssistant.hasItemInInventory( player, water) and ItemAssistant.hasItemInInventory( player, earth) and ItemAssistant.hasItemInInventory( player, fire) and ItemAssistant.hasItemInInventory( player, mould): player.getDH().sendDialogues(6036) else: player.getDH().sendDialogues(6035)
def chat_82137101(player): if ItemAssistant.hasItemInInventory(player, sled): player.getDH().sendDialogues(82137103) else: player.getDH().sendPlayerChat("Whoops, I forgot to bring it. I'll be back soon.", 591)
def chat_6200(player): if ItemAssistant.hasItemInInventory(player, bones): player.getDH().sendDialogues(6202) else: player.getDH().sendDialogues(6201)