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
Citar
local theFlameDoor = MoveEvent()
function theFlameDoor.onStepIn(creature, item, position, fromPosition)
local player = creature:getPlayer()
if not player then
return true
end
if 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!")
end
return true
end
theFlameDoor:type("stepin")
theFlameDoor:aid(50001) -- Action ID da porta no RME
theFlameDoor:register()
if 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!"
}
}
}
}
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
end
local 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.")
end
return true
end
-- Registrando os 3 baús pelo UID
theFlameChest:uid(8001)
theFlameChest:uid(8002)
theFlameChest:uid(8003)
theFlameChest:register()
info
Grupo: Campones
Registrado: 19/04/16
Posts: 7
Reputação: 0
Gênero: Masculino
Char no Tibia: Coronel Dharel
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
esse aqui é meu
Storages
esse é meu LIB/QUEST.LUA
ESSE É MEU ACTIONS/QUEST/THE_FLAME_CHEST.LUA