Ir para conteúdo
  • Cadastre-se

Posts Recomendados

Eae Fmz?

O titulo ja diz tudo então vamos la.

Add isso em creaturescripts/scripts/login.lua:

setPlayerStorageValue(cid, 14755, -1)

Crie um novo arquivo.lua com o nome que voce quiser em spells/scripts/Nome.lua:

local function move(cid, target, playerpos, targetpos, times)

if playerdir ~= getCreatureLookDirection(cid) then

doCreatureSetLookDirection(target, getCreatureLookDirection(cid))

end

if playerpos ~= getCreaturePosition(cid) then

if playerpos.z == getCreaturePosition(cid).z then

local ntpos = getCreaturePosition(cid)

local x,y,z = ntpos.x-playerpos.x,ntpos.y-playerpos.y,ntpos.z-playerpos.z

ntpos = getCreaturePosition(target)

ntpos.x, ntpos.y, ntpos.z = ntpos.x+x,ntpos.y+y,ntpos.z+z

if queryTileAddThing(target, ntpos) == RETURNVALUE_NOERROR and getCreaturePosition(cid).z == getCreaturePosition(target).z then

doMoveCreature(target, getCreatureLookDirection(cid))

end

end

end

local playerpos, targetpos = getCreaturePosition(cid), getCreaturePosition(target)

local times = times+1

if times < 100 then

addEvent(move, 1, cid, target, playerpos, targetpos, times)

else

doCreatureSetNoMove(target, 0)

doSendDistanceShoot(targetpos, playerpos, 31)

doSendAnimatedText(targetpos, "Livre!", math.random(1,255))

doPlayerSendCancel(cid, "Voce nao tem mais o controle do "..getCreatureName(target)..".")

if (isPlayer(target)) then

doPlayerSendCancel(cid, "Voce foi libertado "..getPlayerName(cid).."da tecnica da sombra.")

setPlayerStorageValue(target, 14755, -1)

end

end

end

function onCastSpell(cid, var)

local target = getCreatureTarget(cid)

if (isPlayer(target)) or (isMonster(target)) then

if getPlayerStorageValue(cid, 14755) == -1 then

doCreatureSetNoMove(target, 1)

doPlayerSendCancel(cid, "Voce possuiu "..getCreatureName(target)..".")

if (isPlayer(target)) then

doPlayerSendCancel(target, "Voce foi possuido por "..getPlayerName(cid)..".")

setPlayerStorageValue(target, 14755, 1)

end

doSendAnimatedText(getCreaturePosition(target), "Possuido!", math.random(1,255))

local playerpos,playerdir,targetpos = getCreaturePosition(cid), getPlayerLookDir(cid), getCreaturePosition(target)

doSendDistanceShoot(playerpos, targetpos, 31)

doSendMagicEffect(getCreaturePosition(target), CONST_ME_SMALLCLOUDS)

local times = 1

addEvent(move, 1000, cid, target, playerpos, targetpos, times)

else

doPlayerSendCancel(cid, "Você ainda esta sobre a possecao do inimigo.")

end

end

end

Add isso em spells/spells.xml:

<instant name="possession" words="possession" lvl="75" mana="800" exhaustion="5000" blockwalls="1" needlearn="0" event="script" value="Nome.lua"></instant>

Finish :wow:

Creditos : cbrm

ea min Lano por ter postado no Tk

Link para o post
Compartilhar em outros sites
  • 2 weeks later...
  • 1 month later...

Essa spell infelizmente esta com Bug =\

Ja havia testado ela, e testei novamente, se usada em Monster funiona perfeitamente.

Se usada em Player ela buga, ou seja, voce anda 1 sqm e o player possuido anda uns 4 sqm.

Fodis ;X

Link para o post
Compartilhar em outros sites

Participe da conversa

Você pode postar agora e se cadastrar mais tarde. Se você tem uma conta, faça o login para postar com sua conta.

Visitante
Responder

×   Você colou conteúdo com formatação.   Remover formatação

  Apenas 75 emojis são permitidos.

×   Seu link foi automaticamente incorporado.   Mostrar como link

×   Seu conteúdo anterior foi restaurado.   Limpar o editor

×   Não é possível colar imagens diretamente. Carregar ou inserir imagens do URL.

  • Quem Está Navegando   0 membros estão online

    Nenhum usuário registrado visualizando esta página.

×
×
  • Criar Novo...

Informação Importante

Confirmação de Termo