retired
info
Grupo: Infante
Registrado: 13/10/08
Posts: 1.6k
Reputação: +420
Char no Tibia: Demonbholder

Editado Fevereiro 28 por Demonbholder
aew valeu mesmo.nao sabe como eu precisava desses 2 tb.
sobre o quarto, é só pra da humor ao ot mesmo xD.
se funfar já edito
------------------------------
o erro só acontecia quando alguem que o monstro nao ataca, atacasse ele Ex = God.
-------------------------------
o segundo seria uma magia pra fazer runa.só que a cada ml ele fizesse runas mais fortes e as antigas com mais cargas.
-------------------------------
sobre a arma com efeito,ela parece que funcionou bem,porem o script anula o ataque dela,só ranca life quando o efeito acontece.
Editado Fevereiro 27 por DarkSage
info
Grupo: Infante
Registrado: 13/10/08
Posts: 1.6k
Reputação: +420
Char no Tibia: Demonbholder

function onStatsChange(cid, attacker, type, combat, value)
local money = 100
local random = math.random(1, 10)
local mon = 'ladrao'
if type == STATSCHANGE_HEALTHLOSS and getCreatureName(attacker) == mon then
if random == 1 then
doPlayerRemoveMoney(cid, money)
end
return TRUE
end
return TRUE
end
Kkkk, tinha apagado esse post sem querer.
Editado Fevereiro 28 por Demonbholder
só uma coisa, eu tneho que add alguma tag no monstro??
info
Grupo: Infante
Registrado: 13/10/08
Posts: 1.6k
Reputação: +420
Char no Tibia: Demonbholder

Não, a unica coisa que tu precisa editar é isso:
local mon = 'ladrao'
Você coloca o nome do monstro entre ''. Exemplo, se o nome do monstro for skeleton, você põe assim:
local mon = 'skeleton'
É isso.
Da hora Brother o ladrao funfo direitinho xD rox a lot valeu mesmo.
ai a segunda que se falo que nao entendeu.vou tentar explicar melhor.
é uma magia que gaste 20% de mana.
ela cria runas dependeno do magic level.
quanto maior o magic level, mais forte a runa, e mais cargas.
info
Grupo: Infante
Registrado: 13/10/08
Posts: 1.6k
Reputação: +420
Char no Tibia: Demonbholder

Ae velho, refiz o primeiro script, agora ta funcionando certinho:
local combat = createCombatObject()setCombatParam(combat, COMBAT_PARAM_BLOCKARMOR, 1)
setCombatParam(combat, COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE)
setCombatFormula(combat, COMBAT_FORMULA_SKILL, 1, 0, 1, 0)
local acombat = createCombatObject()
setCombatParam(acombat, COMBAT_PARAM_BLOCKARMOR, 1)
setCombatParam(acombat, COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE)
setCombatParam(acombat, COMBAT_PARAM_EFFECT, 9)
setCombatFormula(acombat, COMBAT_FORMULA_SKILL, 1, 0, 1, 0)
function onUseWeapon(cid, var)
local random = math.random(1, 2)
if random == 2 then
return doCombat(cid, combat, var)
else
return doCombat(cid, acombat, var)
end
end
E a tag:
<melee id="2394" level="??" unproperly="1" event="script" value="nomedoarquivo.lua"/>
O segundo eu vejo se eu faço depois.
da hora man funfo beleza tb.
se possivel de uma olhada no topico eu adicionei mais alguns pedidos.
Editado Fevereiro 27 por DarkSage
info
Grupo: Infante
Registrado: 13/10/08
Posts: 1.6k
Reputação: +420
Char no Tibia: Demonbholder

brother, como tu é novo na comunidade vou te dar umas dicas, vai ser difícil de alguém te ajudar se tu colocar vários pedidos em um único tópico, tipo pede uma coisa, depois espera um tempo, alguns dias, e depois pede outra; já te ajudei em 2, deixa só até a terceira e depois posta a 4, 5, e 6 em outro pedido, falou.
Editado Fevereiro 27 por Demonbholder
eu tirei de la os que eu consegui fazer xD.
info
Grupo: Infante
Registrado: 13/10/08
Posts: 1.6k
Reputação: +420
Char no Tibia: Demonbholder

