Cloow
Active Member
- Joined
- May 10, 2010
- Messages
- 1,086
- Reaction score
- 35
when I run the script it sends me "You need to find the four pieces of crystal first." I have all the storageids
Console error when I use the forge
The crystals
Console error when I use the forge
[21/01/2013 15:51:11] [Error - Action Interface]
[21/01/2013 15:51:11] data/actions/scripts/crstoneswitch.luanUse
[21/01/2013 15:51:11] Description:
[21/01/2013 15:51:11] (luaGetCreatureStorage) Creature not found
Lua:
function onUse(cid, item, frompos, item2, topos)
if getPlayerStorageValue(cid) == 31587 and getPlayerStorageValue(cid) == 31588 and getPlayerStorageValue(cid) == 31589 and getPlayerStoragevalue(cid) == 31590 then
doPlayerSendTextMessage(cid, 22, "You put the four pieces of crystal together and a crystal sword was created!")
doPlayerAddItem(cid, 11449, 1)
setPlayerStorageValue(cid, 31599, 1)
elseif getPlayerStorageValue(cid) == 31599 then
doPlayerSendTextMessage(cid, 22, "You already found the pieces")
else
doPlayerSendTextMessage(cid, 22, "You need to find the four pieces of crystal first.")
end
return true
end
The crystals
Lua:
function onUse(cid, item, frompos, item2, topos)
if getPlayerStorageValue(cid, 31590) <= 0 then
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "You found a piece of green crystal.")
setPlayerStorageValue(cid, 31590, 1)
elseif getPlayerStorageValue(cid, 31590) >= 1 then
doPlayerSendCancel(cid, "There is nothing there")
end
return true
end
Lua:
function onUse(cid, item, frompos, item2, topos)
if getPlayerStorageValue(cid, 31589) <= 0 then
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "You found a piece of light blue crystal.")
setPlayerStorageValue(cid, 31589, 1)
elseif getPlayerStorageValue(cid, 31589) >= 1 then
doPlayerSendCancel(cid, "There is nothing there")
end
return true
end
Lua:
function onUse(cid, item, frompos, item2, topos)
if getPlayerStorageValue(cid, 31588) <= 0 then
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "You found a piece of red crystal.")
setPlayerStorageValue(cid, 31588, 1)
elseif getPlayerStorageValue(cid, 31588) >= 1 then
doPlayerSendCancel(cid, "There is nothing there")
end
return true
end
Lua:
function onUse(cid, item, frompos, item2, topos)
if getPlayerStorageValue(cid, 31587) <= 0 then
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "You found a piece of blue crystal.")
setPlayerStorageValue(cid, 31587, 1)
elseif getPlayerStorageValue(cid, 31587) >= 1 then
doPlayerSendCancel(cid, "There is nothing there")
end
return true
end