Ir para conteúdo

Programação

Seção destinada para dúvidas e erros relacionados a programação.


Explore Perguntas

Não há nenhuma pergunta popular de mostrar agora

575 questões neste fórum

  1. Procuro Scripter para Server Grande

    0 votos
    0 respostas
  2. 0 votos
    0 respostas
  3. Progama Elfbot Ban

    0 votos
    0 respostas
  4. programação, programador

    0 votos
    10 respostas
  5. Programmer! ajuda source System

    0 votos
    8 respostas
  6. Proibir vocação de usar escudo.

    0 votos
    0 respostas
  7. Psoul base experiência

    0 votos
    0 respostas
  8. Puxar Nomes Pela Data Base

    0 votos
    0 respostas
  9. PZ tile?

    0 votos
    2 respostas
  10. 0 votos
    1 resposta
  11. 0 votos
    0 respostas
  12. -1 votos
    3 respostas
  13. 0 votos
    0 respostas
  14. 0 votos
    1 resposta
  15. QUERO CONTRATAR ALGUÉM

    0 votos
    0 respostas
  16. Remover AutoStacking

    0 votos
    8 respostas
  17. Remover Comando- AJUDA

    0 votos
    0 respostas
  18. 0 votos
    0 respostas
  19. Remover Salt

    0 votos
    0 respostas
  20. Remover WHITE_SKULL

    0 votos
    0 respostas
  21. Resetar Serv

    0 votos
    1 resposta
  22. RESOLVIDO!!

    0 votos
    0 respostas
  23. 0 votos
    1 resposta
  24. Salvar Log de erros. Crash Dump

    0 votos
    8 respostas
  25. SAVE PELA SOURCE

    0 votos
    0 respostas
  • Quem Está Navegando   0 membros estão online

    • Nenhum usuário registrado visualizando esta página.
  • Mais Reputados

  • Tópicos

  • Últimos Posts

    • boa noite   local lvlcrit = 48913 -- armazenamento para críticos normais local lvlcritDanger = 48904 -- armazenamento para críticos perigosos local multiplier = 1.5 -- multiplicador de dano function onCombat(cid, target) print("onCombat chamado com cid: " .. tostring(cid) .. " target: " .. tostring(target)) if isPlayer(cid) and isCreature(target) then local criticalChance = getPlayerStorageValue(cid, lvlcrit) or 0 local criticalDangerChance = getPlayerStorageValue(cid, lvlcritDanger) or 0 local chance = math.random(1, 1000) -- Mantém um intervalo razoável print("Chances de crítico: normal=" .. criticalChance .. " perigo=" .. criticalDangerChance .. " sorteio=" .. chance) -- Verifica se a chance de crítico BOOSTER é atingida if chance <= (criticalChance * 3) then print("Crítico BOOSTER atingido!") local damage = 100 -- Valor do dano crítico BOOSTER (ajuste conforme necessário) doTargetCombatHealth(cid, target, COMBAT_PHYSICALDAMAGE, -damage, -damage, 255) doSendAnimatedText(getCreaturePosition(target), "+BOOSTER!", 31) doSendMagicEffect(getCreaturePosition(cid), 54) return true end -- Verifica se a chance de crítico DANGER é atingida if chance <= (criticalDangerChance * 3) then print("Crítico DANGER atingido!") local damage = 100 -- Valor do dano crítico DANGER (ajuste conforme necessário) doTargetCombatHealth(cid, target, COMBAT_PHYSICALDAMAGE, -damage, -damage, 255) doSendAnimatedText(getCreaturePosition(target), "DANGER!", 190) doSendMagicEffect(getCreaturePosition(cid), 52) return true end end return true end  
    • [URL=https://matchnow.info]Pretty Girls in your city[/URL]
    • Boa noite galera! Meu primeiro post aqui.   Bem, acelerando os processos, estou com uma dúvida aqui.   Estou montando um OT do zero para afins de estudo e diversão, e coloquei um sistema de Reset do mano MarcelloMkez E precisava que por exemplo um exevo gran mas frigo desse um dano compatível com a quantidade de Resets do player   Estou sem um norte, se alguém puder me ajudar.   Este é meu sistema de reset.     --[[ SCRIPTING> MarcelloMkez <scriptING ]] --[[ [Advanced Reset System] Autor: MarcelloMkez Versão: 1.0 TFS: 0.3.6 Testado em: 8.50 Fórum: www.xtibia.com/forum/topic/138026-talk-action-advanced-reset-system/ [Características] ~ Versão 1.0 ~ - Resets no Look; - Premium Account ou não; - Mudar Vocação; - Limite de Resets; - Opções para Abilitar e Desabilitar Condições; [Em Construção] - Stages Free e Premium; - 'Talvez' um novo sistema de mudar Vocação; sem data para postagem. ]] function onSay(cid, words, param) --[Configurações de Condição]__ config = { --[[verdadeiro / Falso]] needPa = false, -- Precisa de Premium Account? [true / false] needPz = true, -- Precisa estar em Protection Zone? [true / false] battle = false, -- Precisa estar sem Batlle para Resetar? [true / false] withe = false, -- Players PK Withe pode Resetar? [true / false] red = false, -- Players PK Red pode Resetar? [true / false] tp = true, -- Teleportar para o Templo após o reset? [true / false] look = true, -- Mostrar Resets no Look do Player? [true / false] addLimite = false, -- Abilitar Limite de Resets? [true / false] setClasse = false, -- Mudar Vocação do player quando resetar? [true / false] storage = 2310, -- Storage [valor] --[Configurações do Reset]__ resetStatus = { player = getPlayerGUID(cid), -- Não Mude. lvl = 1000, -- Level Necessário para Resetar. [valor] lvlreset = 8, -- Level que retornará após o Reset. [valor] limite = 10, -- Máximo de resets que um player pode chegar. [valor] newClasse = 4, -- Id da Nova Vocação após o Reset. [valor] tempo= 3 -- Tempo para o Player deslogar para Resetar. Em segundos. [valor] }, } --[Funções]__ function Reseting(cid) resets = getResets(cid) setPlayerStorageValue(cid,config.storage,resets+1) doTeleportThing(cid, getTownTemplePosition(getPlayerTown(cid))) doPlayerSetVocation(cid, config.resetStatus.newClasse) doRemoveCreature(cid) db.executeQuery("UPDATE `players` SET `reset` = '"..resets.."' WHERE `players`.`id` = "..config.resetStatus.player) db.executeQuery("UPDATE `players` SET `level` = "..config.resetStatus.lvlreset..", `experience` = 0 WHERE `id` = "..config.resetStatus.player) return TRUE end function noAll(cid) resets = getResets(cid) setPlayerStorageValue(cid,config.storage,resets+1) doRemoveCreature(cid) db.executeQuery("UPDATE `players` SET `level` = "..config.resetStatus.lvlreset..", `experience` = 0 WHERE `id` = "..config.resetStatus.player) db.executeQuery("UPDATE `players` SET `reset` = '' WHERE `players`.`id` = "..config.resetStatus.player) return TRUE end function noTeleporting(cid) resets = getResets(cid) setPlayerStorageValue(cid,config.storage,resets+1) doPlayerSetVocation(cid, config.resetStatus.newClasse) doRemoveCreature(cid) db.executeQuery("UPDATE `players` SET `level` = "..config.resetStatus.lvlreset..", `experience` = 0 WHERE `id` = "..config.resetStatus.player) db.executeQuery("UPDATE `players` SET `reset` = ' [Reset "..resets.."]' WHERE `players`.`id` = "..config.resetStatus.player) return TRUE end function noLook(cid) resets = getResets(cid) setPlayerStorageValue(cid,config.storage,resets+1) doPlayerSetVocation(cid, config.resetStatus.newClasse) doTeleportThing(cid, getTownTemplePosition(getPlayerTown(cid))) doRemoveCreature(cid) db.executeQuery("UPDATE `players` SET `level` = "..config.resetStatus.lvlreset..", `experience` = 0 WHERE `id` = "..config.resetStatus.player) db.executeQuery("UPDATE `players` SET `reset` = '' WHERE `players`.`id` = "..config.resetStatus.player) return TRUE end function noClasse(cid) resets = getResets(cid) setPlayerStorageValue(cid,config.storage,resets+1) doTeleportThing(cid, getTownTemplePosition(getPlayerTown(cid))) doRemoveCreature(cid) db.executeQuery("UPDATE `players` SET `reset` = ' [Reset "..resets.."]' WHERE `players`.`id` = "..config.resetStatus.player) db.executeQuery("UPDATE `players` SET `level` = "..config.resetStatus.lvlreset..", `experience` = 0 WHERE `id` = "..config.resetStatus.player) return TRUE end function setClasse(cid) resets = getResets(cid) setPlayerStorageValue(cid,config.storage,resets+1) doPlayerSetVocation(cid, config.resetStatus.newClasse) doRemoveCreature(cid) db.executeQuery("UPDATE `players` SET `reset` = '' WHERE `players`.`id` = "..config.resetStatus.player) db.executeQuery("UPDATE `players` SET `level` = "..config.resetStatus.lvlreset..", `experience` = 0 WHERE `id` = "..config.resetStatus.player) return TRUE end function look(cid) resets = getResets(cid) setPlayerStorageValue(cid,config.storage,resets+1) doRemoveCreature(cid) db.executeQuery("UPDATE `players` SET `reset` = ' [Reset "..resets.."]' WHERE `players`.`id` = "..config.resetStatus.player) db.executeQuery("UPDATE `players` SET `level` = "..config.resetStatus.lvlreset..", `experience` = 0 WHERE `id` = "..config.resetStatus.player) return TRUE end function teleporting(cid) resets = getResets(cid) setPlayerStorageValue(cid,config.storage,resets+1) doTeleportThing(cid, getTownTemplePosition(getPlayerTown(cid))) doRemoveCreature(cid) db.executeQuery("UPDATE `players` SET `reset` = '' WHERE `players`.`id` = "..config.resetStatus.player) db.executeQuery("UPDATE `players` SET `level` = "..config.resetStatus.lvlreset..", `experience` = 0 WHERE `id` = "..config.resetStatus.player) return TRUE end function getResets(cid) resets = getPlayerStorageValue(cid,config.storage) if resets < 0 then resets = 0 end return resets end local resets = getResets(cid) local needLvl ="Voce precisa de "..config.resetStatus.lvl-getPlayerLevel(cid).." level's para resetar." local msg ="[Reset: "..getResets(cid).."] 'Sucesso ao Resetar! Voce sera deslogado em "..config.resetStatus.tempo.." Segundos." --[Condiçoes]__ if(config.needPz == true) and (getTilePzInfo(getCreaturePosition(cid)) == FALSE) then doPlayerSendTextMessage(cid,22,"Você Precisa estar em Protection Zone Para Resetar.") return TRUE elseif(config.addLimite == true) and (getResets(cid) == config.resetStatus.limite) then doPlayerSendTextMessage(cid, 22, "Você ja atingiu o Limite de Resets.") return TRUE elseif(config.withe == false) and (getCreatureSkullType(cid) == 3) then doPlayerSendTextMessage(cid,22,"Você ta PK White, por isso não pode resetar.") return TRUE elseif(config.red == false) and (getCreatureSkullType(cid) == 4) then doPlayerSendTextMessage(cid,22,"Você ta PK Red, por isso não pode resetar.") return TRUE elseif(config.needPa == true) and not isPremium(cid) then doPlayerSendTextMessage(cid,22,"Você Precisa ser Premium Account para Resetar.") return TRUE elseif(config.battle == true) and (getCreatureCondition(cid, CONDITION_INFIGHT) == TRUE) then doPlayerSendTextMessage(cid,22,"Você Precisa estar sem Battle para Resetar.") return TRUE elseif getPlayerLevel(cid) >= config.resetStatus.lvl and (config.tp == true) and (config.look == true) and (config.setClasse == true) then addEvent(Reseting, config.resetStatus.tempo* 1000, cid) elseif getPlayerLevel(cid) >= config.resetStatus.lvl and (config.tp == false) and (config.look == false) and (config.setClasse == false) then addEvent(noAll, config.resetStatus.tempo* 1000, cid) elseif getPlayerLevel(cid) >= config.resetStatus.lvl and (config.tp == false) and (config.look == true) and (config.setClasse == true) then addEvent(noTeleporting, config.resetStatus.tempo* 1000, cid) elseif getPlayerLevel(cid) >= config.resetStatus.lvl and (config.tp == true) and (config.look == false) and (config.setClasse == true) then addEvent(noLook, config.resetStatus.tempo* 1000, cid) elseif getPlayerLevel(cid) >= config.resetStatus.lvl and (config.tp == true) and (config.look == true) and (config.setClasse == false) then addEvent(noClasse, config.resetStatus.tempo* 1000, cid) elseif getPlayerLevel(cid) >= config.resetStatus.lvl and (config.tp == false) and (config.look == false) and (config.setClasse == true) then addEvent(setClasse, config.resetStatus.tempo* 1000, cid) elseif getPlayerLevel(cid) >= config.resetStatus.lvl and (config.tp == false) and (config.look == true) and (config.setClasse == false) then addEvent(look, config.resetStatus.tempo* 1000, cid) elseif getPlayerLevel(cid) >= config.resetStatus.lvl and (config.tp == true) and (config.look == false) and (config.setClasse == false) then addEvent(teleporting, config.resetStatus.tempo* 1000, cid) elseif doPlayerSendCancel(cid, needLvl) then doSendMagicEffect(getPlayerPosition(cid), CONST_ME_POFF) return TRUE end if doPlayerPopupFYI(cid, msg) then end return TRUE end --[by: MarcelloMkez]__    
    • local lvlcrit = 48913 -- storage para criticos normais local lvlcritDanger = 48904 -- storage para criticos perigosos local multiplier = 1.5 -- multiplicador de dano function onCombat(cid, target) if isPlayer(cid) and isCreature(target) then local criticalChance = getPlayerStorageValue(cid, lvlcrit) or 0 local criticalDangerChance = getPlayerStorageValue(cid, lvlcritDanger) or 0 local chance = math.random(1, 1000) -- Mantém um intervalo razoável -- Verifica se a chance de crítico BOOSTER é atingida if chance <= (criticalChance * 3) then local damage = 100 -- Valor do dano crítico BOOSTER (ajuste conforme necessário) doTargetCombatHealth(cid, target, COMBAT_PHYSICALDAMAGE, -damage, -damage, 255) doSendAnimatedText(getCreaturePosition(target), "+BOOSTER!", 31) doSendMagicEffect(getCreaturePosition(cid), 54) return true end -- Verifica se a chance de crítico DANGER é atingida if chance <= (criticalDangerChance * 3) then ---> Ja tentei por 4 e não resolveu. local damage = 100 -- Valor do dano crítico DANGER (ajuste conforme necessário) doTargetCombatHealth(cid, target, COMBAT_PHYSICALDAMAGE, -damage, -damage, 255) doSendAnimatedText(getCreaturePosition(target), "DANGER!", 190) doSendMagicEffect(getCreaturePosition(cid), 52) return true end end return true end @Holograma
    • Diethylcarbamazine buy online (DEC) is an anthelmintic medication used primarily to treat parasitic infections such as lymphatic filariasis, loiasis, and tropical eosinophilia. To use Diethylcarbamazine, it is crucial to follow the specific dosage and administration guidelines provided by a healthcare professional. The medication is typically taken orally, with the dosage tailored based on the type of infection, its severity, and the patient’s body weight. DEC is often prescribed in divided doses throughout the day, and it is important to complete the full course of treatment to ensure the complete eradication of the parasites. Common side effects may include headache, dizziness, nausea, and fatigue, which generally diminish as the body adjusts to the medication. In some cases, a healthcare provider might recommend taking the medication with food to reduce gastrointestinal discomfort. Regular follow-up and monitoring are essential to assess the treatment's effectiveness and manage any potential adverse reactions. Go to dosepharmacy to know more.
×
×
  • Criar Novo...