Postado Maio 30, 2014 11 anos Ah, pode crer... Foi o sono... kkkk, vc sabe do q eu to flnd... :S Editado Maio 30, 2014 11 anos por danihcv (veja o histórico de edições) Te ajudei?? REP + e ficamos quites... http://www.tibiaking.com/forum/uploads/emoticons/default_happyy.png' alt=';D'> Atenciosamente, Daniel. Abraços! Meus tutoriais: Programação: Resolvendo QUALQUER erro na data base. Scripts (system's, creaturescripts, mod's, NPC's, etc): (Sistema) GOD Ambient Light Full. Adicionando novas mounts ao servidor [NPC] Papai Noel que dá presente todo ano. Web-site: Resolvendo problema de caracteres especiais em PHP Formatando textos em PHP! Mudando a cor, tamanho, fonte, etc. Criando e configurando tabelas para paginas PHP
Postado Maio 30, 2014 11 anos Dei um upgrade no script, pq antes ele tava meio inútil.... Agora o player tem que esperar um tempo configurável para poder usar denovo a alavanca... se precisar de uma alteração a seu gosto me fale que eu faço de boa... premmysumon.lua --Script Made By Llucas75 Of TK function onUse(cid, item, fromPosition, itemEx, toPosition) --parte configurável-- local minutos = 60 --tempo em minutos para o player poder usar a alavanca denovo(se não quiser essa restrição deixe em 0.) local posmonster = {x= posx, y = posy, z= posz} --posição que monstro nascerá local monster = "Demon" --Nome do monstro que será spawnado local stor = 18992 local msg1 = "Voce precisar ter um ou mais dias de premium para puxar esta alavanca!" -- mensagem caso não tenha 1 ou mais dias de premium --fim parte configurável, sem conhecimentos básicos não edite.-- local stor = 18992 local tempo = minutos*60 local limitedeuso = 12331 local player = getPlayerPremiumDays(cid) if isPremium(cid) == true and player > 1 then if (getPlayerStorageValue(cid, stor) == 0) and (getPlayerStorageValue(cid, limitedeuso) - os.time() <= 0) then doCreateMonster(monster, posmonster) setPlayerStorageValue(cid, stor, 1) setPlayerStorageValue(cid, limitedeuso, os.time() + tempo) elseif (getPlayerStorageValue(cid, stor) == 1) and (getPlayerStorageValue(cid, limitedeuso) - os.time() <= 0) then doCreateMonster(monster, posmonster) setPlayerStorageValue(cid, stor, 2) setPlayerStorageValue(cid, limitedeuso, os.time() + tempo) elseif (getPlayerStorageValue(cid, stor) == 2) and (getPlayerStorageValue(cid, limitedeuso) - os.time() <= 0) then doCreateMonster(monster, posmonster) setPlayerStorageValue(cid, stor, 3) setPlayerStorageValue(cid, limitedeuso, os.time() + tempo) elseif (getPlayerStorageValue(cid, stor) == 3) and (getPlayerStorageValue(cid, limitedeuso) - os.time() <= 0) then doCreateMonster(monster, posmonster) setPlayerStorageValue(cid, stor, 4) setPlayerStorageValue(cid, limitedeuso, os.time() + tempo) elseif (getPlayerStorageValue(cid, stor) == 4) and (getPlayerStorageValue(cid, limitedeuso) - os.time() <= 0) then doCreateMonster(monster, posmonster) setPlayerStorageValue(cid, stor, 5) setPlayerStorageValue(cid, limitedeuso, os.time() + tempo) elseif (getPlayerStorageValue(cid, stor) == 5) and (getPlayerStorageValue(cid, limitedeuso) - os.time() <= 0) then doCreateMonster(monster, posmonster) setPlayerStorageValue(cid, stor, 6) setPlayerStorageValue(cid, limitedeuso, os.time() + tempo) elseif (getPlayerStorageValue(cid, stor) == 6) and (getPlayerStorageValue(cid, limitedeuso) - os.time() <= 0) then doCreateMonster(monster, posmonster) setPlayerStorageValue(cid, stor, 7) setPlayerStorageValue(cid, limitedeuso, os.time() + tempo) elseif (getPlayerStorageValue(cid, stor) == 7) and (getPlayerStorageValue(cid, limitedeuso) - os.time() <= 0) then doCreateMonster(monster, posmonster) setPlayerStorageValue(cid, stor, 8) setPlayerStorageValue(cid, limitedeuso, os.time() + tempo) elseif (getPlayerStorageValue(cid, stor) == 8) and (getPlayerStorageValue(cid, limitedeuso) - os.time() <= 0) then doCreateMonster(monster, posmonster) setPlayerStorageValue(cid, stor, 9) setPlayerStorageValue(cid, limitedeuso, os.time() + tempo) elseif (getPlayerStorageValue(cid, stor) == 9) and (getPlayerStorageValue(cid, limitedeuso) - os.time() <= 0) then doCreateMonster(monster, posmonster) setPlayerStorageValue(cid, stor, 0) doPlayerRemovePremiumDays(cid, 1) setPlayerStorageValue(cid, limitedeuso, os.time() + tempo) end else doPlayerSendTextMessage(cid, TALKTYPE_ORANGE_1, msg1) end return true end actions.xml tag <action actionid="ACTION ID DA ALAVANCA" event="script" value="premmysumon.lua"/> Editado Maio 30, 2014 11 anos por llucas75 (veja o histórico de edições) Scripter: |||||||||| 10% Te ajudei?? REP + e ficamos quites... Atenciosamente, Lucas. Abraços!
Participe da conversa
Você pode postar agora e se cadastrar mais tarde. Se você tem uma conta, faça o login para postar com sua conta.