• There is NO official Otland's Discord server and NO official Otland's server list. The Otland's Staff does not manage any Discord server or server list. Moderators or administrator of any Discord server or server lists have NO connection to the Otland's Staff. Do not get scammed!

HOW TO ADD QUESTS TO A PLAYER (MANUALLY)

sarilioo

New Member
Joined
Aug 12, 2016
Messages
7
Reaction score
0
Hi, I would like to manually "add" quests to my player (as if he'd done them), quests like "The Djinn War" and some other quests needed to be able to sell items to NPCs.

I've tried to add it using mysql, but I wasn't able to find a place for quests.

Is it possible? When a character completes a quest, it must change his information somewhere... but where?
Does it make sense?

I hope you guys understand my question.

Cheers!
 
storage values
look through a list of subfunctions for your tfs version for a storage function
default storages for every possible storage is -1
you can check inside a quest chest if the player has storage equal to -1 then it will give the items and set storage value to anything but -1, then if they click the chest again they will not be able to get it since you changed the value of that storage
 
Last edited:
Thank you for the attention Xeraphus, I am a newbie in that sort of stuff and Idk much, where can I find this Storage Subfunction? Mysql?
 
SOLVED!!!
*I found the quests file in the data/XML directory
*I then found the storageid of the quest I wanted
*I went to my php myadmin and select the players_storage database
*I copied from the character that had done the quest (Just changed for the new player ID)

Thanks heaps Xeraphus!
(I am posting here just in case someone else wants to do the same thing. (if they play offline)
 
SOLVED!!!
*I found the quests file in the data/XML directory
*I then found the storageid of the quest I wanted
*I went to my php myadmin and select the players_storage database
*I copied from the character that had done the quest (Just changed for the new player ID)

Thanks heaps Xeraphus!
(I am posting here just in case someone else wants to do the same thing. (if they play offline)
if you just want to change the storage value you don't have to do all that with phpmyadmin lol
just use /storage playername, storageid, newvalue
for example, /storage xeraphus, 8000, 1 sets storage 8000 to = 1 on xeraphus
 
Code:
function onSay(cid, words, param)
    local t = string.explode(param, ",")
    if(not t[2]) then
        doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Invalid param specified.")
        return true
    end

    local tid = getPlayerByNameWildcard(t[1])
    if(not tid or (isPlayerGhost(tid) and getPlayerGhostAccess(tid) > getPlayerGhostAccess(cid))) then
        doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Player " .. param .. " not found.")
        return true
    end

    if(not t[3]) then
        doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, " [" .. t[1] .. " - " .. t[2] .. "] = " .. getPlayerStorageValue(tid, t[2]))
    else
        setPlayerStorageValue(tid, t[2], t[3])
    end

    return true
end
 
Back
Top