Postado Maio 28, 2018 7 anos 1 hora atrás, Jociel disse: @Vodkart deu esse erro: [28/05/2018 11:01:30] [Error - LuaScriptInterface::loadFile] data/spells/scripts/carvalho/kamui1.lua:33: 'end' expected (to close 'function' at line 6) near '<eof>' [28/05/2018 11:01:30] [Warning - Event::loadScript] Cannot load script (data/spells/scripts/carvalho/kamui1.lua) [28/05/2018 11:01:30] data/spells/scripts/carvalho/kamui1.lua:33: 'end' expected (to close 'function' at line 6) near '<eof>' [28/05/2018 11:01:30] [Error - LuaScriptInterface::loadFile] data/spells/scripts/carvalho/kamui1.lua:33: 'end' expected (to close 'function' at line 6) near '<eof>' [28/05/2018 11:01:31] [Warning - Event::loadScript] Cannot load script (data/spells/scripts/carvalho/kamui1.lua) [28/05/2018 11:01:31] data/spells/scripts/carvalho/kamui1.lua:33: 'end' expected (to close 'function' at line 6) near '<eof>' manda teu script editado pra eu ver [*Ninguém será digno do sucesso se não usar suas derrotas para conquistá-lo.*] DISCORD: vodkart#6090
Postado Maio 28, 2018 7 anos Autor @Vodkart local config = {pos = {x=1765, y=578, z=7},tempo = 30,effect1 = 10,effect2 = 10} local areas ={ -- areas bloqueadas {from = {x=97, y=1773, z=7},to = {x=109, y=1785, z=7}}, -- Evento {from = {x=1008,y=1018,z=7},to = {x=1011,y=1021,z=7}} } function onCastSpell(cid, var) for _, var in ipairs(areas) do if isInRange(getCreaturePosition(cid), var.from, var.to) then doPlayerSendTextMessage(cid, MESSAGE_EVENT_DEFAULT,"Voce nao pode usar essa magia nesse local") return true end end 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, "Voce ".. getCreatureName(cid) ..".") end if isPlayer(cid) and isCreature(target) then doPlayerSendTextMessage(cid, 27, "Voce levou ".. getCreatureName(target) .."!") end else doPlayerSendCancel(cid, "Voce") end return true end
Postado Maio 28, 2018 7 anos Solução kk ainda bem que copiou bem certinho local config = {pos = {x=1765, y=578, z=7},tempo = 30,effect1 = 10,effect2 = 10} local areas ={ -- areas bloqueadas {from = {x=97, y=1773, z=7},to = {x=109, y=1785, z=7}}, -- Evento {from = {x=1008,y=1018,z=7},to = {x=1011,y=1021,z=7}} } function onCastSpell(cid, var) for _, var in ipairs(areas) do if isInRange(getCreaturePosition(cid), var.from, var.to) then doPlayerSendTextMessage(cid, MESSAGE_EVENT_DEFAULT,"Voce nao pode usar essa magia nesse local") return true end end 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, "Voce ".. getCreatureName(cid) ..".") end if isPlayer(cid) and isCreature(target) then doPlayerSendTextMessage(cid, 27, "Voce levou ".. getCreatureName(target) .."!") end else doPlayerSendCancel(cid, "Voce") end return true end [*Ninguém será digno do sucesso se não usar suas derrotas para conquistá-lo.*] DISCORD: vodkart#6090
Postado Junho 3, 2018 7 anos Em 28/05/2018 em 15:44, Vodkart disse: kk ainda bem que copiou bem certinho local config = {pos = {x=1765, y=578, z=7},tempo = 30,effect1 = 10,effect2 = 10} local areas ={ -- areas bloqueadas {from = {x=97, y=1773, z=7},to = {x=109, y=1785, z=7}}, -- Evento {from = {x=1008,y=1018,z=7},to = {x=1011,y=1021,z=7}} } function onCastSpell(cid, var) for _, var in ipairs(areas) do if isInRange(getCreaturePosition(cid), var.from, var.to) then doPlayerSendTextMessage(cid, MESSAGE_EVENT_DEFAULT,"Voce nao pode usar essa magia nesse local") return true end end 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, "Voce ".. getCreatureName(cid) ..".") end if isPlayer(cid) and isCreature(target) then doPlayerSendTextMessage(cid, 27, "Voce levou ".. getCreatureName(target) .."!") end else doPlayerSendCancel(cid, "Voce") end return true end Em 27/05/2018 em 20:02, Sttorm disse: local config = { pos = {x=1765, y=578, z=7}, -- tempo = 30, -- effect1 = 10, -- effect2 = 10 -- } local fromPosition = {x=1031, y=737, z=7} local toPosition = {x=1031, y=737, z=7} function onCastSpell(cid, var) local pos = getCreaturePosition(cid) if isInRange(pos, fromPosition, toPosition) then doPlayerSendTextMessage(cid, 27, "Voce nao pode usar essa magia nesse local") return doSendMagicEffect(pos, 3) end 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, "Voce ".. getCreatureName(cid) ..".") end if isPlayer(cid) and isCreature(target) then doPlayerSendTextMessage(cid, 27, "Voce levou para ".. getCreatureName(target) .."!") end else doPlayerSendCancel(cid, "Voces") end return true end Em 27/05/2018 em 20:02, Sttorm disse: local config = { pos = {x=1765, y=578, z=7}, -- tempo = 30, -- effect1 = 10, -- effect2 = 10 -- } local fromPosition = {x=1031, y=737, z=7} local toPosition = {x=1031, y=737, z=7} function onCastSpell(cid, var) local pos = getCreaturePosition(cid) if isInRange(pos, fromPosition, toPosition) then doPlayerSendTextMessage(cid, 27, "Voce nao pode usar essa magia nesse local") return doSendMagicEffect(pos, 3) end 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, "Voce ".. getCreatureName(cid) ..".") end if isPlayer(cid) and isCreature(target) then doPlayerSendTextMessage(cid, 27, "Voce levou para ".. getCreatureName(target) .."!") end else doPlayerSendCancel(cid, "Voces") end return true end Ao invés de ser TODAS as spells, eu gostaria de proibir somente UMA spell na área...
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.