Postado Abril 5, 2020 5 anos Autor Fala irmão, tranquilidade? Por acaso, você teria um script p/ quest? Tipo, uma action.. Aquelas quest por action, tlgd? Eu tenho um script de Action Quest aqui, porém ele dá p/ fazer qualquer level também, gostaria de fazer tais quests, porém com level, se liga, vê se você consegue me ajudar ai irmão, vlw, tmj.. function onUse(cid, item, fromPosition, itemEx, toPosition) local player = Player(cid) if item.uid == 4955 then if player:getStorageValue(490) < 1 then player:setStorageValue(490, 1) player:addItem(2519, 1) player:sendTextMessage(MESSAGE_INFO_DESCR, "You have found a crown shield.") else player:sendTextMessage(MESSAGE_INFO_DESCR, "The tree is empty.") end elseif item.uid == 3027 then if player:getStorageValue(491) < 1 then player:setStorageValue(491, 1) player:addItem(2487, 1) player:sendTextMessage(MESSAGE_INFO_DESCR, "You have found a crown armor.") else player:sendTextMessage(MESSAGE_INFO_DESCR, "The tree is empty.") end end return true end
Postado Abril 5, 2020 5 anos @Jonathan005 opa, claro amigo, use como exemplo, se quiser usar este script já que está todo configurado só mudar o id do item : // se tiver alguma dúvida pergunte. function onUse(cid, item, frompos, item2, topos) -- script anexado por Henrique Baiak storage = 490 item = 2160 quantidade = 1 level = 8 if getPlayerLevel(cid) >= level and getPlayerStorageValue(cid,storage) == -1 then doPlayerSendTextMessage(cid,25,"Você recebeu seu item!") doPlayerAddItem(cid, item, quantidade) setPlayerStorageValue(cid,storage,1) elseif getPlayerLevel(cid) <= level then doPlayerSendTextMessage(cid,25,"Você precisa ser level 8 ou mais.") elseif getPlayerStorageValue(cid,storage) >= 1 then doPlayerSendTextMessage(cid,25,"Você já fez está quest") end return true end Editado Abril 5, 2020 5 anos por Piquenuxo (veja o histórico de edições)
Postado Abril 5, 2020 5 anos Autor Caramba, humilde demais, jogou longe irmão, valeu pela força, abraço, tmjuntao Mano, eu testei o script, porém observei, onde eu coloco o item uniqid? e o actionid? que é onde a pessoa clica? dá uma luz ai, kk vlw
Postado Abril 6, 2020 5 anos @Jonathan005 amigo é só você registrar a função do actionid no actions.xml <action actionid="2424" event="script" value="questlevel.lua"/> <action uniqueid="2424" event="script" value="questlevel.lua"/>
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.