Postado Outubro 22, 2015 10 anos Aew galera do TK preciso muito de ajuda!. acredito que esse seja a versão da TFS não sei ver!E nas pasta ta assim <?xml version="1.0" encoding="UTF-8"?> Já peguei o talkactions de ot's baiak e globais que eu tenho aqui de outras versões mais em todas o comando !bless fica bugado.Em talkactions ta assim <talkaction words="!buybless;/buybless;!bless;/bless" script="bless.lua" /> Em talkactions/scripts - bless-- !blessing by artofworklocal bless = {1, 2, 3, 4, 5}local cost = 10000local maxlevel = 50000function onSay(cid, words, param)local lvl = getPlayerLevel(cid)local new_cost = 35000local target = getPlayerGUID(cid) for i = 1, table.maxn(bless) do if(getPlayerBlessing(cid, bless)) then doPlayerSendCancel(cid, "Você já tem todas as blessings.") return TRUE end end if (getPlayerLevel(cid) >= maxlevel) then if(doPlayerRemoveMoney(cid, new_cost) == TRUE) then for i = 1, table.maxn(bless) do doPlayerAddBlessing(cid, bless) end doPlayerSendTextMessage(cid,18,"Você acaba de comprar uma blessing, e com ela veio um AOL, use-o pois a bless pode falhar") local bp = doPlayerAddItem(cid, 2173, 1) else doPlayerPopupFYI(cid, "Você precisa de "..cost.." para comprar uma bless.") end elseif(getPlayerLevel(cid) < maxlevel) then if(doPlayerRemoveMoney(cid, cost) == TRUE) then for i = 1, table.maxn(bless) do doPlayerAddBlessing(cid, bless) end doPlayerSendTextMessage(cid,18,"Você acaba de comprar uma blessing, e com ela veio um AOL, use-o pois a bless pode falhar") local bp = doPlayerAddItem(cid, 2173, 1) else doPlayerPopupFYI(cid, "Você precisa de "..cost.." para comprar uma bless.") end end return FALSEend E Em talkactions/scripts - blessingsfunction onSay(cid, words, param, channel) if(param == '') then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Command param required.") return true end local t = string.explode(param, ",") if(not t[2]) then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Not enough params.") return true end local pid = getPlayerByNameWildcard(t[1]) if(not pid or (isPlayerGhost(pid) and getPlayerGhostAccess(pid) > getPlayerGhostAccess(cid))) then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Player " .. t[1] .. " not found.") return true end t[2] = t[2]:lower() local blessing = BLESS_IDS[t[2]] if(not blessing) then blessing = tonumber(t[2]) if(not blessing or blessing < BLESS_FIRST or blessing > BLESS_LAST) then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "This bless not found.") return true end end doPlayerAddBlessing(pid, blessing) doSendMagicEffect(getCreaturePosition(cid), CONST_ME_MAGIC_BLUE) return trueend Apos usar esse comando e tirar o aol que ganha caso você morra. perde a bp. queria esse comando entregando bless sem aol. e que quando morrer não perca lootIrei dar Rep+ pra quem me ajudar!!obrigado a todos desde já! Editado Outubro 22, 2015 10 anos por compp Atualizado Versão TFS (veja o histórico de edições)
Postado Outubro 22, 2015 10 anos Geralmente esse script é a bless de servidores 1.0 function getCost(level) if level <= 30 then return 3000*5 elseif level >= 120 then return 30000*5 else return ((level - 20) * 200 * 5) end end function onSay(cid, words, param) local p = Player(cid) local cost = getCost(getPlayerLevel(cid)) if(not(isPlayerPzLocked(cid))) then if(p:hasBlessing(1) and p:hasBlessing(2) and p:hasBlessing(3) and p:hasBlessing(4) and p:hasBlessing(5) and p:hasBlessing(6)) then p:sendCancelMessage("You have already been blessed by the gods.") return false end if(p:removeMoney(cost)) then for b = 1,6 do p:addBlessing(b) end p:getPosition():sendMagicEffect(39) p:sendTextMessage(19, "You have been blessed by the gods!") else p:sendCancelMessage("You need "..cost.." gold coins to buy all blessings.") end else p:sendCancelMessage("You can't buy bless, when you are in a battle.") end return false end Editado Outubro 22, 2015 10 anos por vankk (veja o histórico de edições) Discord: vankk #7765 Precisando de ajuda? Entre em contato comigo via Discord. Muitos vêm seus muitos dias de glória, mas poucos vêm seus muitos dias de luta.
Postado Outubro 22, 2015 10 anos Autor Eu já tinha testado esse. porem da esse bug Editado Outubro 22, 2015 10 anos por compp (veja o histórico de edições)
Postado Outubro 22, 2015 10 anos @comppO meu servidor é TFS 0.4 também..Testa o meu bless.lua(data/talkactions/scripts)bless.luafunction onSay(cid, words, param)if getPlayerBlessing(cid,5) thendoPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "You have already been blessed")doSendMagicEffect(getPlayerPosition(cid), CONST_ME_MORTAREA)elseif doPlayerRemoveMoney(cid, 50000) == TRUE thenfor i = 1,5 dodoPlayerAddBlessing(cid,i)enddoPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "You have received blessings!")doSendMagicEffect(getPlayerPosition(cid), CONST_ME_ENERGYAREA)elsedoPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "You need 50,000 gp in backpack for blessings.")doSendMagicEffect(getPlayerPosition(cid), CONST_ME_ICEAREA)endendend Te ajudei? Clique em Gostei ! ²²²d¬¬b²²² "She's got a smile that it seems to me...." ♪♪
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.