First commit

This commit is contained in:
2025-02-26 13:42:34 +01:00
commit f465c9072c
2467 changed files with 426214 additions and 0 deletions

View File

@@ -0,0 +1,28 @@
local maps = {
[17528] = "You have successfully read plan A.",
[17529] = "You have successfully read plan B.",
[17530] = "You have successfully read plan C."
}
function onUse(player, item, fromPosition, target, toPosition)
local mapActionId = item:getActionId()
local map = maps[mapActionId]
if not map then
return false
end
local playerPosition = player:getPosition()
if player:getStorageValue(17520) < 8 then
player:say("You shouldn't touch these maps because someone might see you.", TALKTYPE_MONSTER_SAY, false, 0, playerPosition)
return true
end
if player:getStorageValue(mapActionId) ~= 1 then
player:say(map, TALKTYPE_MONSTER_SAY, false, 0, playerPosition)
player:setStorageValue(mapActionId, 1)
else
player:say("You have already read this map.", TALKTYPE_MONSTER_SAY, false, 0, playerPosition)
end
return true
end