Ir para conteúdo

dimmebag

Membro
  • Registro em

  • Última visita

Histórico de Curtidas

  1. Gostei
    @yanloco70 Esse aqui funciona em MySql:
    local config = { item = { Id = 1111, count = 0, }, maxTextLenght = 15, blacklistParam = {"account manager", "god", "cm", "gm", "tutor", "tester"}, minWordLenght = 3, delay = 2 } function onSay(cid, words, param, channel) local textCancel, t = config.text, string.explode(param, ",") if(param == '') then return doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Command param required.") elseif((getPlayerGUIDByName(t[1]) ~= nil) and (not getBooleanFromString(t[2]))) then textCancel = "That name is already in use." elseif(getPlayerItemCount(cid, config.item.Id) < config.item.count) then textCancel = "You do not fulfill the requirements." elseif(not getTilePzInfo(getCreaturePosition(cid))) then textCancel = "You must be inside a protection zone to use this command." elseif(string.len(tostring(t[1])) >= config.maxTextLenght) then textCancel = "You can only use a maximum of " .. config.maxTextLenght .. " characters." elseif(string.find(t[1]:lower(), "[^%l%s]") ~= nil) then textCancel = "You cannot use symbols." else for blacklist = 1, table.maxn(config.blacklistParam) do if(string.find(t[1]:lower(), config.blacklistParam[blacklist]) ~= nil) then textCancel = "Invalid name entry." break end end end if(config.text ~= textCancel) then doPlayerSendCancel(cid, textCancel) return true end local paramTemp, space, oldName = '', '', getCreatureName(cid) for word in string.gmatch(t[1], "%a+") do if(string.len(word) < config.minWordLenght) then doPlayerSendCancel(cid, "Each word must have a minimum of " .. config.minWordLenght .. " characters.") return true end paramTemp = "" .. paramTemp .. "" .. space .. "" .. word .. "" if(space == '') then space = " " end end local guid = getPlayerGUID(cid) t[1] = paramTemp doPlayerRemoveItem(cid, config.item.Id, config.item.count) if(pcall(doPlayerChangeName, guid, oldName, t[1]) == false) then db.executeQuery("INSERT INTO `player_namelocks` (`player_id`, `name`, `new_name`, `date`) VALUES (" .. guid .. ", " .. db.escapeString(oldName) .. ", " .. db.escapeString(t[1]) .. ", " .. os.time() .. ");") db.executeQuery("UPDATE `players` SET `name` = " .. db.escapeString(t[1]) .. " WHERE `id` = " .. guid .. " LIMIT 1;") end doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Your name has been changed successfully. You will be kicked in " .. config.delay .. " seconds.") addEvent(function(cid, forceLogout) if(isPlayer(cid)) then doRemoveCreature(cid, forceLogout) end end, config.delay * 1000, cid, false) return true end  
    Créditos - Ratser
  2. Gostei
    Tente assim:
     
    Com a tag:
    <talkaction words="!name" filter="quotation" event="script" value="name.lua"/>  
    No caso será usado assim: (!name"Jon Snow)
     
    E é como o @yanloco70 disse, não fique sempre esperando pelos outros, procure ir mexendo no script até que você ache a solução do seu problema.
  3. Haha
    Então é melhor esperar alguém que saiba aparecer... Isso não vai dar em nada =S
  4. Gostei
    dimmebag recebeu reputação de Leomonti em [pedido] monsters diferentes   
    Estranho... Pq ta ali no ataque pra dar... Faz assim, altera isso aqui interval="2000" troca o valor para 1000 e chance="5" troca o valor para 40
     <attack name="speed" interval="2000" chance="5" radius="3" target="1" speedchange="-500" duration="5000">       <attribute key="areaEffect" value="mortarea"/>     </attack>
  5. Gostei
    dimmebag recebeu reputação de Leomonti em [pedido] monsters diferentes   
    Sim, veja se esse ta bom:


  6. Gostei
    dimmebag recebeu reputação de Leomonti em [pedido] monsters diferentes   
    @Leomonti Tenta inverter ali, colocar "earth" em shooteffect e "smallplants" em areaeffect.
  7. Obrigado
    dimmebag deu reputação a Werner em (Resolvido)[Movements] Timer tile   
    Estranho ...
    Tenta assim, vai em tptile.lua e substitui por isso aqui:
    function onStepIn(cid, item, position, FromPosition) local pos = {x=xxx, y=xxx, z=xxx} tp = addEvent(doTeleportThing, 60*1000, cid, pos) tp2 = addEvent(doSendMagicEffect, 60*1000, pos, 10) return TRUE end function onStepOut(cid, item, position, fromPosition) stopEvent(tp) stopEvent(tp2) return TRUE end Nas tags pode deixar a mesma coisa.
     
    o onStepOut é pra caso o player saia do tile cancele o evento e ele não seja teleportado.
     
    Em "local pos" coloca o x,y,z do tile.
     
  8. Gostei
    dimmebag deu reputação a antharaz em (Resolvido)[Action] Alavanca de backpack event.   
    @Mateus Santosss 
     
    Acho que é isso
     
     
  9. Gostei
    dimmebag recebeu reputação de Leomonti em [pedido] monsters diferentes   
    O 3º não entendi muito bem... Mas o primeiro e o segundo ta ai. Você só vai precisar alterar o looktype, corpse, voices e os itens para os quais você deseja. No caso do pilar ele é looktypeex, então tem que colocar o ID.
    DOIS.xml
    UM.xml
  10. Obrigado
    dimmebag deu reputação a antharaz em (Resolvido)[Action] Alavanca de backpack event.   
    @dimmebag 
     
    Seria algo tipo isso?
     
     
  11. Gostei
  12. Obrigado
    @dimmebag a tag.xml dele ta chamando um onTimer quando na verdade ele ta usando um onThink. Mude o script para onTimer ou mude a tag xml para onThink!
  13. Gostei
    dimmebag deu reputação a antharaz em ARMA QUE HEALA QUANDO DA UM HIT   
    Vamos começar...
     
    Crie um arquivo em data\creaturescripts\scripts chamado recover.lua com o código abaixo
     
     
     
    Depois vá no arquivo data\creaturescripts\scripts\creaturescripts.xml antes da linha </creaturescripts> e coloque a tag abaixo:
     
     
    Depois vá no seu login.lua localizado em data\creaturescripts\scripts e coloque o código uma linha antes do return true do final do arquivo:
     
     
     
    E por último, coloque o código abaixo no xml de cada monstro que quando perder vida o player será healado, uma linha acima de </monster>:
     
     
     
    E pronto, a parte mais chata é a dos monsters.
  14. Gostei
    dimmebag deu reputação a Dwarfer em (Resolvido)[PEDIDO] Sistema HeadButt   
    Se eu entendi bem o que você quer...
    Em actions/scripts, crie um arquivo:
     
    treemonster.lua
     
     
    Em actions.xml: <action actionid="ACTION_ID_DA_ARVORE" script="treemonster.lua" />
     
  15. Obrigado
  16. Gostei
    dimmebag deu reputação a Bruno Carvalho em [TalkAction] Prision System   
    Versão testada: 9.4+ (Pode funcionar em anteriores)
    Descrição: O script de cadeia feito por FreaksOt onde eu modifiquei e fiz algumas alterações.

    Alterações:
    - Quando prende o player ele não fica mais em um local fixo, você pode configurar para coloca-lo em outras celas.
    - O tempo pode ou não ser fixo, é só você digitar /jail (nome do player) para um tempo fixo ou /jail (nome do player), (tempo) para coloca-lo com um tempo especifico.
    -- OBS: O tempo é posto em segundos. (120 segundos = 2 minutos)

    TAG:


    <talkaction log="yes" words="/jail;!jail;/prender;!prender;/unjail;!unjail;/desprender;!desprender" access="3" event="script" value="prisao.lua"/>
    [/code] [i][b]Script:[/b][/i] data/talkaction/prisao.lua [code]
    grouprequired = 3
    jailedstoragevalue_time = 1338
    jailedstoragevalue_bool = 1339
    local jailpos = {
    [1] = {x = 59, y = 52, z =6},
    [2] = {x = 59, y = 52, z =5},
    [3] = {x = 55, y = 47, z =6},
    [4] = {x = 55, y = 47, z =5},
    [5] = {x = 55, y = 52, z =6},
    [6] = {x = 55, y = 52, z =5},
    [7] = {x = 59, y = 47, z =5},
    [8] = {x = 63, y = 52, z =5}
    }
    local unjailpos = { x = 63, y = 54, z =6 }
    jail_list = {}
    jail_list_work = 0

    function checkJailList(param)
    addEvent(checkJailList, 1000, {})
    for targetID,player in ipairs(jail_list) do
    if isPlayer(player) == TRUE then
    if getPlayerStorageValue(player, jailedstoragevalue_time) < os.time() then
    doTeleportThing(player, unjailpos, TRUE)
    setPlayerStorageValue(player, jailedstoragevalue_time, 0)
    setPlayerStorageValue(player, jailedstoragevalue_bool, 0)
    table.remove(jail_list,targetID)
    doPlayerSendTextMessage(player, MESSAGE_STATUS_CONSOLE_ORANGE, 'Você saiu da cadeia, tente não fazer coisas malvadas da próxima vez para não ser preso novamente. Cuide-se amigo.')
    end
    else
    table.remove(jail_list,targetID)
    end
    end
    end

    function onSay(cid, words, param, channel)
    if(param == '') then
    doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Command param required.")
    return true
    end
    local t = string.explode(param, ",")
    if jail_list_work == 0 then
    jail_list_work = addEvent(checkJailList, 1000, {})
    end
    local jail_time = -1
    for word in string.gmatch(tostring(t[1]), "(%w+)") do
    if tostring(tonumber(word)) == word then
    jail_time = tonumber(word)
    end
    end
    local isplayer = getPlayerByName(t[1])
    if isPlayer(isplayer) ~= TRUE then
    isplayer = getPlayerByName(string.sub(t[1], string.len("jail_time")+1))
    if isPlayer(isplayer) ~= TRUE then
    isplayer = getPlayerByName(string.sub(t[1], string.len("jail_time")+2))
    if isPlayer(isplayer) ~= TRUE then
    isplayer = getPlayerByName(string.sub(t[1], string.len("jail_time")+3))
    end
    end
    end
    local default_jail = 30
    if(t[2]) then
    default_jail = t[2]
    end
    if jail_time ~= -1 then
    jail_time = jail_time * 60
    else
    jail_time = default_jail
    end

    if (words == '!prender' or words == '/prender') then
    if getPlayerGroupId(cid) >= grouprequired then
    if isPlayer(isplayer) == TRUE then
    doTeleportThing(isplayer, jailpos[math.random(#jailpos)], TRUE)
    setPlayerStorageValue(isplayer, jailedstoragevalue_time, os.time()+jail_time)
    setPlayerStorageValue(isplayer, jailedstoragevalue_bool, 1)
    table.insert(jail_list,isplayer)
    doPlayerSendTextMessage (cid, MESSAGE_STATUS_CONSOLE_ORANGE, 'Você prendeu o player: '.. getCreatureName(isplayer) ..' ate ' .. os.date("%H:%M:%S", getPlayerStorageValue(isplayer, jailedstoragevalue_time)) .. ' (agora é: ' .. os.date("%H:%M:%S", os.time()) .. ').')
    doPlayerSendTextMessage (isplayer, MESSAGE_STATUS_CONSOLE_ORANGE, 'Voce foi preso por '.. getCreatureName(cid) ..' ate ' .. os.date("%H:%M:%S", getPlayerStorageValue(isplayer, jailedstoragevalue_time)) .. ' (agora é: ' .. os.date("%H:%M:%S", os.time()) .. ').')
    else
    doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "Este jogador não existe ou esta offline.")
    end
    else
    doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "Você não tem permissão para prender players.")
    end
    elseif (words == '!desprender' or words == '/desprender') then
    if getPlayerGroupId(cid) >= grouprequired then
    if isPlayer(isplayer) == TRUE then
    if getPlayerStorageValue(isplayer, jailedstoragevalue_bool) == 1 then
    doTeleportThing(isplayer, unjailpos, TRUE)
    setPlayerStorageValue(isplayer, jailedstoragevalue_time, 0)
    setPlayerStorageValue(isplayer, jailedstoragevalue_bool, 0)
    table.remove(jail_list,targetID)
    doPlayerSendTextMessage(isplayer, MESSAGE_STATUS_CONSOLE_ORANGE, 'O player '.. getCreatureName(cid) ..' te tirou da prisão. Te vejo em breve!!!')
    doPlayerSendTextMessage (cid, MESSAGE_STATUS_CONSOLE_ORANGE, 'Você tirou da prisão o player: '.. getCreatureName(isplayer) ..'.')
    else
    doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "Este jogador não está preso.")
    end
    else
    doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "Este jogador não existe ou esta offline.")
    end
    else
    doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "Você não tem permissão para prender players.")
    end
    end
    return true
    end
    Config:
    local jailpos = { -- Local das selas onde o player vai aparecer.
    local unjailpos = { x = 63, y = 54, z =6 } -- Local onde ele irá sair.
    local default_jail = 30 -- Tempo padrão.
    [/code]

    [i][b]Créditos:[/b][/i]
    [i]FreaksOt[/i]
    [i]Comedinha (Bruno Carvalho)[/i]
  17. Haha
    dimmebag recebeu reputação de antharaz em (Resolvido){Resolvido} [Action] Disguise kit   
    Isso mesmo. Obrigado, funcionou corretamente.
  18. Gostei
    dimmebag deu reputação a antharaz em (Resolvido){Resolvido} [Action] Disguise kit   
    Seria algo assim?
     
    local config = { looks = {128,129,130,131}, tempo = 7 } function onUse(cid, item, fromPosition, itemEx, toPosition) local out = getCreatureOutfit(cid) out.lookType = config.looks[math.random(1,#config.looks)] doSetCreatureOutfit(cid, out, config.tempo*1000) doRemoveItem(item.uid,1) return true end  
  19. Gostei
    dimmebag deu reputação a Rusherzin em (Resolvido)Tile que só pode passa algumas vocaçao.   
    Não testei..
     
    local vocations = {1,2,3,4,5,6,7,8} -- Vocs local entermsg = "Welcome" -- Msg se puder passar local failmsg = "Sorry, but you aren\'t the right vocation" -- Msg se não tiver voc certa function onStepIn(cid, item, position, lastPosition, fromPosition, toPosition, actor) if isPlayer(cid) then if isInArray(vocations,getPlayerVocation(cid)) then doPlayerSendTextMessage(cid,25,entermsg) doSendAnimatedText(getCreaturePosition(cid), "WELCOME!", TEXTCOLOR_RED) doSendMagicEffect(getCreaturePosition(cid), CONST_ME_FIREWORK_RED) else doTeleportThing(cid,fromPosition) doSendMagicEffect(getCreaturePosition(cid), CONST_ME_TELEPORT) doPlayerSendTextMessage(cid,25,failmsg) end return true end end movements.xml
     
    <movevent type="StepIn" actionid="xxx" event="script" value="voctile.lua"/>
  20. Gostei
    Em actions/scripts, crie um arquivo:
     
    itemspeed.lua
     
     
    Em actions.xml: <action itemid="ID_DO_ITEM" script="itemspeed.lua" />
  21. Obrigado
  22. Gostei
  23. Gostei
    dimmebag deu reputação a Albeck em (Resolvido){Resolvido} [ERRO] Alavanca que da spawn de criatura.   
    @dimmebag
    Você tava usando o script da versão 1.2
    Tenta esse:
    function onUse(cid, item, fromPosition, toPosition) if (getPlayerStorageValue(cid, 11548) >= os.time()) then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE,"Você só pode usar novamente em " .. (getPlayerStorageValue(cid, 11548)-os.time()+(0)) .. " segundos.") return true end if item.itemid == 1945 then doCreateMonster('Demon Arena', {x=32182,y=32236,z=7}) doCreateMonster('Demon Arena', {x=32171,y=32240,z=7}) doCreateMonster('Demon Arena', {x=32181,y=32240,z=7}) doCreateMonster('Demon Arena', {x=32175,y=32242,z=7}) doTransformItem(item.uid, 1946) setPlayerStorageValue(cid,11548,os.time()+180) elseif item.itemid == 1946 then doTransformItem(item.uid, 1945) end return true end  
  24. Gostei
    dimmebag deu reputação a Pandawan. em (Resolvido)Pedido NPC Cassino   
    Olá amigo, teste esse script, se apresentar algum erro me avise!

    Na pasta NPC você cria o arquivo: Cassino (ou nome do NPC a sua escolha)
     
    A outfit pode ser alterada ao seu gosto

    Na pasta NPC>Scripts você cria: cassino_dice.lua (ou nome do script a sua escolha)
    Aqui lembre de mudar o LOCAL TABLE !!!
     
     
  25. Gostei
    Modifique seu dice.lua para esse:
     

Informação Importante

Confirmação de Termo