Extrodus
|| Blazera.net ||
So I'm trying to create a script that checks if the player has all the storages from Act I in order to start Act II but currently, all it does is tell me I have already started Act II even though I don't have the storages.
Here's the code, I'm sure I have a small error somewhere.
Thanks in advance!
Here's the code, I'm sure I have a small error somewhere.
Code:
function onUse(cid, item, fromPosition, target, toPosition, isHotkey)
local player = Player(cid)
if not Player(player) then
return false
end
if item:getActionId(6001) and player:getStorageValue(37113) and player:getStorageValue(37114) and player:getStorageValue(37115) and player:getStorageValue(37116) and player:getStorageValue(37117) and player:getStorageValue(37118) then
player:sendTextMessage(MESSAGE_INFO_DESCR, "You have unlocked the Temporal Shrine of [Act II]!")
player:setStorageValue(37121, 1)
player:setStorageValue(37122, 1)
else
player:sendTextMessage(MESSAGE_INFO_DESCR, "You need to activate all the shrines of [Act I] before continuing!")
return false
end
if item:getActionId(6001) and player:getStorageValue(37121,1) then
player:sendTextMessage(MESSAGE_INFO_DESCR, "You have already started [Act II]! Say !travel to continue.")
return true
end
return true
end
Thanks in advance!
Last edited: