Tenta: \/ spell/script
function onCastSpell(cid, var)
Por wesleybeek, 22 de out. de 2013 em Tópicos Sem Resposta
Tenta: \/ spell/script
function onCastSpell(cid, var)
Editado Outubro 22 por zipter98
info
Grupo: Artesão
Registrado: 15/11/12
Posts: 124
Reputação: +7
Char no Tibia: Xtibia Soul

Tenta: \/ spell/script
function onCastSpell(cid, var)
local playerpos = getPlayerPosition(cid)local targetpos = getPlayerPosition(getCreatureTarget(cid))local cloth = getCreatureOutfit(cid)local health = getCreatureHealth(getCreatureTarget(cid))local monsters = {"Name", "Name1", "Name2", "Name3", "Name4", "Name5"}if not isMonster(getCreatureTarget(cid)) thendoPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Você so deve pegar o corpo para edo tensei de ninjas e monstros selvagens.")return 0endif health >= getCreatureMaxHealth(getCreatureTarget(cid))/100*90 thendoPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, ""..getCreatureName(getCreatureTarget(cid)).." esta resistindo ao edo tensei retire mais vida dele")return 0endif isInArray(monsters, getCreatureName(cid)) thendoPlayerSendCancel(cid, "Você não pode controlar esta criatura.")return trueendif getPlayerLevel(cid) < 350 thendoPlayerSendTextMessage(cid, 27, "Você precisa ser lv 350, ou mais, para usar Edo Tensei.")return 0endif getCreatureMaxHealth(getCreatureTarget(cid)) > 10000000 thendoPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Você não pode controlar criaturas com HP acima de 10.000.000.")return 0endlocal item = doPlayerAddItem(cid, 2218)doItemSetAttribute(item, "corpse", ""..getCreatureName(getCreatureTarget(cid)).."")doItemSetAttribute(item, "health", ""..getCreatureMaxHealth(getCreatureTarget(cid)).."")doSendMagicEffect(playerpos, 2)doSendMagicEffect(targetpos, 2)doItemSetAttribute(item, "name", "[Edo Tensei] "..getCreatureName(getCreatureTarget(cid)).."")doRemoveCreature(getCreatureTarget(cid))return trueendVá adicionando na tabela monsters o nome dos boss/kuchiyoses. Para adicionar um novo, basta seguir o modelo dos Names: "nome(iniciado com letra maiúscula)". Se for o último nome desta tabela, não use vírgula após o segundo ", se não for, use. Como eu disse, tome como exemplo estes 6 Names. (e não esqueça de substituí-los)
Sim, mas só podera ter 6 ?? Ou Posso adicionar Mais !?!
Ele Não Funfou, Posso Pegar como (Edo Tensei) Os Monstros que eu Coloquei !!!!
Posso ver como você configurou o script? se quiser, pode ser por pm, igual à aquele outro post do script do transformar/reverter
info
Grupo: Artesão
Registrado: 15/11/12
Posts: 124
Reputação: +7
Char no Tibia: Xtibia Soul

Posso ver como você configurou o script? se quiser, pode ser por pm, igual à aquele outro post do script do transformar/reverter
Ok ^^
Editado Outubro 23 por wesleybeek
/\ mandei por pm, olha lá
info
Grupo: Artesão
Registrado: 15/11/12
Posts: 124
Reputação: +7
Char no Tibia: Xtibia Soul

/\ mandei por pm, olha lá
Não funfou, por favor Alguem Me Ajuda dou Rep++ POSSIVEL .. PReciso muito disso !!!
info
Grupo: Herói
Registrado: 12/06/12
Posts: 2.2k
Reputação: +739
Gênero: Masculino
Char no Tibia: Supreme Player

Tópico movido para a seção de dúvidas e pedidos resolvidos.
info
Grupo: Artesão
Registrado: 15/11/12
Posts: 124
Reputação: +7
Char no Tibia: Xtibia Soul

Tópico movido para a seção de dúvidas e pedidos resolvidos.
Desculpa, mas não foi Resolvido ![]()
info
Grupo: Herói
Registrado: 28/11/10
Posts: 3.4k
Reputação: +585
Gênero: Masculino

