#TÓPICO RESOLVIDO
#DUVIDA SANADA
#TÓPICO RESOLVIDO
#DUVIDA SANADA
Beautiful Life #
tente assim (nao esqueca do rep)
tente assim (nao esqueca do rep)
function onSay(cid, words, param)local config = {pz = false, -- players precisam estar em protection zone para usar? (true or false)battle = true, -- players deve estar sem battle (true or false)custo = false, -- se os teleport irão custa (true or false)need_level = false, -- se os teleport irão precisar de level (true or false)premium = true, -- somente vip players poderam usar o comando? ("yes" or "no")storageUse = 901941 -- storage usado.exhaustionSeconds = 1800, -- exausted em segundos}--[[ Config lugares]]--local lugar = {["depot"] = { -- nome do lugarpos = {x=1070, y=1102, z=7},level = 0,price = 0},["temple"] = { -- nome do lugarpos = {x=1088, y=1085, z=7},level = 0, price = 0},["arena"] = { -- nome do lugarpos = {x=1070, y=1106, z=8},level = 0,price = 0},["viparea"] ={ -- nome do lugarpos = {x=885, y=800, z=7},level = 0,price = 0},["trainer"] ={ -- nome do lugarpos = {x=1387, y=1045, z=7},level = 0,price = 0},["teleports"] ={ -- nome do lugarpos = {x=1083, y=1142, z=7},level = 0,price = 0},["npcs"] ={ -- nome do lugarpos = {x=1095, y=953, z=7},level = 0,price = 0},}--[[ Lista de Viagem (Não mexa) ]]--if (param == "lista") thenlocal str = ""str = str .. "Lugares Onde Podem Ser Teletransportados :\n \n"for name, pos in pairs(lugar) dostr = str..name.."\n"endstr = str .. ""doShowTextDialog(cid, 6579, str)return TRUEendlocal a = lugar[param]if not(a) thendoPlayerSendTextMessage(cid, 25, "Desculpa, este lugar não existe na Lista")doSendMagicEffect(getCreaturePosition(cid), CONST_ME_POFF)return TRUEelseif config.pz == true and getTilePzInfo(getCreaturePosition(cid)) == FALSE thendoPlayerSendTextMessage(cid, MESSAGE_EVENT_DEFAULT,"Você necessita esta em uma area ProtectZone.")return TRUEelseif config.premium == true and not isPremium(cid) thendoPlayerSendTextMessage(cid, MESSAGE_EVENT_DEFAULT, "Apenas players com premium account podem teleportar.")return TRUEelseif config.battle == true and getCreatureCondition(cid, CONDITION_INFIGHT) == TRUE thendoPlayerSendTextMessage(cid, MESSAGE_EVENT_DEFAULT, "Você não pode se teletransporta enquanto estiver com Fight ligado.")return TRUEelseif config.need_level == true and getPlayerLevel(cid) < a.level thendoPlayerSendTextMessage(cid, 25, "Desculpe,Voce não tem level. voce precisa "..a.level.." level ou mais para ser teleportado.")doSendMagicEffect(getCreaturePosition(cid), CONST_ME_POFF)return TRUEelseif config.custo == true and doPlayerRemoveMoney(cid, a.price) == FALSE thendoPlayerSendTextMessage(cid, 25, "Desculpe,voce nao tem dinheiro suficiente. Voce precisa "..a.price.." gp para ser teleportado.")doSendMagicEffect(getCreaturePosition(cid), CONST_ME_POFF)return TRUEelseif config.vip == true and getPlayerStorageValue(cid, tonumber(config.storage)) - os.time() <= 0 thendoPlayerSendTextMessage(cid, 25, "Desculpa, somente player com VIP pode usar este comando.")doSendMagicEffect(getCreaturePosition(cid), CONST_ME_POFF)return TRUEendif (exhaustion.get(cid, config.storageUse) <= 60) thendoPlayerSendCancel(cid, "Você só pode usar novamente após [" .. exhaustion.get(cid, config.storageUse).."] segundos.")elseexhaustion.set(cid, config.storageUse, config.exhaustionSeconds)doTeleportThing(cid, a.pos)doSendMagicEffect(a.pos, 36)doBroadcastMessage("" .. getPlayerName(cid) .. " foi teletransportado para " .. param .. " usando !fly." ,MESSAGE_INFO_DESCR)endreturn TRUEend
Tinha dado um errinho bobo de uma virgula, mais eu mesmo tirei. Valeu Rep+
Obrigado
tente assim (nao esqueca do rep)
function onSay(cid, words, param)local config = {pz = false, -- players precisam estar em protection zone para usar? (true or false)battle = true, -- players deve estar sem battle (true or false)custo = false, -- se os teleport irão custa (true or false)need_level = false, -- se os teleport irão precisar de level (true or false)premium = true, -- somente vip players poderam usar o comando? ("yes" or "no")storageUse = 901941 -- storage usado.exhaustionSeconds = 1800, -- exausted em segundos}--[[ Config lugares]]--local lugar = {["depot"] = { -- nome do lugarpos = {x=1070, y=1102, z=7},level = 0,price = 0},["temple"] = { -- nome do lugarpos = {x=1088, y=1085, z=7},level = 0, price = 0},["arena"] = { -- nome do lugarpos = {x=1070, y=1106, z=8},level = 0,price = 0},["viparea"] ={ -- nome do lugarpos = {x=885, y=800, z=7},level = 0,price = 0},["trainer"] ={ -- nome do lugarpos = {x=1387, y=1045, z=7},level = 0,price = 0},["teleports"] ={ -- nome do lugarpos = {x=1083, y=1142, z=7},level = 0,price = 0},["npcs"] ={ -- nome do lugarpos = {x=1095, y=953, z=7},level = 0,price = 0},}--[[ Lista de Viagem (Não mexa) ]]--if (param == "lista") thenlocal str = ""str = str .. "Lugares Onde Podem Ser Teletransportados :\n \n"for name, pos in pairs(lugar) dostr = str..name.."\n"endstr = str .. ""doShowTextDialog(cid, 6579, str)return TRUEendlocal a = lugar[param]if not(a) thendoPlayerSendTextMessage(cid, 25, "Desculpa, este lugar não existe na Lista")doSendMagicEffect(getCreaturePosition(cid), CONST_ME_POFF)return TRUEelseif config.pz == true and getTilePzInfo(getCreaturePosition(cid)) == FALSE thendoPlayerSendTextMessage(cid, MESSAGE_EVENT_DEFAULT,"Você necessita esta em uma area ProtectZone.")return TRUEelseif config.premium == true and not isPremium(cid) thendoPlayerSendTextMessage(cid, MESSAGE_EVENT_DEFAULT, "Apenas players com premium account podem teleportar.")return TRUEelseif config.battle == true and getCreatureCondition(cid, CONDITION_INFIGHT) == TRUE thendoPlayerSendTextMessage(cid, MESSAGE_EVENT_DEFAULT, "Você não pode se teletransporta enquanto estiver com Fight ligado.")return TRUEelseif config.need_level == true and getPlayerLevel(cid) < a.level thendoPlayerSendTextMessage(cid, 25, "Desculpe,Voce não tem level. voce precisa "..a.level.." level ou mais para ser teleportado.")doSendMagicEffect(getCreaturePosition(cid), CONST_ME_POFF)return TRUEelseif config.custo == true and doPlayerRemoveMoney(cid, a.price) == FALSE thendoPlayerSendTextMessage(cid, 25, "Desculpe,voce nao tem dinheiro suficiente. Voce precisa "..a.price.." gp para ser teleportado.")doSendMagicEffect(getCreaturePosition(cid), CONST_ME_POFF)return TRUEelseif config.vip == true and getPlayerStorageValue(cid, tonumber(config.storage)) - os.time() <= 0 thendoPlayerSendTextMessage(cid, 25, "Desculpa, somente player com VIP pode usar este comando.")doSendMagicEffect(getCreaturePosition(cid), CONST_ME_POFF)return TRUEendif (exhaustion.get(cid, config.storageUse) <= 60) thendoPlayerSendCancel(cid, "Você só pode usar novamente após [" .. exhaustion.get(cid, config.storageUse).."] segundos.")elseexhaustion.set(cid, config.storageUse, config.exhaustionSeconds)doTeleportThing(cid, a.pos)doSendMagicEffect(a.pos, 36)doBroadcastMessage("" .. getPlayerName(cid) .. " foi teletransportado para " .. param .. " usando !fly." ,MESSAGE_INFO_DESCR)endreturn TRUEend
Tinha dado um errinho bobo de uma virgula, mais eu mesmo tirei. Valeu
Rep+
Obrigado
Hey, nao ta dando o exausted.
Beautiful Life #
Tópico movido para a seção de dúvidas e pedidos resolvidos.
Não respondo PMs solicitando suporte. Já existem seções no fórum para isto.