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

Script Quest

Exorz

New Member
Joined
Mar 14, 2009
Messages
59
Reaction score
0
Hello i got a problem with scripting in quest i know i can make qquest i nmapeditor but then io cant make like u get 10cc only 1

and when i test to make quest in "actions" i what it stands to do but i wont work so you guys mabey can tell me better how to make quest on "actions"



7.6 <------------------
 
Last edited:
Put this in moneyquest.lua in actions/scripts folder
Code:
  function onUse(cid, item, frompos, item2, topos)

        if item.uid == 62623 then
        queststatus = getPlayerStorageValue(cid,5640)
        if queststatus == -1 then
        doPlayerSendTextMessage(cid,22,"You have found 10 crystal coins.")
        doPlayerAddItem(cid,2160,10)
        setPlayerStorageValue(cid,5640,1)
        else
        doPlayerSendTextMessage(cid,22,"It is empty.")
        end
        else
        return 0
        end

        return 1
        end

Put that in your actions.xml
Code:
        <action uniqueid="62623" event="script" value="moneyquest.lua" />

Put unique id 62623 on the chest that you'd like to be the quest chest in your mapeditor.
 
Put this in moneyquest.lua in actions/scripts folder
Code:
  function onUse(cid, item, frompos, item2, topos)

        if item.uid == 62623 then
        queststatus = getPlayerStorageValue(cid,5640)
        if queststatus == -1 then
        doPlayerSendTextMessage(cid,22,"You have found 10 crystal coins.")
        doPlayerAddItem(cid,2160,10)
        setPlayerStorageValue(cid,5640,1)
        else
        doPlayerSendTextMessage(cid,22,"It is empty.")
        end
        else
        return 0
        end

        return 1
        end

Put that in your actions.xml
Code:
        <action uniqueid="62623" event="script" value="moneyquest.lua" />

Put unique id 62623 on the chest that you'd like to be the quest chest in your mapeditor.


ok i test it but where do "5640" come from on
queststatus = getPlayerStorageValue(cid,5640
and
setPlayerStorageValue(cid,5640,1)
?
 
Try this

Code:
function onUse(cid, item, frompos, item2, topos)

   	if item.uid == 62623 then
   		queststatus = getPlayerStorageValue(cid,5640)
   		if queststatus == -1 then
			doPlayerSendTextMessage(cid,22,"You have found 10 crystal coins.")
			doPlayerAddItem(cid,2160,10)
			setPlayerStorageValue(cid,5640,1)
   		else
   			doPlayerSendTextMessage(cid,22,"It is empty.")
   		end
	else
		return 0
   	end

   	return 1
end


and in actions.xml
Code:
<action uniqueid="62623" script="moneyquest.lua" />
 
Back
Top