info
Grupo: Artesão
Registrado: 15/11/12
Posts: 124
Reputação: +7
Char no Tibia: Xtibia Soul
Galera preciso da Ajuda de Voces, neste Tópico eu consegui fazer para que os players só possam fazer edo tensei no Lvl 350 (Funcionou Perfeitamente) E tambem Consegui adicionar para que Só Pode pegar Monstros com Vida abaixo do 5.000.000..
http://www.xtibia.com/forum/topic/222928-ajuda-sistema-edo-tensei-configuracao/#entry1574548
Bom Quero Mudar, preciso que me Ajude para Que no Sistema o Player (Kabuto Orochimaru) NÃO Possa Fazer Edo Tensei de Kuchyoses e Boss..
Bom Para Ser Mais Simples:
Se For Possível postar onde eu devo Colocar e talz.. Não Acho Muuuito díficil creio que voces irão conseguir !!
Peço Que não Mude na Parte do Script que o Playe Precisa de Level 300 (Por Favor Tente Manter Isto)
REP++
Edo Tensei:
Spell.XML:
<instant needlearn="0" exhaustion="1500" prem="0" mana="1000" lvl="260" words="edo tensei" name="edo tensei" script="edo tensei.lua" selftarget="1">
<vocation id="310"/>
<vocation id="311"/>
<vocation id="312"/>
<vocation id="313"/>
<vocation id="314"/>
<vocation id="315"/>
</instant>
Spell/Script:
function onCastSpell(cid, var)
local playerpos = getPlayerPosition(cid)
local targetpos = getPlayerPosition(getCreatureTarget(cid))
local cloth = getCreatureOutfit(cid)
local health = getCreatureHealth(getCreatureTarget(cid))
local hpmax = 10000000 --Monstros com vida superior à 1000 não poder ser controlados.
if not isMonster(getCreatureTarget(cid)) then
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Você so deve pegar o corpo para edo tensei de ninjas e monstros selvagens.")
return 0
end
if health >= getCreatureMaxHealth(getCreatureTarget(cid))/100*90 then
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, ""..getCreatureName(getCreatureTarget(cid)).." esta resistindo ao edo tensei retire mais vida dele")
return 0
end
if getPlayerLevel(cid) < 350 then
doPlayerSendTextMessage(cid, 27, "Você precisa ser lv 350, ou mais, para usar Edo Tensei.")
return 0
end
if getCreatureMaxHealth(getCreatureTarget(cid)) > hpmax then
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Você não pode controlar criaturas com HP acima de 10.000.000.")
return 0
end
local item = doPlayerAddItem(cid, 2218)
doItemSetAttribute(item, "corpse", ""..getCreatureName(getCreatureTarget(cid)).."")
doItemSetAttribute(item, "health", ""..getCreatureMaxHealth(getCreatureTarget(cid)).."")
doSendMagicEffect(playerpos, 2)
doSendMagicEffect(targetpos, 2)
doItemSetAttribute(item, "name", "[Edo Tensei] "..getCreatureName(getCreatureTarget(cid)).."")
doRemoveCreature(getCreatureTarget(cid))
return true
end
Actions.XML:
<action itemid="2218" event="script" value="edo tensei.lua"/>
Actions/Script:
function onUse(cid, item, frompos, item2, topos)
local monstro = getItemAttribute(item.uid, "corpse")
local health = getItemAttribute(item.uid, "health")
local name = getItemAttribute(item.uid, "monstro")
if #getCreatureSummons(cid) > 3 then
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Você ja esta usando uma reencarnação ou um pet")
return true
end
if getPlayerMana(cid) < health/100*10 then
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Você não tem chakra suficiente")
return true
end
if getPlayerStorageValue(cid, 24438) == 1 then
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Você não pode invocar mais de reanimação junto.")
return true
end
t = doCreateMonster(monstro, getThingPos(cid))
doConvinceCreature(cid, t)
setCreatureMaxHealth(t, health)
doCreatureAddHealth(t, health)
doPlayerAddMana(t, -getItemAttribute(item.uid, "health")/10)
setPlayerStorageValue(cid, 24438, name)
return true
end
Agradeço desde Ja !