
acan
Membro
-
Registro em
-
Última visita
Histórico de Curtidas
-
acan deu reputação a Vodkart em (Resolvido)ajuda error script tpo problema está na estruturação do código.
function onStepIn(cid, item, position, fromPosition) local pos = {x=397, y=1056, z=7} if getPlayerStorageValue(cid, 8000) == 112 then setPlayerStorageValue(cid, 8000, 113) doPlayerAddExperience(cid, 10000) elseif getPlayerStorageValue(cid, 8000) == 114 then doTeleportThing(cid, pos) end return true end
-
acan deu reputação a Storm em (Resolvido)Arvorelocal config = { porc = 25, -- | % de chance | -- itemid = 5252, -- | id do item | -- qnt = 1, -- | Count do item | -- storage = 232526, -- | Storage que conta o tempo | -- horas = 1 -- | Horas para usar o item novamente | -- } local msgs = { exaust = "você so pode usar isso a cada uma hora", -- | Msg de exaust | -- sucess = "voce recebeu o item", -- | Msg qnd conseguir | -- notmission = "você não está nestas missões.", -- | Msg quando n tiver na missao | -- fail = "voce n recebeu o item" -- | Msg quando falhar | -- } function onUse(cid, item, fromPosition, itemEx, toPosition) local pos = getCreaturePosition(cid) if getPlayerStorageValue (cid, 8000) ~= 98 then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, msgs.notmission) doSendMagicEffect(pos, 3) return true end if os.time() - getPlayerStorageValue(cid, config.storage) <= config.horas * 3600 then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, msgs.exaust) doSendMagicEffect(pos, 3) return true end if math.random(1, 100) <= config.porc then doSendMagicEffect(pos, 5) doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, msgs.sucess) doPlayerAddItem(cid, config.itemid, config.qnt) setPlayerStorageValue (cid, 8000, 99) setPlayerStorageValue(cid, config.storage, os.time()) return true end doSendMagicEffect(pos, 5) doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, msgs.fail) setPlayerStorageValue(cid, config.storage, os.time()) return true end
-
acan deu reputação a Dwarfer em (pedido) spells teleport in various positionsIf I could understand, you want to the player teleports to a random position, right? Add the positions.