Estava realizando um scripts acabei que pensei em outro script e acabei o finalizando aí pensei que seria interessante postar porque poderiam achar uma ultilidade a ele.
A criaçao então foi tipo acidental mesmo.
E o Fusion Sytem que e o sistema de fusão ele funde seus atribbutos em um summon assim o player se funde ao uma creature.
Precisa ser um summon ou seja se ultilizar um pet sytem e aceito qualquer scripts mais é claro que recomendo o meu proprio( Card sytem)
Então vamos la:
Crie um arquivo LUA em talkactions/scripts chamado de fusion e coloque isto:
function onSay(cid, words, param)
function doPlayerStartFusion(cid, creaturetarget)
local creature = creaturetarget
local healthmax = getCreatureMaxHealth(cid)
local healthmaxcre = getCreatureMaxHealth(creature)
local manamax = getCreatureMaxMana(cid)
local outfitcre = getCreatureOutfit(creature)
local outfit = getCreatureOutfit(cid)
local strcreature = getCreatureName(creature)
setPlayerStorageValue(cid, 87765, strcreature)
setPlayerStorageValue(cid, 87666, healthmax)
setPlayerStorageValue(cid, 87667, manamax)
setPlayerStorageValue(cid, 87668, outfit)
setCreatureMaxMana(cid, getCreatureMaxMana(cid)+healthmaxcre)
doCreatureAddMana(cid, getCreatureMaxMana(cid)+healthmaxcre)
setCreatureMaxHealth(cid, healthmax+healthmaxcre)
doCreatureAddHealth(cid, getCreatureMaxHealth(cid))
doCreatureChangeOutfit(cid, outfitcre)
doSendMagicEffect(getCreaturePosition(cid), 14)
return true
end
function doPlayerEndFusion(cid, effectfusion)
local healthmax = getPlayerStorageValue(cid, 87666)
local manamax = getPlayerStorageValue(cid, 87667)
local outfit = getPlayerStorageValue(cid, 87668)
local creature = getPlayerStorageValue(cid, 87665)
setCreatureMaxHealth(cid, healthmax)
setCreatureMaxMana(cid, manamax)
doCreatureAddHealth(cid, getCreatureMaxHealth(cid))
doCreatureAddMana(cid, manamax)
doSendMagicEffect(getCreaturePosition(cid), effectfusion)
return true
end
if(words == "/fusion") then
if getPlayerStorageValue(cid, 86444) == 1 then
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Você esta com fusion para remover a fusion diga /endfusion")
return true
end
local summons = getCreatureSummons(cid)
if #summons < 1 then
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Necessita de um summon")
return true
end
doPlayerStartFusion(cid, summons[1])
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Você se transformo no summon "..getCreatureName(summons[1]).." transformaçao concluida ")
setPlayerStorageValue(cid, 86444, 1)
doRemoveCreature(summons[1])
else
doPlayerEndFusion(cid, 12)
doPlayerSendOutfitWindow(cid)
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Você se desfundiu ao monstro")
setPlayerStorageValue(cid, 86444, 0)
return true
end
return true
end
Agora coloque esta tag em talkactions.xml
<talkaction words="/fusion;/endfusion" event="script" value="fusion.lua"/>
E isso ai gente
Obrigado a todos