Postado Fevereiro 11, 2015 10 anos Olá amigos do tibiaking gostaria muito de pedir ajuda em algumas magias: todas elas removem 10 a 30 de soul, se não tiver soul elas avisam, voce não tem soul suficiente. 1ª esta cura o player que a usou e cura os players na mesma party em até 4 sqm de distancia. 2ª esta adiciona um buff de fist fighting para os players na mesma party em 3 sqm de distancia por 5 segundos. 3ª esta adiciona um buff de speed para os jogadores na mesma party em um sqm de 5 sqm de distancia por 15 segundos. 4ª esta remove 60% de vida de quem falou a magia NOME "PLAYER, e adiciona uma proteção que não permite com que o player denominado na magia seja atacado, ou então crie uma proteção de ataque de 90%. UP PLEASE? '' Uma ideia é apenas uma ideia, até ser desenvolvida, mastigada, retratada, analisada e por fim se tornar uma boa ideia. ''
Postado Fevereiro 11, 2015 10 anos @Alienbear já estou terminando, na de heal coloquei pra healar 20% do health local config = { soul = soul necessaria para usar a spell percent = porcentagem de health que vai healar effect = efeito que ira aparecer ao utilizar } heal_party function onCastSpell(cid, var) local config = { soul = 10, percent = 20, effect = 12, } if getPlayerSoul(cid) >= config.soul then if isInParty(cid) == true then for _, party in ipairs(getPartyMembers(cid)) do local health = math.ceil(getCreatureMaxHealth(party) * (config.percent / 100)) if getDistanceBetween(getThingPos(cid), getThingPos(party)) <= 4 then doSendMagicEffect(getThingPos(party), config.effect) doCreatureAddHealth(party, health) doPlayerAddSoul(cid, -config.soul) else doPlayerAddSoul(cid, -config.soul) doSendMagicEffect(getThingPos(cid), config.effect) doCreatureAddHealth(cid, health) end end else doPlayerSendCancel(cid, "you need in party to use this spell.") end else doPlayerSendCancel(cid, "don't have soul.") end return true end haste_party local condition = createConditionObject(CONDITION_HASTE) setConditionParam(condition, CONDITION_PARAM_TICKS, 22000) setConditionFormula(condition, 0.7, -56, 0.7, -56) function onCastSpell(cid, var) local config = { soul = 10, effect = 14, } if getPlayerSoul(cid) >= config.soul then if isInParty(cid) == true then for _, party in ipairs(getPartyMembers(cid)) do if getDistanceBetween(getThingPos(cid), getThingPos(party)) <= 5 then doSendMagicEffect(getThingPos(party), config.effect) doAddCondition(party, condition) doPlayerAddSoul(cid, -config.soul) else doPlayerAddSoul(cid, -config.soul) doSendMagicEffect(getThingPos(cid), config.effect) doAddCondition(cid, condition) end end else doPlayerSendCancel(cid, "you need in party to use this spell.") end else doPlayerSendCancel(cid, "don't have soul.") end return true end buff_party local condition = createConditionObject(CONDITION_ATTRIBUTES) setConditionParam(condition, CONDITION_PARAM_TICKS, 3000) setConditionParam(condition, CONDITION_PARAM_SKILL_FIST, 15) function onCastSpell(cid, var) local config = { soul = 10, effect = 13, } if getPlayerSoul(cid) >= config.soul then if isInParty(cid) == true then for _, party in ipairs(getPartyMembers(cid)) do if getDistanceBetween(getThingPos(cid), getThingPos(party)) <= 3 then doSendMagicEffect(getThingPos(party), config.effect) doAddCondition(party, condition) doPlayerAddSoul(cid, -config.soul) else doPlayerAddSoul(cid, -config.soul) doSendMagicEffect(getThingPos(cid), config.effect) doAddCondition(cid, condition) end end else doPlayerSendCancel(cid, "you need in party to use this spell.") end else doPlayerSendCancel(cid, "don't have soul.") end return true end se ajudei rep+ , foi interessante fazer essas spells rs EDIT - não tinha visto a 4 e.e, vou fazer um minuto. Bom a 4 spell fiz por talkaction era o unico modo lembrando que só funciona (talkaction "parametro) se tu usar (talkaction parametro) não vai achar o jogador crie uma talkaction e coloque esse script 4° spell function onSay(cid, words, param) local config = { percent = 60, -- % que o usuario irá perder de vida storage = 5890, -- storage usada effect = 13, -- efeito time = 5, -- tempo que o parceiro ira ficar protegido // segundos soul = 30, exaust = 10 -- tempo que o usuario ira poder usar de novo a spell } local health = math.ceil(getCreatureMaxHealth(cid) * (config.percent / 100)) local pos = getThingPos(cid) local t = string.explode(param, '"') if(param == '') then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Command param required.") return true end local pid = getPlayerByNameWildcard(t[2]) if(not pid or (isPlayerGhost(pid) and getPlayerGhostAccess(pid) > getPlayerGhostAccess(cid))) then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Player " .. param .. " not found.") return true end if(t[2]) then if(getPlayerStorageValue(cid, config.exaust) > os.time() and getPlayerStorageValue(cid, config.exaust) < 100+os.time()) then return doPlayerSendTextMessage(cid, 24, "You are exausted.") else if getPlayerSoul(cid) >= config.soul then doCreatureAddHealth(cid, -health) setPlayerStorageValue(pid, config.storage, os.time() + config.time) setPlayerStorageValue(cid, config.exaust, os.time() + config.exaust) doPlayerSendCancel(pid, ""..getPlayerName(cid).." bless you.") doSendMagicEffect(getThingPos(pid), 14) doPlayerAddSoul(cid, -config.soul) else doPlayerSendCancel(cid, "You don't have soul.") end end end return true end depois vá em creaturescript crie um arquivo .lua e renomeie para protect.lua e adicione esse script function onStatsChange(cid, attacker, type, combat, value) if isPlayer(cid) and type == STATSCHANGE_HEALTHLOSS and getPlayerStorageValue(cid, 5890) > os.time() then doSendMagicEffect(getThingPos(cid), 12) doSendAnimatedText(getThingPos(cid), "Protect ["..value.."]", COLOR_WHITE) return false else return true end return true end function onLogin(cid) registerCreatureEvent(cid, "protect") setPlayerStorageValue(cid, 5890, 0) return true end depois adicione as tag no creaturescripts.xml <event type="statschange" name="protect" event="script" value="protect.lua"/> <event type="login" name="registerProtect" event="script" value="protect.lua"/> Editado Fevereiro 11, 2015 10 anos por xBen (veja o histórico de edições)
Postado Fevereiro 12, 2015 10 anos Autor Muito obrigado mano, eu estou fazendo o servidor mais estou sem tempo para muita coisa. Então agradeço muito pela compreenção... se precisar de algo basta mandar mensagem no chat. Sou designer e rpg maker. Abraços '' Uma ideia é apenas uma ideia, até ser desenvolvida, mastigada, retratada, analisada e por fim se tornar uma boa ideia. ''
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.