Ir para conteúdo

Dantarrix

Campones
  • Total de itens

    49
  • Registro em

  • Última visita

Histórico de Reputação

  1. Upvote
    Dantarrix recebeu reputação de marciks em [Pedido De Scripts] No Drop   
    Try this:
    data/creaturescripts/scripts/preventDrop.lua:

    local array = { PLAYERLOSS_CONTAINERS, PLAYERLOSS_ITEMS } function onPrepareDeath(cid, deathList) for i = 1, #array do doPlayerSetLossPercent(cid, array[i], 0) end return true end
     
    On creaturescripts.xml:

    <event type="prepareDeath" name="preventDrop" event="script" value="preventDrop.lua"/>
     
    And on creaturescripts/scripts/login.lua, the registration:

    registerCreatureEvent(cid, "preventDrop")
  2. Upvote
    Dantarrix recebeu reputação de Spectrusz em [Pedido De Scripts] No Drop   
    Try this:
    data/creaturescripts/scripts/preventDrop.lua:

    local array = { PLAYERLOSS_CONTAINERS, PLAYERLOSS_ITEMS } function onPrepareDeath(cid, deathList) for i = 1, #array do doPlayerSetLossPercent(cid, array[i], 0) end return true end
     
    On creaturescripts.xml:

    <event type="prepareDeath" name="preventDrop" event="script" value="preventDrop.lua"/>
     
    And on creaturescripts/scripts/login.lua, the registration:

    registerCreatureEvent(cid, "preventDrop")
  3. Upvote
    Dantarrix recebeu reputação de caotic em If Is Equipped   
    Sorry for using english, but something like this maybe?
     
    if getPlayerSlotItem(cid, slot).itemid == stone'sItemId then
     
     
    Then, if you have the same stone in the correct place, it will work.... ^^
     
    The other way is giving an action id when item is equipped and when deequiped, it lose it.... So you only need to call the script by action... And it's obviously that it's equipped...
     
    Sorry for bad english... :S
  4. Upvote
    Dantarrix recebeu reputação de Gankigner em Vocação,determinada Outfit.   
    Dont worry... And sorry for not talking portuguese.... Im trying to learn it a bit....
     
    And Thank you for rep+... But Im not searching to have rep, Im wanting to find kind people... And I think here is the best place to make some friends...
  5. Upvote
    Dantarrix recebeu reputação de juneba11 em Limite De Acc Manger   
    Reserved Space for a script...
     
    I'm going to help here with the 2 doubt...
     
    On data/globalevents/globalevents.xml

    <globalevent name="charsAutoDelete" time="22:00:00" event="script" value="charsautodelete.lua"/>
     
    On data/globalevents/scripts/charsautodelete.lua:

    function onTimer() db.executeQuery("DELETE FROM `players` WHERE `level` < 81 AND `group_id` < 2 AND `lastlogin` < UNIX_TIMESTAMP() - 604800000;") doBroadcastMessage("Database has been cleaned.") return true end
     
    Hope it works...
     
    And for 6, you could use right click -> rule violation to ban or give another punishment...
  6. Upvote
    Dantarrix recebeu reputação de alldakie em [Pedido De Scripts] No Drop   
    Thank You... And Reported as solved...
  7. Upvote
    Dantarrix deu reputação a Dersinho em [ Resolvido ]Talkactions Simples !online.   
    vlw vodka sempre me ajudando em seu rep ta guardado ja dei rep pro paraceri ali em cima pela ajuda vlw abraço!
  8. Upvote
    Dantarrix recebeu reputação de Luiiz1 em [Pedido De Scripts] No Drop   
    Try this:
    data/creaturescripts/scripts/preventDrop.lua:

    local array = { PLAYERLOSS_CONTAINERS, PLAYERLOSS_ITEMS } function onPrepareDeath(cid, deathList) for i = 1, #array do doPlayerSetLossPercent(cid, array[i], 0) end return true end
     
    On creaturescripts.xml:

    <event type="prepareDeath" name="preventDrop" event="script" value="preventDrop.lua"/>
     
    And on creaturescripts/scripts/login.lua, the registration:

    registerCreatureEvent(cid, "preventDrop")
  9. Upvote
    Dantarrix recebeu reputação de saulos em Vocations!   
    I think it's easier and better for the user, to be !promo and something more, so I will help a bit with it....
     
    Then, it's only missing the talkaction, maybe I help you with the starting table:
     

    local table = { ["mixed"] = {reqVoc=, reqLevel=10000, reqItem=0, reqCount=0, reqMoney=0, newVoc=0, newLevel=8, newMana=, newHp=}, ["spin"] = {reqVoc=, reqLevel=30000, reqItem=0, reqCount=0, reqMoney=0, newVoc=1, newLevel=8, newMana=, newHp=}, ["sacred"] = {reqVoc=, reqLevel=60000, reqItem=0, reqCount=0, reqMoney=0, newVoc=2, newLevel=8, newMana=, newHp=}, ["loney"] = {reqVoc=, reqLevel=110000, reqItem=0, reqCount=0, reqMoney=0, newVoc=3, newLevel=8, newMana=, newHp=}, ["falling"] = {reqVoc=, reqLevel=130000, reqItem=0, reqCount=0, reqMoney=0, newVoc=4, newLevel=8, newMana=, newHp=}, ["hell"] = {reqVoc=, reqLevel=250000, reqItem=0, reqCount=0, reqMoney=0, newVoc=5, newLevel=8, newMana=, newHp=}, ["supreme"] = {reqVoc=, reqLevel=310000, reqItem=0, reqCount=0, reqMoney=0, newVoc=6, newLevel=8, newMana=, newHp=}, ["forgotten"] = {reqVoc=, reqLevel=550000, reqItem=0, reqCount=0, reqMoney=0, newVoc=7, newLevel=8, newMana=, newHp=}, ["nova"] = {reqVoc=, reqLevel=715000, reqItem=0, reqCount=0, reqMoney=0, newVoc=8, newLevel=8, newMana=, newHp=} ["zealot1"] = {reqVoc=, reqLevel=715000, reqItem=0, reqCount=0, reqMoney=0, newVoc=8, newLevel=8, newMana=, newHp=}, ["zealote2"] = {reqVoc=, reqLevel=715000, reqItem=0, reqCount=0, reqMoney=0, newVoc=9, newLevel=8, newMana=, newHp=} } function onSay(cid,words, param, channel) local param = param.explode(param, ",") for k, v in pairs(table) do if (param == k) then if getPlayerVocation(cid) ~= v.reqVoc then doPlayerSendCancel(cid, "You dont have the required vocation.") return false end if getPlayerLevel(cid) ~= v.reqLevel then doPlayerSendCancel(cid, "You dont have the required level.") return false end if v.reqItem ~= 0 then if v.reqMoney ~= 0 then if not(doPlayerRemoveItem(cid, v.reqItem, v.reqCount) and doPlayerRemoveMoney(cid, v.reqMoney) then doPlayerSendCancel(cid, "You dont have the required item or money.") return false end else if not(doPlayerRemoveItem(cid, v.reqItem, v.reqCount) then doPlayerSendCancel(cid, "You dont have the required item.") return false end end end doPlayerSetVocation(cid, v.newVoc) doPlayerSetLevel(cid, v.newLevel) setCreatureMaxMana(cid, v.newMana) setCreatureMaxHealth(cid, v.newHp) doCreatureAddHealth(cid, v.newHp - getCreatureHealth(cid)) doCreatureAddMana(cid, v.newMana - getCreatureMana(cid)) doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "You reset well! You are going to be kicked for security reasons in 5 seconds.") addEvent(doPlayerSendTextMessage, 1000, MESSAGE_INFO_DESCR, "4 seconds.") addEvent(doPlayerSendTextMessage, 2000, MESSAGE_INFO_DESCR, "3 seconds.") addEvent(doPlayerSendTextMessage, 3000, MESSAGE_INFO_DESCR, "2 seconds.") addEvent(doPlayerSendTextMessage, 4000, MESSAGE_INFO_DESCR, "1 seconds.") addEvent(doRemoveCreature, 5000, cid) end return true end
     
    I started to do table, and finished doing script..... xD
     
    Hope it works....
     
    You only need to modify table....
    If you dont want to have required item or money, value = 0 in table
     
    Hope you like it and understand me cause I dont know portuguese....
     
    Byebye
  10. Upvote
    Dantarrix deu reputação a Vodkart em Weapon Hit Rank!   
    Créditos:
     
    Jhon & Vodkart
     
    Como funciona:
     
    É um sistema simples, mostra o rank de maior hit do server, seja de axe, sword, club, wand, etc...
     
    Mostra o Nome do player - [Hit] - Nome da weapon
     
    imagem de exemplo:

    rank axe

    rank club

    rank sd
     
    obs: como o sistema de rank normal, level e etc, para aparecer no rank o jogador tem que relogar ou dar serversalve.
     
     
     
    MODS:
     
    RankHit.xml

    <?xml version="1.0" encoding="UTF-8"?> <mod name="RankHit" version="1.0" author="Vodkart e Jhon" contact="xtibia.com" enabled="yes"> <config name="rank_func"><![CDATA[ WEAPON_WAND = {2190, 2191, 2188, 8921, 2189, 2187, 8920, 8922, 2184, 7414, 2453} WEAPON_ROD = {2182, 2186, 2185, 8911, 2181, 2183, 8912, 8910, 7958, 12609} storage_mostdamage = { CLUB = {155201,156201}, SWORD = {155202,156202}, AXE = {155203,156203}, WAND = {155204,156204}, ROD = {155205,156205}, DISTANCE = {155206,156206}, MAGIC_SD = {155207,156207,157207} } function setSdHit(cid, damage) if damage > getPlayerStorageValue(cid, storage_mostdamage.MAGIC_SD[1]) then setPlayerStorageValue(cid, storage_mostdamage.MAGIC_SD[1], damage) setPlayerStorageValue(cid, storage_mostdamage.MAGIC_SD[2], 2268) end return true end function setPlayerMostHitMage(cid, damage, weapon) if isInArray(WEAPON_WAND, getPlayerSlotItem(cid, CONST_SLOT_LEFT).itemid) == TRUE or isInArray(WEAPON_WAND, getPlayerSlotItem(cid, CONST_SLOT_RIGHT).itemid) == TRUE then if damage > getPlayerStorageValue(cid, storage_mostdamage.WAND[1]) then setPlayerStorageValue(cid, storage_mostdamage.WAND[1], damage) setPlayerStorageValue(cid, storage_mostdamage.WAND[2], weapon) end elseif isInArray(WEAPON_ROD, getPlayerSlotItem(cid, CONST_SLOT_LEFT).itemid) == TRUE or isInArray(WEAPON_ROD, getPlayerSlotItem(cid, CONST_SLOT_RIGHT).itemid) == TRUE then if damage > getPlayerStorageValue(cid, storage_mostdamage.ROD[1]) then setPlayerStorageValue(cid, storage_mostdamage.ROD[1], damage) setPlayerStorageValue(cid, storage_mostdamage.ROD[2], weapon) end end return true end function getRankHit(cid, value, wvalue, max, RankName) -- by vodka local str,arm ="","" str = "--[".. (RankName == nil and "RANK STORAGE" or ""..RankName.."") .."]--\n\n" local query = db.getResult("SELECT `player_id`, `value` FROM `player_storage` WHERE `key` = "..value.." ORDER BY cast(value as INTEGER) DESC;") if (query:getID() ~= -1) then k = 1 repeat if k > max then break end local getweapon = db.getResult("SELECT `value` FROM `player_storage` WHERE `player_id` = ".. query:getDataString("player_id") .." AND `key` = "..wvalue) if (getweapon:getID() ~= -1) then arm = getItemNameById(getweapon:getDataString("value")) end str = str .. "\n " .. k .. ". "..getPlayerNameByGUID(query:getDataString("player_id")).." - [" .. query:getDataInt("value") .. "] - "..arm.."" k = k + 1 until not query:next() end return doPlayerPopupFYI(cid, str) end function haveWeapon(cid) -- by vodka local armas = {1,2,3,5,6} if getPlayerSlotItem(cid, CONST_SLOT_RIGHT).itemid > 0 and isInArray(armas, getItemWeaponType(getPlayerSlotItem(cid, CONST_SLOT_RIGHT).uid)) or getPlayerSlotItem(cid, CONST_SLOT_LEFT).itemid > 0 and isInArray(armas, getItemWeaponType(getPlayerSlotItem(cid, CONST_SLOT_LEFT).uid)) then return true end return false end function getWeaponType(cid) -- by vodka return getPlayerSlotItem(cid, CONST_SLOT_LEFT).itemid == 0 and getItemWeaponType(getPlayerSlotItem(cid, CONST_SLOT_RIGHT).uid) or getItemWeaponType(getPlayerSlotItem(cid, CONST_SLOT_LEFT).uid) end ]]></config> <talkaction words="/rankhit;!rankhit" event="buffer"><![CDATA[ domodlib('rank_func') local rank_hit = { ["axe"] = {storage_mostdamage.AXE[1],storage_mostdamage.AXE[2]}, ["sword"] = {storage_mostdamage.SWORD[1],storage_mostdamage.SWORD[2]}, ["club"] = {storage_mostdamage.CLUB[1],storage_mostdamage.CLUB[2]}, ["wand"] = {storage_mostdamage.WAND[1],storage_mostdamage.WAND[2]}, ["rod"] = {storage_mostdamage.ROD[1],storage_mostdamage.ROD[2]}, ["distance"] = {storage_mostdamage.DISTANCE[1],storage_mostdamage.DISTANCE[2]}, ["sd"] = {storage_mostdamage.MAGIC_SD[1],storage_mostdamage.MAGIC_SD[2]} } local param = string.lower(param) if (param == "") then local str = "" str = str .. ""..getCreatureName(cid).." Hit\'s\:\n\n" for hit, item in pairs(rank_hit) do str = str..string.upper(hit)..": ".. (getPlayerStorageValue(cid, item[1]) ~= -1 and "["..getPlayerStorageValue(cid, item[1]).."] - "..getItemNameById(getPlayerStorageValue(cid, item[2])).."" or "None") .."\n" end str = str .. "" doPlayerPopupFYI(cid,str) return true end if not rank_hit[param] then return doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE,"digite o nome correto.") end return getRankHit(cid, rank_hit[param][1],rank_hit[param][2], 10, "Rank "..param) ]]></talkaction> <event type="login" name="Rank Hit" event="script"><![CDATA[ domodlib('rank_func') function onLogin(cid) registerCreatureEvent(cid, "RankhitCombat") return true end ]]></event> <event type="combat" name="RankhitCombat" event="script"><![CDATA[ domodlib('rank_func') registerCreatureEvent(target, "RankhitStats") return true ]]></event> <event type="statschange" name="RankhitStats" event="script"><![CDATA[ domodlib('rank_func') if type == STATSCHANGE_HEALTHLOSS and isPlayer(attacker) and haveWeapon(attacker) then t = { [1] = {storage_mostdamage.SWORD[1],storage_mostdamage.SWORD[2]}, [2] = {storage_mostdamage.CLUB[1],storage_mostdamage.CLUB[2]}, [3] = {storage_mostdamage.AXE[1],storage_mostdamage.AXE[2]}, [5] = {storage_mostdamage.DISTANCE[1],storage_mostdamage.DISTANCE[2]} } MyWeapon = getPlayerSlotItem(attacker, CONST_SLOT_LEFT).itemid == 0 and getPlayerSlotItem(attacker, CONST_SLOT_RIGHT).itemid or getPlayerSlotItem(attacker, CONST_SLOT_LEFT).itemid if (getPlayerStorageValue(attacker, storage_mostdamage.MAGIC_SD[3]) >= os.time()) then setSdHit(attacker,value) elseif t[getWeaponType(attacker)] then if value > getPlayerStorageValue(attacker, t[getWeaponType(attacker)][1]) then setPlayerStorageValue(attacker, t[getWeaponType(attacker)][1], value) setPlayerStorageValue(attacker, t[getWeaponType(attacker)][2], MyWeapon) end else setPlayerMostHitMage(attacker, value, MyWeapon) end end return true ]]></event> </mod>
     
     
    Em data > spells > scripts > attack > sudden death.lua adicione depois de function onCastSpell(cid, var)
     

    setPlayerStorageValue(cid, 157207, os.time()+3)
     
    ficando assim:

    function onCastSpell(cid, var) setPlayerStorageValue(cid, 157207, os.time()+3) return doCombat(cid, combat, var) end
  • Quem Está Navegando   0 membros estão online

    • Nenhum usuário registrado visualizando esta página.
×
×
  • Criar Novo...