Cruor NPC
Posted: Tue Apr 07, 2015 11:54 am
Here is script I have for our Cruor NPC but on the player:startEvent(0x07D2,player:getCruor()); I get call method 'get cruor' (a nil value) what am I missing
-----------------------------------
-- Area: Abyssea-Konschtat
-- NPC: Cruor Prospector
--
-----------------------------------
require("scripts/globals/settings");
package.loaded["scripts/zones/Abyssea-Vunkerl/TextIDs"] = nil;
require("scripts/zones/Abyssea-Vunkerl/TextIDs");
require("scripts/globals/abyssea");
require("scripts/globals/common");
require("scripts/globals/missions");
-----------------------------------
-- onTrade Action
-----------------------------------
function onTrade(player,npc,trade)
end;
-----------------------------------
-- onTrigger Action
-----------------------------------
function onTrigger(player,npc)
player:startEvent(0x07D2,player:getCruor());
print("onEventSelection")
print("onEventSelection - CSID:",csid);
print("onEventSelection - option ===",option);
end;
-----------------------------------
-- onEventUpdate
-----------------------------------
function onEventUpdate(player,csid,option)
-- if (CSID == 0x07D2) then
print("onEventSelection")
print("onEventSelection - CSID:",csid);
print("onEventSelection - option ===",option);
-- end
-- 552
-- printf("CSID: %u",csid);
-- printf("RESULT: %u",option);
end;
-----------------------------------
-- onEventFinish
-----------------------------------
function onEventFinish(player,csid,option)
print("onEventSelection")
print("onEventSelection - CSID:",csid);
print("onEventSelection - option ===",option);
local abysseaTime = player:getVar("Abysseatime");
if (option >= 552) then
cost = 0;
-- printf("CSID: %u",csid);
-- printf("RESULT: %u",option);
end;
-----------------------------------
-- Area: Abyssea-Konschtat
-- NPC: Cruor Prospector
--
-----------------------------------
require("scripts/globals/settings");
package.loaded["scripts/zones/Abyssea-Vunkerl/TextIDs"] = nil;
require("scripts/zones/Abyssea-Vunkerl/TextIDs");
require("scripts/globals/abyssea");
require("scripts/globals/common");
require("scripts/globals/missions");
-----------------------------------
-- onTrade Action
-----------------------------------
function onTrade(player,npc,trade)
end;
-----------------------------------
-- onTrigger Action
-----------------------------------
function onTrigger(player,npc)
player:startEvent(0x07D2,player:getCruor());
print("onEventSelection")
print("onEventSelection - CSID:",csid);
print("onEventSelection - option ===",option);
end;
-----------------------------------
-- onEventUpdate
-----------------------------------
function onEventUpdate(player,csid,option)
-- if (CSID == 0x07D2) then
print("onEventSelection")
print("onEventSelection - CSID:",csid);
print("onEventSelection - option ===",option);
-- end
-- 552
-- printf("CSID: %u",csid);
-- printf("RESULT: %u",option);
end;
-----------------------------------
-- onEventFinish
-----------------------------------
function onEventFinish(player,csid,option)
print("onEventSelection")
print("onEventSelection - CSID:",csid);
print("onEventSelection - option ===",option);
local abysseaTime = player:getVar("Abysseatime");
if (option >= 552) then
cost = 0;
-- printf("CSID: %u",csid);
-- printf("RESULT: %u",option);
end;