Ir para conteúdo

psychonaut

Membro
  • Registro em

  • Última visita

Solutions

  1. psychonaut's post in (Resolvido)remover item was marked as the answer   
    Ah, tem que por depois do end, muda
    doSummonCreature("Prince Drazzak", {x = 33523, y = 32334, z = 12}) end Pra:
    end doSummonCreature("Prince Drazzak", {x = 33523, y = 32334, z = 12})
  2. psychonaut's post in (Resolvido)TFS 1.2 teletransportar ao acabar premium was marked as the answer   
    Vai na creaturescripts/scripts sempremium.lua
    function onLogin(player, cid) if getPlayerPremiumDays(cid) == 0 then doTeleportThing(cid, getPlayerMasterPos(cid), false) doPlayerSendTextMessage(cid,MESSAGE_FIRST,'Sua premium acabou, voce foi pro templo') doSendMagicEffect(getCreaturePosition(cid),CONST_ME_TELEPORT) end return true end creaturescripts/others/login.lua:
         'Sempremium'   No localevents.   Ai no creaturescripts.xml: <event type="login" name="Sempremium" script="sempremium.lua" /> Qualquer coisa me avisa que arrumo. Não deu pra testar porque no meu servidor PA é grátis, então não cai no templo.
  3. psychonaut's post in (Resolvido)Resolvido-Script de troca de nome TFS 0.4 >TFS 1.0 was marked as the answer   
    Deu um trabalho do cão arrumar o banco de dados, mas enfim:
    local seconds = 4 -- tempo pra ler a msg de mudanca de nome local maxTextLenght = 15 -- limite de caracteres do nome local blacklistParam = {"account manager", "god", "cm", "gm", "tutor", "tester"} -- nomes proibidos pra usar local minWordLenght = 3 -- min de caracteres local qtd = 1 -- quantidade do item necessario local item = 1984 -- id do item necessario local function changeName(param) local guid = getPlayerGUID(param.pid) doRemoveCreature(param.pid) db.query("UPDATE `players` SET `name` = '"..param.params.."' WHERE `id` = " .. guid .. ";") doRemoveCreature(guid) doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, 'Jogador com nome: '..param.nome..' Mudou para: '..param.params..'.') return true end function onSay(cid, words, param) dofile("./config.lua") nome = getCreatureName(cid) params = param pid = cid if param ~= "" then local resultx = db.storeQuery("SELECT `name` FROM `players` WHERE `name` = " .. db.escapeString(param)) if not resultx then end local value = result.getDataString(resultx, 'name') result.free(resultx) print("chegou aki a") if (value == param) then print("chegou aki b") doPlayerSendCancel(cid, "Nome ja em uso.") return false end if (getPlayerItemCount(cid, item) < qtd) then doPlayerSendCancel(cid, "Voce nao possui o item.") elseif(not getTilePzInfo(getCreaturePosition(cid))) then doPlayerSendCancel(cid, "Voce precisa estar em pz para usar.") else if(string.len(tostring(params)) >= maxTextLenght) then doPlayerSendCancel(cid, "Ha um limite de " .. maxTextLenght .. "caracteres.") elseif(string.find(params:lower(), "[^%l%s]") ~= nil) then doPlayerSendCancel(cid, "Voce nao pode usar simbolos.") else for blacklist = 1, table.maxn(blacklistParam) do if(string.find(params:lower(), blacklistParam[blacklist]) ~= nil) then doPlayerSendCancel(cid, "Nome proibido.") return false end end local paramTemp, space, oldName = '', '', getCreatureName(cid) for word in string.gmatch(params, "%a+") do if(string.len(word) < minWordLenght) then doPlayerSendCancel(cid, "Cada palavra tem um minimo de " .. minWordLenght .. " caracteres.") return true end paramTemp = "" .. paramTemp .. "" .. space .. "" .. word .. "" if(space == '') then space = " " end end local guid = getPlayerGUID(cid) params = paramTemp if(pcall(doPlayerChangeName, guid, oldName, params) == false) then doPlayerRemoveItem(cid, item, qtd) doPlayerPopupFYI(cid, " Voce mudou o nome para "..params..".\nEntre denovo para aplicar as mudancas.") addEvent(changeName, seconds * 1000, {cid = cid, pid = pid, params = params, nome = nome}) doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Mudara o nome para "..params.." em "..seconds.." segundos.") end end end else doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, 'Use: /changename Novonome') end return true end talkactions.xml:
    <talkaction words="!changename" separator=" " script="NomedoScript.lua"/>
  4. psychonaut's post in (Resolvido)So x vocaçao pode usa x item was marked as the answer   
    Altera a linha
    if vocation = 3 then
     
    Pra 
    if vocation == 3 then
      Erro meu, é que to mexendo com VB, ai confundi.
  5. psychonaut's post in (Resolvido)[PEDIDO] Spell que suga mana was marked as the answer   
    Então, o que você pediu dando dano ta aqui, não consegui fazer porcentagem msm... com o global.lua ficaria mais facil
    local MIN = 30 -- minimo de drain local MAX = 100 -- max de drain local combat1 = createCombatObject() setCombatParam(combat1, COMBAT_PARAM_TYPE, COMBAT_ENERGYDAMAGE) setCombatParam(combat1, COMBAT_PARAM_EFFECT, 134) setCombatFormula(combat1, COMBAT_FORMULA_LEVELMAGIC, -120.2, 1, -120.2, 1) local combat2 = createCombatObject() setCombatParam(combat2, COMBAT_PARAM_TYPE, COMBAT_ENERGYDAMAGE) setCombatParam(combat2, COMBAT_PARAM_EFFECT, 134) setCombatFormula(combat2, COMBAT_FORMULA_LEVELMAGIC, -120.2, 1, -120.2, 1) local combat3 = createCombatObject() setCombatParam(combat3, COMBAT_PARAM_TYPE, COMBAT_MANADRAIN) setCombatParam(combat3, COMBAT_PARAM_EFFECT, CONST_ME_MAGIC_RED) setCombatFormula(combat3, COMBAT_FORMULA_LEVELMAGIC, 0, -MIN, 0, -MAX) local combat4 = createCombatObject() setCombatParam(combat4, COMBAT_PARAM_TYPE, COMBAT_MANADRAIN) setCombatParam(combat4, COMBAT_PARAM_EFFECT, CONST_ME_MAGIC_RED) setCombatFormula(combat4, COMBAT_FORMULA_LEVELMAGIC, 0, -MIN, 0, -MAX) arr1 = { {0, 0, 0, 0, 0}, {0, 1, 1, 1, 0}, {0, 1, 3, 1, 0}, {0, 1, 1, 1, 0}, {0, 0, 0, 0, 0} } arr2 = { {0, 0, 0, 0, 0}, {0, 1, 1, 1, 0}, {0, 1, 3, 1, 0}, {0, 1, 1, 1, 0}, {0, 0, 0, 0, 0} } arr3 = { {0, 0, 0, 0, 0}, {0, 1, 1, 1, 0}, {0, 1, 3, 1, 0}, {0, 1, 1, 1, 0}, {0, 0, 0, 0, 0} } arr4 = { {0, 0, 0, 0, 0}, {1, 1, 1, 1, 1}, {1, 1, 3, 1, 1}, {1, 1, 1, 1, 1}, {0, 0, 0, 0, 0} } local area1 = createCombatArea(arr1) local area2 = createCombatArea(arr2) local area3 = createCombatArea(arr3) local area4 = createCombatArea(arr4) setCombatArea(combat1, area1) setCombatArea(combat2, area2) setCombatArea(combat3, area3) setCombatArea(combat4, area4) local function onCastSpell1(parameters) return isPlayer(parameters.cid) and doCombat(parameters.cid, combat1, parameters.var) end local function onCastSpell2(parameters) return isPlayer(parameters.cid) and doCombat(parameters.cid, combat2, parameters.var) end local function onCastSpell3(parameters) return isPlayer(parameters.cid) and doCombat(parameters.cid, combat3, parameters.var) end local function onCastSpell4(parameters) return isPlayer(parameters.cid) and doCombat(parameters.cid, combat4, parameters.var) end function onCastSpell(cid, var) local parameters = { cid = cid, var = var} addEvent(onCastSpell1, 100, parameters) addEvent(onCastSpell2, 400, parameters) addEvent(onCastSpell3, 800, parameters) addEvent(onCastSpell4, 1000, parameters) return true end
  6. psychonaut's post in (Resolvido)[PEDIDO] Colocar cooldown em spell. was marked as the answer   
    Agora acho que vai!
    http://pastebin.com/GiG69Zqi
     
    Tem uma parte que ta assim:
    end end end setGlobalStorageValue(45000, os.time() + 5) end return true   Remove o setGlobalStorageValue(45000, os.time() + 5)   E coloca la em cima depois do else   if getGlobalStorageValue(45000) >= os.time() then doPlayerSendCancel(cid,"Voce tem que esperar ".. getGlobalStorageValue(45000) - os.time() .." pra usar denovo.")   else setGlobalStorageValue(45000, os.time() + 5)   5 É o cooldown
  7. psychonaut's post in (Resolvido)Erro ao executar /save was marked as the answer   
    Editei aquele script, olha la, muda e tenta dar /save
    http://www.tibiaking.com/forum/topic/59582-problemas-com-rollback/
  8. psychonaut's post in (Resolvido)Problemas com RollBack was marked as the answer   
    Editei o script, acontece que algumas funções eram antigas. Esse ai é o do talkactions.
    function onSay(cid, words, param, channel) if getPlayerGroupId(cid) > 2 then for var = 1,2 do if var == 1 then broadcastMessage("Salvo.", 4) end if var == 2 then saveServer() end end end return true end
  9. psychonaut's post in (Resolvido)Como aumentar imagens no shop gesior estilo underwar? was marked as the answer   
    O seu só não tem o height="350" width="400", tem que adicionar, vai no script lá, aperta ctrl+f e digita:
    <img src="item_images/'.$itemvip['item_id'].'.gif">
     
    Ele vai te levar pra parte do script que tem que mudar, muda pra:
    <img src="item_images/'.$itemvip['item_id'].'.gif" height="350" width="400">
     
    Faz o mesmo com:
    <img src="item_images/'.$item['item_id'].'.gif">
     
    Substituindo para:
    <img src="item_images/'.$item['item_id'].'.gif" height="350" width="400">
     
    Se isso não mudar nada, avisa, que é porquê tem que mudar o tamanho da tabela
    Lembrando que tu pode alterar os valores height="350" width="400" pro tamanho que quer que a imagem fique.
  10. psychonaut's post in (Resolvido)O que é GuildShop? was marked as the answer   
    Por exemplo, num sistema que eu achei, todo dia o dono de uma guilda fala um comando(ex: !guildpoints), ai todos os jogadores ganharão pontos. Com esses pontos eles vão la no site(achei um que funcionava com geisor) e compram itens que você pre determinou, achei um ot aqui que possui. Ai você coloca alguns requerimentos pra isso, por exemplo, a guilda precisa de 10 chars leveis 200+ e quantos pontos ganham por dia. Isso é pra estimular criação de guildas e fazer com que o guild leader seja ativo.
     

Informação Importante

Confirmação de Termo