Ir para conteúdo

selenia.global

Membro
  • Registro em

  • Última visita

Histórico de Curtidas

  1. Obrigado
    selenia.global recebeu reputação de TioSlash em Comando: !bless 1.3   
    @Cjaker I think I got it right this time!
     
    Could you tell me if this passed the test/aproved?
     
    function onSay(cid) local player = Player(cid) local totalBlessPrice = getBlessingsCost(player:getLevel()) * 5 * 0.7 if(not(isPlayerPzLocked(cid))) 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 else player:sendCancelMessage("You can't buy bless while you are in a battle.") end end Ok its working as requested, but now if(not(isPlayerPzLocked(cid)))  only does it so players CANT do it while having pz(pk) aka white skull...
    how can i change that so it also works with if(not(isPlayer"in any combat"(not only pk)(cid))) 
  2. Curtir
    selenia.global recebeu reputação de TioSlash em Comando: !bless 1.3   
    Fala Galera!!
     
    Muito obrigado! no entanto, eles podem ser comprados na batalha, se o jogador pode comprar, como aquele que leva pz
     
    Disculpa mim malo portuguese!
     
    Cheers from Norway :D!!
    Hello everyone!!!
     
    well i have keep on testing it yet i can’t find a correct way to do the solution to the script in order that players can’t buy blessings while on battle! 
     
    It would be awesome if someone could help us out! 
     
    getCost(getPlayerLevel(cid)) if(not(isPlayerPzLocked(cid))) then  
     
    player:sendCancelMessage("You can't buy bless, when you are in a battle.") end The community would be really thankfull!
     
     
     
     
  3. Obrigado
    selenia.global deu reputação a Storm em [Help] Regarding Command Script (talkaction)   
    @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  
  4. Gostei
    selenia.global deu reputação a Sergio R em Comando: !bless 1.3   
    Boa tarde! 
    Desenvolvi um codigo para o comando !bless para meu projeto de servidor.
    Testei alguns e não obtive sucesso, então gostaria de compartilhar para ajudar quem estiver com o mesmo problema.
     
    Criei uma linha nova no arquivo talkactions.xml dentro da pasta Talkactions.
    <talkaction words="!bless" script="bless.lua"/> e criei um arquivo novo com o nome bless.lua na pasta scripts.
    function onSay(cid) local player = Player(cid) local totalBlessPrice = getBlessingsCost(player:getLevel()) * 5 * 0.7 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 end O valor da bless poderá ser alterado conforme o gosto, basta trocar o 0.7 pelo valor desejado.
     
    Espero ajudar!!
    Abraço
  5. Curtir
    selenia.global deu reputação a Cjaker em Comando: !bless 1.3   
    Parabéns, seu tópico de conteúdo foi aprovado!
    Muito obrigado pela sua contribuição, nós do Tibia King agradecemos.
    Seu conteúdo com certeza ajudará à muitos outros, você recebeu +1 REP.
     
    Está faltando algumas funções amigo, verifique novamente para que ninguém tenha problema.

Informação Importante

Confirmação de Termo