Postado Fevereiro 17, 2018 7 anos Diga em poucas palavras a base utilizada (Nome do servidor ou nome do website). Ex. TFS 1.3; Base: OTX Malucoo Latest Gitlab Qual erro está surgindo/O que você procura? Im trying to make a command (talkaction) that can´t be used while player is in combat,by monster,player or pzlocked(any combat) I already tried with if(not(isPlayerPzLocked(cid))) but that only works if the player haz pz(by pk-skull-or field) What lua configuration should i use in order to make it so cant be used while fighting Thanks in advance! Greetings from norway :D! Você tem o código disponível? Se tiver publique-o aqui: Você tem alguma imagem que possa auxiliar no problema? Se sim, coloque-a aqui.
Postado Fevereiro 17, 2018 7 anos @selenia.global Just use the condition to see if it's in battle if getCreatureCondition(cid, CONDITION_INFIGHT) then doPlayerSendTextMessage(cid, 13, "You can only use the command without being in battle") return false end
Postado Fevereiro 18, 2018 7 anos Autor @Sttorm Perfect!!! Thanks a lot!!!! It works now as i wanted. Awesome!!! Thanks! @Sttorm Also Could you help me with this ? I Would like This setup: -When Player cast command it says "You have been blessed by all of eight gods! and CONST_ME_HOLYAREA(and no other animation overwrite) -When Player cast the command if he already has blessings it goes "You already have been blessed and CONST_ME_POFF(and no other animation overwrite) -When Player cast the command If he was Condition_INFIGHT it says" You cant Buy Bless While you have battle time left and goes CONST_ME_DRAWBLOOD" (and no other animation overwrite) With the This setup I get: You have been blessed by all of eight gods! and CONST_ME_HOLYAREA + CONST_ME_POFF(I dont want the CONSTE_ME_POFF here,somehow in my setup it overwrites , it displays both at the same time) "You already have been blessed and CONST_ME_POFF You cant Buy Bless While you have battle time left And does CONST_ME_POFF" (Im not the author of this Script- I just Edited a little bit) Thanks in advance The setup: function onSay(cid) local player = Player(cid) local totalBlessPrice = getBlessingsCost(player:getLevel()) * 5 * 0.7 if(not(getCreatureCondition(cid, CONDITION_INFIGHT))) then if player:getBlessings() == 5 then player:sendCancelMessage("You already have been blessed!", cid) elseif player:removeMoney(totalBlessPrice) then player:sendTextMessage(MESSAGE_EVENT_ADVANCE, "You have been blessed by all of eight gods!") for b = 1, 5 do player:addBlessing(b, 1) end player:getPosition():sendMagicEffect(CONST_ME_HOLYAREA) else player:sendCancelMessage("You don't have enough money. You need " .. totalBlessPrice .. " to buy bless.", cid) end player:getPosition():sendMagicEffect(CONST_ME_POFF) else player:sendCancelMessage("You can't buy bless while you have battle time left.") end player:getPosition():sendMagicEffect(CONST_ME_POFF) end
Postado Fevereiro 18, 2018 7 anos function onSay(cid) if creature:getCondition(cid, CONDITION_INFIGHT) then player:sendTextMessage(cid, 13, "You can only use the command without being in battle") return false end local player = Player(cid) local totalBlessPrice = getBlessingsCost(player:getLevel()) * 5 * 0.7 if(not(getCreatureCondition(cid, CONDITION_INFIGHT))) then if player:getBlessings() == 5 then player:sendCancelMessage("You already have been blessed!", cid) elseif player:removeMoney(totalBlessPrice) then player:sendTextMessage(MESSAGE_EVENT_ADVANCE, "You have been blessed by all of eight gods!") for b = 1, 5 do player:addBlessing(b, 1) end player:getPosition():sendMagicEffect(CONST_ME_HOLYAREA) else player:sendCancelMessage("You don't have enough money. You need " .. totalBlessPrice .. " to buy bless.", cid) end player:getPosition():sendMagicEffect(CONST_ME_POFF) else player:sendCancelMessage("You can't buy bless while you have battle time left.") end player:getPosition():sendMagicEffect(CONST_ME_POFF) end
Postado Fevereiro 19, 2018 7 anos Autor @Sttorm Im going to check it out when im in my house later this day. I would post back with the news Thanks man
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.