VMP. 202 Posted December 11, 2012 BoasAqui deixo uma quest que permite aos jogadores trocarem Gold/Yang por Moedas.Relembrando que as moedas são um item qualquer que vocês tenham no servidor e valem X valor.. ------------------------------------------------Nome: Trocar Gold por Moedas--Data: 11 de Dezembro de 2012----------------------------------------------quest moedas begin state start begin when 22067.click 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(51000 , 1); return elseif s == 2 then if pc.count_item(51000) < 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(51000 , 1) pc.changegold(1000000000) end end when 22067.take with item.vnum == 51000 or item.vnum == 51001 or item.vnum == 51002 begin local gold = pc.gold; local name = {} name[51000] = "1KKK"; name[51001] = "5KKK"; name[51002] = "10KKK"; local value = {} value[51000] = 1000000000; value[51001] = 5000000000; value[51002] = 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() == 51000 then pc.remove_item(51000, m) elseif item.get_vnum() == 51001 then pc.remove_item(51001, math.floor(m / 5 ) ) elseif item.get_vnum() == 51002 then pc.remove_item(51002, math.floor(m / 10) ) -- 4 de 10KKK gera 40 de 1KKK e são removidas 4 de 10KKK end pc.give_item2(51000 , 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() == 51000 then pc.remove_item(51000, m2 * 5 ) elseif item.get_vnum() == 51001 then pc.remove_item(51001, m2) elseif item.get_vnum() == 51002 then pc.remove_item(51002, math.floor(m2 / 2) ) end pc.give_item2(51001 , 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() == 51000 then pc.remove_item(51000, m3 * 10) elseif item.get_vnum() == 51001 then pc.remove_item(51001, m3 * 2) -- 4 de 5KKK gera 2 de 10KKK e são removidas as 4 de 5KKK elseif item.get_vnum() == 51002 then pc.remove_item(51002, m3 ) end pc.give_item2(51002 , m3); end end end end end 5 ShadowKnight, TropMT2, MiguelCosta and 2 others reacted to this Share this post Link to post Share on other sites
ŽŞҜIŁŁ€Ř 9 Posted December 11, 2012 podes por essa quest a dar em npc? Share this post Link to post Share on other sites
VMP. 202 Posted December 11, 2012 Porque não ¿Alí onde diz when 22067.click begin mudas para when [npc].chat."Mensagem >.>" begin (: 1 Hadak reacted to this Share this post Link to post Share on other sites
sombra 3 Posted January 9, 2013 nao podes por aqui isso mais ja com a sena para o NPC xD tentei mudar mais nao conseguimete ja direito para o NPC aqui sff Share this post Link to post Share on other sites
juniorira 0 Posted July 21, 2013 queria fazer mas nao entendi xD Share this post Link to post Share on other sites
Hadak 31 Posted July 21, 2013 Obrigado por partilhares levas http://cyber-gamers.org/public/style_emoticons/default/451960.gif Share this post Link to post Share on other sites
TitaniiuMwOw 17 Posted September 14, 2013 onde anda os icons? Share this post Link to post Share on other sites
TitaniiuMwOw 17 Posted February 18, 2014 onde anda os icons? Share this post Link to post Share on other sites
TitaniiuMwOw 17 Posted March 25, 2014 onde anda os icons? Share this post Link to post Share on other sites
TitaniiuMwOw 17 Posted April 28, 2014 Alguém me consegue só a dar moedas de 1kkk? Share this post Link to post Share on other sites