Ir para conteúdo

Bodak Reborn

Membro
  • Registro em

  • Última visita

Tudo que Bodak Reborn postou

  1. Não entendi. Explique melhor para podermos lhe ajudar.
  2. Não entendi o problema. Ele tá com [SPECIAL] e [VIP] no nome?
  3. Ué, vai no actions.xml, dá ctrl + f e procura por 12358
  4. Assim. local config = { from = {x = 1047, y = 1049, z = 7}, -- canto superior esquerdo da sala dos trainers. to = {x = 1054, y = 1056, z = 7}, -- canto inferior direito da sala dos trainers. } local function getPlayersInArea(fromPos, toPos) local players = {} for _, cid in ipairs(getPlayersOnline()) do if isInRange(getThingPos(cid), fromPos, toPos) then table.insert(players, cid) end end return players end local function playersInArea () if table.getn(getPlayersInArea(config.from, config.to)) > 0 then --resto do código end return true end
  5. Deve funcionar... movements function onStepIn(cid, item, position, fromPosition) setPlayerStorageValue(cid, 138456, 1) return true end function onStepOut(cid, item, position, fromPosition) setPlayerStorageValue (cid, 138456, 0) return true end 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 if getPlayerStorageValue (cid, 138456) == 1 then doAddCondition(cid, exhaust) doSendMagicEffect(getThingPos(itemEx.uid), CONST_ME_MAGIC_BLUE) doCreatureSay(itemEx.uid, "Aaaah...", TALKTYPE_ORANGE_1) else doAddCondition(cid, exhaust) doSendMagicEffect(getThingPos(itemEx.uid), CONST_ME_MAGIC_BLUE) doCreatureSay(itemEx.uid, "Aaaah...", TALKTYPE_ORANGE_1) doTransformItem(item.uid, EMPTY_POTION) end return TRUE end
  6. Coloque um action id no piso dos trainers e faça com que dê um storage x. No script dos potions, faça uma verificação para caso o jogador tenha esse storage x, o potion não será transformado em um frasco, logo, ficando inifinito. Após sair do piso do trainer, o storage é removido e então o potion vai ser transformado em frasco ao usar.
  7. Como faltou informação, vou supor que é a máxima. config = { healthPlus = 1000, -- quanto vai aumentar de life. manaPlus = 1000, -- quanto vai aumentar de mana. } setCreatureMaxHealth (cid, getCreatureMaxHealth (cid) + config.healthPlus) setCreatureMaxMana (cid, getCreatureMaxMana (cid) + config.manaPlus)
  8. Coloca em movements/scripts cria um arquivo nome_arquivo.lua XML: <movevent type="StepIn" actionid="Action_ID_do_chão" event="script" value="nome_arquivo.lua" /> Coloca um action ID no chão que você quer que apenas staff passe.
  9. Caso tenha alguma dúvida sobre a tag, avise. function onStepIn(cid, item, position, fromPosition) if getPlayerAcess(cid) < 2 then doTeleportThing(cid, fromPosition, true) doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE,"MSG caso não seja da staff") doSendMagicEffect(getThingPos(cid), CONST_ME_MAGIC_BLUE) return true end doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE,"MSG caso seja da staff") return true end
  10. doRemoveCreature (cid)
  11. Provavelmente. Esse erro não faz sentido... Já vi erros como esse apenas por não usar o notepad++. Lembrando, é notepad++, não notepad.
  12. Script..? Cadê?
  13. local config = { newPos = {x = 1049, y = 1058, z = 7}, -- posição para onde os jogadores irão. tpPos = {x = 1055, y = 1052, z = 7}, -- posição onde será criado o teleporte. exhaust = 5, -- tempo em segundos para poder usar a skill novamente. storage = 15020, timeRemove = 3, -- tempo em segundos para o teleport sumir. tpInside = {x = 1048, y = 1053, z = 7}, -- posição do teleport verdadeiro. } function doMarkPos(cid, posx, posy, posz) setPlayerStorageValue(cid, 12000, posx) setPlayerStorageValue(cid, 12001, posy) setPlayerStorageValue(cid, 12002, posz) end function getMarkPos(cid) return {x=getPlayerStorageValue(cid, 12000), y=getPlayerStorageValue(cid, 12001), z=getPlayerStorageValue(cid, 12002)} end local function doRemoveTeleportIn (tpPos) local tpRemove = getTileItemById(tpPos, 1387).uid return tpRemove > 0 and doRemoveItem(tpRemove) end local pos = getCreaturePosition(cid) function onCastSpell(cid, var) doMarkPos(cid, pos.x, pos.y, pos.z) if getPlayerStorageValue(cid, config.storage) < os.time() then if getMarkPos(cid).x > 0 then doCreateTeleport(1387, config.newPos, config.tpPos) doCreateTeleport(1387, getMarkPos(cid), config.tpInside) setPlayerStorageValue(cid, config.storage, config.exhaust + os.time()) addEvent (doRemoveTeleportIn, config.timeRemove * 1000, config.tpPos) end else doPlayerSendCancel(cid, "You are exhausted") end return true end movements/scripts/nome_arquivo.lua function onStepIn(cid, item, position, fromPosition) local config = { tpInside = {x = 1048, y = 1053, z = 7}, -- posição do teleport verdadeiro. from = {x = 1047, y = 1049, z = 7}, -- canto superior esquerdo da sala para onde os jogadores irão. to = {x = 1054, y = 1056, z = 7}, -- canto inferior direito da sala para onde os jogadores irão. } local function getPlayersInArea(fromPos, toPos) local players = {} for _, cid in ipairs(getPlayersOnline()) do if isInRange(getThingPos(cid), fromPos, toPos) then table.insert(players, cid) end end return players end local function doRemoveTeleportInside (tpInside) local tpRemoveInside = getTileItemById(tpInside, 1387).uid return tpRemoveInside > 0 and doRemoveItem(tpRemoveInside) end local function playersInArea () if table.getn(getPlayersInArea(config.from, config.to)) == 0 then doRemoveTeleportInside (config.tpInside) end return true end addEvent(playersInArea, 1) return true end XML <movevent type="StepIn" actionid="Action_id_do_tp" event="script" value="nome_arquivo.lua" /> Na posição que você colocar o teleport verdadeiro (para voltar para a posição antes de usar a spell) coloque um action id, o mesmo que você vai colocar no XML.
  14. Se ninguém ajudar até amanhã, eu faço. Hoje não tem como. \;
  15. Cara, eu testei e está funcionando, não sei o que fazer. ;/ Você tem certeza absoluta que colocou tudo no lugar certo? Está esperando o tempo? Lembrando que o tempo está em segundos. timeToAdd é quanto você vai ter que esperar parado no SQM, no seu caso, 3 minutos. addTime é o tempo que vai adicionar, no seu caso, 5 minutos. Caso esteja usando anti-idle, pare um pouquinho e teste. Lembrando que para aumentar a stamina, você deve relogar.
  16. "Eu criei com o action 3950 e coloquei em todos os pisos dos trainers!" "<movevent type="StepIn" actionid="5963" script="trainer.lua" />"
  17. Colocou o action id no movements.xml?
  18. Você está declarando uma variável com o valor x e depois declarando a mesma variável com o valor y, logo, a variável vai valer apenas y. Troca o nome da variável e faz um addEvent (nome da função, tempo, parâmentros da função) No caso, o tempo está em milésimos, para ser em segundos, coloque tempo * 1000
  19. Eu testei e estava funcionando perfeitamente. Você colocou os action id certos?
  20. Só faltou eu colocar os creaturescripts, lel. Achei esse script do zipter. talkactions local msg = "Agora seu sistema PvP está %s." function onSay(cid, words, param) local _table = { ["on"] = {"ativado", 1}, ["off"] = {"desativado", 0}, } if _table[param:lower()] then local mode = _table[param:lower()] setPlayerStorageValue(cid, 91821, mode[2]) doPlayerSendTextMessage(cid, 27, msg:format(mode[1])) end return true end creaturescripts XML: <event type="statschange" name="PvPStats" event="script" value="nome do arquivo.lua"/> <event type="target" name="PvPTarget" event="script" value="nome do arquivo.lua"/> <event type="login" name="PvPLogin" event="script" value="nome do arquivo.lua"/> script function onTarget(cid, target) if isPlayer(target) and isPlayer(cid) then if getPlayerStorageValue(cid, 91821) < 1 then doPlayerSendCancel(cid, "Você está com o modo PvP desligado. Se quiser atacar outros jogadores, ative-o.") return false end end return true end function onStatsChange(cid, attacker, type, combat, value) if isPlayer(cid) and isPlayer(attacker) and type == STATSCHANGE_HEALTHLOSS then if getPlayerStorageValue(attacker, 91821) < 1 then doPlayerSendCancel(attacker, "Você está com o modo PvP desligado. Se quiser atacar outros jogadores, ative-o.") return false end end return true end function onLogin(cid) registerCreatureEvent(cid, "PvPTarget") registerCreatureEvent(cid, "PvPStats") return true end Caso não consiga colocar a tag nas talkactions, me avise.
  21. Cara, eu testei aqui e deu certo. Tenta assim: local config = { newPos = {x = 1049, y = 1558, z = 7}, -- posição para onde os jogadores irão. tpPos = {x = 1050, y = 1558, z = 7}, -- posição onde será criado o teleporte. exhaust = 5, -- tempo em segundos para poder usar a skill novamente. Recomendo ser maior que o backTime. backTime = 4, -- tempo em segundos para voltar para de onde usou a skill. target = getCreatureTarget(cid), storage = 115820, } function doMarkPos(cid, posx, posy, posz) setPlayerStorageValue(cid, 19000, posx) setPlayerStorageValue(cid, 19001, posy) setPlayerStorageValue(cid, 19002, posz) end function getMarkPos(cid) return {x=getPlayerStorageValue(cid, 19000), y=getPlayerStorageValue(cid, 19001), z=getPlayerStorageValue(cid, 19002)} end function tpBack() doTeleportThing (cid, getMarkPos(cid)) doTeleportThing (target, getMarkPos(cid)) end local pos = getCreaturePosition(cid) doMarkPos(cid, pos.x, pos.y, pos.z) function onCastSpell(cid, var) if getPlayerStorageValue(cid, config.storage) < os.time() then if isPlayer(target) then return true end -- Teste para ver se some o bug caso tente usar a skill sem target, se der erro no código, remova essa linha. if getMarkPos(cid).x > 0 then doTeleportThing(cid, config.newPos) doTeleportThing(target, config.newPos) setPlayerStorageValue(cid, config.storage, config.exhaust + os.time()) addEvent(tpBack, config.backTime * 1000) end else doPlayerSendCancel(cid, "You are exhausted") end return true end
  22. Ele está como moveble no Item Editor?
  23. Nos SQMs dos trainers, coloque um action id data/movements/scripts nome_arquivo addSta = {} local config = { timeToAdd = 3, -- intervalo de tempo para adicionar. addTime = 5, -- quanto vai adicionar. } local function addStamina(cid) if not isPlayer(cid) then addSta[cid] = nil return true end doPlayerSetStamina(cid, getPlayerStamina(cid) + config.addTime) doPlayerSendTextMessage(cid, 25, "Você recebeu "..config.addTime.." minutos de stamina.") addSta[cid] = addEvent(addStamina, config.timeToAdd * 60 * 1000, cid) end function onStepIn(cid) if isPlayer(cid) then addSta[cid] = addEvent(addStamina, config.timeToAdd * 60 * 1000, cid) end return true end function onStepOut(cid) if isPlayer(cid) then stopEvent(addSta[cid]) addSta[cid] = nil end return true end movements.xml <movevent type="StepIn" actionid="actiond_id" event="script" value="nome_arquivo.lua" /> Adaptei o script do Elwyn.

Informação Importante

Confirmação de Termo