• 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!

Making quest status work on character_view

pikaboy

New Member
Joined
Mar 10, 2010
Messages
37
Reaction score
0
Hey there,

I'm having a problem with making the quest status work on my ModernAAC site. I understand that it relies on storage.

For example;

PHP:
$characterPageQuests[] = array('storage'=>35700, 'value'=>2, 'name'=>'Demon Oak Quest');

Here's the code I use for the NPC;

PHP:
elseif msgcontains(msg, 'demon oak') then
		selfSay('Did you defeat the demon oak?', cid)
		talkState[talkUser] = 2
	elseif msgcontains(msg, 'yes') and talkState[talkUser] == 2 then
		if getCreatureStorage(cid, 35700) == 1 then
			selfSay('Good job!', cid)
			setPlayerStorageValue(cid, 35700, 2)
			talkState[talkUser] = 0
		else

The NPC works well and all, but my command, setPlayerStorageValue(cid, 35700, 2) , doesnt add a entry in the database, therefore the injection.php can't find anything.

What am I doing wrong here? Help'll be appreciated.
 
This is the script the chests use. However, I cannot make out of this what to fill in exactly at ''storage'' and ''value'' line.






PHP:
local uid =
{
	[12901] = {done = 12900, reward = 2495, count = 1},
        [12902] = {done = 12900, reward = 8905, count = 1},
        [12903] = {done = 12900, reward = 2495, count = 1},
        [12904] = {done = 12900, reward = 8905, count = 1}
}
 
function onUse(cid, item, fromPosition, itemEx, toPosition)
 
        if uid[item.uid] then
                local t = uid[item.uid]
                if(getCreatureStorage(cid, t.done) < 1) then
                        doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "You have found " .. getItemArticleById(t.reward) .. " " .. getItemNameById(t.reward) .. ".")
                        doPlayerAddItem(cid, t.reward, t.count)
                        doCreatureSetStorage(cid, t.done, 1)
                else
                        doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "It's empty.")
                end
        else
                return false
        end
        return true
end
 
Tried that -- opened the chest, nothing happened unfortunately. Should I fill 1 for value? I did.

it demonOak.lua, the main script, it also says something like this;

PHP:
local storages =
{ 
  done = 37500

}
 
12900 use in modernacc not in oak scripts (there don't change antything).

Like this:
PHP:
$characterPageQuests[] = array('storage'=>12900, 'value'=>2, 'name'=>'Demon Oak Quest');
i'm not sure with value because i don't use modernacc
 
Thanks for that

Problem is though, when I look in my mySQL database after opening one of the chests, it doesn't have anything new added. (no 12900 with a playerid, nothing)
 
Back
Top