Postado Novembro 1, 2014 10 anos Ola galera kero + uma ajudinha ne uma spell dessa vez kero q me ajude a colocar tempo no kamui in q eu tenho, tipo tempo entre um atake e o outro e + uma coisa kero q n possa usar kamui in dentro do kamui falando assim vc n pode usar kamui in dentro do kamui vlw ai galera toma a spell ai local config = { pos = {x = 1234, y = 728, z = 6}, -- posição da aegis dimension tempo = 60, -- tempo pra voltar effect1 = 91, -- efeito ao ser teleportado effect2 = 91 -- efeito ao voltar } function onCastSpell(cid, var) if isPlayer(getCreatureTarget(cid)) then target = getCreatureTarget(cid) addEvent(doTeleportThing, 1000*config.tempo, target, getThingPos(target), true) addEvent(doSendMagicEffect, 1000*config.tempo, getThingPos(target), config.effect2) doSendMagicEffect(getThingPos(target), config.effect1) doTeleportThing(target, config.pos) if isCreature(cid) then doPlayerSendTextMessage(target, 27, "You were teleported by ".. getCreatureName(cid) ..".") end if isPlayer(cid) and isCreature(target) then doPlayerSendTextMessage(cid, 27, "You teleported ".. getCreatureName(target) .."!") end for i = 1,config.tempo do addEvent(function() if isCreature(target) then doPlayerSendTextMessage(target,25,"You'll be back in " .. config.tempo -i +1 .. " second(s)") end end, 1000*i) end else doPlayerSendCancel(cid, "You can only use this spell in players") end return true end Ajudei Rep+
Postado Novembro 2, 2014 10 anos acho que resolve: local config = { pos = {x = 1234, y = 728, z = 6}, -- posição da aegis dimension tempo = 60, -- tempo pra voltar effect1 = 91, -- efeito ao ser teleportado effect2 = 91, -- efeito ao voltar distance = 15, --- distancia que você vai ter que estar do centro do kamui pra poder usar a magia storagecool = 94283, -- storage do cooldown cooldown = 20 -- tempo entre um uso e outro } function onCastSpell(cid, var) if getDistanceBetween(getThingPos(cid), config.pos) <= config.distance then doPlayerSendCancel(cid, "You cant use kamui inside the kamui.") return false end if getPlayerStorageValue(cid, config.storagecool) - os.time() > 0 then doPlayerSendCancel(cid, "Your spell is in cooldown, wait ".. getPlayerStorageValue(cid, config.storagecool) - os.time() .." to use it again.") return false end if isPlayer(getCreatureTarget(cid)) then target = getCreatureTarget(cid) setPlayerStorageValue(cid, config.storagecool, os.time() + config.cooldown) addEvent(doTeleportThing, 1000*config.tempo, target, getThingPos(target), true) addEvent(doSendMagicEffect, 1000*config.tempo, getThingPos(target), config.effect2) doSendMagicEffect(getThingPos(target), config.effect1) doTeleportThing(target, config.pos) if isCreature(cid) then doPlayerSendTextMessage(target, 27, "You were teleported by ".. getCreatureName(cid) ..".") end if isPlayer(cid) and isCreature(target) then doPlayerSendTextMessage(cid, 27, "You teleported ".. getCreatureName(target) .."!") end for i = 1,config.tempo do addEvent(function() if isCreature(target) then doPlayerSendTextMessage(target,25,"You'll be back in " .. config.tempo -i +1 .. " second(s)") end end, 1000*i) end else doPlayerSendCancel(cid, "You can only use this spell in players") end return true end Todos os meus trabalhos importantes estão na seção "Sobre mim" no meu perfil; Dá uma passada lá! "Há três caminhos para o fracasso: não ensinar o que se sabe, não praticar o que se ensina, e não perguntar o que se ignora." - São Beda (obg ao @Beeny por fazer essa linda sign <3)
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.