Ir para conteúdo
Banner com Efeitos

Featured Replies

Postado
function onUse(cid, item, fromPosition, itemEx, toPosition)

local itemid = 13245 -- Id do item que sera criado na pos
local pos = fromPosition
local aqui = getPlayerPosition(cid)
local vocs = {6, 10}
local agua = {4610, 4612, 4611, 4664, 4613, 4666, 4646, 4654, 4609, 4665, 4608, 4625, 4665, 4666, 4645}
local parede = {1030, 1029, 1025, 1026, 1027, 1259, 1028, 1032, 1034, 1033, 1536, 1533, 873, 919, 874, 1037, 2700, 2708, 4472, 4475, 4471, 3388, 3373, 3363, 3398, 3408, 3417, 3420, 3407, 3368, 2701, 5130, 6170, 6166, 1596, 3361, 3362, 3363, 3364, 3365, 3366, 3367, 3368, 3369, 3370, 3371, 3372, 3373, 3374, 3375, 3376, 3377, 3378, 3379, 3380, 3381, 3382, 3383, 3384, 3385, 3386, 3387, 3388, 3389, 3390, 3391, 3392, 3393, 3394, 3395, 3396, 3397, 3398, 3399, 3400, 3401, 3402, 3403, 3404, 3405, 3406, 3407, 3408, 3409, 3410, 3411, 3412, 3413, 3414, 3415, 3416, 3417, 3418, 3419, 3420, 3421, 3422}
local pedra = {874, 919, 873, 2707, 2784, 2778, 3330, 4471, 4475, 4473, 4472, 4474, 4468, 4478, 4469, 4470, 4479, 2703, 2704, 1534, 2739, 3867, 5324, 5316, 5315, 5317, 1600, 1597, 1601}

if getDistanceBetween(aqui, toPosition) >= 8 then
return doPlayerSendTextMessage(cid, 27, "muito longe.")
 
elseif(not(isSightClear(aqui, toPosition, 1))) then
return doPlayerSendTextMessage(cid, 27, "Isso é impossivel.")
 
elseif(getTilePzInfo(aqui)) then
return doPlayerSendCancel(cid, "nao pode usar a tecnica em casas ou areas protegidas.")
 
elseif(getTilePzInfo(toPosition)) then
return doPlayerSendCancel(cid, "nao pode usar a tecnica Deus Dragão em casas ou areas protegidas.")
 
elseif(isInArray(agua, itemEx.itemid)) then
return doPlayerSendTextMessage(cid, 27, "voce nao pode usar em agua")
 
elseif(isInArray(parede, itemEx.itemid)) then
return doPlayerSendTextMessage(cid, 27, "voce nao pode usar em paredes")
 
elseif(isInArray(pedra, itemEx.itemid)) then
return doPlayerSendTextMessage(cid, 27, "voce nao pode usar em pedras")
 
elseif(not(isInArray(vocs, getPlayerVocation(cid)))) then
return doPlayerSendTextMessage(cid, 27, "Desculpe, Apenas Minato e Tobirama podem usar a tecnica.")
end
 
if(doTeleportThing(cid, toPosition, false)) then
doSendMagicEffect(pos, 186)
doSendMagicEffect(toPosition, 186)
doCreateItem(itemid, 1, toPosition)
 
doCreatureSay(cid, "Shunshin", 19)
return doSendDistanceShoot(pos, toPosition, 16)
end
 
return doPlayerSendCancel(cid, "Desculpe nao foi possivel.")
end

 

Editado por Sttorm (veja o histórico de edições)

  • Respostas 11
  • Visualizações 1.1k
  • Created
  • Última resposta

Top Posters In This Topic

Most Popular Posts

  • function onUse(cid, item, fromPosition, itemEx, toPosition) local itemid = 13245 -- Id do item que sera criado na pos local pos = fromPosition local aqui = getPlayerPosition(cid) local vocs = {6, 10}

  • Código editado.

Posted Images

Postado
  • Autor

