User talk:Kymara: Difference between revisions
Jump to navigation
Jump to search
Content deleted Content added
imported>Kymara No edit summary |
imported>Kymara making some notes about an npc to lend kitchen equipment |
||
| Line 67: | Line 67: | ||
* equipment refactoring (right click equip, swapping items over existing items in slots) |
* equipment refactoring (right click equip, swapping items over existing items in slots) |
||
* [[Stendhal Quest Histories]] - can we get some smart default methods in? or use existing actions? |
* [[Stendhal Quest Histories]] - can we get some smart default methods in? or use existing actions? |
||
== npc to lend kitchen tools == |
|||
games.stendhal.server.maps.semos.baker.ShopAssistantNPC |
|||
Idea: have erna lend out pestle and mortar or sugar mill and expect them back after a certain time. If you don't bring them back but want to borrow another thing, you have to pay for the previous. |
|||
<source lang = "java"> |
|||
// define a COST int 3000 ? |
|||
// String QUEST_SLOT = "borrow_kitchen_equipment"; |
|||
addOffer("Our pizza delivery team can #borrow some kitchen equipment from me."); |
|||
add(ConversationStates.ATTENDING, "borrow", |
|||
new LevelLessThanCondition(6), |
|||
ConversationStates.ATTENDING, |
|||
"Oh sorry, I don't lend equipment to people with so little experience as you.", |
|||
null); |
|||
add(ConversationStates.ATTENDING, "borrow", |
|||
new AndCondition(new LevelGreaterThanCondition(5), new QuestNotCompletedCondition("pizza_delivery")), |
|||
ConversationStates.ATTENDING, |
|||
"You'll have to speak to Leander and ask if you can help with the pizza before I'm allowed to lend you anything.", |
|||
null); |
|||
add(ConversationStates.ATTENDING, "borrow", |
|||
new AndCondition( |
|||
new LevelGreaterThanCondition(5), |
|||
new QuestCompletedCondition("pizza_delivery"), |
|||
new QuestNotActiveCondition(QUEST_SLOT)), |
|||
ConversationStates.ATTENDING, |
|||
"I lend out #'pestle and mortar' and #'sugar mill'.", |
|||
// say items from a list would be better |
|||
null); |
|||
// player already has borrowed something it didn't return |
|||
add(ConversationStates.ATTENDING, "borrow", |
|||
new QuestActiveCondition(QUEST_SLOT)), |
|||
ConversationStates.QUEST_ITEM_QUESTION, |
|||
"You didn't #return what I last lent you! You must return it, or you can #pay for it if you lost it. That's " + COST + " money.", |
|||
null); |
|||
// player wants to pay for previous item |
|||
final List<ChatAction> payment = new LinkedList<ChatAction>(); |
|||
payment.add(new DropItemAction("money", COST)); |
|||
payment.add(new SetQuestAction(QUEST_SLOT, "done")); |
|||
payment.add(new DecreaseKarmaAction(10)); |
|||
add(ConversationStates.QUEST_ITEM_QUESTION, "pay", |
|||
new PlayerHasItemWithHimCondition("money", COST), |
|||
ConversationStates.ATTENDING, |
|||
"Thanks. Just let me know if you want to #borrow any tools again.", |
|||
new MultipleActions(payment)); |
|||
// player already has borrowed something and wants to return it |
|||
final List<ChatAction> return = new LinkedList<ChatAction>(); |
|||
return.add(new DropRequiredItemAction(QUEST_SLOT)); |
|||
return.add(new SetQuestAction(QUEST_SLOT, "done")); |
|||
add(ConversationStates.QUEST_ITEM_QUESTION, "return", |
|||
new QuestActiveCondition(QUEST_SLOT)), |
|||
ConversationStates.ATTENDING, |
|||
"Thank you! Just let me know if you want to #borrow any tools again.", |
|||
null); |
|||
</source> |
|||