print("NPC_AWM init") require "lua/entity.lua" require "lua/utilities.lua" require "lua/level_hub/npc_base.lua" require "lua/level_hub/ruinsstate.lua" npcname = "arkeyanweaponsmaster" activated = false if RuinsState.get() < 19 then trigger.send(4,"ActionButtonTrigger") end if RuinsState.get() > 20 then trigger.send(4,"ActionButtonTrigger") end if RuinsState.get() > 19 then trigger.send(1,"sendActive") end function selectConversation() if RuinsState.get() == 19 then if not ruins.sc39Done then --if not activated then trigger.send(1,"sendActive") end activeConversation = "" print("playing sc39") object("Sc39_MagicWeaponMaster").trigger.send() else activeConversation = "RuinsArk19Prompt" conversationResultYes = function() print("goToNextLevel") goToNextLevel() end conversationResultNo = function() activeConversation = "RuinsArk19Prompt_Refuse" talk() conversationResultNo = function() end end end elseif RuinsState.get() == 20 then activeConversation = "RuinsArk20" conversationResultYes = function() print("goToNextLevel") goToNextLevel() end conversationResultNo = function() activeConversation = "RuinsArk20_Refuse" talk() conversationResultNo = function() end end end end function state19DepartPrompt(short) nextLevelPrompt(short,"RuinsArk19Prompt","RuinsArk19Prompt","RuinsArk19Prompt_Refuse",nil) end function state20DepartPrompt(short) nextLevelPrompt(short,"RuinsArk20","RuinsArk20Direct","RuinsArk20_Refuse",nil) end while tick() do if trigger.received(1,"sc39Done") then print("arkeyanweaponsmaster got sc39Done") state19DepartPrompt(true) talk() end if trigger.received(1,"sc40Done") then print("arkeyanweaponsmaster got sc40Done") state20DepartPrompt(true) talk() end npctick(dt) end