Ir para conteúdo
  • Cadastre-se

Vodkart

Héroi
  • Total de itens

    3259
  • Registro em

  • Dias Ganhos

    228

Tudo que Vodkart postou

  1. local combat = createCombatObject() setCombatParam(combat, COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE) setCombatParam(combat, COMBAT_PARAM_BLOCKARMOR, true) setCombatParam(combat, COMBAT_PARAM_DISTANCEEFFECT, CONST_ANI_REDSTAR) function onGetFormulaValues(cid, level, skill) return -(((skill + 25) / 3) + (level / 5)), -((skill + 25) + (level / 5)), 0 end setCombatCallback(combat, CALLBACK_PARAM_SKILLVALUE, "onGetFormulaValues") function onCastSpell(cid, var) local item = 7368 if not doPlayerRemoveItem(cid, item, 1) then doPlayerSendDefaultCancel(cid, RETURNVALUE_NOTPOSSIBLE) doSendMagicEff
  2. na própria lib do npc já existe um campo para tal... basta usar o index "storage", por exemplo são paulo exemplo local travelNode = keywordHandler:addKeyword({'sao paulo'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'Do you want to sail to Sao Paulo for 1000 gold coins?'}) travelNode:addChildKeyword({'yes'}, StdModule.travel, {npcHandler = npcHandler, premium = true, level = 0, cost = 1000, storage = 32148324, destination = {x=32072, y=32182, z=5}}) travelNode:addChildKeyword({'no'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, reset
  3. testa assim: local config = { removeOnUse = "no", usableOnTarget = "yes", -- can be used on target? (fe. healing friend) splashable = "no", realAnimation = "no", -- make text effect visible only for players in range 1x1 healthMultiplier = 1.0, manaMultiplier = 1.0 } config.removeOnUse = getBooleanFromString(config.removeOnUse) config.usableOnTarget = getBooleanFromString(config.usableOnTarget) config.splashable = getBooleanFromString(config.splashable) config.realAnimation = getBooleanFromString(config.realAnimation) local POTIONS = { [8704] = {empty = 7636, sp
  4. Testei aqui e funcionou mano... vc editou alguma coisa? se sim me manda ai.
  5. ok desativa aquela parte ali no config.lua e usa assim: local config = { removeOnUse = "no", usableOnTarget = "yes", -- can be used on target? (fe. healing friend) splashable = "no", realAnimation = "no", -- make text effect visible only for players in range 1x1 healthMultiplier = 1.0, manaMultiplier = 1.0 } config.removeOnUse = getBooleanFromString(config.removeOnUse) config.usableOnTarget = getBooleanFromString(config.usableOnTarget) config.splashable = getBooleanFromString(config.splashable) config.realAnimation = getBooleanFromString(config.realAnimation
  6. para ativar os efeitos visuais, vá em config.lua e deixe assim: showHealingDamage = true e o código em % local config = { removeOnUse = "no", usableOnTarget = "yes", -- can be used on target? (fe. healing friend) splashable = "no", realAnimation = "no", -- make text effect visible only for players in range 1x1 healthMultiplier = 1.0, manaMultiplier = 1.0 } config.removeOnUse = getBooleanFromString(config.removeOnUse) config.usableOnTarget = getBooleanFromString(config.usableOnTarget) config.splashable = getBooleanFromString(config.splashable) c
  7. Parabéns pelo tutorial, está bem fácil de entender, obrigado pela contribuição aqui no TK, @oclipper!! Reputado. ?
  8. adicione essas funções no seu servidor: LUA IP STORAGE e usa o código assim local keywordHandler = KeywordHandler:new() local npcHandler = NpcHandler:new(keywordHandler) NpcSystem.parseParameters(npcHandler) local talkState = {} function onCreatureAppear(cid) npcHandler:onCreatureAppear(cid) end function onCreatureDisappear(cid) npcHandler:onCreatureDisappear(cid) end function onCreatureSay(cid, type, msg) npcHandler:onCreatureSay(cid, type, msg) end function onThink() npcHandler:onThink() end function creatureSayCallback(cid, type, msg) if(not npcHan
  9. achei que seu codigo ja fazia isso. local config = { cooldown = 60 * 60 * 20, -- in seconds - (Make it 'seconds * minutes * hours' - its will be '60 * 60 * 20' for 20 hours) (player cooldown) cooldown_storage = 808856, storage_control = 78484, duration = 10, -- time till reset, in minutes (lever cooldown) level_req = 8, -- minimum level to do quest min_players = 1, -- minimum players to join quest lever_id = 1945, -- id of lever before pulled pulled_id = 1946 -- id of lever after pulled } local player_positions = { [1] = {fromPos = Position(33395, 32662, 6), toPos =
  10. local config = { storage = 3411101, percent = 70 } math.percent = function (value, percentage) return math.ceil(math.floor(value)*math.floor(percentage)/100) end function onStatsChange(cid, attacker, type, combat, value) if value >= 1 and (type == STATSCHANGE_HEALTHLOSS or (getCreatureCondition(cid, CONDITION_MANASHIELD) and type == STATSCHANGE_MANALOSS)) then if getPlayerStorageValue(cid,config.storage) == 1 and isCreature(attacker) then local atk, me = math.percent(value, config.percent), math.percent(value, (100 - config.percent)) -- aqui por exemplo vai devolver 70% do atack
  11. Ficou bem maneiro esses temas que você criou amigo, super interessante!!! Aguardo novos temas seus hein? Obrigado por compartilhar no TK. Abraços! ?
  12. local config = { cooldown = 60 * 60 * 20, -- in seconds - (Make it 'seconds * minutes * hours' - its will be '60 * 60 * 20' for 20 hours) (player cooldown) cooldown_storage = 808856, duration = 10, -- time till reset, in minutes (lever cooldown) level_req = 8, -- minimum level to do quest min_players = 1, -- minimum players to join quest lever_id = 1945, -- id of lever before pulled pulled_id = 1946 -- id of lever after pulled } local player_positions = { [1] = {fromPos = Position(33395, 32662, 6), toPos = Position(33395, 32658, 6)}, [2] = {fromPos = Position(33395, 32663, 6), toPos
  13. local config = { storage = 3411101, percent = 70 } math.percent = function (value, percentage) return math.ceil(math.floor(value)*math.floor(percentage)/100) end function onStatsChange(cid, attacker, type, combat, value) if value >= 1 and (type == STATSCHANGE_HEALTHLOSS or (getCreatureCondition(cid, CONDITION_MANASHIELD) and type == STATSCHANGE_MANALOSS)) then if getPlayerStorageValue(cid,config.storage) == 1 and isCreature(attacker) then local atk, me = math.percent(value, config.percent), math.percent(value, (100 - config.percent)) -- aqui por exemplo vai devolver 70% do atack
  14. Não está lendo é o seu spells.xml, deve estar com algum erro.
  15. <?xml version="1.0" encoding="UTF-8"?> <npc name="Yasir" script="default.lua" walkinterval="25" floorchange="0" access="5" level="1" maglevel="1"> <health now="150" max="150"/> <look type="146" head="85" body="7" legs="12" feet="19" addons="2"/> <parameters> <parameter key="module_shop" value="1" /> <parameter key="message_greet" value="Yasu me halaka |PLAYERNAME|"/> <parameter key="shop_sellable" value=" acorn,11213,10; antlers,11214,50; ape fur,5883,120; badger fur,7965,15; bamboo stick,12401,30; banana sash,12467,55; b
  16. o que em porcentagem? o dano refletido ou a chance de dar reflect? se for o dano, por exemplo... Attacker deu 1000 de dano no Jogador. então se a porcentagem for de 70% para dar o reflect, então o Attacker vai tomar 700 de dano(que foi refletido em 70%) Jogador vai tomar só 300 de dano(aquele que foi atacado, ficando com os 30%) É isso?
  17. <?xml version="1.0" encoding="UTF-8"?> <npc name="Yasir" script="default.lua" walkinterval="25" floorchange="0" access="5" level="1" maglevel="1"> <health now="150" max="150"/> <look type="146" head="85" body="7" legs="12" feet="19" addons="2"/> <parameters> <parameter key="module_shop" value="1" /> <parameter key="message_greet" value="Yasu me halaka |PLAYERNAME|"/> <parameter key="shop_sellable" value=" acorn,11213,10; antlers,11214,50; ape fur,5883,120; badger fur,7965,15; bamboo stick,12401,30; banana sash,12467,55;
  18. Esse npc é bem antigo, creio que das versões 8.0... onde tiver a função "creatureGetName(cid)" troque por "getCreatureName(cid)"
  19. tenta assim: local condition = createConditionObject(CONDITION_ATTRIBUTES) setConditionParam(condition, CONDITION_PARAM_TICKS, 8000) setConditionParam(condition, CONDITION_PARAM_SKILL_FISTPERCENT, -70) setConditionParam(condition, CONDITION_PARAM_SKILL_AXEPERCENT, -70) setConditionParam(condition, CONDITION_PARAM_SKILL_SWORDPERCENT, -70) setConditionParam(condition, CONDITION_PARAM_SKILL_CLUBPERCENT, -70) setCombatCondition(combat, condition) ou assim: local condition = createConditionObject(CONDITION_ATTRIBUTES) setConditionParam(condition, CONDITION_PARAM_T
  20. tenta usar algumas dessas conditions: CONDITION_PARAM_STAT_MAXHEALTHPERCENT = 31 CONDITION_PARAM_STAT_MAXMANAPERCENT = 32 CONDITION_PARAM_STAT_SOULPERCENT = 33 CONDITION_PARAM_STAT_MAGICLEVELPERCENT = 34 CONDITION_PARAM_SKILL_MELEEPERCENT = 35 CONDITION_PARAM_SKILL_FISTPERCENT = 36 CONDITION_PARAM_SKILL_CLUBPERCENT = 37 CONDITION_PARAM_SKILL_SWORDPERCENT = 38 CONDITION_PARAM_SKILL_AXEPERCENT = 39 CONDITION_PARAM_SKILL_DISTANCEPERCENT = 40 CONDITION_PARAM_SKILL_SHIELDPERCENT = 41 CONDITION_PARAM_SKILL_FISHINGPERCENT = 42 ficando assim: local conditi
  21. function onSay(player, words, param) local points = 0 local res = db.storeQuery('SELECT `tfp` FROM `accounts` WHERE `id` = '.. player:getAccountId()) if res ~= false then points = result.getNumber(res, "tfp") end return doPlayerPopupFYI(player, "Você tem ".. (points <= 0 and 0 or points) .." Adventure Points.") end
  22. se ele criou a pedra no lugar certo é pq tinha uma escada então para ser removida, se não a verificação nem teria funcionado... me passa seu discord para dar uma olhada
  23. qual a position? coloquei para remover e criar mesmo local THRONE_POS = {x = 2561, y = 2446, z = 5} local STORAGE_EVENT = 83902 local STORAGE_PLAYER = 73289 local DUR = 2 -- in minutes local days = {"Friday", "Saturday", "Thursday"} -- coloque os dias function OpenEvent() for _, tid in ipairs(getPlayersOnline()) do setPlayerStorageValue(tid, STORAGE_PLAYER, 1) end setGlobalStorageValue(STORAGE_EVENT, 1) doBroadcastMessage("O Evento castle foi aberto e vai durar ".. DUR .." minutos.", 25) end function CastleWalls(n) -- 1 remove pedra e cria escada local pos = {x =
×
×
  • Criar Novo...

Informação Importante

Confirmação de Termo