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

Creating one time reward chests?

Magictibiaman

New Member
Joined
May 25, 2009
Messages
371
Reaction score
0
how do i Create one time reward chests?
so i can't open the same chest twice?
 
Last edited:
Just put the items in the chest via map editor.. Don't set an action id or anything like that

That's wrong. That's equal to opening the chest, and taking the items, and other players can't take anything, because the first player took everything.

Also, he don't want 2 items in the chest, he wants the same item to be taken twice.
 
QUEST SYSTEM EXAMPLES:


  • (Tfs 0.2 quest chest)

You change the unique id to the item id of the item.
Then you are done.

  • (Tfs 0.3 quest chest)

Action id 2000
Unique id is from 1- 65500 (Needs to be unique)
And you just select the item in the chest by clicking on one of the small black squares in the chest...
Then you are done.

For more information about the 0.3 quest system click here.
 
here ya go you can get 1 item from 2 chests.
you have to change the storage id and the id of of items afc.

PHP:
function onUse(cid, item, fromPosition, itemEx, toPosition)

       if item.uid == 9030 then
           queststatus = getPlayerStorageValue(cid,9030)
           if queststatus == -1 then
               doPlayerSendTextMessage(cid,22,"You have found a Crystal Coin.")
               doPlayerAddItem(cid,2160,1)
               setPlayerStorageValue(cid,9030,1)
           else
               doPlayerSendTextMessage(cid,22,"It is empty.")
           end
       elseif item.uid == 9031 then
           queststatus = getPlayerStorageValue(cid,9031)
           if queststatus == -1 then
               doPlayerSendTextMessage(cid,22,"You have found a Crystal Coin.")
               doPlayerAddItem(cid,2160,1)
               setPlayerStorageValue(cid,9031,1)
           else
               doPlayerSendTextMessage(cid,22,"It is empty.")
           end
    end
       return 1
end



and add this in to action.xml
PHP:
	<action uniqueid="9030" script="dubblequest.lua"/>
	<action uniqueid="9031" script="dubblequest.lua"/>

and in tfs 0.3.4 i think you have to do this
PHP:
	<action uniqueid="9030" event="script" value="dubblequest.lua"/>
	<action uniqueid="9031" event="script" value="dubblequest.lua"/>
 
Back
Top