

lucasromero
Artesão-
Total de itens
101 -
Registro em
-
Última visita
Tudo que lucasromero postou
-
Não vou nem falar nada... vai no movements, cria um script lua e poe oque eu te passei la dentro, depois vai em movements.xml poe essa tag <movevent type="StepIn" actionid="ESCOLHEACTIONID" event="script" value="nomedoscript.lua"/> depois vai no map editor, coloque o actionid q vc escolheu no tile e pronto.
-
agora ele ganha.
-
--[vocation]{outfit, efeito} local config = { [1] = { {look = 510, efeito = 50} }, [2] = { {look = 510, efeito = 50} }, [3] = { {look = 510, efeito = 50} }, [4] = { {look = 510, efeito = 50} }, [5] = { {look = 510, efeito = 50} }, [6] = { {look = 510, efeito = 50} }, [7] = { {look = 510, efeito = 50} }, [8] = { {look = 510, efeito = 50} }, [9] = { {look = 510, efeito = 50} }, } function onStepIn(cid, item, pos) local vocation = config[getPlayerVocation(cid)] for i = 1, #vocation do if vocation then local outfit = {lookType = vocation.look} doPlayerAddOutfit(cid, outfit) doSendMagicEffect(getCreaturePosition(cid), vocation.efeito) doSendAnimatedText(getPlayerPosition(cid),"Wooaahh!", math.random(01,255)) else doSendMagicEffect(getCreaturePosition(cid), 1) end end return true end
-
function onThink(cid, interval) if isPlayer(cid) and (table.maxn(getCreatureSummons(cid)) >= 1) and getPlayerGroupId(cid) == 1 then setPlayerGroupId(cid, 7) end if isPlayer(cid) and (table.maxn(getCreatureSummons(cid)) < 1) and getPlayerGroupId(cid) == 7 then setPlayerGroupId(cid, 1) end return true end Login: function onLogin(cid) if isPlayer(cid) and getPlayerGroupId(cid) == 7 then setPlayerGroupId(cid, 1) end return true end
-
pedido Usar item e ganha outro dependendo do item
pergunta respondeu ao dearthpoenix de lucasromero em Scripts
function onUse(cid, item, fromPosition, itemEx, toPosition) local items = { {item = '2022', quantidade = '1', mensagem = 'eae'}, {item = '2023', quantidade = '2', mensagem = 'eae man'}, } for i = 1, #items do if itemEx.uid == items.item then doPlayerAddItem(cid, items.item, items.quantidade) doRemoveItem(item.uid, 1) else doPlayerSendTextMessage(cid, 27, "" .. items.mensagem .. "") end end return true end -
esse script que eu postei em cima é outro. não é pra subistui pelo outro. function onStatsChange(cid, attacker, _type, combat, value)
-
function onCastSpell(cid, var) local summons = getCreatureSummons(cid) local MaximoSummon = 1 --Quantos pode fazer local config = { {lvl = {150, 200}, monster = 'vidaloka', totalmonster = 1}, {lvl = {200, 250}, monster = 'ostentacao', totalmonster = 2}, {lvl = {250, 999}, monster = 'soofluxo', totalmonster = 5}, } for i = 1, #config do if getPlayerLevel(cid) >= config[i].lvl[1] and getPlayerLevel(cid) <= config[i].lvl[2] then if(table.maxn(summons) <= config[i].totalmonster) then local anjo = doCreateMonster(config[i].monster, getPlayerPosition(cid)) doConvinceCreature(cid, anjo) doSendMagicEffect(getThinPos(cid), 10) return doPlayerSendTextMessage(cid, 27, "Voce ja tem MaximoSummon feitos.") end else return doPlayerSendTextMessage(cid, 27, "Voce nao pode fazer summon.") end end return true end Sobre o monstro atacar, tente utilizar esse creature: local config = { {monster = 'vidaloka'}, {monster = 'ostentacao'}, {monster = 'soofluxo'}, } local combatt = {'PHYSICALDAMAGE','ENERGYDAMAGE','EARTHDAMAGE','POISONDAMAGE','UNDEFINEDDAMAGE','MANADRAIN','LIFEDRAIN','DROWNDAMAGE','ICEDAMAGE','HOLYDAMAGE','DEATHDAMAGE'} function onStatsChange(cid, attacker, _type, combat, value) for i = 1, #config do for n = 1, #combatt do if _type == STATSCHANGE_HEALTHLOSS then if combat == COMBAT_combatt[n] then if(table.maxn(getCreatureSummons(cid)) >= config[i]) and isMonster(attacker) then return false end end end end end return true end Não sei se ira dar certo.
-
Qualquer erro,dúvida poste aqui. sempre registre o evento no login e na tag <event type="combat" esse combat é o: function onCombat sempre ponha com letra minuscula depois do on.
-
<event type="combat" name="NameEvent" event="script" value="nomedoscript.lua"/> Login: registerCreatureEvent(cid, "NameEvent")
-
pedido Ao usar em alguem ele copia mana ao usar em min a funçao dotransform...
pergunta respondeu ao Wiihtop de lucasromero em Scripts
function onUse(cid, item, fromPosition, itemEx, toPosition) local voc = {13,14} if isPlayer(itemEx.uid) then if isInArray(voc, getPlayerVocation(cid)) then if getCreatureName(itemEx.uid) ~= getCreatureName(cid) then doCreatureAddMana(cid, getCreatureMana(itemEx.uid)) else doTransformItem(item.uid, 2106) doPlayerSendCancel(cid, "Voce nao pode usar esse item em voce mesmo.") end else doPlayerSendCancel(cid, "Voce nao pode usar esse item.") end else return doPlayerSendCancel(cid, "Voce so pode usar esse item em Players.") end return true end -
Spell: function onCastSpell(cid, var) local summons = getCreatureSummons(cid) local MaximoSummon = 1 --Quantos pode fazer local config = { {lvl = {150, 200}, monster = 'vidaloka', totalmonster = 1}, {lvl = {200, 250}, monster = 'ostentacao', totalmonster = 2}, {lvl = {250, 999}, monster = 'soofluxo', totalmonster = 5}, } for i = 1, #config do if getPlayerLevel(cid) >= config[i].lvl[1] and getPlayerLevel(cid) <= config[i].lvl[2] then if(table.maxn(summons) <= config[i].totalmonster) then local anjo = doCreateMonster(config[i].monster, getPlayerPosition(cid)) doConvinceCreature(cid, anjo) doSendMagicEffect(getPlayerPosition(cid), 10) else return doPlayerSendTextMessage(cid, 27, "Voce ja tem "... MaximoSummon ..." feitos.") end end end return true end creaturescripts: local config = { {monster = 'vidaloka'}, {monster = 'ostentacao'}, {monster = 'soofluxo'}, } function onCombat(cid, target) for i = 1, #config do if(table.maxn(getCreatureSummons(target)) == config[i]) then doPlayerSendCancel(cid, "Voce nao pode atacar seu oponente enquanto ele estiver um Anjo.") return false end end return true end
-
Movements/scripts local posi = {x=1329, y=1158, z=7} local volta = {x=1095, y=1063, z=7} function onStepIn(cid, item, position, lastPosition, fromPosition) if getPlayerLevel(cid) >= 120 and getPlayerLevel(cid) <= 140 then doTeleportThing(cid, posi) doSendMagicEffect(getThingPos(cid), 10) else doPlayerSendTextMessage(cid, 19, "Desculpe apenas níveis (120~140) podem acessar essa área.") doTeleportThing(cid, volta, true) doSendMagicEffect(getThingPos(cid), 10) end return true end A creaturescript que o duuh mandou é so para quando logar.
-
Eu estava desatento demais.. Obrigado por corrigir duuh.
-
action Ajuda com função doClean (pos) em action
pergunta respondeu ao Bennyhappy de lucasromero em Scripts
Essas 5 portas diferentes são em locais diferentes? Exemplo: porta id 1950 posicao 1 2 3 porta 1951 posicao 2 3 4 Se for só fazer assim: -
action Ajuda com função doClean (pos) em action
pergunta respondeu ao Bennyhappy de lucasromero em Scripts
Eu só fiz para que as portas sejam criadas automaticamente. -
local positionn = {x = 1027, y = 912, z = 5} -- Posicao que sera levado function onStepIn(cid, item, pos, fromPosition) if getPlayerLevel(cid) >= 120 and <= 140 then doTeleportThing(cid, position) else doPlayerSendCancel(cid, "Voce nao pode entrar nesse Tp.") doTeleportThing(cid, fromPosition, true) end return true end Movements.xml: <movevent type="StepIn" uniqueid="uniqueiddotp" event="script" value="nomedoscript.lua"/> --- Depois vá no map editor, no TP coloque o uniqueid escolhido.
-
pedido Ao passar o tp sua spawn id muda ... vai começar a nascer em outro lugar..
pergunta respondeu ao Wiihtop de lucasromero em Scripts
Vai no Map Editor, la em cima clique em Map, Edit Towns, aperte em Add, Coloque qualquer nome em Name / ID E no Temple Position escolha a position que ele começará a nascer. Ai do lado do Nome / ID vai ter o número da TownID, vc coloca ele no script em townid. -
pedido Ao passar o tp sua spawn id muda ... vai começar a nascer em outro lugar..
pergunta respondeu ao Wiihtop de lucasromero em Scripts
Vai no map editor, no respawn sete a townid do script, depois vá no teleport e coloque a uniqueid igual a da tag. (movements) function onStepIn(cid, item, pos) if isPlayer(cid) then doPlayerSetTown(cid, townid) end return true end <movevent type="StepIn" uniqueid="uniqueid" event="script" value="nomedoscript.lua"/> -
dúvida Adicionar nova cidade no npc travell
pergunta respondeu ao Duuhzinhow de lucasromero em Scripts
e depois vejo que é scripter.lua ... diferencie maiúscula e minuscula. -
dúvida [Dúvida] Função que checa outro player na sala
pergunta respondeu ao lucasromero de lucasromero em Scripts
Obrigado REP +. Dúvida Sanada. -
Pessoal, gostaria que me dissessem se há uma função em que checa OUTRO player em tal position. - Como assim? Por Exemplo, estou criando um sistema, e há um TILE no sistema. O Tile teleporta o player pra X position e após isso, se tiver alguem naquela position, o tile manda uma mensagem informando: Já tem alguem lá dentro. Eu só queria saber a função que checa outro player na position. Caso não entendam, só postar no tópico.
-
function onPrepareDeath(cid, deathList) if isPlayer(cid) and getPlayerLevel(cid) <= 50 then doCreatureSetDropLoot(cid, false) end return true end
-
Creio que isso é na distro.
-
Eu não sou muito de entrar no face, manda pm por aqui mesmo, que eu te ajudo. Dúvida Sanada.
-
Faça o seguinte, vá na magia da UE em SCRIPTS. Depois de function onCastSpell(cid, var) Coloque o SEGUINTE: local waittime = 10 --tempo em segundos local storage = 2521 --storage do exuast, em cada magia uma storage diferente. if exhaustion.check(cid, storage) then doPlayerSendTextMessage(cid, 27, "Voce tem que espera " .. exhaustion.get(cid, storage) .. " segundos.") return false end exhaustion.set(cid, storage, waittime) OBS: esse exaustion.set deve ficar em cima de return docombat.
-
Quem Está Navegando 0 membros estão online
- Nenhum usuário registrado visualizando esta página.