Postado Junho 11, 2013 12 anos Olá galerinha, Estou trazendo um script de minha autoria para vocês usufruir-lo. "O que ele tem de diferente dos outros comandos ?" Então, ele além de comprar as 5 blessings ele também compra o twist of fate. Ao morrer com as 6 blessings por 1 monstro, você perderá apenas as 5 blessings, e o twist of fate continuará, então usando o comando !bless com esse script você comprará apenas as 5 blessings. (Seria um disperdicio comprar as 6 blessings por um preço mais caro, sendo que você já tem a twist of fate). Quando você morrer para um player, você perderá apenas o twist of fate, então, usando o comando !bless com esse script, você comprará apenas o twist of fate. Se você não tiver nenhum dos dois, ele comprará todas as blessings por um preço maior, é óbvio. O padrão de preço do Script está assim : Twist of Fate = 50k Todas as 5 blessings = 50k Todas as blessings = 100k Ou seja, se você morrer, ao invés de comprar todas as blessings de novo. você só comprará as que tiverem faltando. Crie um arquivo: bless.lua e adicione esse conteúdo : local bless = {1, 2, 3, 4, 5} local five_blessings_price = 50000 -- 50k WITHOUT TWIST OF FATE local twist_of_fate_price = 50000 -- 50k ONLY TWIST OF FATE local all_blessings_price = 100000 -- 100k WITH TWIST OF FATE function onSay(cid, words, param) for i = 1, table.maxn(bless) do if(getPlayerBlessing(cid, bless[i])) and getPlayerPVPBlessing(cid) == true then doPlayerSendCancel(cid, "You already have all blesses.") end if getPlayerBlessing(cid, bless[i]) == FALSE and getPlayerPVPBlessing(cid) == FALSE then if (doPlayerRemoveMoney(cid, all_blessings_price) == TRUE) then for i = 1, table.maxn(bless) do doPlayerAddBlessing(cid, bless[i]) end doPlayerSetPVPBlessing(cid) doCreatureSay(cid, "You has been blessed by Gods with all blessings, including the twist of fate.") doSendMagicEffect(getPlayerPosition(cid), 30) else doPlayerSendCancel(cid, "You don't have 100k to buy the five blessings and twist of fate.") end elseif getPlayerBlessing(cid, bless[i]) == TRUE and getPlayerPVPBlessing(cid) == FALSE then if (doPlayerRemoveMoney(cid, twist_of_fate_price) == TRUE) then doPlayerSetPVPBlessing(cid) doCreatureSay(cid, "You has been blessed with twist of fate. the only bless that you didn't had.") doSendMagicEffect(getPlayerPosition(cid), 30) else doPlayerSendCancel(cid, "You don't have 50k to buy the twist of fate.") end elseif getPlayerBlessing(cid, bless[i]) == FALSE and getPlayerPVPBlessing(cid) == TRUE then if (doPlayerRemoveMoney(cid, five_blessings_price) == TRUE) then for i = 1, table.maxn(bless) do doPlayerAddBlessing(cid, bless[i]) end doCreatureSay(cid, "You has been blessed with the five blessings. Before you had only the twist of fate.") doSendMagicEffect(getPlayerPosition(cid), 30) else doPlayerSendCancel(cid, "You don't have 50k to buy the five blessings.") end end end return true end TAG para você add no talkaction.xml : <talkaction log="yes" words="!buybless;/buybless;!bless;/bless" script="bless.lua" /> Obrigado, espero que tenham gostado !
Postado Junho 8, 2014 11 anos só ta mal explicado "crie arquivo bless lua mas nao fala a onde ele deve ser criado mas é mt util e achei terrivel vc nao ter um gostei o meu ta ai vlw vo testa dps do outro Editado Junho 8, 2014 11 anos por Skullphoenyx (veja o histórico de edições)
Postado Junho 8, 2014 11 anos deu erro aki se souber como arruma vo posta erro do distrito http://prntscr.com/3qvmdg
Postado Julho 26, 2014 10 anos deu erro aki se souber como arruma vo posta erro do distrito http://prntscr.com/3qvmdg é no talkactions/scripts Se Ajudei Rep+ pra mim
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.