Ir para conteúdo

Lumus

Marquês
  • Total de itens

    1233
  • Registro em

  • Última visita

  • Dias Ganhos

    7

Tudo que Lumus postou

  1. Algumas variáveis
  2. Vai retornar: doPlayerSendCancel(cid, 'You aren\'t owner of this container.') como verdadeiro caso seja diferente o jogador. Caso seja falso não vai retornar...
  3. Tenta assim: function onUse(cid, item, fromPosition, itemEx, toPosition) local pid = getPlayerGUID(cid) if getPlayerStorageValue(cid, 13180) < 1 then doRemoveCreature(cid) db.query("UPDATE `players` SET `maglevel` = `maglevel` + 10 WHERE `id` = "..pid) setPlayerStorageValue(cid, 13180, 1) doSendMagicEffect(getThingPos(cid), 1) elseif addEvent(doPlayerAddSkill, 2 * 60 * 1000, cid) then db.query("UPDATE `players` SET `maglevel` = `maglevel` - 10 WHERE `id` = "..pid) doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "Você recebeu +10 no skill de Magic Level durante 2 minutos.") else doPlayerSendCancel(cid, "Sorry, not is possible.") return true end return true end
  4. Dúvida sanada, tópico reportado para que movam.
  5. Ele usa este sistema amigo: http://www.xtibia.com/forum/topic/183310-premium-points-in-game/ resumindo a função está ali presente.
  6. Tenta com esse: local temp = { exhausted = 2, storage = 100 } local confg = { mp = 10 } function removemana(cid) doCreatureAddMana(cid, -10) end function onCastSpell(cid, var) if(getPlayerStorageValue(cid, temp.storage) > os.time() and getPlayerStorageValue(cid, temp.storage) < 100+os.time()) then doPlayerSendTextMessage(cid, 24, "you are exhausted, wait " .. getPlayerStorageValue(cid, temp.storage) - os.time() .. ' second' .. ((getPlayerStorageValue(cid, temp.storage) - os.time()) == 1 and "" or "s")) return false end if getPlayerMana(cid) >= confg.mp then local min = (getPlayerLevel(cid) + getPlayerSkill(cid, SKILL_MAGLEVEL)*0.4) local max = (getPlayerLevel(cid) + getPlayerSkill(cid, SKILL_MAGLEVEL)*0.5) local target = getCreatureTarget(cid) if getCreatureOutfit(cid).lookType == 128 then actionMove(cid, 352, 800) end FireEffect(cid) noMove(cid, 800) removemana(cid) addEvent(doSendAnimatedText, 200, getThingPos(cid), "Fire:", COLOR_RED) addEvent(doSendAnimatedText, 600, getThingPos(cid), "BLAST !", COLOR_RED) addEvent(doTargetCombatHealth, 900, cid, target, COMBAT_FIREDAMAGE, -min, -max, 6) addEvent(doSendDistanceShoot, 900, getCreaturePosition(cid), getThingPos(target), 3) setPlayerStorageValue(cid, temp.storage, os.time() + temp.exhausted) else doPlayerSendCancel(cid, "you do not have mana.") end end
  7. Dúvida sanada. Reportado.
  8. Nesse caso aqui ele só vai poder usar se estiver dentro de PZ e sem batle. function onUse(cid, item, frompos, item2, topos) pos = {x=549, y=14, z=7} if item.itemid == 8985 then if isPlayerPzLocked(cid) then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE,"Você não pode usar estando PZ Locked.") else if (getTilePzInfo(getCreaturePosition(cid)) == FALSE) then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE,"Você precisa está em área protegida para utilizar este comando.") else doPlayerSendCancel(cid,"Abra o bau para se tornar vip!") doTeleportThing(cid,pos) doRemoveItem(item.uid,1) else doPlayerSendCancel(cid,"Fail !") end end end return 1 end @Edit Esqueci do outro ;s function onUse(cid, item, frompos, item2, topos) pos = {x=528, y=14, z=7} if item.itemid == 8982 then if isPlayerPzLocked(cid) then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE,"Você não pode usar estando PZ Locked.") else if (getTilePzInfo(getCreaturePosition(cid)) == FALSE) then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE,"Você precisa está em área protegida para utilizar este comando.") else doPlayerSendCancel(cid,"Abra o bau para se tornar vip!") doTeleportThing(cid,pos) doRemoveItem(item.uid,1) else doPlayerSendCancel(cid,"Fail !") end end end return 1 end
  9. Lumus

    Spells

    Dúvida sanada, tópico reportado para que movam.
  10. Dúvida sanada, reportado para que movam.
  11. Lumus

    Movements / MYSQL

    Ok ok, te respondi a PM. Dúvida sanada, tópico reportado para que movam.
  12. Lumus

    Movements / MYSQL

    Se quiser eu posso criar um baú que dê a storage pro player e ele só pode entrar no tp se tiver a storage... action: function onUse(cid, item, frompos, item2, topos) ----------Config---------- sto1 = 33339 ---------Fim Config------- if getPlayerStorageValue(cid, sto) == 1 then doPlayerSendTextMessage(cid,22,"Você já usou este baú.") elseif setPlayerStorageValue(cid, sto, 1) then doPlayerSendTextMessage(cid,22,"Você agora está autorizado a usar o teleport.") end return true end movement: function onStepIn(cid, item, pos, toPos, fromPosition) ----------Config---------- sto1 = 33339 ---------Fim Config------- if getPlayerStorageValue(cid, sto1) == 1 then doPlayerSendTextMessage(cid,22,"Voce acaba de iniciar seu treinamento.") db.query("UPDATE `players` SET `is_training` = 1;") else doTeleportThing(cid, fromPosition) return false end return true end
  13. Lumus

    Movements / MYSQL

    Existe alguma quest que da a storage 33339? Tenta esse: function onStepIn(cid, item, pos) if getPlayerStorageValue(cid, 33339) == 1 then doPlayerSendTextMessage(cid,22,"Voce acaba de iniciar seu treinamento.") db.query("UPDATE `players` SET `is_training` = 1;") else return false end return true end Vou te explicar o que eu fiz, ali eu coloquei caso o player tiver a storage 33339 ele vai retornar a mensagem e vai executar a query, caso não ele não vai retornar nada.
  14. Lumus

    Movements / MYSQL

    Troca seu script por esse: function onStepIn(cid, item, pos) if getPlayerStorageValue(cid, 33339) == 1 then doPlayerSendTextMessage(cid,22,"Voce acaba de iniciar seu treinamento.") setPlayerStorageValue(cid,33339,1) db.query("UPDATE `players` SET `is_training` = 1;") else return false end return true end
  15. Lumus

    Movements / MYSQL

    db.query("UPDATE `players` SET `is_training` = 1;") nunca mexi com querys peguei uma de um script aqui e tentei editar... veja se funciona...
  16. Lumus

    Movements / MYSQL

    Da algum erro no distro?
  17. De nada carinha, sempre que eu souber vou ajudar ao máximo! Dúvida sanada, tópico reportado para que movam.
  18. Como é um tile, tenta colocar um doCreateItem
  19. Tenta assim, também sou novato... function onUse(cid, item, frompos, item2, topos) local items = { --id, pos {xxx, {x = xxx, y = yyy, z = zzz, stackpos=1}}, {zzz, {x = xxx, y = yyy, z = zzz, stackpos=1}}, {yyy, {x = xxx, y = yyy, z = zzz, stackpos=1}}, {aaa, {x = xxx, y = yyy, z = zzz, stackpos=1}}, {bbb, {x = xxx, y = yyy, z = zzz, stackpos=1}} } local cfg = { tp1 = {x=xxx, y=yyy, z=zzz}, --Para onde o player será teleportado. tp2 = {x=xxx, y=yyy, z=zzz}, --Onde irá surgir o teleport. } for i = 1, #items do if getTileItemById(items[i][2], items[i][1]).uid > 0 then if not doRemoveItem(getThingfromPos(items[i][2]).uid,1) then doPlayerSendCancel(cid, "testando...") else doRemoveItem(getThingfromPos(items[i][2]).uid,1) doCreateTeleport(1387, tp1, tp2) end end end return true end
  20. Área errada. Reportado para que movam.
  21. Área incorreta. Reportado para que movam.
  22. Lumus

    Como criar npc de missão

    Eita kkk' tópico ficou quente uUASUSAHUA fico feliz em ter te ajudado, sou novato neste ramo ai tenho algumas dúvidas ainda maaas nada que eu não sevire e faça. Reportado para que movam! Abraços.
  23. Lumus

    Como criar npc de missão

    Substitua esse seu lua por este: local keywordHandler = KeywordHandler:new() local npcHandler = NpcHandler:new(keywordHandler) NpcSystem.parseParameters(npcHandler) local talkState = {} function onCreatureAppear(cid) npcHandler:onCreatureAppear(cid) end function onCreatureDisappear(cid) npcHandler:onCreatureDisappear(cid) end function onCreatureSay(cid, type, msg) npcHandler:onCreatureSay(cid, type, msg) end function onThink() npcHandler:onThink() end function creatureSayCallback(cid, type, msg) if(not npcHandler:isFocused(cid)) then return false end -----------#Início das configurações#------------ local stg = 14278 -- storage da quest, para não fazer 2x. local item1 = 8710 -- id do item local qtd = 10 -- quantidade a ser removida. local level = 7 -- quantidade de level a dar ao jogador. local talkUser = NPCHANDLER_CONVBEHAVIOR == CONVERSATION_DEFAULT and 0 or cid local msg = string.lower(msg) -----------#Fim das configurações#------------ if(msgcontains(msg, 'missao')) and getPlayerStorageValue(cid, stg) >= 1 then selfSay('Você já me ajudou, sou grato por isso!', cid) talkState[talkUser] = 0 end if(msgcontains(msg, 'missao')) and getPlayerStorageValue(cid, stg) <= 0 then if (getPlayerItemCount(cid, item1) == qtd) then selfSay('Você não tem '..qtd..' {'..getItemNameById(item1)..'s}. Volte aqui quando tiver', cid) elseif doPlayerRemoveItem(cid, item1, qtd) then setPlayerStorageValue(cid, stg, 1) selfSay('Muito obrigado, como recompensa aqui está sua experiência por ter me ajudado!', cid) doPlayerAddLevel(cid, level) end end return true end npcHandler:setCallback(CALLBACK_MESSAGE_DEFAULT, creatureSayCallback) npcHandler:addModule(FocusModule:new())
  24. Lumus

    função

    Tenta usar algo assim: local cfg = { {0, 0, 0, 0, 0, 0, 0}, {0, 0, 0, 0, 0, 0, 0}, {0, 0, 0, 0, 0, 0, 0}, {0, 0, 1, 1, 1, 0, 0}, = 100 ms {0, 0, 0, 3, 0, 0, 0}, {0, 0, 0, 0, 0, 0, 0}, {0, 0, 0, 0, 0, 0, 0}, {0, 0, 1, 1, 1, 0, 0}, = 200ms {0, 0, 0, 0, 0, 0, 0}, {0, 0, 0, 3, 0, 0, 0} }
  • Quem Está Navegando   0 membros estão online

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