First of all, I am completely new to this and I hope I have posted this in the correct sub forum.
I just started up my own Tibia server but I have run into a few issues regarding quests. From what I can understand the game does not always set the StorageValue for the player correctly meaning I cannot progress further. I know where to find .lua for both the NPC and the storage_set.lua files but I am having some issue understanding how to use them.
In my case I got a character namned Donut trying to progress the Yalahar quest line. What would be my GOD TalkAction to set the correct StorageValue for Donut?
The NPC.lua:
"player:getStorageValue(Storage.InServiceofYalahar.NotesPalimuth) == 1 and player:getStorageValue(Storage.InServiceofYalahar.Questline) == 16"
The storage_set.lua:
local storageSet = TalkAction("/set")
function storageSet.onSay(cid, words, param)
local player = Player(cid)
if not player:getGroup():getAccess() then
return true
end
if player:getAccountType() < ACCOUNT_TYPE_GOD then
return false
end
local split = param:split(",")
if split[2] == nil then
player:sendCancelMessage("Insufficient parameters.")
return false
end
local target = Player(split[1])
if target == nil then
player:sendCancelMessage("A player with that name is not online.")
return false
end
-- Trim left
split[2] = split[2]:gsub("^%s*(.-)$", "%1")
split[3] = split[3]:gsub("^%s*(.-)$", "%1")
local ch = split[2]
local ch2 = split[3]
setPlayerStorageValue(getPlayerByName(split[1]), tonumber(ch), tonumber(ch2))
doPlayerSendTextMessage(cid, MESSAGE_EVENT_ADVANCE, "The storage with id: "..tonumber(ch).." from player "..split[1].." is now: "..ch2..".")
return false
end
storageSet:separator(" ")
storageSet:register()
I just started up my own Tibia server but I have run into a few issues regarding quests. From what I can understand the game does not always set the StorageValue for the player correctly meaning I cannot progress further. I know where to find .lua for both the NPC and the storage_set.lua files but I am having some issue understanding how to use them.
In my case I got a character namned Donut trying to progress the Yalahar quest line. What would be my GOD TalkAction to set the correct StorageValue for Donut?
The NPC.lua:
"player:getStorageValue(Storage.InServiceofYalahar.NotesPalimuth) == 1 and player:getStorageValue(Storage.InServiceofYalahar.Questline) == 16"
The storage_set.lua:
local storageSet = TalkAction("/set")
function storageSet.onSay(cid, words, param)
local player = Player(cid)
if not player:getGroup():getAccess() then
return true
end
if player:getAccountType() < ACCOUNT_TYPE_GOD then
return false
end
local split = param:split(",")
if split[2] == nil then
player:sendCancelMessage("Insufficient parameters.")
return false
end
local target = Player(split[1])
if target == nil then
player:sendCancelMessage("A player with that name is not online.")
return false
end
-- Trim left
split[2] = split[2]:gsub("^%s*(.-)$", "%1")
split[3] = split[3]:gsub("^%s*(.-)$", "%1")
local ch = split[2]
local ch2 = split[3]
setPlayerStorageValue(getPlayerByName(split[1]), tonumber(ch), tonumber(ch2))
doPlayerSendTextMessage(cid, MESSAGE_EVENT_ADVANCE, "The storage with id: "..tonumber(ch).." from player "..split[1].." is now: "..ch2..".")
return false
end
storageSet:separator(" ")
storageSet:register()