Postado Julho 11, 2014 10 anos Este é um post popular. Estava com um Pouco de Tempo e tiver a ideia de cria essa Script (-- Como Funciona? ao você da Use em um item irar ganhar x Level (você pode configurar no script quantos level dará ao da use no item) e Somente Players com x Level poderá usar esse item (tbm podes configurar no script) vamos lá, vá na pasta >> data\action\scripts e crie um arquivo.lua com o nome de itemlevel.lua e dentro cole:: local level = 1 local nivel = 100 function onUse(cid, item, fromPosition, itemEx, toPosition) if getPlayerLevel(cid) <= nivel then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, "voce precisa ser level ".. nivel .." para poder usar esse item que o dará ".. level .." Level.") doSendAnimatedText(getPlayerPosition(cid), "Failed!", 180) return doSendMagicEffect(fromPosition, CONST_ME_POFF) end doRemoveItem(item.uid, 1) doPlayerSendTextMessage(cid,MESSAGE_INFO_DESCR, "Congratz!") doSendMagicEffect(getPlayerPosition(cid), CONST_ME_FIREWORK_BLUE) doSendAnimatedText(getPlayerPosition(cid), "LevelUp!", 18) return doPlayerAddLevel(cid, level) end e em actions.xml adicione essa tag:: <action itemid="XXXX" event="script" value="itemlevel.lua" /> Configurando:: local level = 1 -- Quantidade que dará de level ao usa o item local nivel = 100 -- Level que poderá usar o Tal item na tag no actions.xml no "XXXX" é o ID do item que vai Dar o Level @#Edit Caso alguém quera sem o Limite de Level use o que o Nosso Amigo Luan Disponibilizou:: local level_win = 1 function onUse(cid, item, fromPosition, itemEx, toPosition) local level = getPlayerLevel(cid) if isPlayer(cid) then doSendMagicEffect(getPlayerPosition(cid), CONST_ME_FIREWORK_BLUE) doSendAnimatedText(getPlayerPosition(cid), "LevelUp!", 18) doPlayerAddLevel(cid, level_win) -- doPlayerAddLevel(cid, level + level_win) doRemoveItem(item.uid, 1) end return true end é isso ai Pessoal até a proxima Editado Julho 11, 2014 10 anos por AnnaFeeh (veja o histórico de edições)
Postado Julho 11, 2014 10 anos Legal o script .. Sem limite de level também ficaria legal ... local level_win = 1 function onUse(cid, item, fromPosition, itemEx, toPosition) local level = getPlayerLevel(cid) if isPlayer(cid) then doSendMagicEffect(getPlayerPosition(cid), CONST_ME_FIREWORK_BLUE) doSendAnimatedText(getPlayerPosition(cid), "LevelUp!", 18) doPlayerAddLevel(cid, level_win) -- doPlayerAddLevel(cid, level + level_win) doRemoveItem(item.uid, 1) end return true end
Postado Julho 11, 2014 10 anos Autor gostei mano, muito criativo! segura meu like ae Obrigado Legal o script .. Sem limite de level também ficaria legal ... local level_win = 1 function onUse(cid, item, fromPosition, itemEx, toPosition) local level = getPlayerLevel(cid) if isPlayer(cid) then doSendMagicEffect(getPlayerPosition(cid), CONST_ME_FIREWORK_BLUE) doSendAnimatedText(getPlayerPosition(cid), "LevelUp!", 18) doPlayerAddLevel(cid, level_win) -- doPlayerAddLevel(cid, level + level_win) doRemoveItem(item.uid, 1) end return true end Irei adiciona ao Tópico quem sabe alguns querem sem o Limite de level tbm obrigado Luan *--*
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.