Postado Janeiro 5, 2013 12 anos Como fasso pra tipo:Ponho 4 items ,mas o player so pode pegar 1? Nto Generations Breve online Quer participar da equip staff? Envie um email PARA [email protected] Explicando PORQUE VC quer ser da staff,e suas abilidades,exemplo mapper....
Postado Janeiro 5, 2013 12 anos Administrador Não entendi o seu pedido '-' TibiaKing Team- KingTópicos www.tibiaking.com
Postado Janeiro 5, 2013 12 anos Como fasso pra tipo:Ponho 4 items ,mas o player so pode pegar 1? Só por aa mesma uniqueid nos 4 baus '-' Procuro Equipe para projeto sério com remuneração, maior necessidade Programador em C\C++.
Postado Janeiro 5, 2013 12 anos Testa assim: Em SeuOt/data/actions, vá até Actions.xml abra, edite com bloco de notas e antes de </actions> adicione isso: <action uniqueid="9000;9001;2650;2651;2652;2653" event="script" value="annihilator.lua"/> Em SeuOt/data/actions/sctips copiei um arquivo .lua e renomeie para annihilator.lua dentro de annihilator.lua cole isso --[[ Author: Gandhi [PL] Date: 24.03.2012 ~10.20-11.15 Contanct: GG - 38138073 (I can do some not easy scripts for cash (Self-promotion, hah) ) about: Simple script for annihilator quest. You can set: - more or less than 4 players (numbers of tables with position in config.positions.before_teleport and config.positions.after_teleport (this number must be equal in these two tables) ) - player can do quest without all teammates - player can do quest only at once - players must kill all monsters to get prize - placing of monsters - prizes Greetings for people of Go(o)d Will! ]] local config = { positions = { -- positions before_teleport = { -- positions where are players before teleport to quest {x=1221, y=969, z=11, stackpos=253}, {x=1222, y=969, z=11, stackpos=253}, {x=1223, y=969, z=11, stackpos=253}, {x=1224, y=969, z=11, stackpos=253} }, after_teleport = { -- positions of players after teleport {x=1221, y=969, z=12, stackpos=253}, {x=1222, y=969, z=12, stackpos=253}, {x=1223, y=969, z=12, stackpos=253}, {x=1224, y=969, z=12, stackpos=253} }, place_monsters = { -- positions to place monsters placeMonstersAfterTeleport = true, -- use placing monsters on quest by script? {name = 'Demon', position = {x=1222, y=967, z=12, stackpos=253}}, {name = 'Demon', position = {x=1224, y=967, z=12, stackpos=253}}, {name = 'Demon', position = {x=1221, y=971, z=12, stackpos=253}}, {name = 'Demon', position = {x=1223, y=971, z=12, stackpos=253}} } }, requiredLevel = 100, -- required level to join annihilator quest checkForPlayers = false, -- if false, you can do quest when you don't have whole team killAllMonstersToExitRoom = true, -- if true, you have to kill all monsters before exit the room requiredStorage = { storage = 8600, -- storage where are saving info that player has do this quest (has take a price) valueDone = 1, -- value after do quest checkStorage = false -- check storage before join (if true, players can do quest only once) }, messagesType = 20, -- type of messages sent to players items = { itemActionIdType = 'uid', -- chest with price from annihilator quest have set its id in actionid ('aid') or uniqueid ('uid')? [2650] = {count = 1, itemid = 2494, name = 'demon armor'}, [2651] = {count = 1, itemid = 2400, name = 'magic sword'}, [2652] = {count = 1, itemid = 2431, name = 'stonecutter axe'}, [2653] = {count = 1, itemid = 2421, name = 'thunder hammer'}, [9000] = {switch = true}, -- is item with this id a switch to teleport? [9001] = {doors = true} -- is item with this id a doors to exit room? } } function onUse(cid, item, frompos, item2, topos) local prize = (config.items.itemActionIdType == 'uid' and config.items[item.uid] or config.items[item.actionid]) if(prize == nil) then return 0 end if(prize.itemid ~= nil) then if(getPlayerStorageValue(cid, config.requiredStorage.storage) == config.requiredStorage.valueDone) then doPlayerSendTextMessage(cid, config.messagesType, 'You already take your price from this quest.') doSendMagicEffect(getCreaturePosition(cid), CONST_ME_POFF) return 1 end doPlayerAddItem(cid, prize.itemid, prize.count) doPlayerSendTextMessage(cid, config.messagesType, 'You have found ' .. (prize.count == 1 and 'a' or prize.count) .. ' ' .. prize.name .. '.') setPlayerStorageValue(cid, config.requiredStorage.storage, config.requiredStorage.valueDone) elseif(prize.doors) then if(config.killAllMonstersToExitRoom) then local monsters, monster = {}, 0 for k, v in pairs(config.positions.place_monsters) do if(type(v) == 'table') then monster = getThingfromPos(v.position) if(monster.uid > 0) then table.insert(monsters, monster.uid) end end end if(table.getn(monsters) > 0) then for _, v in pairs(monsters) do doSendMagicEffect(getCreaturePosition(v), CONST_ME_MAGIC_RED) end doPlayerSendTextMessage(cid, config.messagesType, 'You have to kill ' .. table.getn(monsters) .. ' monsters.') return 1 end end doTransformItem(item.uid, item.itemid + 1) doTeleportThing(cid, getThingPos(item.uid)) if(config.killAllMonstersToExitRoom) then doPlayerSendTextMessage(cid, config.messagesType, 'Your team killed all monsters. You can pass doors.') end return 1 elseif(not prize.switch) then return 0 end if(table.getn(config.positions.before_teleport) ~= table.getn(config.positions.after_teleport)) then error('Numbers of positions before teleport and after teleport doesn\'t match.') return 0 end local players, player = {}, 0 for k, v in pairs(config.positions.after_teleport) do player = getThingfromPos(v) if(isPlayer(player.uid)) then doPlayerSendCancel(cid, 'Another team is doing annihilator quest now. Wait a moment.') doSendMagicEffect(getCreaturePosition(cid), CONST_ME_POFF) return 1 end end local sendMessageNotEnoughPlayers = false for k, v in pairs(config.positions.before_teleport) do player = getThingfromPos(v) if(not isPlayer(player.uid)) then if(config.checkForPlayers) then if(not sendMessageNotEnoughPlayers) then doPlayerSendTextMessage(cid, config.messagesType, 'You need ' .. table.getn(config.positions.before_teleport) .. ' players to do annihilator quest.') doSendMagicEffect(getCreaturePosition(player.uid), CONST_ME_POFF) sendMessageNotEnoughPlayers = true end else table.insert(players, -1) end elseif(getPlayerLevel(player.uid) < config.requiredLevel) then doPlayerSendTextMessage(cid, config.messagesType, 'Player ' .. getCreatureName(player.uid) .. ' from your team don\'t have required level (' .. config.requiredLevel .. ')') doPlayerSendCancel(player.uid, 'You don\'t have enough level to do annihilator quest. Come back if you reach ' .. config.requiredLevel .. ' level.') doSendMagicEffect(getCreaturePosition(player.uid), CONST_ME_POFF) elseif(config.requiredStorage.checkStorage and getPlayerStorageValue(player.uid, config.requiredStorage.storage) == config.requiredStorage.valueDone) then doPlayerSendTextMessage(cid, config.messagesType, 'Player ' .. getCreatureName(player.uid) .. ' from your team has done this quest.') doPlayerSendCancel(cid, 'You have done this quest.') doSendMagicEffect(getCreaturePosition(player.uid), CONST_ME_POFF) else table.insert(players, player.uid) end end if(table.getn(players) ~= table.getn(config.positions.before_teleport)) then return 1 end local teleportPosition = 0 for i, v in ipairs(players) do if(v ~= -1) then teleportPosition = config.positions.after_teleport doTeleportThing(v, teleportPosition) doSendMagicEffect(teleportPosition, CONST_ME_MAGIC_BLUE) doPlayerSendTextMessage(v, config.messagesType, 'Now you are teleported to annihilator room. Good luck.') end end if(config.positions.place_monsters.placeMonstersAfterTeleport) then local monster = 0 for k, v in pairs(config.positions.place_monsters) do if(type(v) == 'table') then monster = getThingfromPos(v.position) if(monster.uid == 0) then doSummonCreature(v.name, v.position) doSendMagicEffect(v.position, CONST_ME_MAGIC_RED) end end end end return 1 end Agora basta fazer os ajustes no seu map editor, mexendo na alavanca, nas posições que o demon vai nascer e por final os baus. Creditos pelo script: Kanciak Editado Janeiro 5, 2013 12 anos por tiagoduuarte (veja o histórico de edições)
Postado Janeiro 5, 2013 12 anos Autor deu certo vlws rep+ pros 2 ae Nto Generations Breve online Quer participar da equip staff? Envie um email PARA [email protected] Explicando PORQUE VC quer ser da staff,e suas abilidades,exemplo mapper....
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.