Postado Abril 7, 2015 10 anos bom eu tenho um script aki que teleporta e sumona monstros, porem qnd eu matava os monstros e dava uma enroladinha pra sair do lugar que eles nasceram dava um errinho na distro, segue script (pasta actions) crie um arquivo com qualquer nome e ponha issu -- Annihilator by Shawak v2.1 -- CONFIG -- local room = { -- room with demons fromX = 663, fromY = 1161, fromZ = 8, -------------- toX = 703, toY = 1289, toZ = 8 } local monster_pos = { [1] = {pos = {690, 1278, 8}, monster = "Pikachu"}, [2] = {pos = {688, 1254, 8}, monster = "Charizard"}, [3] = {pos = {689, 1227, 8}, monster = "Squirtle"}, [4] = {pos = {687, 1201, 8}, monster = "Abra"}, [5] = {pos = {673, 1169, 8}, monster = "Seviper"} } local players_pos = { {x = 669, y =1171, z = 7, stackpos = 253} --{x = 547, y =1127, z = 7, stackpos = 253}, -- {x = 549, y =1127, z = 7, stackpos = 253} } local new_player_pos = { {x = 690, y =1278, z = 8} -- {x = 542, y =1126, z = 8}, --{x = 542, y =1127, z = 8} } local playersOnly = "yes" local questLevel = 150 ------------------------------------------------------ --- CONFIG END --------------------------------------- ------------------------------------------------------ function onUse(cid, item, fromPosition, itemEx, toPosition) if getPlayerStorageValue(cid, 99284) == 1 then doPlayerSendCancel(cid, "Desculpe mais não pode entrar com camera.") return false end local all_ready, monsters, player, level = 0, 0, {}, 0 if item.itemid == 1945 then for i = 1, #players_pos do table.insert(player, 0) end for i = 1, #players_pos do player = getThingfromPos(players_pos) if player.itemid > 0 then if string.lower(playersOnly) == "yes" then if isPlayer(player.uid) == TRUE then all_ready = all_ready+1 else monsters = monsters+1 end else all_ready = all_ready+1 end end end if all_ready == #players_pos then for i = 1, #players_pos do player = getThingfromPos(players_pos) if isPlayer(player.uid) == TRUE then if getPlayerLevel(player.uid) >= questLevel then level = level+1 end else level = level+1 end end if level == #players_pos then if string.lower(playersOnly) == "yes" and monsters == 0 then for _, area in pairs(monster_pos) do doCreateNpc(area.monster,{x=area.pos[1],y=area.pos[2],z=area.pos[3]}) end for i = 1, #players_pos do doSendMagicEffect(players_pos, CONST_ME_POFF) doTeleportThing(player.uid, new_player_pos, FALSE) doSendMagicEffect(new_player_pos, CONST_ME_ENERGYAREA) doTransformItem(item.uid,1946) end else doPlayerSendTextMessage(cid,19,"Only players can do this quest.") end else doPlayerSendTextMessage(cid,19,"All Players have to be level "..questLevel.." to do this quest.") end else doPlayerSendTextMessage(cid,19,"You need "..table.getn(players_pos).." players to do this quest.") end elseif item.itemid == 1946 then local player_room = 0 for x = room.fromX, room.toX do for y = room.fromY, room.toY do for z = room.fromZ, room.toZ do local pos = {x=x, y=y, z=z,stackpos = 253} local thing = getThingfromPos(pos) if thing.itemid > 0 then if isPlayer(thing.uid) == TRUE then player_room = player_room+1 end end end end end if player_room >= 1 then doPlayerSendTextMessage(cid,19,"There is already a team in the quest room.") elseif player_room == 0 then for x = room.fromX, room.toX do for y = room.fromY, room.toY do for z = room.fromZ, room.toZ do local pos = {x=x, y=y, z=z,stackpos = 253} local thing = getThingfromPos(pos) if thing.itemid > 0 then doRemoveCreature(thing.uid) end end end end doTransformItem(item.uid,1945) end end end e a tag dele no xml <action uniqueid="Id unique que sera colocado no item x que ira teleportar" event="script" value="Nome do Arquivo criado.lua"/> bom se alguém conseguir arrumar o erro eu agradeço xD Qual o erro, você nem coloca isso _ .-'` `} _./) / } .'o \ | } '.___.'`.\ {` /`\_/ , `. } ME DA UMA NOZ! \=' .-' _`\ { `'`;/ `, } _\ @ ; } /__`;-...'--' Cluck!
Postado Abril 7, 2015 10 anos Autor Administrador bom eu tenho um script aki que teleporta e sumona monstros, porem qnd eu matava os monstros e dava uma enroladinha pra sair do lugar que eles nasceram dava um errinho na distro, segue script (pasta actions) crie um arquivo com qualquer nome e ponha issu -- Annihilator by Shawak v2.1 -- CONFIG -- local room = { -- room with demons fromX = 663, fromY = 1161, fromZ = 8, -------------- toX = 703, toY = 1289, toZ = 8 } local monster_pos = { [1] = {pos = {690, 1278, 8}, monster = "Pikachu"}, [2] = {pos = {688, 1254, 8}, monster = "Charizard"}, [3] = {pos = {689, 1227, 8}, monster = "Squirtle"}, [4] = {pos = {687, 1201, 8}, monster = "Abra"}, [5] = {pos = {673, 1169, 8}, monster = "Seviper"} } local players_pos = { {x = 669, y =1171, z = 7, stackpos = 253} --{x = 547, y =1127, z = 7, stackpos = 253}, -- {x = 549, y =1127, z = 7, stackpos = 253} } local new_player_pos = { {x = 690, y =1278, z = 8} -- {x = 542, y =1126, z = 8}, --{x = 542, y =1127, z = 8} } local playersOnly = "yes" local questLevel = 150 ------------------------------------------------------ --- CONFIG END --------------------------------------- ------------------------------------------------------ function onUse(cid, item, fromPosition, itemEx, toPosition) if getPlayerStorageValue(cid, 99284) == 1 then doPlayerSendCancel(cid, "Desculpe mais não pode entrar com camera.") return false end local all_ready, monsters, player, level = 0, 0, {}, 0 if item.itemid == 1945 then for i = 1, #players_pos do table.insert(player, 0) end for i = 1, #players_pos do player = getThingfromPos(players_pos) if player.itemid > 0 then if string.lower(playersOnly) == "yes" then if isPlayer(player.uid) == TRUE then all_ready = all_ready+1 else monsters = monsters+1 end else all_ready = all_ready+1 end end end if all_ready == #players_pos then for i = 1, #players_pos do player = getThingfromPos(players_pos) if isPlayer(player.uid) == TRUE then if getPlayerLevel(player.uid) >= questLevel then level = level+1 end else level = level+1 end end if level == #players_pos then if string.lower(playersOnly) == "yes" and monsters == 0 then for _, area in pairs(monster_pos) do doCreateNpc(area.monster,{x=area.pos[1],y=area.pos[2],z=area.pos[3]}) end for i = 1, #players_pos do doSendMagicEffect(players_pos, CONST_ME_POFF) doTeleportThing(player.uid, new_player_pos, FALSE) doSendMagicEffect(new_player_pos, CONST_ME_ENERGYAREA) doTransformItem(item.uid,1946) end else doPlayerSendTextMessage(cid,19,"Only players can do this quest.") end else doPlayerSendTextMessage(cid,19,"All Players have to be level "..questLevel.." to do this quest.") end else doPlayerSendTextMessage(cid,19,"You need "..table.getn(players_pos).." players to do this quest.") end elseif item.itemid == 1946 then local player_room = 0 for x = room.fromX, room.toX do for y = room.fromY, room.toY do for z = room.fromZ, room.toZ do local pos = {x=x, y=y, z=z,stackpos = 253} local thing = getThingfromPos(pos) if thing.itemid > 0 then if isPlayer(thing.uid) == TRUE then player_room = player_room+1 end end end end end if player_room >= 1 then doPlayerSendTextMessage(cid,19,"There is already a team in the quest room.") elseif player_room == 0 then for x = room.fromX, room.toX do for y = room.fromY, room.toY do for z = room.fromZ, room.toZ do local pos = {x=x, y=y, z=z,stackpos = 253} local thing = getThingfromPos(pos) if thing.itemid > 0 then doRemoveCreature(thing.uid) end end end end doTransformItem(item.uid,1945) end end end e a tag dele no xml <action uniqueid="Id unique que sera colocado no item x que ira teleportar" event="script" value="Nome do Arquivo criado.lua"/> bom se alguém conseguir arrumar o erro eu agradeço xD Testando jaja edito @edit aqui nao apresentou nem um erro eu abri e coloquei os monstros apareceram porem nao teleportou Editado Abril 7, 2015 10 anos por Erimyth (veja o histórico de edições) TibiaKing Team- KingTópicos www.tibiaking.com
Postado Abril 8, 2015 10 anos 1 o unico erro que eu achei desse script e que se você mata o bixu sumonado e ficar parado na area depois de um tempo ira suubir umerror de sumon (eu nao tenho print do erro aki pq nao uso esse script, só tenho ele guardado aki) 2 essas são as coordenadas da area de fromX, fromY, fromZ ate tox, toY, toZ local room = { -- room with demons fromX = 663, fromY = 1161, fromZ = 8, -------------- toX = 703, toY = 1289, toZ = 8 } local monster_pos = { [1] = {pos = {690, 1278, 8}, monster = "Pikachu"}, [2] = {pos = {688, 1254, 8}, monster = "Charizard"}, [3] = {pos = {689, 1227, 8}, monster = "Squirtle"}, [4] = {pos = {687, 1201, 8}, monster = "Abra"}, [5] = {pos = {673, 1169, 8}, monster = "Seviper"} } 3 esse local plyers_pos é onde o prayer estara quando puxar a alavanca e newplayer pos é para aonde ele vai ir qnd puxar a alavanca local players_pos = { {x = 669, y =1171, z = 7, stackpos = 253} --{x = 547, y =1127, z = 7, stackpos = 253}, -- {x = 549, y =1127, z = 7, stackpos = 253} } local new_player_pos = { {x = 690, y =1278, z = 8} -- {x = 542, y =1126, z = 8}, --{x = 542, y =1127, z = 8} } Editado Abril 8, 2015 10 anos por tioj (veja o histórico de edições) Minhas Gambiarras [PDA] Pokedex Mostrando o Catch http://www.tibiaking.com/forum/topic/54998-pda-arrumando-a-dex/?view=findpost&p=323041
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.