Postado Janeiro 18, 2013 12 anos Olá galera. Estou tendo o seguinte problema, que acontece quando um player clica no "globozinho" da quest Azerus: [2:16:45.377] [Error - Action Interface] [2:16:45.377] data/actions/scripts/quests/azerus.lua:onUse [2:16:45.377] Description: [2:16:45.377] (luaGetThingFromPos) Tile not found O código azerus.lua é esse: -- Config #1 -- local BlindField = {x=32781, y=31157, z=10, stackpos=1} -- end -- function mapArea(fromPos, toPos, stack) -- Area iterator by Colandus. local pos = {x=fromPos.x, y=fromPos.y-1, z=fromPos.z} return function() if (pos.y < toPos.y) then pos.y = pos.y+1 elseif (pos.x <= toPos.x) then pos.y = fromPos.y pos.x = pos.x+1 else pos.x = fromPos.x pos.y = fromPos.y pos.z = pos.z+1 end if (pos.x <= toPos.x and pos.y <= toPos.y or pos.z < toPos.z) then if (stack == nil) then return pos else pos.stackpos = stack --return pos, getTileThingByPos(pos) return pos, getThingfromPos(pos) end end end end function getMonstersfromArea(fromPos, toPos) local monsters = {} for _, thing in mapArea(fromPos, toPos, 253) do if isMonster(thing.uid) == TRUE then table.insert(monsters, thing.uid) end end local bfm = getThingfromPos(BlindField) if isMonster(bfm.uid) == TRUE then table.insert(monsters, bfm.uid) end return monsters end function onUse(cid, item, fromPosition, itemEx, toPosition) local topLeft = {x=32772, y=31154, z=10} local buttomRight = {x=32793, y=31178, z=10} local monsters = getMonstersfromArea(topLeft, buttomRight) local monsters1 = getMonstersfromArea(topLeft, buttomRight) local tp = {x=32783, y=31175, z=10} local glo = {x=32783, y=31166, z=10} local function FirstWave() doSummonCreature("Rift Worm", {x= glo.x - 4,y=glo.y,z=glo.z}) doSummonCreature("Rift Worm", {x= glo.x + 4,y=glo.y,z=glo.z}) doSummonCreature("Rift Worm", {x=glo.x,y=glo.y + 4,z=glo.z}) doSummonCreature("Rift Worm", {x=glo.x,y=glo.y - 4,z=glo.z}) doSummonCreature("Rift Worm", {x=glo.x,y=glo.y + 5,z=glo.z}) doSummonCreature("Azerus", {x=glo.x,y=glo.y - 5,z=glo.z}) end local function FifthWave() doSummonCreature("Rift Worm", {x= glo.x - 4,y=glo.y,z=glo.z}) doSummonCreature("Rift Worm", {x= glo.x + 4,y=glo.y,z=glo.z}) doSummonCreature("Rift Worm", {x=glo.x,y=glo.y + 4,z=glo.z}) doSummonCreature("Rift Worm", {x=glo.x,y=glo.y - 4,z=glo.z}) doSummonCreature("Rift Worm", {x=glo.x,y=glo.y + 5,z=glo.z}) end local function SecondWave() local monsters1 = getMonstersfromArea(topLeft, buttomRight) for _, monster in pairs(monsters1) do if getCreatureName(monster) == "Azerus" then doRemoveCreature(monster) end end doSummonCreature("Azerus1", {x=glo.x,y=glo.y - 5,z=glo.z}) doSummonCreature("Rift Brood", {x= glo.x - 4,y=glo.y,z=glo.z}) doSummonCreature("Rift Brood", {x= glo.x + 4,y=glo.y,z=glo.z}) doSummonCreature("Rift Brood", {x=glo.x,y=glo.y + 4,z=glo.z}) doSummonCreature("Rift Brood", {x=glo.x,y=glo.y - 4,z=glo.z}) doSummonCreature("Rift Brood", {x=glo.x,y=glo.y + 5,z=glo.z}) end local function SixthWave() doSummonCreature("Rift Brood", {x= glo.x - 4,y=glo.y,z=glo.z}) doSummonCreature("Rift Brood", {x= glo.x + 4,y=glo.y,z=glo.z}) doSummonCreature("Rift Brood", {x=glo.x,y=glo.y + 4,z=glo.z}) doSummonCreature("Rift Brood", {x=glo.x,y=glo.y - 4,z=glo.z}) doSummonCreature("Rift Brood", {x=glo.x,y=glo.y + 5,z=glo.z}) end local function ThirdWave() local monsters1 = getMonstersfromArea(topLeft, buttomRight) for _, monster in pairs(monsters1) do if getCreatureName(monster) == "Azerus" then doRemoveCreature(monster) end end doSummonCreature("Azerus2", {x= glo.x - 5,y=glo.y,z=glo.z}) doSummonCreature("Rift Scythe", {x= glo.x - 4,y=glo.y,z=glo.z}) doSummonCreature("Rift Scythe", {x= glo.x + 4,y=glo.y,z=glo.z}) doSummonCreature("Rift Scythe", {x= glo.x + 4,y=glo.y,z=glo.z}) doSummonCreature("Rift Scythe", {x=glo.x,y=glo.y + 4,z=glo.z}) end local function ThirdWave1() -- with 2s delay doSummonCreature("Rift Scythe", {x=glo.x,y=glo.y + 4,z=glo.z}) doSummonCreature("Rift Scythe", {x=glo.x,y=glo.y - 4,z=glo.z}) doSummonCreature("Rift Scythe", {x=glo.x,y=glo.y + 5,z=glo.z}) end local function FourthWave() doSummonCreature("War Golem", {x= glo.x - 4,y=glo.y,z=glo.z}) doSummonCreature("War Golem", {x= glo.x + 4,y=glo.y,z=glo.z}) doSummonCreature("War Golem", {x=glo.x,y=glo.y - 4,z=glo.z}) doSummonCreature("War Golem", {x=glo.x,y=glo.y + 4,z=glo.z}) end local function SevenWave() local monsters1 = getMonstersfromArea(topLeft, buttomRight) for _, monster in pairs(monsters1) do if getCreatureName(monster) == "Azerus" then doRemoveCreature(monster) end end doSummonCreature("Azerus3", {x= glo.x - 5,y=glo.y,z=glo.z}) doSummonCreature("War Golem", {x= glo.x - 4,y=glo.y,z=glo.z}) doSummonCreature("War Golem", {x= glo.x + 4,y=glo.y,z=glo.z}) doSummonCreature("War Golem", {x=glo.x,y=glo.y - 4,z=glo.z}) doSummonCreature("War Golem", {x=glo.x,y=glo.y + 4,z=glo.z}) end local function Glllobe() local monst = getMonstersfromArea(topLeft, buttomRight) for i = 1, #monst do doRemoveCreature(monst[i]) end local item1 = getTileItemById(glo, 9767) doItemSetAttribute(item1.uid, "aid", 58261) end local function createWall(p) local janek = doCreateItem(1387,1,{x=32784, y=31177, z=9}) doItemSetAttribute(janek, "aid", 9105) end local function createWalll(i) local ela = doCreateItem(1387,1,{x=32783, y=31175, z=10}) doItemSetAttribute(ela, "aid", 9106) end local wall0 = {x=32784, y=31177, z=9, stackpos=1} local getwall0 = getThingfromPos(wall0) local wall1 = {x=32783, y=31175, z=10, stackpos=1} local getwall1 = getThingfromPos(wall1) local monsters = getMonstersfromArea(topLeft, buttomRight) local monsters1 = getMonstersfromArea(topLeft, buttomRight) local tele_chk = getTileItemById(tp, 1387) if item.actionid == 58261 then doItemSetAttribute(item.uid, "aid", 58263) end if tele_chk.uid > 0 then doRemoveItem(getTileItemById(tp,1387).uid) doRemoveItem(getwall0.uid,1) addEvent(FirstWave, 0) addEvent(FifthWave, 30000) addEvent(SecondWave, 60000) addEvent(SixthWave, 90000) addEvent(ThirdWave, 120000) addEvent(ThirdWave1, 150000) addEvent(FourthWave, 180000) addEvent(SevenWave, 210000) addEvent(Glllobe, 400000) p = {wallid = getwall0.itemid} addEvent(createWall, 300*1000, p) i = {wallid = getwall1.itemid} addEvent(createWalll, 300*1000, i) end if item.actionid == 58263 then doCreatureSay(cid, "You have to wait some time before this globe will charge.", TALKTYPE_ORANGE_1) end return TRUE end Se alguem puder me ajudar ficarei muito grato! Vlw galera!
Postado Janeiro 18, 2013 12 anos PARA GLOBAL function onUse(cid, item, frompos, item2, topos) --Config--> local statue_pos = {x = 32783, y = 31166, z = 10} local portal_quest01_pos = {x = 32783, y = 31175, z = 10, stackpos = 2} local portal_quest02_pos = {x = 32784, y = 31177, z = 9, stackpos = 2} local new_portal_pos = {x = 32783, y = 31168, z = 10, stackpos = 1} local new_pos = {x = 32778, y = 31171, z = 14} --End Config--> function Potwory1() if math.random (1,8) == 4 then doSummonCreature('Rift Brood', {x = statue_pos.x+1, y = statue_pos.y+1, z = statue_pos.z, stackpos = 253}) doSummonCreature('Rift Brood', {x = statue_pos.x-1, y = statue_pos.y+1, z = statue_pos.z, stackpos = 253}) doSummonCreature('Rift Brood', {x = statue_pos.x, y = statue_pos.y-1, z = statue_pos.z, stackpos = 253}) doSummonCreature('Rift Worm', {x = statue_pos.x-1, y = statue_pos.y, z = statue_pos.z, stackpos = 253}) doSummonCreature('Rift Worm', {x = statue_pos.x+1, y = statue_pos.y, z = statue_pos.z, stackpos = 253}) doSummonCreature('Rift Worm', {x = statue_pos.x+1, y = statue_pos.y-1, z = statue_pos.z, stackpos = 253}) doSummonCreature('Rift Worm', {x = statue_pos.x-1, y = statue_pos.y-1, z = statue_pos.z, stackpos = 253}) addEvent(Potwory2, 30 * 1000) else doSummonCreature('Azerus', {x = statue_pos.x, y = statue_pos.y+1, z = statue_pos.z, stackpos = 253}) doSummonCreature('Rift Brood', {x = statue_pos.x+1, y = statue_pos.y+1, z = statue_pos.z, stackpos = 253}) doSummonCreature('Rift Brood', {x = statue_pos.x-1, y = statue_pos.y+1, z = statue_pos.z, stackpos = 253}) doSummonCreature('Rift Brood', {x = statue_pos.x, y = statue_pos.y-1, z = statue_pos.z, stackpos = 253}) doSummonCreature('Rift Worm', {x = statue_pos.x-1, y = statue_pos.y, z = statue_pos.z, stackpos = 253}) doSummonCreature('Rift Worm', {x = statue_pos.x+1, y = statue_pos.y, z = statue_pos.z, stackpos = 253}) doSummonCreature('Rift Worm', {x = statue_pos.x+1, y = statue_pos.y-1, z = statue_pos.z, stackpos = 253}) doSummonCreature('Rift Worm', {x = statue_pos.x-1, y = statue_pos.y-1, z = statue_pos.z, stackpos = 253}) addEvent(Potwory2, 30 * 1000) end end function Potwory2() doSummonCreature('Rift Brood', {x = statue_pos.x-1, y = statue_pos.y+1, z = statue_pos.z, stackpos = 253}) doSummonCreature('Rift Brood', {x = statue_pos.x, y = statue_pos.y-1, z = statue_pos.z, stackpos = 253}) doSummonCreature('Rift Worm', {x = statue_pos.x-1, y = statue_pos.y, z = statue_pos.z, stackpos = 253}) doSummonCreature('Rift Worm', {x = statue_pos.x+1, y = statue_pos.y, z = statue_pos.z, stackpos = 253}) addEvent(Potwory3, 35 * 1000) end function Potwory3() doSummonCreature('Rift Scythe', {x = statue_pos.x-1, y = statue_pos.y, z = statue_pos.z, stackpos = 253}) doSummonCreature('Rift Scythe', {x = statue_pos.x+1, y = statue_pos.y, z = statue_pos.z, stackpos = 253}) doSummonCreature('Rift Scythe', {x = statue_pos.x+1, y = statue_pos.y-1, z = statue_pos.z, stackpos = 253}) doSummonCreature('Rift Scythe', {x = statue_pos.x-1, y = statue_pos.y-1, z = statue_pos.z, stackpos = 253}) addEvent(Potwory4, 40 * 1000) end function Potwory4() doSummonCreature('Azerus', {x = statue_pos.x, y = statue_pos.y+1, z = statue_pos.z, stackpos = 253}) doSummonCreature('War Golem', {x = statue_pos.x+1, y = statue_pos.y+1, z = statue_pos.z, stackpos = 253}) doSummonCreature('War Golem', {x = statue_pos.x-1, y = statue_pos.y+1, z = statue_pos.z, stackpos = 253}) doSummonCreature('War Golem', {x = statue_pos.x, y = statue_pos.y-1, z = statue_pos.z, stackpos = 253}) doSummonCreature('War Golem', {x = statue_pos.x-1, y = statue_pos.y, z = statue_pos.z, stackpos = 253}) addEvent(NewPortal, 90 * 1000) end function NewPortal() doCreateTeleport(1387, new_pos, new_portal_pos) addEvent(RemoveAll, 60 * 1000) end function RemoveAll() doRemoveItem(getThingfromPos(portal_quest01_pos).uid,1) doRemoveItem(getThingfromPos(portal_quest02_pos).uid,1) doRemoveItem(getThingfromPos(new_portal_pos).uid,1) end if item.uid == 11223 and getThingfromPos(portal_quest01_pos).itemid ~= 9772 then doCreateItem(9772,1,portal_quest01_pos) doCreateItem(9772,1,portal_quest02_pos) addEvent(Potwory1, 0) else doPlayerSendTextMessage(cid,22,"Sorry, not possible.") end return TRUE end Editado Janeiro 18, 2013 12 anos por arthurluna (veja o histórico de edições)
Postado Janeiro 18, 2013 12 anos Autor Oi arthurluna, obrigado por ter ajudado. Cara implementei seu script. Não deu nenhum erro, porém sempre qndo clico no globo aparece a msg Sorry, not possible em vermelho
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.