map editor > chest or anything else > actionid 2000 and unique id 2160 > then put 15 cc's
done
x)
Lol didnt work..
21:54 You have found 2000 of crystal coin.
21:54 You see 100 crystal coins.
They weight 10.00 oz.
did you put 15 cc's in the container-part (map editor)?
did you put 15 cc's in the container-part (map editor)?
<action uniqueid="5000" script="15cc.lua" />
function onUse(cid, item, fromPosition, itemEx, toPosition)
if getPlayerStorageValue(cid,5000) == 1 then
doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR,"You have done this quest.")
return TRUE
end
doPlayerSetStorageValue(cid,5000,1)
doPlayerAddItem(cid,2160,15)
doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR,"You have found 15 crystal coins.")
return TRUE
end
@UP, The first end should be else![]()
yea, because return stops the scriptnope
He is using SimOne and not RME. Read the first post next time u dump f*****
Ont: I guess you can script it?
function onUse(cid, item, fromPosition, itemEx, toPosition)
if getPlayerStorageValue(cid,5000) == 1 then
doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR,"You have done this quest.")
else
doPlayerSetStorageValue(cid,5000,1)
doPlayerAddItem(cid,2160,15)
doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR,"You have found 15 crystal coins.")
end
return TRUE
end
function onUse(cid, item, fromPosition, itemEx, toPosition)
if getPlayerStorageValue(cid, 5000) == 1 then
doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR,"You have done this quest.")
else
setPlayerStorageValue(cid, 5000, 1)
doPlayerAddItem(cid, 2160, 15)
doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR,"You have found 15 crystal coins.")
end
return TRUE
end
Lua Script Error: [action Interface]
Data/actions/script/15cc.lua onUse
Data/actions/script/15cc.lua:6 attempt to call global ´doPlayerSetStorageValue´ <a nil value>
What is wrong?
doPlayerSetStorageValue
setPlayerStorageValue