Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- require("scripts/globals/settings");
- require("scripts/globals/titles");
- require("scripts/globals/quests");
- function onTrade(player,npc,trade)
- local TextIDs = "scripts/zones/" .. player:getZoneName() .. "/TextIDs";
- package.loaded[TextIDs] = nil;
- require(TextIDs);
- local pewp = math.random(1,100)
- local reward = 0
- if (trade:hasItemQty(13916,1) and trade:getItemCount() == 1) then --
- if pewp < 50 then
- reward = 4446 -- Pumpkin Pie
- end
- if pewp >= 50 and pewp < 80 then
- reward = 4525 -- Pumpkin Pie +1
- end
- if pewp >= 80 and pewp < 90 then
- reward = 13916 -- Pumpkin Head
- end
- if pewp >= 90 then
- reward = 15176 -- Pumpkin Head II
- end
- end
- if (trade:hasItemQty(17565,1) and trade:getItemCount() == 1) then -- Trick Staff
- if pewp < 50 then
- reward = 4446 -- Pumpkin Pie
- end
- if pewp >= 50 and pewp < 80 then
- reward = 5631 -- Pumpkin Cake
- end
- if pewp >= 80 and pewp < 90 then
- reward = 4525 -- Pumpkin Pie +1
- end
- if pewp >= 90 then
- reward = 17587 -- Trick Staff II
- end
- end
- if (trade:hasItemQty(17566,1) and trade:getItemCount() == 1) then -- Treat Staff
- if pewp < 50 then
- reward = 4446 -- Pumpkin Pie
- end
- if pewp >= 50 and pewp < 80 then
- reward = 5631 -- Pumpkin Cake
- end
- if pewp >= 80 and pewp < 90 then
- reward = 4430 -- Pumpkin Soup
- end
- if pewp >= 90 then
- reward = 17588 -- Treat Staff II
- end
- end
- if (player:getFreeSlotsCount() == 0 and reward > 0) then
- player:messageSpecial( ITEM_CANNOT_BE_OBTAINED, reward);
- end
- if (player:getFreeSlotsCount() >= 1 and reward > 0) then
- player:addItem(reward,1);
- player:messageSpecial( ITEM_OBTAINED, reward );
- end
- end;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement