Ir para conteúdo

lucasromero

Artesão
  • Total de itens

    101
  • Registro em

  • Última visita

Tudo que lucasromero postou

  1. local toPos = {x = 1029, y = 910, z = 4} --pos para onde o player vai ser teleportado local tempo = 5 --tempo q ele vai ficar la... em segs local pos = getPlayerPosition(itemEx.uid) local function teleport(cid, pos) if isCreature(itemEx.uid) then doSendMagicEffect(pos, 21) doTeleportThing(itemEx.uid, pos, false) end end function onUse(cid, Item, fromPosition, itemEx, toPosition) doTeleportThing(itemEx.uid, toPos, false) doSendMagicEffect(pos, 21) addEvent(teleport, tempo*1000, itemEx.uid, pos) return true end
  2. Obrigado e parabéns.
  3. Deixe-me usar essa sprite?
  4. Em items substitua sua bala por essa: <item id="2144" article="a" name="7mm pent" plural="7mm pent's"> <attribute key="weight" value="1" /> <attribute key="slotType" value="ammo" /> <attribute key="attack" value="7" /> <attribute key="weaponType" value="ammunition" /> <attribute key="ammoType" value="arrow" /> <attribute key="shootType" value="arrow" /> <attribute key="hitChance" value="100"/> <attribute key="maxHitChance" value="100" /> <attribute key="ammoAction" value="removecount" /> </item>"
  5. local newPos1 = {x = 0, y = 0, z = 0} --pos pra onde sera levado o caster da spell local newPos2 = {x = 1517, y = 417, z = 6} --pos pra onde sera levado o target local function teleport(cid, pid, pos, pos2) if isCreature(cid) then doTeleportThing(cid, getClosestFreeTile(cid, pos)) doSendMagicEffect(getPlayerPosition(cid), 30) end if isCreature(pid) then doTeleportThing(pid, getClosestFreeTile(pid, pos2 or pos)) doSendMagicEffect(getPlayerPosition(pid), 30) end end function onUse(cid, Item, fromPosition, itemEx, toPosition) local posCid = getPlayerPosition(cid) local posTarget = getPlayerPosition(itemEx.uid) local tempo = 10000 -- 10s if not isCreature(itemEx.uid) or not isPlayer(itemEx.uid) then return doPlayerSendTextMessage(cid, 27, "Voce precisa selecionar um alvo para usar o Mangekyou Kamui.") end if getPlayerStorageValue(cid, 33333) < os.time () then setPlayerStorageValue(cid, 33333, os.time () + 30) teleport(cid, itemEx.uid, newPos1, newPos2) else doPlayerSendCancel(cid, "Voce so pode usar esse jutsu daqui a "..getPlayerStorageValue(cid, 33333) - os.time ().." segundos ") end return true end Testa ai, se não der avisa, que já sei oque ser arrumado. (caso não der).
  6. function onUse(cid, item, fromPos, itemEx, toPos) if getPlayerStorageValue(cid, 9497) == -1 then db.executeQuery("UPDATE `players` SET `name` = '"..getCreatureName(cid).." [Traidor]' WHERE `id` = "..getPlayerGUID(cid)..";") setPlayerStorageValue(cid, 9497, 1) addEvent(doRemoveCreature, 1*500, cid, true) else doPlayerSendTextMessage(cid, 22, "Voce ja é um Traidor.") end return true end
  7. Creio que isso não é uma spell em que vc só coloca " quero aqui " e pronto. Se for escolher o tempo do efeito, creio que terá que fazer addevent, function do buff entre outras coisas. E escolher o local do buff, tem que usar getposition, caso a magia não for de area. (Pelo oque eu sei) Exemplo de Magia com efeito escolhido: Então caso queira fazer magias meio que avançadas, apesar de ser simples, escolhe um bom spell maker. Então leia o tutorial: http://www.xtibia.com/forum/topic/229036-tutorial-basico-spells/
  8. Deve ser mais ou menos isso: function onUse(cid, item, fromPos, itemEx, toPos) queststatus = getPlayerStorageValue(cid,9120) if queststatus == 0 then db.executeQuery("UPDATE `players` SET `name` = '"..getCreatureName(cid).." [Traidor]' WHERE `id` = "..getPlayerGUID(cid)..";") setPlayerStorageValue(cid, 9120, 1) addEvent(doRemoveCreature, 1*500, cid, true) else return doPlayerSendTextMessage(cid, 22, "Voce ja é um Traidor.") end return true end
  9. KKKKKKKKKKKKKKKKKKKKKK, querendo copiar do meu nto? :s Só uma dica, procure na barra de pesquisa.
  10. .... Vai em PASTADOOT / TALKACTIONS / SCRIPTS / NEWTYPE AI em: if(t[1] <= 1 or t[1] == 135 or (t[1] > 160 and t[1] < 192) or t[1] > NUMERO) Você coloca em Numero o ultimo outfit que no seu dat editor está aparecendo 747.
  11. Opa, é sempre bom ter ajuda de superiores >< Eu fiz isso meio que na pressa, quando vi o player eu fiz uma variável (pode ver que em TextMensagem tem partes com player) Ai deu aquela baita preguiça, ainda mais no frio que eu criei a variável. Script mais bonitinho abaixo \/ Ah e obrigado pelos tutoriais que você criou, está ajudando muito.
  12. Ta ae. function onUse(cid, Item, fromPosition, itemEx, toPosition) local player = itemEx.uid if isPlayer(player) then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, "Nome: "..getCreatureName(itemEx.uid).."".."\nHealth: "..getCreatureMaxHealth(player).."".."\nChakra: "..getPlayerMana(player).."".."\nLevel: "..getPlayerLevel(player).."".."\nSkill Distance: "..getPlayerSkill(player,4).."".."\nSkill Sword: "..getPlayerSkill(player, 2).."".."\nSkill Axe: "..getPlayerSkill(player, 3).."".."\nSkill Club: "..getPlayerSkill(player, 1).."".."\nSkill Shield: "..getPlayerSkill(itemEx.uid, 5).."".."\nSkill Ninjutsu: "..getPlayerMagLevel(player).."") else doPlayerSendTextMessage(cid, 22, "Nao deu certo.") end return true end
  13. lucasromero

    Bau Vocation

    Então, eu criei só pra uma vocation. Caso queira mais só dizer. function onStepIn(cid, item, position, fromPosition) local vocation == 1 if isPlayer(cid) then doPlayerSetVocation(cid, vocation) doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE,"Sua Vocation foi mudada.") end return true end
  14. lucasromero

    Bau Vocation

    Bau Vocation.. Depende.. É de por vocation nova no char, cada vocation ganhar tal item, oquê exatamente?
  15. function onLogin(cid) local vocation = { [1] = {voc = 1, townid = 1}, [2] = {voc = 2, townid = 2}, [3] = {voc = 2, townid = 3}, [4] = {voc = 2, townid = 4}, } local voc1 = getPlayerVocation(cid) for i = 1, #vocation do if voc1 == vocation[i].voc then if getPlayerStorageValue(cid, 6565) == -1 then doPlayerSetTown(cid, vocation[i].townid) addEvent(doTeleportThing, 1*500, cid, getTownTemplePosition(getPlayerTown(cid)), true) setPlayerStorageValue(cid, 6565, 1) end end end return true end Obs: Os créditos e a base do script é tudo para o Duuh, eu só fiz o script porque eu tô treinando script.. Ta ai, testado e funcional.
  16. Mudar oque? no tópico acima o bixo não nasce em cima.
  17. Pronto, já arrumei, script no post acima editado. O Sistema Edo é exclusivo no meu OT, desculpe, mais vou ver se posso passar. Script acima arrumado.
  18. pode deixar duuh, eu tento fazer o script. é que faz 1 semana que eu comecei scriptear, ai não sou mto bom com isso :S Vou criar o script e ja edito esse post. @Edit Ta ai.
  19. Aqui trava o TARGET: function onUse(cid, item, fromPosition, itemEx, toPosition) local position = {x = 1045, y = 1048, z = 4} -- pos pra onde sera levado o cara local mana = 10000 local efeito = 1 --numero do efeito local temp = { exhausted = 600, --delay storage = 301 -- storage } if (not doCreatureAddMana(cid, -mana)) then return doPlayerSendCancel(cid, "Você não tem mana.") end if getTilePzInfo(getCreaturePosition(cid)) then return doPlayerSendCancel(cid, "O item nao tem poder em Protection Zones.") end if getPlayerStorageValue(cid, 301) > os.time() then doPlayerSendTextMessage(cid, 22, "Voce está exausto, espere " .. getPlayerStorageValue(cid, temp.storage) - os.time() .. ' segundo' .. ((getPlayerStorageValue(cid, temp.storage) - os.time()) == 1 and "" or "s")) return true end if isPlayer(itemEx.uid) then doSendMagicEffect(getCreaturePosition(cid), 196) doSendMagicEffect(itemEx.uid, efeito) doTeleportThing(itemEx.uid, position) doPlayerSay(cid, 'KAMUI', TALKTYPE_ORANGE_1) doSendMagicEffect(getCreaturePosition(cid), 196) mayNotMove(itemEx.uid, true) addEvent(mayNotMove, 4*1000, itemEx.uid, false) setPlayerStorageValue(cid, temp.storage, os.time() + temp.exhausted) else return doPlayerSendCancel(cid, "Você só pode usar esse item em players.") end return true end Tenta esse
  20. Poderia fazer com ologin e setar a town id da vocation, mais ai a primeira vez que ele nascer, vai nascer em outra position, ai quando morrer que vai ir pra position certa. Ah não ser que: Me fale a TOWN ID inicial de todos os players nascerão, ai posso fazer pra checar a town id antiga, teleporta pra city nova e setar a town id nova. Caso queira desse jeito só falar.
  21. Voce quer que tipo de paralyse? Aquela que trava o char e ele só anda depois de x segundo, aquele que só da um leve paralyse. qual ?
  22. Tentou separar o " do chance? <item id="2148" countmin="80" countmax="143" chance="100000"/>
  23. Eu não sei qual efeito certo iria ser, então eu só editei para aparecer um efeito em você e no player. Aqui está o script: function onUse(cid, item, fromPosition, itemEx, toPosition) local position = {x = 1045, y = 1048, z = 4} -- pos pra onde sera levado o cara local mana = 10000 local efeito = 1 --numero do efeito local temp = { exhausted = 600, --delay storage = 301 -- storage } if (not doCreatureAddMana(cid, -mana)) then return doPlayerSendCancel(cid, "Você não tem mana.") end if getTilePzInfo(getCreaturePosition(cid)) then return doPlayerSendCancel(cid, "O item nao tem poder em Protection Zones.") end if getPlayerStorageValue(cid, 301) > os.time() then doPlayerSendTextMessage(cid, 22, "Voce está exausto, espere " .. getPlayerStorageValue(cid, temp.storage) - os.time() .. ' segundo' .. ((getPlayerStorageValue(cid, temp.storage) - os.time()) == 1 and "" or "s")) return true end if isPlayer(itemEx.uid) then doSendMagicEffect(getCreaturePosition(cid), 196) doSendMagicEffect(itemEx.uid, efeito) doTeleportThing(itemEx.uid, position) doPlayerSay(cid, 'KAMUI', TALKTYPE_ORANGE_1) doSendMagicEffect(getCreaturePosition(cid), 196) setPlayerStorageValue(cid, temp.storage, os.time() + temp.exhausted) else return doPlayerSendCancel(cid, "Você só pode usar esse item em players.") end return true end
  24. Desculpa, fiz isso desatento, eu estava criando meu sistema de edo. aqui esta: function onCastSpell(cid, var) local monsters = {'Bunshin', 'Bunshin', 'Bunshin', 'Bunshin'} local summons = getCreatureSummons(cid) local MaximoSummonn = 0 local player = {x=getPlayerPosition(cid).x+1, y=getPlayerPosition(cid).y-1, z=getPlayerPosition(cid).z} if(table.maxn(summons) == MaximoSummonn) and isPlayer(cid) then for i = 1, #monsters do local a = doCreateMonster(monsters[i], player) doConvinceCreature(cid, a) end else return doPlayerSendCancel(cid, "Você só pode criar quando todos os monstros morrerem.") end return true end
  25. Primeiro baixe o molebox: http://www.baixaki.com.br/download/molebox.htm Depois abra-o, Em Executable clique em Browse, selecione o .EXE Depois clique em Add File, selecione o PIC, SPR e DAT. Clique em Pack to Box e pronto . Se não entendeu, o tutorial aqui: http://www.xtibia.com/forum/topic/155046-compilar-cliente-sem-spr-com-video-aula-atualizado/
  • Quem Está Navegando   0 membros estão online

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