Postado Junho 8, 2014 11 anos Autor ainda ta dando thing not found =\ e quando eu equipo o item o ot cai Editado Junho 8, 2014 11 anos por poko360 (veja o histórico de edições)
Postado Junho 8, 2014 11 anos jovem na função onThink nao existe o cid, vai ter de utilizar o getPlayersOnline()
Postado Junho 8, 2014 11 anos Vê agr: Script do ring: local storage = 27398 local efeito = 15 local playerpos = getPlayerPosition(pid) function onEquip(cid, item, slot, fromPosition, toPosition) doSendMagicEffect(playerpos, efeito) local rate = {} if getPlayerLevel(cid) <= 1000 then rate = 2 elseif getPlayerLevel(cid) > 1001 and getPlayerLevel(cid) <= 2000 then rate = 2 elseif getPlayerLevel(cid) > 2001 and getPlayerLevel(cid) <= 3000 then rate = 2 elseif getPlayerLevel(cid) > 3001 and getPlayerLevel(cid) <= 4000 then rate = 2 elseif getPlayerLevel(cid) > 4001 then rate = 2 end setPlayerStorageValue(cid, storage, 1) doTransformItem(item.uid, 10309, 1) doPlayerSendTextMessage(cid, 22, "Sua experiencia foi multiplicada (2x).") doPlayerSetExperienceRate(cid, rate) return TRUE end function onDeEquip(cid, item, slot) setPlayerStorageValue(cid, storage, -1) doTransformItem(item.uid, 10310, 1) doPlayerSendTextMessage(cid, 22, "Sua experiencia esta de volta ao normal.") doPlayerSetExperienceRate(cid, 1.0) return TRUE end GlobalEvent: local playerpos = getPlayerPosition(pid) local efeito = 15 local storage = 27398 function onThink(interval, lastExecution) local players = getPlayersOnline() for _, pid in ipairs(getPlayersOnline()) do if getPlayerStorageValue(pid, storage) >= 1 then doSendMagicEffect(playerpos, efeito) end end return true end Editado Junho 8, 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 Junho 8, 2014 11 anos Autor nao acontece nd =S ainda fica aparecendo o thing not found LuagetThingPosition - thing not found Editado Junho 8, 2014 11 anos por poko360 (veja o histórico de edições)
Postado Junho 10, 2014 11 anos local storage = 27398 local efeito = 15 function onEquip(cid, item, slot, fromPosition, toPosition) local playerpos = getThingPos(cid) local rate = {} if getPlayerLevel(cid) <= 1000 then rate = 2 elseif getPlayerLevel(cid) > 1001 and getPlayerLevel(cid) <= 2000 then rate = 2 elseif getPlayerLevel(cid) > 2001 and getPlayerLevel(cid) <= 3000 then rate = 2 elseif getPlayerLevel(cid) > 3001 and getPlayerLevel(cid) <= 4000 then rate = 2 elseif getPlayerLevel(cid) > 4001 then rate = 2 end doSendMagicEffect(playerpos, efeito) setPlayerStorageValue(cid, storage, 1) doTransformItem(item.uid, 10309, 1) doPlayerSendTextMessage(cid, 22, "Sua experiencia foi multiplicada (2x).") doPlayerSetExperienceRate(cid, rate) return true end function onDeEquip(cid, item, slot) setPlayerStorageValue(cid, storage, -1) doTransformItem(item.uid, 10310, 1) doPlayerSendTextMessage(cid, 22, "Sua experiencia esta de volta ao normal.") doPlayerSetExperienceRate(cid, 1.0) return true end GlobalEvents: local storage = 27398 local efeito = 15 function onThink(interval, lastExecution) local playerpos = getThingPos(cid) for _, pid in ipairs(getPlayersOnline()) do if getPlayerStorageValue(pid, storage) >= 1 then doSendMagicEffect(playerpos, efeito) end end return true end
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.