єxŧєrмiηαŧєr 50 Posted May 25, 2014 Boas cria passar esta quest para npc troco o 95005.use por idnpc.chat não aparece nada no npc e tambem a uma que é 95005.take quest: ---------------------------------------------- --Nome: Trocar Gold por Moedas --Data: 11 de Dezembro de 2012 ---------------------------------------------- quest moedas begin state start begin when 95005.use begin local gold = pc.gold; local count = math.floor(gold / 1000000000); say_title("Troca de Moedas"); say("Aqui podes trocar Yang por Moedas"); say("E Moedas por Yang"); say(""); say(""); say_reward("O que desejas fazer?"); local s = select("Yang->Moedas" , "Moedas->Yang","Cancelar"); if s == 3 then return end if s == 1 then say_title("Yang->Moedas"); say("Atualmente tens ".. gold .. " Yang"); say("Podes trocar por:"); say_title("- ".. count .. " Moedas de 1kkk "); say_reward("Tens a certeza?"); local sel = select("Avançar ", "Cancelar"); if sel == 2 then return end if gold < 1000000000 then say_title("Erro!"); say("Não tens Yang necessário para fazer a troca!"); return end pc.changegold(-1000000000); pc.give_item2(95002 , 1); return elseif s == 2 then if pc.count_item(95002) < 1 then say_title("ERRO!") say("Não possuis nenhuma moeda de 1KKK"); return end local rm = 2000000000 - gold; if rm <= 1000000000 then say_title("Moedas->Yang"); say("Aqui podes trocar as moedas de 1KKK por Yang"); say(""); say(""); say_reward("Não posso trocar nenhuma Moeda"); say_reward("Porque a diferença entre o teu dinheiro e os 2KKK"); say_reward("É inferior a uma moeda de 1KKK"); say("E não quero que bugues o teu dinheiro"); return end say_title("Moedas->Yang"); say("Aqui podes trocar as moedas de 1KKK por Yang"); say("Posso-te trocar 1 Moeda de 1KKK, mais não posso!"); say(""); say_reward("Desejas fazê-lo?"); local sx = select("Sim!" , "Cancelar"); if sx == 2 then return end pc.remove_item(95002 , 1) pc.changegold(1000000000) end end when 95005.take with item.vnum == 95002 or item.vnum == 95002 or item.vnum == 95002 begin local gold = pc.gold; local name = {} name[95002] = "1KKK"; name[95002] = "5KKK"; name[95002] = "10KKK"; local value = {} value[95002] = 1000000000; value[95002] = 5000000000; value[95002] = 10000000000; say_title("Troca de Moedas"); say("Tens aí ".. item.get_count() .. " Moedas de ".. name[item.get_vnum()] .. ""); say(""); say(""); say_reward("O que desejas fazer?"); local sel = select("Trocar por Yang" , "Destrocar" , "Cancelar"); if sel == 3 then return end if sel == 1 then if gold + item.get_count() * value[item.get_vnum()] > 2000000000 then say_title("ERRO!") say("Não posso trocar essas moedas todas"); say("Senão o teu dinheiro buga!"); say(""); say("Separa as Moedas em quantidades menores usando a tecla SHIFT"); say("E depois volta a arrastar para aqui!"); return end pc.changegold(item.get_count() * value[item.get_vnum()]); item.remove() elseif sel == 2 then local count = item.get_count(); local real_money = count * value[item.get_vnum()]; local m = math.floor(real_money / 1000000000); local m2 = math.floor(real_money / 5000000000); local m3 = math.floor(real_money / 10000000000); say_title("Destrocar"); say("Aqui podes trocar moedas por moedas de valores diferentes"); say("Podes trocar por:") say_title("- ".. m .. " Moedas de 1kkk "); say_title("- ".. m2 .. " Moedas de 5kkk "); say_title("- ".. m3 .. " Moedas de 10kkk "); say_reward("Escolhe!"); local selx = select("1kkk" , "5kkk" , "10kkk" , "Cancelar"); if selx == 4 then return end if selx == 1 then if m <= 0 then say_title("ERRO!"); say("Essas moedas não chegam para isto!"); return end if item.get_vnum() == 95002 then pc.remove_item(95002, m) elseif item.get_vnum() == 95002 then pc.remove_item(95002, math.floor(m / 5 ) ) elseif item.get_vnum() == 95002 then pc.remove_item(95002, math.floor(m / 10) ) -- 4 de 10KKK gera 40 de 1KKK e são removidas 4 de 10KKK end pc.give_item2(95002 , m); elseif selx == 2 then if m2 <= 0 then say_title("ERRO!"); say("Essas moedas não chegam para isto!"); return end if item.get_vnum() == 95002 then pc.remove_item(95002, m2 * 5 ) elseif item.get_vnum() == 95002 then pc.remove_item(95002, m2) elseif item.get_vnum() == 95002 then pc.remove_item(95002, math.floor(m2 / 2) ) end pc.give_item2(95002 , m2); elseif selx == 3 then if m3 <= 0 then say_title("ERRO!"); say("Essas moedas não chegam para isto!"); return end if item.get_vnum() == 95002 then pc.remove_item(95002, m3 * 10) elseif item.get_vnum() == 95002 then pc.remove_item(95002, m3 * 2) -- 4 de 5KKK gera 2 de 10KKK e são removidas as 4 de 5KKK elseif item.get_vnum() == 95002 then pc.remove_item(95002, m3 ) end pc.give_item2(95002 , m3); end end end end end Share this post Link to post Share on other sites
0 kimameixede 70 Posted May 25, 2014 ---------------------------------------------- --Nome: Trocar Gold por Moedas --Data: 11 de Dezembro de 2012 ---------------------------------------------- quest moedas begin state start begin when 95005.chat."Yang por Moedas." begin local gold = pc.gold; local count = math.floor(gold / 1000000000); say_title("Troca de Moedas"); say("Aqui podes trocar Yang por Moedas"); say("E Moedas por Yang"); say(""); say(""); say_reward("O que desejas fazer?"); local s = select("Yang->Moedas" , "Moedas->Yang","Cancelar"); if s == 3 then return end if s == 1 then say_title("Yang->Moedas"); say("Atualmente tens ".. gold .. " Yang"); say("Podes trocar por:"); say_title("- ".. count .. " Moedas de 1kkk "); say_reward("Tens a certeza?"); local sel = select("Avançar ", "Cancelar"); if sel == 2 then return end if gold < 1000000000 then say_title("Erro!"); say("Não tens Yang necessário para fazer a troca!"); return end pc.changegold(-1000000000); pc.give_item2(95002 , 1); return elseif s == 2 then if pc.count_item(95002) < 1 then say_title("ERRO!") say("Não possuis nenhuma moeda de 1KKK"); return end local rm = 2000000000 - gold; if rm <= 1000000000 then say_title("Moedas->Yang"); say("Aqui podes trocar as moedas de 1KKK por Yang"); say(""); say(""); say_reward("Não posso trocar nenhuma Moeda"); say_reward("Porque a diferença entre o teu dinheiro e os 2KKK"); say_reward("É inferior a uma moeda de 1KKK"); say("E não quero que bugues o teu dinheiro"); return end say_title("Moedas->Yang"); say("Aqui podes trocar as moedas de 1KKK por Yang"); say("Posso-te trocar 1 Moeda de 1KKK, mais não posso!"); say(""); say_reward("Desejas fazê-lo?"); local sx = select("Sim!" , "Cancelar"); if sx == 2 then return end pc.remove_item(95002 , 1) pc.changegold(1000000000) end end when 95005.take with item.vnum == 95002 or item.vnum == 95002 or item.vnum == 95002 begin local gold = pc.gold; local name = {} name[95002] = "1KKK"; name[95002] = "5KKK"; name[95002] = "10KKK"; local value = {} value[95002] = 1000000000; value[95002] = 5000000000; value[95002] = 10000000000; say_title("Troca de Moedas"); say("Tens aí ".. item.get_count() .. " Moedas de ".. name[item.get_vnum()] .. ""); say(""); say(""); say_reward("O que desejas fazer?"); local sel = select("Trocar por Yang" , "Destrocar" , "Cancelar"); if sel == 3 then return end if sel == 1 then if gold + item.get_count() * value[item.get_vnum()] > 2000000000 then say_title("ERRO!") say("Não posso trocar essas moedas todas"); say("Senão o teu dinheiro buga!"); say(""); say("Separa as Moedas em quantidades menores usando a tecla SHIFT"); say("E depois volta a arrastar para aqui!"); return end pc.changegold(item.get_count() * value[item.get_vnum()]); item.remove() elseif sel == 2 then local count = item.get_count(); local real_money = count * value[item.get_vnum()]; local m = math.floor(real_money / 1000000000); local m2 = math.floor(real_money / 5000000000); local m3 = math.floor(real_money / 10000000000); say_title("Destrocar"); say("Aqui podes trocar moedas por moedas de valores diferentes"); say("Podes trocar por:") say_title("- ".. m .. " Moedas de 1kkk "); say_title("- ".. m2 .. " Moedas de 5kkk "); say_title("- ".. m3 .. " Moedas de 10kkk "); say_reward("Escolhe!"); local selx = select("1kkk" , "5kkk" , "10kkk" , "Cancelar"); if selx == 4 then return end if selx == 1 then if m <= 0 then say_title("ERRO!"); say("Essas moedas não chegam para isto!"); return end if item.get_vnum() == 95002 then pc.remove_item(95002, m) elseif item.get_vnum() == 95002 then pc.remove_item(95002, math.floor(m / 5 ) ) elseif item.get_vnum() == 95002 then pc.remove_item(95002, math.floor(m / 10) ) -- 4 de 10KKK gera 40 de 1KKK e são removidas 4 de 10KKK end pc.give_item2(95002 , m); elseif selx == 2 then if m2 <= 0 then say_title("ERRO!"); say("Essas moedas não chegam para isto!"); return end if item.get_vnum() == 95002 then pc.remove_item(95002, m2 * 5 ) elseif item.get_vnum() == 95002 then pc.remove_item(95002, m2) elseif item.get_vnum() == 95002 then pc.remove_item(95002, math.floor(m2 / 2) ) end pc.give_item2(95002 , m2); elseif selx == 3 then if m3 <= 0 then say_title("ERRO!"); say("Essas moedas não chegam para isto!"); return end if item.get_vnum() == 95002 then pc.remove_item(95002, m3 * 10) elseif item.get_vnum() == 95002 then pc.remove_item(95002, m3 * 2) -- 4 de 5KKK gera 2 de 10KKK e são removidas as 4 de 5KKK elseif item.get_vnum() == 95002 then pc.remove_item(95002, m3 ) end pc.give_item2(95002 , m3); end end end end end tenta agora. 1 єxŧєrмiηαŧєr reacted to this Share this post Link to post Share on other sites
0 .тιαgσ 624 Posted May 26, 2014 when 95005.chat "Yang por Moedas." begin se não der mete assim when 95005.click "Yang por Moedas." begin 1 єxŧєrмiηαŧєr reacted to this Share this post Link to post Share on other sites
0 єxŧєrмiηαŧєr 50 Posted May 26, 2014 #RESOLVIDO #CLOSEREQUEST +1 aos dois Share this post Link to post Share on other sites
Boas cria passar esta quest para npc troco o 95005.use por idnpc.chat não aparece nada no npc e tambem a uma que é 95005.take
quest:
Share this post
Link to post
Share on other sites