Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- -----------------------------------
- -- Area: The_Garden_of_RuHmet
- -- NPC: ??? (Jailer of Fortitude Spawn)
- -- Allows players to spawn the Jailer of Fortitude by trading 12 Ghrah M Chips to a ???.
- -- @pos ,-420 0 755
- -----------------------------------
- package.loaded["scripts/zones/The_Garden_of_RuHmet/TextIDs"] = nil;
- -----------------------------------
- require("scripts/zones/The_Garden_of_RuHmet/TextIDs");
- require("scripts/zones/The_Garden_of_RuHmet/MobIDs");
- -----------------------------------
- -- onTrade Action
- -----------------------------------
- function onTrade(player,npc,trade)
- npc = GetNPCbyID(16921028);
- -- Trade 12 Ghrah M Chips
- if(GetMobAction(16921015) == 0 and trade:hasItemQty(1872,12) and trade:getItemCount() == 12) then
- player:tradeComplete();
- mobspawn:setSpawn(npc:getXPos(),npc:getYPos(),npc:getZPos());
- GetNPCByID(16921028):hideNPC(900);
- --SpawnMob(16921015,180):updateEnmity(player); -- Spawn Jailer of Fortitude
- --local mobpop = GetNPCByID(17535224); -- Spawn ???
- --npc:setStatus(0);
- end
- end;
- -----------------------------------
- -- OnGameHourAutomatisation
- -----------------------------------
- function OnGameHourAutomatisation(npc,player)
- local Spawn = getServerVar("[SPN]Fortitude"); -- start in spawn pos 1.
- local qm1p = getServerVar ("[POSI]Fortitude");
- local SpawnTimer = tonumber(os.time(t));
- local s = 900 -- wait time till change to next spawn pos, set to 15 mins.
- if(Spawn = (SpawnTimer - os.time(t) >= s)) then -- change spawn pos every 15 mins.
- setServerVar("[POSI]Fortitude", Spawn + 1);
- elseif (Spawn == 6) then -- set spawn pos to 1 after counter reach 6.
- setServerVar("[POSI]Fortitude",1);
- if (Spawn = 1) then
- GetNPCbyID(16921028):setPos(-420,0.00,755); -- spawn point 1 "Hume"
- elseif (Spawn = 2) then
- GetNPCbyID(16921028):setPos(-43,0.00,460); -- spawn point 2 "Elvaan"
- elseif (Spawn = 3) then
- GetNPCbyID(16921028):setPos(-260,0.00,44.821); -- spawn point 3 "Galka"
- elseif (Spawn = 4) then
- GetNPCbyID(16921028):setPos(-580,0.00,43); -- spawn point 4 "Taru"
- elseif (Spawn = 5) then
- GetNPCbyID(16921028):setPos(-796,0.00,460); -- spawn point 5 "Mithra"
- end
- end
- end;
- -----------------------------------
- -- onTrigger Action
- -----------------------------------
- function onTrigger(player,npc)
- end;
- -----------------------------------
- -- onEventUpdate
- -----------------------------------
- function onEventUpdate(player,csid,option)
- --printf("onUpdate CSID: %u",csid);
- --printf("onUpdate RESULT: %u",option);
- end;
- -----------------------------------
- -- onEventFinish Action
- -----------------------------------
- function onEventFinish(player,csid,option)
- --printf("onFinish CSID: %u",csid);
- --printf("onFinish RESULT: %u",option);
- end;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement