First is distributing the eggs. You can do it as you please, I had the suspicious npc's next to the obyssean passages move about the city, and each time you find them they hand out an egg. This has been pretty effective as it limits the rate that eggs enter the world, and it's random so you gotta keep running around looking for them, and it encourages players to trade with each other to get the eggs they need.
Here's a script for port bastok:
Code: Select all
function onTrigger(player,npc)
local npc = GetNPCByID(17744177);
random = math.random(1,26);
local prize = 1487 + random
player:addItem(prize, 1)
player:messageSpecial(ITEM_OBTAINED,prize);
local randpos = math.random(1,11);
switch (randpos): caseof
{
[1] = function (x) npc:setPos(82,8,-229); end,
[2] = function (x) npc:setPos(40,7,-193); end,
[3] = function (x) npc:setPos(81,7,-188); end,
[4] = function (x) npc:setPos(103,8,-44); end,
[5] = function (x) npc:setPos(70,-2,-25); end,
[6] = function (x) npc:setPos(46,-2,-25); end,
[7] = function (x) npc:setPos(9,-2,14); end,
[8] = function (x) npc:setPos(-22,4,41); end,
[9] = function (x) npc:setPos(-79,-2,13); end,
[10] = function (x) npc:setPos(-142,0,-37); end,
[11] = function (x) npc:setPos(-198,2,-53); end,
}
end;
Code: Select all
function onTrade(player,npc,trade)
a = {}
local letters = 'abcdefghijklmnopqrstuvwxyz'
local input = string.lower(string.sub(player:getName(),1,3))
for i=1, 3 do
local char = string.sub(input,i,i)
local num = string.find(letters, char)
a[i] = (num + 1487)
end
if (player:hasItem(16109) == false) then
if (trade:hasItemQty(a[1],1) and trade:hasItemQty(a[2],1) and trade:hasItemQty(a[3],1) and trade:getItemCount() == 3) then
player:addItem(16109)
player:messageSpecial(ITEM_OBTAINED,16109);
player:tradeComplete();
printf("Added Item")
end
end
end;