viewing paste Unknown #21435 | Lua

Posted on the
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91
-----------------------------------
-- Area: Rolanberry Fields
--  NPC: Legion Tome
-- Legion NPC
-- @pos 238 24 469 110
-----------------------------------
package.loaded["scripts/zones/Rolanberry_Fields/TextIDs"] = nil;
-----------------------------------
 
 
require("scripts/globals/settings");
require("scripts/globals/keyitems");
require("scripts/globals/titles");
require("scripts/zones/Rolanberry_Fields/TextIDs");
 
-----------------------------------
-- onTrade Action
-----------------------------------
 
function onTrade(player,npc,trade)
    local HALL = 0;
 
    if (player:hasKeyItem(ADVENTURERS_CERTIFICATE)) then
        if (trade:hasItemQty(4104,1) and trade:getItemCount() == 1) then -- gil + fire cluster to pop legion hall An
            SpawnMob('17526785'); -- Lofty_Behemoth
            SpawnMob('17526786'); -- Lofty_Wyrm
            SpawnMob('17526787'); -- Lofty_Adamantoise
            player:setPos(-180, 12, 212, 192, 183);
            HALL = 1
        elseif (trade:hasItemQty(3529,1) and trade:getItemCount() == 1) then -- gil + lofty trophy to pop legion hall Ki
            SpawnMob('17526805'); -- Mired_Cerberus
            SpawnMob('17526806'); -- Mired_Khimaira
            SpawnMob('17526807'); -- Mired_Hydra
            player:setPos(130, 12, 220, 0, 183);
            HALL = 2
        elseif (trade:hasItemQty(3530,1) and trade:getItemCount() == 1) then -- gil + mired trophy to pop legion hall Im
            SpawnMob('17526819'); -- Soaring_Corse
            SpawnMob('17526820'); -- Soaring_Dvergr
            SpawnMob('17526821'); -- Soaring_Vampyr
            player:setPos(140, 12, -132, 64, 183);
            HALL = 3
        elseif (trade:hasItemQty(3531,1) and trade:getItemCount() == 1) then -- gil + soaring trophy to pop legion hall Muru
            SpawnMob('17526833'); -- Veiled_Amphiptere
            SpawnMob('17526834'); -- Veiled_Ixion
            SpawnMob('17526835'); -- Veiled_Sandworm
            player:setPos(-170, 12, -140, 128, 183);
            HALL = 4
        elseif (trade:hasItemQty(3532,1) and trade:getItemCount() == 1) then -- gil + veiled trophy to pop legion hall Mul
            SpawnMob('17526851'); -- Paramount_Naraka
            SpawnMob('17526852'); -- Paramount_Harpeia
            SpawnMob('17526853'); -- Paramount_Mantis
            SpawnMob('17526854'); -- Paramount_Ironclad
            player:setPos(-20, 12, 68, 64, 183);
            HALL = 5
        end
 
        if (HALL > 0) then
            player:delGil(1000000);
            player:PrintToPlayer( "You will now be transported to Legion" ); -- needs to be spoof saying....
            player:tradeComplete();
        end
    else
        player:PrintToPlayer( "You do not meet the requirements to launch Legion!" );
    end
end;
 
-----------------------------------
-- onTrigger Action
-----------------------------------
 
function onTrigger(player,npc)
    -- player:startEvent(8009);
end;
 
-----------------------------------
-- onEventUpdate
-----------------------------------
 
function onEventUpdate(player,csid,option,target)
    -- printf("CSID: %u",csid);
    -- printf("RESULT: %u",option);
end;
 
-----------------------------------
-- onEventFinish
-----------------------------------
 
function onEventFinish(player,csid,option,target)
    -- print("CSID:",csid);
    -- print("RESULT:",option);
end;
Viewed 811 times, submitted by Guest.