Jump to content

Alezzo

Campones
  • Posts

    53
  • Joined

  • Last visited

Reputation Activity

  1. Upvote
    Alezzo reacted to Bruno in BAU DE Quest   
    @,
     
    Vá em data/creaturescripts/creaturescripts.xml e adicione a seguinte tag:

    <event type="kill" name="bossKill" script="bosskill.lua"/>Em data/creaturescripts/scripts crie o arquivo bosskill.lua com o seguinte conteúdo:
    local config = { boss = "Nome do Boss", storage = 724800 } function onKill(cid, target, damage, flags) if isMonster(target) then if getCreatureName(target) == config.boss and getPlayerStorageValue(cid, config.storage) == -1 then setPlayerStorageValue(cid, config.storage, 1) doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Parabens por matar o boss " .. config.boss .. ", pode pegar sua recompensa.") doSendMagicEffect(getCreaturePosition(cid), 66) end end return true endAinda em data/creaturescripts/scripts adicione isso em login.lua antes do ultimo return true:
    registerCreatureEvent(cid, "bossKill")Agora vá em data/actions/actions.xml e coloque a seguinte tag:
    <action actionid="4213" script="rewardBoss.lua" />E para finalizar, em data/actions/scripts crie o arquivo rewardBoss.lua com o seguinte conteúdo:
    local config = { questStorage = 724877, bossStorage = 724800, item = {18422, 5} -- itemid, amount } function onUse(cid, item, fromPosition, itemEx, toPosition) if getPlayerStorageValue(cid, config.bossStorage) >= 1 then if getPlayerStorageValue(cid, config.questStorage) >= 1 then doPlayerSendTextMessage(cid, 25, "Desculpe, mas voce ja completou essa quest!") return false end doPlayerAddItem(cid, config.item[1], config.item[2]) setPlayerStorageValue(cid, config.questStorage, 1) doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Parabens! Voce recebeu "..config.item[2].." "..getItemNameById(config.item[1])..".") doSendMagicEffect(getCreaturePosition(cid), CONST_ME_HOLYDAMAGE) return true else doPlayerSendTextMessage(cid, 25, "The chest is empty.") end return false end
  2. Upvote
    Alezzo reacted to meubk in Premium   
    amigo todo script q vc deseja transformar só para premium, procure a função onUse, onSay, onStep seja la qual for e em baixo dela adicione:
    if not isPremium(cid) then return doPlayerSendCancel(cid, "You need premium to use this command.") end
  3. Upvote
    Alezzo reacted to DuuhCarvalho in Premium   
    local MIN_HEALTH = 200
    local MAX_HEALTH = 600
    local MIN_MANA = 110
    local MAX_MANA = 390
    local EMPTY_POTION = 7635
     
    local exhaust = createConditionObject(CONDITION_EXHAUST)
    setConditionParam(exhaust, CONDITION_PARAM_TICKS, (getConfigInfo('timeBetweenExActions') - 100))
     
    function onUse(cid, item, fromPosition, itemEx, toPosition)
     
    if (not isPremium(cid)) then
    return FALSE
    end
     
    if isPlayer(itemEx.uid) == FALSE then
    return FALSE
    end
     
    if hasCondition(cid, CONDITION_EXHAUST_HEAL) == TRUE then
    doPlayerSendDefaultCancel(cid, RETURNVALUE_YOUAREEXHAUSTED)
    return TRUE
    end
     
     
    if((not(isPaladin(itemEx.uid)) or getPlayerLevel(itemEx.uid) < 80) and getPlayerCustomFlagValue(itemEx.uid, PlayerCustomFlag_GamemasterPrivileges) == FALSE) then
    doCreatureSay(itemEx.uid, "Only paladins of level 80 or above may drink this fluid.", TALKTYPE_ORANGE_1)
    return TRUE
    end
     
    if doCreatureAddHealth(itemEx.uid, math.random(MIN_HEALTH, MAX_HEALTH)) == LUA_ERROR or doPlayerAddMana(itemEx.uid, math.random(MIN_MANA, MAX_MANA)) == LUA_ERROR then
    return FALSE
    end
     
    doAddCondition(cid, exhaust)
    doSendMagicEffect(getThingPos(itemEx.uid), CONST_ME_MAGIC_BLUE)
    doCreatureSay(itemEx.uid, "Aaaah...", TALKTYPE_ORANGE_1)
    doRemoveItem(item.uid, 1)
    pot_count = getPlayerItemCount(cid, EMPTY_POTION)
    doPlayerRemoveItem(cid, EMPTY_POTION, pot_count)
    doPlayerAddItem(cid, EMPTY_POTION, pot_count)
    return TRUE
    end
  4. Upvote
    Alezzo reacted to GstvoLiber in Premium   
    Bom, para seu numero 1, basta modificar seus codigos de Potion em actions/scripts/liquids.. Veja um exemplo da mana potion...
    local MIN = 70 local MAX = 130 local EMPTY_POTION = 7636 local exhaust = createConditionObject(CONDITION_EXHAUST) setConditionParam(exhaust, CONDITION_PARAM_TICKS, (getConfigInfo('timeBetweenExActions') - 100)) function onUse(cid, item, fromPosition, itemEx, toPosition) if isPlayer(itemEx.uid) == FALSE then return FALSE end if hasCondition(cid, CONDITION_EXHAUST_HEAL) == TRUE then doPlayerSendDefaultCancel(cid, RETURNVALUE_YOUAREEXHAUSTED) return TRUE end if doPlayerAddMana(itemEx.uid, math.random(MIN, MAX)) == LUA_ERROR then return FALSE end doAddCondition(cid, exhaust) doSendMagicEffect(getThingPos(itemEx.uid), CONST_ME_MAGIC_BLUE) doCreatureSay(itemEx.uid, "Aaaah...", TALKTYPE_ORANGE_1) doRemoveItem(item.uid, 1) doPlayerAddItem(cid, EMPTY_POTION, 1) return TRUE end Modifiquei por..
    local MIN = 70 local MAX = 130 local EMPTY_POTION = 7636 local ehPremmy = getPlayerPremiumDays(cid) local exhaust = createConditionObject(CONDITION_EXHAUST) setConditionParam(exhaust, CONDITION_PARAM_TICKS, (getConfigInfo('timeBetweenExActions') - 100)) function onUse(cid, item, fromPosition, itemEx, toPosition) if(ehPremmy >= 1) then if isPlayer(itemEx.uid) == FALSE then return FALSE end if hasCondition(cid, CONDITION_EXHAUST_HEAL) == TRUE then doPlayerSendDefaultCancel(cid, RETURNVALUE_YOUAREEXHAUSTED) return TRUE end if doPlayerAddMana(itemEx.uid, math.random(MIN, MAX)) == LUA_ERROR then return FALSE end doAddCondition(cid, exhaust) doSendMagicEffect(getThingPos(itemEx.uid), CONST_ME_MAGIC_BLUE) doCreatureSay(itemEx.uid, "Aaaah...", TALKTYPE_ORANGE_1) doRemoveItem(item.uid, 1) doPlayerAddItem(cid, EMPTY_POTION, 1) return TRUE else doPlayerSendTextMessage(cid, 27, "Você não é premium account !") end end Pronto, agora acho que só usa quem for Premmy Account.
     
    Possíveis erros:
    - Você utiliza um sistema de premium diferente do global;
    - O player restaura mana, mas ao invez dos efeitos ele retorna a mensagem de que não é premium;
     
    Bom, caso ele continue cosneguindo usar a potion, talvez você deva mecher aqui :
     
    Em actions/scripts/liquids no arquivo potions.lua :
    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, splash = 2, health = {50, 100}}, -- small health potion [7618] = {empty = 7636, splash = 2, health = {100, 200}}, -- health potion [7588] = {empty = 7634, splash = 2, health = {200, 400}, level = 50, vocations = {3, 4, 7, 8}, vocStr = "knights and paladins"}, -- strong health potion [7591] = {empty = 7635, splash = 2, health = {500, 700}, level = 80, vocations = {4, 8}, vocStr = "knights"}, -- great health potion [8473] = {empty = 7635, splash = 2, health = {800, 1000}, level = 130, vocations = {4, 8}, vocStr = "knights"}, -- ultimate health potion [7620] = {empty = 7636, splash = 7, mana = {70, 130}}, -- mana potion [7589] = {empty = 7634, splash = 7, mana = {110, 190}, level = 50, vocations = {1, 2, 3, 5, 6, 7}, vocStr = "sorcerers, druids and paladins"}, -- strong mana potion [7590] = {empty = 7635, splash = 7, mana = {200, 300}, level = 80, vocations = {1, 2, 5, 6}, vocStr = "sorcerers and druids"}, -- great mana potion [8472] = {empty = 7635, splash = 3, health = {200, 400}, mana = {110, 190}, level = 80, vocations = {3, 7}, vocStr = "paladins"} -- great spirit potion } local exhaust = createConditionObject(CONDITION_EXHAUST) setConditionParam(exhaust, CONDITION_PARAM_TICKS, (getConfigInfo('timeBetweenExActions') - 100)) function onUse(cid, item, fromPosition, itemEx, toPosition) local potion = POTIONS[item.itemid] if(not potion) then return false end if(not isPlayer(itemEx.uid) or (not config.usableOnTarget and cid ~= itemEx.uid)) then if(not config.splashable) then return false end if(toPosition.x == CONTAINER_POSITION) then toPosition = getThingPos(item.uid) end doDecayItem(doCreateItem(2016, potion.splash, toPosition)) doTransformItem(item.uid, potion.empty) return true end if(hasCondition(cid, CONDITION_EXHAUST_HEAL)) then doPlayerSendDefaultCancel(cid, RETURNVALUE_YOUAREEXHAUSTED) return true end if(((potion.level and getPlayerLevel(cid) < potion.level) or (potion.vocations and not isInArray(potion.vocations, getPlayerVocation(cid)))) and not getPlayerCustomFlagValue(cid, PLAYERCUSTOMFLAG_GAMEMASTERPRIVILEGES)) then doCreatureSay(itemEx.uid, "Only " .. potion.vocStr .. (potion.level and (" of level " .. potion.level) or "") .. " or above may drink this fluid.", TALKTYPE_ORANGE_1) return true end local health = potion.health if(health and not doCreatureAddHealth(itemEx.uid, math.ceil(math.random(health[1], health[2]) * config.healthMultiplier))) then return false end local mana = potion.mana if(mana and not doPlayerAddMana(itemEx.uid, math.ceil(math.random(mana[1], mana[2]) * config.manaMultiplier))) then return false end doSendMagicEffect(getThingPos(itemEx.uid), CONST_ME_MAGIC_BLUE) if(not realAnimation) then doCreatureSay(itemEx.uid, "Aaaah...", TALKTYPE_ORANGE_1) else for i, tid in ipairs(getSpectators(getCreaturePosition(cid), 1, 1)) do if(isPlayer(tid)) then doCreatureSay(itemEx.uid, "Aaaah...", TALKTYPE_ORANGE_1, false, tid) end end end doAddCondition(cid, exhaust) if(not potion.empty or config.removeOnUse) then doRemoveItem(item.uid, 1) return true end doRemoveItem(item.uid, 1) doPlayerAddItem(cid, potion.empty, 1) return true end Modifiquei por:
    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, TemPremmy = getPlayerPremiumDays(cid) } 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, splash = 2, health = {50, 100}}, -- small health potion [7618] = {empty = 7636, splash = 2, health = {100, 200}}, -- health potion [7588] = {empty = 7634, splash = 2, health = {200, 400}, level = 50, vocations = {3, 4, 7, 8}, vocStr = "knights and paladins"}, -- strong health potion [7591] = {empty = 7635, splash = 2, health = {500, 700}, level = 80, vocations = {4, 8}, vocStr = "knights"}, -- great health potion [8473] = {empty = 7635, splash = 2, health = {800, 1000}, level = 130, vocations = {4, 8}, vocStr = "knights"}, -- ultimate health potion [7620] = {empty = 7636, splash = 7, mana = {70, 130}}, -- mana potion [7589] = {empty = 7634, splash = 7, mana = {110, 190}, level = 50, vocations = {1, 2, 3, 5, 6, 7}, vocStr = "sorcerers, druids and paladins"}, -- strong mana potion [7590] = {empty = 7635, splash = 7, mana = {200, 300}, level = 80, vocations = {1, 2, 5, 6}, vocStr = "sorcerers and druids"}, -- great mana potion [8472] = {empty = 7635, splash = 3, health = {200, 400}, mana = {110, 190}, level = 80, vocations = {3, 7}, vocStr = "paladins"} -- great spirit potion } local exhaust = createConditionObject(CONDITION_EXHAUST) setConditionParam(exhaust, CONDITION_PARAM_TICKS, (getConfigInfo('timeBetweenExActions') - 100)) function onUse(cid, item, fromPosition, itemEx, toPosition) local potion = POTIONS[item.itemid] if(config.TemPremmy >= 1) then if(not potion) then return false end if(not isPlayer(itemEx.uid) or (not config.usableOnTarget and cid ~= itemEx.uid)) then if(not config.splashable) then return false end if(toPosition.x == CONTAINER_POSITION) then toPosition = getThingPos(item.uid) end doDecayItem(doCreateItem(2016, potion.splash, toPosition)) doTransformItem(item.uid, potion.empty) return true end if(hasCondition(cid, CONDITION_EXHAUST_HEAL)) then doPlayerSendDefaultCancel(cid, RETURNVALUE_YOUAREEXHAUSTED) return true end if(((potion.level and getPlayerLevel(cid) < potion.level) or (potion.vocations and not isInArray(potion.vocations, getPlayerVocation(cid)))) and not getPlayerCustomFlagValue(cid, PLAYERCUSTOMFLAG_GAMEMASTERPRIVILEGES)) then doCreatureSay(itemEx.uid, "Only " .. potion.vocStr .. (potion.level and (" of level " .. potion.level) or "") .. " or above may drink this fluid.", TALKTYPE_ORANGE_1) return true end local health = potion.health if(health and not doCreatureAddHealth(itemEx.uid, math.ceil(math.random(health[1], health[2]) * config.healthMultiplier))) then return false end local mana = potion.mana if(mana and not doPlayerAddMana(itemEx.uid, math.ceil(math.random(mana[1], mana[2]) * config.manaMultiplier))) then return false end doSendMagicEffect(getThingPos(itemEx.uid), CONST_ME_MAGIC_BLUE) if(not realAnimation) then doCreatureSay(itemEx.uid, "Aaaah...", TALKTYPE_ORANGE_1) else for i, tid in ipairs(getSpectators(getCreaturePosition(cid), 1, 1)) do if(isPlayer(tid)) then doCreatureSay(itemEx.uid, "Aaaah...", TALKTYPE_ORANGE_1, false, tid) end end end doAddCondition(cid, exhaust) if(not potion.empty or config.removeOnUse) then doRemoveItem(item.uid, 1) return true end doRemoveItem(item.uid, 1) doPlayerAddItem(cid, potion.empty, 1) return true else doPlayerSendTextMessage(cid, 27, "Você não é premium account !") end end Em outras palavras, antes de executar o código que adiciona mana para os players, eu testei se ele era premium, se fosse, executava o código, se não, parava.
     
    Aguardo FeedBack.
     
    -GstavoLiber
  5. Upvote
    Alezzo reacted to Stormkz in Yalahar Quest Com Bugs   
    -Primeiro: Entre no Map editor e coloque os npcs no lugar certo, se nao tiver basta ir em file/import/npc
    -Segundo: olhe no script do azerus3 (data/monster/azerus) e verifique se as cordenadas estao certo (logicamente nao estao pois mude!)
    -Terceiro: Totalmente normal, pois quando azerus3 morrer tem que apareser o teleport pros player entrar e depois de certo tempo sumir! pra quest continuar
    -Quarto: Segue o "primeiro" acima!
     
    Ajudei? Rep+ Boa sorte qualquer duvida so falar
  6. Upvote
    Alezzo reacted to VictorWEBMaster in [GESIOR] VictorWEBMaster 2019v   
    REMOVIDO
  7. Upvote
    Alezzo reacted to japavrb15 in [Ajuda]   
    axei esse do jeito que vc ker...
    creditos no final do post
     
    cria 1 arquivo .lua e poe iso dentro
     
    w = {
    [1] = {ef = 36, sh = 3, dmg = COMBAT_FIREDAMAGE},
    [2] = {ef = 42, sh = 28, dmg = COMBAT_ICEDAMAGE},
    [3] = {ef = 47, sh = 38, dmg = COMBAT_POISONDAMAGE},
    [4] = {ef = 17, sh = 31, dmg = COMBAT_DEATHDAMAGE},
    [5] = {ef = 11, sh = 35, dmg = COMBAT_ENERGYDAMAGE},
    [6] = {ef = 36, sh = 31, dmg = COMBAT_PHYSICALDAMAGE},
    [7] = {ef = 49, sh = 37, dmg = COMBAT_HOLYDAMAGE}
    }
     
    function onUseWeapon(cid, var)
    min, max = 300, 300 -- dano minimo e maximo
    target = getCreatureTarget(cid)
    if target ~= 0 then
    wx = w[math.random(1, #w)]
    doSendDistanceShoot(getThingPos(cid), getThingPos(target), wx.sh)
    addEvent(doAreaCombatHealth, 100, cid, wx.dmg, getThingPos(target), 0, -min, -max, wx.ef)
    end
    return true
    end
     
     
    agr só adicionar o script da wand em weapons
    vc sabe fazer né?
     
    poe esa tag em weapons.xml
     
     
     
     
    e em itens.xml
     
     
     
     
    Creditos : Soldoran,Miler. e eu por procurar
    Te ajudei? rep+ :]
  8. Upvote
    Alezzo reacted to jhon992 in [Ajuda] Item   
    Vai em data/creaturescripts/scripts, duplica um arquivo e renomeia para aoldeath e nele cole:

    function onPrepareDeath(cid, lastHitKiller, mostDamageKiller) local aolID = 2130 -- id do aol local lossExp = false -- perde xp 'false' para falso ou 'true' para verdadeiro local lossItems = false -- perde items if isPlayer(cid) then if ((getPlayerSlotItem(cid, 2).itemid == aolID) and (getCreatureSkullType(cid) ~= SKULL_RED)) then if (lossExp == false) then doPlayerSetLossPercent(cid, PLAYERLOSS_EXPERIENCE, 0) end doCreatureSetDropLoot(cid, lossItems) return true end end return true end
     
    Agora vai em data/creaturescripts/creaturescripts.xml e cola a tag:

    <event type="preparedeath" name="AolDeath" event="script" value="aoldeath.lua"/>
     
    E por último, vai em data/creaturescripts/scripts e abra o arquivo login.lua e nele cole:

    registerCreatureEvent(cid, "AolDeath")
  9. Upvote
    Alezzo reacted to CoGames in Mensagem Automatica   
    Vá em data/globalevents/scripts, copie e cole um arquivo.lua e renomeie-o para info, dentro cole:
     
     
     
    Em data/globalevents/globalevents.xml cole em alguma linha:
     
     
     
    Em negrito, é o tempo em segundos!
     
    Obrigado!
     
    Se eu não me engano, já tinha postado isso no XTibia!
     
    to vendo o rep+ q eu to ganhando ¬¬
  10. Upvote
    Alezzo reacted to jhon992 in [Creaturescript] Weapons Paralyze!   
    Sóh adicionar mais conditions antes da função onAttack
     
    Fire:

    local condition = createConditionObject(CONDITION_FIRE) setConditionParam(condition, CONDITION_PARAM_TICKS, 10000) -- aqui vai o tempo de fire, 1000 = 1 segundo setConditionFormula(condition, 0, 0, 0, 0) setCombatCondition(combat, condition)
     
    Ice:

    local condition = createConditionObject(CONDITION_FREEZING) setConditionParam(condition, CONDITION_PARAM_TICKS, 10000) -- aqui vai o tempo de fire, 1000 = 1 segundo setConditionFormula(condition, 0, 0, 0, 0) setCombatCondition(combat, condition)
     
    Lista de Conditions:

    CONDITION_NONE = 0 CONDITION_POISON = 1 CONDITION_FIRE = 2 CONDITION_ENERGY = 4 CONDITION_PHYSICAL = 8 CONDITION_HASTE = 16 CONDITION_PARALYZE = 32 CONDITION_OUTFIT = 64 CONDITION_INVISIBLE = 128 CONDITION_LIGHT = 256 CONDITION_MANASHIELD = 512 CONDITION_INFIGHT = 1024 CONDITION_DRUNK = 2048 CONDITION_EXHAUST = 4096 CONDITION_FOOD = 8192 CONDITION_REGENERATION = 8192 CONDITION_SOUL = 16384 CONDITION_DROWN = 32768 CONDITION_MUTED = 65536 CONDITION_ATTRIBUTES = 131072 CONDITION_FREEZING = 262144 CONDITION_DAZZLED = 524288 CONDITION_CURSED = 1048576 CONDITION_PACIFIED = 2097152 CONDITION_GAMEMASTER = 4194304 CONDITION_HUNTING = 8388608
  11. Upvote
    Alezzo reacted to extremeots in [Ajuda] Item   
    tem sim =D pede na area de script Rep+ ai vlw
  12. Upvote
    Alezzo reacted to alldakie in [Ajuda] Pedidos Urgente   
    Para deixar com o ataque rápido,
    Veja esse tutorial:
    http://www.xtibia.co...u-vocationsxml/
     
    ou,
     
    Vá na pasta (data/xml) abra o arquivo "Vocations.xml" e modifique o código em negrito:
     
     
    Para fazer as criaturas nascerem mais rápidas,
    Vá na pasta do seu servidor (data/world) e abra o arquivo "-spawn.xml" e modifique o código abaixo:
     
    Lembrando o numero 1024 e o numero a ser modificado para nascer mais rápido...
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...