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

Chest quests help fast please

shawntio

Member
Joined
Apr 14, 2008
Messages
737
Reaction score
5
Location
sweden
Hi i made a quest but it didn't work i did put the action id as 2000 and a random unique id and a item in the chest but when i click at the chest i don't get an item :S

i use "the forgotten server 0.3.6 crying damson" if you know what's wrong please reply Thanks!
 
Instead of adding the items with map editor, you need to make action script for it like this, remember to set unique id to same as you did with map editor:
actions.xml
Code:
<action uniqueid="50032" event="script" value="fire_axe.lua"/>

fire_axe.lua
Code:
function onUse(cid, item, frompos, item2, topos)
	if item.uid == 50032 then
		if getPlayerStorageValue(cid,50032) == -1 then
			doPlayerSendTextMessage(cid,25,"You have found a Fire Axe.")
			doPlayerAddItem(cid,2432,1)
			setPlayerStorageValue(cid,50032,1)
		else
			doPlayerSendTextMessage(cid,25,"The is empty.")
		end

	end
	return TRUE
end
 
I using it:
Code:
 function onUse(cid, item, frompos, item2, topos)

local config = {
        storage = 6008, -- player storage value
        item = 2103,   -- Id Item of quest
		

}

        if getPlayerStorageValue(cid, config.storage) == -1 then
                setPlayerStorageValue(cid, config.storage, 1)
				doPlayerSendTextMessage(cid,25,"You have found a honey flower.") 

                key = doPlayerAddItem(cid, config.item, 1) ~= -1
        else
                doPlayerSendTextMessage(cid,25,"The plant is empty.")  
                end
        return TRUE
end
 
hum, isn't that the exactly same thing as MiPo91 wrote? i got manny quests, and i don't want to make one by one like that, it will take a long time until i'm done with all the quests if i do it like that :/ so please can someone find a solution so i can make quests in mapeditor
 
Back
Top