Sexto:
function onKill(cid, target)
local random = math.random(1, 10)
if getCreatureName(target) == 'Encosto Plasmatico' then
if isInArray({1, 2, 3, 4, 5, 6}, random) then
doCreateMonster('Encosto Plasmatico', getCreaturePosition(target))
doSendAnimatedText(getCreaturePosition(target),"Voltei, viu como sou um idiota.",TEXTCOLOR_ORANGE)
end
return TRUE
end
return TRUE
end
Põe isso em creaturescripts/scripts, ai depois você abre o arquivo login.lua, acha as tags que registram eventos e cola essa:
registerCreatureEvent(cid, "Revive")
Ai depois vai em creaturescripts.xml e cola essa tag:
<event type="kill" name="Revive" event="script" value="NomeDoArquivo.lua"/>
Segundo:
function onCastSpell(cid, var)
local rune1 =
local rune2 =
local rune3 =
local rune4 =
local rune5 =
local rune6 =
if getPlayerLevel(cid) <= 20 then
doPlayerAddItem(cid, rune1, getPlayerLevel(cid))
elseif getPlayerLevel(cid) > 20 and getPlayerLevel(cid) <= 40 then
doPlayerAddItem(cid, rune2, getPlayerLevel(cid))
elseif getPlayerLevel(cid) > 40 and getPlayerLevel(cid) <= 60 then
doPlayerAddItem(cid, rune3, getPlayerLevel(cid))
elseif getPlayerLevel(cid) > 60 and getPlayerLevel(cid) <= 80 then
doPlayerAddItem(cid, rune4, getPlayerLevel(cid))
elseif getPlayerLevel(cid) > 80 and getPlayerLevel(cid) <= 100 then
doPlayerAddItem(cid, rune5, getPlayerLevel(cid))
elseif getPlayerLevel(cid) > 100 then
doPlayerAddItem(cid, rune6, getPlayerLevel(cid))
end
end
Só edita o rune1, rune2, rune3, rune4, rune5, e rune6, coloca o id da runa em cada um desses, por exemplo, no primeiro você coloca uma runa mais fraca, no segundo uma runa mais forte, e assim vai.
Usa essa tag :
<instant name="Nome_da_Spell" words="utori rune" lvl="1" manapercent="20" prem="1" exhaustion="2000" needlearn="0" event="script" value="Nome_do_arquivo.lua"> <vocation id="1"/> <vocation id="2"/> <vocation id="3"/> <vocation id="4"/> <vocation id="5"/> <vocation id="6"/> <vocation id="7"/> <vocation id="8"/> </instant>
Só muda o nome da spell, as palavras, o nome do arquivo, se precisa de premium ou não e as vocações se quiser.
Quinto:
Vai em items.xml, acha o id do item do anel e põe isso:
<item id="Id_do_item1" article="a" name="mana ring"><attribute key="weight" value="50" />
<attribute key="slotType" value="ring" />
<attribute key="decayTo" value="0" />
<attribute key="transformDeEquipTo" value="id_do_item2" />
<attribute key="duration" value="800" />
<attribute key="manaGain" value="100" />
<attribute key="manaTicks" value="1000" />
<attribute key="showduration" value="1" />
</item>
Esse ai acima é o anel quando estiver no slot do ring, agora vamos colocar o anel quando esta na bp:
<item id="Id_do_Item2" article="a" name="mana ring"><attribute key="weight" value="50" />
<attribute key="slotType" value="ring" />
<attribute key="transformEquipTo" value="Id_do_Item1" />
<attribute key="stopduration" value="1" />
<attribute key="showduration" value="1" />
</item>
Editado Fevereiro 28 por Demonbholder
my god, vou testar eles ai.
sabe algum tuturial de script pra indicar pa eu?
Editado Março 1 por DarkSage
info
Grupo: Infante
Registrado: 13/10/08
Posts: 1.6k
Reputação: +420
Char no Tibia: Demonbholder

Cara, da uma olhada ai: http://www.xtibia.com/forum/topic/99746-pasta-data-enciclopedia-13-tutoriais-para-entender-ela-toda/
Ou então, lua pura:
http://www.lua.org/manual/5.1/pt/manual.html
Funcionaram os scripts?



info
Grupo: Campones
Registrado: 27/02/11
Posts: 10
Reputação: 0
Ola Xtibianos, sou novo aki no forum e estou montando um ot, mas preciso da ajuda de vcs com algumas coisas xD.
são algumas coisas nao tão dificeis xD(pra vcs, pq pra min parece uma *****)
Segundo: Uma Magia Criar "Runa Da Terra"
Ex:
Ml 10 = Light Magic Missile Rune (quanto maior o ml mais cargas)
Ml 20 = Light Magic Missile Rune (quanto maior o ml mais cargas) Ou Sudden Death(exemplo, e mais cargas a cada ml)
Quinto = Um anel(façam um script editavel pra min fazer mais plix) que almente a regeneração de mana.
Sexto = No ot tem um monstro Encosto Plasmatico, queria que quando matasse ele ele tivesse uma chance(60%) de voltar.Se ele volta-sse ele iria falar "Voltei,viu como sou um encosto".
No mais Obrigado por tudo xD
Editado Fevereiro 27 por DarkSage