Rapaziada, eu sou novo nesse Revscript e eu estou precisando de uma ajuda, a quest não mostra iniciada (oque não é tão relevante assim para mim) e quando eu clico no bau eu escolho qual dos items eu quero e pego um deles (onde finalizo a quest) não aparece no quest log que aquela quest foi completada ou finalizada etc
Esse aqui é meu Moviments
Citarlocal theFlameDoor = MoveEvent()
function theFlameDoor.onStepIn(creature, item, position, fromPosition)
local player = creature:getPlayer()
if not player then
return true
endif player:getStorageValue(Storage.Quest.TheFlame.QuestStart) ~= 1 then
player:setStorageValue(Storage.Quest.TheFlame.QuestStart, 1)
player:sendTextMessage(MESSAGE_EVENT_ADVANCE, "You have entered the quest area. Defeat the monsters and claim your reward!")
endreturn true
endtheFlameDoor:type("stepin")
theFlameDoor:aid(50001) -- Action ID da porta no RME
theFlameDoor:register()
esse aqui é meu
Storages
Citar
Storage = {
Quest = {
Key = {
ID1000 = 103,
},
ExampleQuest = {
Example = 9000,
Door = 9001,
},
TheFlame = {
QuestStart = 50001,
ChestReward = 50002,
QuestComplete = 50003,
},
},DelayLargeSeaShell = 30002,
Imbuement = 30004,
}GlobalStorage = {
ExampleQuest = {
Example = 60000,
},
}
esse é meu LIB/QUEST.LUA
Citarif not Quests then
Quests = {
[1] = {
name = "Example",
startStorageId = Storage.Quest.ExampleQuest.Example,
startStorageValue = 1,
missions = {
[1] = {
name = "The Hidden Seal",
storageId = Storage.Quest.ExampleQuest.Example,
missionId = 1,
startValue = 1,
endValue = 1,
description = "You broke the first seal.",
},
},
},
}
end-- Adicionando nova quest (sem apagar a anterior)
Quests[#Quests + 1] = {
name = "The Flame",
startStorageId = Storage.Quest.TheFlame.QuestStart,
startStorageValue = 1,
missions = {
[1] = {
name = "The Flame",
storageId = Storage.Quest.TheFlame.QuestComplete,
missionId = 1001,
startValue = 0,
endValue = 1,
states = {
[0] = "Enter The Flame quest area, defeat the monsters and claim your legendary reward!",
[1] = "You have completed The Flame quest and claimed your legendary weapon!"
}
}
}
}
ESSE É MEU ACTIONS/QUEST/THE_FLAME_CHEST.LUA
Citarlocal theFlameChest = Action()
local choiceRewards = {
[8001] = {id = 3309, count = 1}, -- thunder hammer
[8002] = {id = 8097, count = 1}, -- solar axe
[8003] = {id = 8103, count = 1}, -- epiphany (sword)
}function theFlameChest.onUse(player, item, fromPosition, target, toPosition, isHotkey)
-- Verifica se o player já pegou a recompensa
if player:getStorageValue(Storage.Quest.TheFlame.ChestReward) == 1 then
player:sendTextMessage(MESSAGE_EVENT_ADVANCE, "It is empty.")
return true
end-- Verifica se o player iniciou a quest
if player:getStorageValue(Storage.Quest.TheFlame.QuestStart) ~= 1 then
player:sendTextMessage(MESSAGE_EVENT_ADVANCE, "You haven't completed the requirements for this quest.")
return true
end-- Pega a recompensa do baú específico
local reward = choiceRewards[item.uid]
if not reward then
player:sendTextMessage(MESSAGE_EVENT_ADVANCE, "This chest has no reward.")
return true
endlocal rewardItem = player:addItem(reward.id, reward.count)
if rewardItem then
player:sendTextMessage(MESSAGE_EVENT_ADVANCE, "You have found a " .. ItemType(reward.id):getName():lower() .. ".")
player:setStorageValue(Storage.Quest.TheFlame.ChestReward, 1)
player:setStorageValue(Storage.Quest.TheFlame.QuestComplete, 1)
player:sendTextMessage(MESSAGE_EVENT_ADVANCE, "Quest completed!")
else
player:sendTextMessage(MESSAGE_EVENT_ADVANCE, "You don't have enough space in your inventory.")
endreturn true
end-- Registrando os 3 baús pelo UID
theFlameChest:uid(8001)
theFlameChest:uid(8002)
theFlameChest:uid(8003)
theFlameChest:register()