@Sttorm [19/02/2018 20:07:40] [Error - LuaScriptInterface::loadFile] data/actions/scripts/hiraishin.lua:46: 'end' expected (to close 'function' at line 1) near 'en'
[19/02/2018 20:07:40] [Warning - Event::loadScript] Cannot load script (data/actions/scripts/hiraishin.lua)
[19/02/2018 20:07:40] data/actions/scripts/hiraishin.lua:46: 'end' expected (to close 'function' at line 1) near 'en'

Postado
12 horas atrás, bismarkzika disse:

@Sttorm [19/02/2018 20:07:40] [Error - LuaScriptInterface::loadFile] data/actions/scripts/hiraishin.lua:46: 'end' expected (to close 'function' at line 1) near 'en'
[19/02/2018 20:07:40] [Warning - Event::loadScript] Cannot load script (data/actions/scripts/hiraishin.lua)
[19/02/2018 20:07:40] data/actions/scripts/hiraishin.lua:46: 'end' expected (to close 'function' at line 1) near 'en'


Código editado.

Postado
local config = {
  storageID = 49615,
  storageID2 = 49620,
  tempo = 2, -- Tempo de duracao da marcacao
  itemID = 11675, -- item ID da sprite que fica no chao
  effectWhenTeleport = 11, -- Efeito que aparece no player quando é teleportado
  effectWhenExpired = 2, -- Efeito que aparece quando a skill expira
}

local errorMsg = {
  alreadyMarked = "Voce ja possui uma marcacao em andamento neste slot.",
  expired = "A skill de selamento expirou.",
}

function onCastSpell(cid, var)
  markedPosition = getPlayerPosition(cid)

  if getPlayerStorageValue(cid, config.storageID) <= os.time() and not getPlayerStorageValue(cid, config.storageID)  == -1 then
    doPlayerSendTextMessage(cid, 22, errorMsg.alreadyMarked)
    return false
  end

--  doCreateItem(config.itemID, 1, markedPosition)
  setPlayerStorageValue(cid, config.storageID, os.time() + getTime())
  setPlayerStorageValue(cid, config.storageID2, 1)
  doPlayerSendTextMessage(cid, 22, "Voce tem ".. config.tempo .." minutos para usar a spell antes que ela expire.")

  local estrutura = {
    cid = cid,
    markedPosition = markedPosition,
    timeFinal = os.time() + getTime()
  }

  addEvent (teleportIsTrue, 333, estrutura)

  return true
end

function getTime ()
  return config.tempo * 60
end

function teleportIsTrue (st)
  if os.time() > st.timeFinal then
    setPlayerStorageValue(st.cid, config.storageID2, 0)
    doPlayerSendTextMessage(st.cid, 22, errorMsg.expired)
    return false
  elseif getPlayerStorageValue(st.cid, config.storageID2) == 2 then
    doTeleportThing(st.cid, st.markedPosition, true)
    setPlayerStorageValue(st.cid, config.storageID2, 1)
    doSendMagicEffect(getPlayerPosition(st.cid), config.effectWhenTeleport)
  end
  addEvent (teleportIsTrue, 333, st)
  return true
end

 

local config = {
	storageID2 = 49620,
}	

function onCastSpell(cid, var)
	if getPlayerStorageValue (cid, config.storageID2) == 1 then
		setPlayerStorageValue(cid, config.storageID2, 2)
	else
		doPlayerSendTextMessage(cid,22, "Voce nao marcou nenhum local com a kunai.")
		return false
	end

	return true
end

 

 

                     Projeto    Nto Myth

 

" Eu to disposto a lutar e que se foda todo mundo que duvida que eu vou tocar o terror na porra toda! "

 

 

                                                                                                    bang.gif.bfc77cb73cf3065add6e416ceba6dc90.gif

 

 

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

Quem Está Navegando 0

  • Nenhum usuário registrado visualizando esta página.

Conteúdo Similar

Estatísticas dos Fóruns

  • Tópicos 96.9k
  • Posts 519.6k

Informação Importante

Confirmação de Termo