Amiroslo
Excellent OT User
- Joined
- Jul 28, 2009
- Messages
- 6,812
- Solutions
- 6
- Reaction score
- 822
Code:
[Error - LuaScriptInterface::loadFile] data/actions/scripts/AOD/rebornteleport.lua:6: '}' expected (to close '{' at line 2) near 'rebornN'
[Warning - Event::loadScript] Cannot load script (data/actions/scripts/AOD/rebornteleport.lua)
Code:
local config =
{
posWrong = {x=1090, y=1096, z=7}, -- If they dont have required storage value
posCorrect = {x=1093, y=1151, z=7}, -- If they DO have correct storage value
rebornV = 2500 -- reborn storage
rebornN = 1 -- reborn value requirement
}
-- Reborn teleport script
function onUse(cid, item, fromPosition, itemEx, toPosition)
if getPlayerStorageValue(cid, config.rebornV) >= config.rebornN then -- If players "reborn" storage is greater than 1. THEN:
doTeleportThing(cid, config.posCorrect) -- teleport them to "posCorrect" value
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Welcome to Reborn Hunting Spawns.")
else
doTeleportThing(cid, config.posWrong) -- reject their access.
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Sorry, you are under the requirement reborn.")
end
return true
end
rep++ for fixer