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

Lua Whats wrong with it- Chest quest

kubiczi123

RoFT- First and last memb
Joined
Dec 30, 2011
Messages
102
Reaction score
11
Location
Poland
Whats wrooong:
PHP:
Loading script systems
[15/12/2012 21:53:26] [Error - LuaScriptInterface::loadFile] data/actions/scripts/fstone.lua:1: unexpected symbol near '˙'
[15/12/2012 21:53:26] [Warning - Event::loadScript] Cannot load script (data/actions/scripts/fstone.lua)
[15/12/2012 21:53:26] data/actions/scripts/fstone.lua:1: unexpected symbol near '˙'


Script:
PHP:
function onUse(cid, item, fromPosition, itemEx, toPosition)
if item.uid == 6665 then
queststatus = getPlayerStorageValue(cid,6665)
if queststatus < 1 then
doPlayerSendTextMessage(cid,MESSAGE_INFO_DESCR,"You have found something!")
doPlayerAddItem(cid,11447,1)
doPlayerSetStorageValue(cid,6665,1)
else
doPlayerSendTextMessage(cid,MESSAGE_INFO_DESCR,"You've already taken the prize.")
end

end
return TRUE
end

Please itanz Help
 
Try this:

Lua:
function onUse(cid, item, frompos, item2, topos)
 
if item.uid == 6665 then
queststatus = getPlayerStorageValue(cid,6665)
if queststatus == 1 then
doPlayerSendTextMessage(cid,MESSAGE_EVENT_ADVANCE,"This Chest is empty.")
 
else
doPlayerSendTextMessage(cid,MESSAGE_EVENT_ADVANCE,"You have found something!")
doSendMagicEffect(topos,12)
coins_uid = doPlayerAddItem(cid,11447,1)
setPlayerStorageValue(cid,6665,1)
end
return 0
end
return 1
end
 
Meh.

Lua:
function onUse(cid, item, fromPosition, itemEx, toPosition)
	if item.uid == 6665 then
		queststatus = getPlayerStorageValue(cid, 6665)
		if queststatus ~= 1 then
			doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, 'You have found something!')
			doPlayerAddItem(cid, 11447, 1)
			doPlayerSetStorageValue(cid, 6665, 1)
		else
			doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, 'You\'ve already taken the prize.')
		end
	end
	return true
end

cbf to test.
 
Sorry, still dont working
BTW.
I copied this script:
PHP:
function onUse(cid, item, fromPosition, itemEx, toPosition)
if item.uid == 6666 then
queststatus = getPlayerStorageValue(cid,6666)
if queststatus < 1 then
doPlayerSendTextMessage(cid,MESSAGE_INFO_DESCR,"You have found something!")
doPlayerAddItem(cid,11638,1)
doPlayerSetStorageValue(cid,6666,1)
else
doPlayerSendTextMessage(cid,MESSAGE_INFO_DESCR,"You've already taken the prize.")
end

end
return TRUE
end

And remaked it to this at the first post.
This script is working...

PHP:
	<action uniqueid="6666" event="script" value="starter.lua"/>
	<action uniqueid="6665" event="script" value="fstone.lua"/>
 
Lua:
function onUse(cid, item, frompos, item2, topos)
     if item.uid == 6665 then
       queststatus = getPlayerStorageValue(cid,6665)
        if queststatus == -1 then
   			doPlayerSendTextMessage(cid,MESSAGE_INFO_DESCR,"You have found something!")
   			doPlayerAddItem(cid,11447,1)
   			setPlayerStorageValue(cid,6665,1)
   		else
   			doPlayerSendTextMessage(cid,MESSAGE_INFO_DESCR,"You've already taken the prize.")
       	end
	else
		return 0
   	end

   	return 1
end
 
Back
Top