"Too Bee or Not Too Bee" Quest in Windurst Walls
Posted: Tue Sep 25, 2012 3:58 am
Howdy! I scripted this little quest tonight. It tested okay by me and a buddy. Thanks!
~Thrydwolf
~Thrydwolf
Go to LandSandBoat
http://forums.dspt.info:80/
Code: Select all
player:completeQuest(WINDURST,TO_BEE_OR_NOT_TO_BEE);
Code: Select all
player:addFame(WINDURST,WIN_FAME*30);
player:completeQuest(WINDURST,TO_BEE_OR_NOT_TO_BEE);
Code: Select all
require("scripts/globals/settings");
require("scripts/globals/titles");
require("scripts/globals/keyitems");
require("scripts/globals/shop");
require("scripts/globals/quests");
require("scripts/zones/Windurst_Walls/TextIDs");
Code: Select all
player:addItem(4156,3); -- Mulsum x3
player:messageSpecial(ITEM_OBTAINED, 4156);
player:messageSpecial(ITEM_OBTAINED, 4156);
player:messageSpecial(ITEM_OBTAINED, 4156);
Code: Select all
ITEMS_OBTAINED = xxxx; -- You obtain <number> <item>!
to save your quest status and fame, then you must to add fame first
I just followed the Quest Guide on the Wiki and included all... I will clean that up.in Zayhi-Bauhi.lua you don't use shop, keyitems and titles, why you have included them ?
Oopsy, we don't want someone to loose something else by accident . Will fix.you don't check item count in trade
Hrmm, I guess I can use bitmask again... I did a quest with that last year... or can change it so that quest doesn't really begin until you receive honey from Raamimi... what would keep the events in a linear fashion so a player couldn't trade honey to Zayhi until give the first one my Raamimi.try not to use the second variable "TooBeeOrNot_var2"
Thanks!!! I was wondering how to do that. Will fix.you must add 'ITEMS_OBTAINED = xxxx; -- You obtain <number> <item>!'
Thanks!!in Windurst_Walls/TextIDs. use POLUtils for it.
Code: Select all
function onTrade(player,npc,trade)
local ToBee = player:getQuestStatus(WINDURST,TO_BEE_OR_NOT_TO_BEE);
if(ToBee == QUEST_ACCEPTED) then
local ToBeeOrNotStatus = player:getVar("ToBeeOrNot_var");
local itemCount = trade:getItemCount();
if(ToBeeOrNotStatus == 10 and trade:hasItemQty(4370,1) and itemCount == 1) then
player:startEvent(0x0045); -- After Honey#1: Clearing throat
elseif(ToBeeOrNotStatus == 1 and trade:hasItemQty(4370,1) and itemCount == 1) then
player:startEvent(0x0046); -- After Honey#2: Tries to speak again... coughs
elseif(ToBeeOrNotStatus == 2 and trade:hasItemQty(4370,1) and itemCount == 1) then
player:startEvent(0x0049); -- After Honey#3: Tries to speak again... coughs..asked for more Honey
elseif(ToBeeOrNotStatus == 3 and trade:hasItemQty(4370,1) and itemCount == 1) then
player:startEvent(0x004A); -- After Honey#4: Feels like its getting a lot better but there is still iritaion
elseif(ToBeeOrNotStatus == 4 and trade:hasItemQty(4370,1) and itemCount == 1) then
player:startEvent(0x004B); -- After Honey#5: ToBee quest Finish (tooth hurts from all the Honey
end
end
end;
Code: Select all
elseif(csid == 0x004B) then -- After Honey#5: ToBee quest Finish (tooth hurts from all the Honey)
player:tradeComplete();
player:setVar("ToBeeOrNot_var",5);
player:addFame(WINDURST,WIN_FAME*30);
player:completeQuest(WINDURST,TO_BEE_OR_NOT_TO_BEE);
player:needToZone(true);
Code: Select all
elseif(csid == 0x004B) then -- After Honey#5: ToBee quest Finish (tooth hurts from all the Honey)
player:tradeComplete();
player:setVar("ToBeeOrNot_var",5);
Code: Select all
function onTrigger(player,npc)
local ToBee = player:getQuestStatus(WINDURST,TO_BEE_OR_NOT_TO_BEE);
local ToBeeOrNotStatus = player:getVar("ToBeeOrNot_var");
if(ToBeeOrNotStatus == 10 and ToBee == QUEST_AVAILABLE) then
player:startEvent(0x0043); -- Quest Started - He gives you honey
elseif(ToBee == QUEST_ACCEPTED and ToBeeOrNotStatus < 5) then
player:startEvent(0x0044); -- After honey is given to player...... but before 5th hondy is given to Zayhi
elseif(ToBee == QUEST_COMPLETED and ToBeeOrNotStatus == 5) then
player:startEvent(0x0050); -- Quest Finish - Gives Mulsum
elseif(ToBee == QUEST_COMPLETED and player:needToZone()) then
player:startEvent(0x004F); -- After Quest but before zoning "it's certainly gotten quiet around here..."
else
player:startEvent(0x0128);
end
end;
Code: Select all
elseif(csid == 0x0050) then -- After Honey#5: ToBee quest Finish (tooth hurts from all the Honey)
if (player:getFreeSlotsCount() == 0) then
player:messageSpecial(ITEM_CANNOT_BE_OBTAINED,4156); -- Cannot give Mulsum because player Inventory is full
else
player:setVar("ToBeeOrNot_var",0);
player:addItem(4156,3); -- Mulsum x3
player:messageSpecial(ITEMS_OBTAINED, 4156,3);
player:addFame(WINDURST,WIN_FAME*30);
player:completeQuest(WINDURST,TO_BEE_OR_NOT_TO_BEE);
player:needToZone(true);
end