quero uma spell que ao clickar no oponente (no battle) e usar a spell o player seja teleportado para perto do oponente apenas isso flw
Spell Muito Simples.

Não está completa mais sim funcional:
function onCastSpell(cid, var) if getCreatureTarget(cid) > 0 then demage = math.random(50, 150) doCreatureAddHealth(getCreatureTarget(cid), -demage) doSendAnimatedText(getThingPos(cid), ""..demage.."", 181) doTeleportThing(cid, getThingPos(getCreatureTarget(cid)), true) doSendMagicEffect(getThingPos(cid), 10) addEvent(doMoveCreature, 200, cid, NORTH) else doPlayerSendCancel(cid, "You need a target for this spell.") return TRUE end end
Crie um arquivo .lua em spells/script
function onCastSpell(cid, var) local jogadorpos = getCreaturePosition(cid) local target = getCreatureTarget(cid) local monsterpos = getCreaturePosition(target) if target == isMonster or isCreature then doTeleportThing(cid,monsterpos) doSendMagicEffect(jogadorpos, 10) else doPlayerSendTextMessage(cid,20,'You can only use it on creatures') end end
dps só adicionar uma tag em spells.xml:
<instant name="NOME DA SUA SPELL" words="PALAVRAS PRA USAR ELA" lvl="50" mana="50" needtarget="1" prem="0" range="5" exhaustion="1000" blockwalls="1" needlearn="0" script="NOME DO ARQUIVO LUA.lua">
dai só vc editar o level pra usar, a mana gasta, colocar o nome na spell e pronto!
hã... esse script ae n vai funcionar n heim /\/\
if target == isMonster or isCreature then
isso n existe tem q ser assim..
if isMonster(target) or isPlayer(target) then
"Só a beira do abismo que os seres humanos acham forças para mudar."... E isso me da nojo... ¬¬
"Insanity is doing the exact... same fucking thing... over and over again expecting... shit to change... That. Is. Crazy." -Vass/Einstein
não tem como ele deixar um item onde ele tava qdo ele teleporta no caso ficaria uma madeira no local que ele estava antes. tem como isso ?
não tem como ele deixar um item onde ele tava qdo ele teleporta no caso ficaria uma madeira no local que ele estava antes. tem como isso ?
function onCastSpell(cid, var) if getCreatureTarget(cid) > 0 then demage = math.random(50, 150) doCreatureAddHealth(getCreatureTarget(cid), -demage) doSendAnimatedText(getThingPos(cid), ""..demage.."", 181) doCreateItem(ID DO ITEM, 1, getThingPos(cid)) doTeleportThing(cid, getThingPos(getCreatureTarget(cid)), true) doSendMagicEffect(getThingPos(cid), 10) addEvent(doMoveCreature, 200, cid, NORTH) else doPlayerSendCancel(cid, "You need a target for this spell.") return TRUE end end
Basta por o id do item que sera criado nessa linha:
doCreateItem(ID DO ITEM, 1, getThingPos(cid))
Te ajudei. Então REP+
Meus Trabalhos:
- Sistema de Reputação [simple Reputation System]
- Weapons Paralyze
- Sistema de Duas Weapons [Two Weapons System]
- Sistema de Items apenas para Vips [Vip Items System]
- Tutorial Básico sobre CreatureScripts!
- Tutorial Básico sobre Arrays!
- Sistema de Durabilidade!
- [spell] Crystal Wall 8.54+
- Dbo 8.6 {by Jhon992}
- Monster Creator
O melhor pokebot!
Modifiquei só uma coisinha nele, é pra ficar mais agradável...
local id_do_Item = -- Id do item que vai ficar no lugar antigo function onCastSpell(cid, var) if getCreatureTarget(cid) > 0 then demage = math.random(50, 150) doCreatureAddHealth(getCreatureTarget(cid), -demage) doSendAnimatedText(getThingPos(cid), ""..demage.."", 181) doCreateItem(id_do_Item, 1, getThingPos(cid)) doTeleportThing(cid, getThingPos(getCreatureTarget(cid)), true) doSendMagicEffect(getThingPos(cid), 10) addEvent(doMoveCreature, 200, cid, math.random(0, 3)) else doPlayerSendCancel(cid, "You need a target for this spell.") return TRUE end end
isto ai funciona em ot normal? ou so em ot de naruto eu queria tbm no meu ot
client dele e 8.6!
A edição do script não e considerada flood.
Mais e bom tomar atenção porque se fazer miseras modificações e considerado flood