Ir para conteúdo
  • 0

[ajuda] anihi


subyth

Pergunta

Bem. Estou utilizando um Tfs 0.4 3777 8.60

 

Estou com um script da annihilator aqui. Ele aparentemente funciona normal.. Da o exaust na alavanca, avisa que faltam players etc.. Porém ele não está teleportando para a sala dos Demons =/

 

OBS: Não aparece nenhum erro no distro.

OBS²: Acabei de ver aqui, ele sumona os Demons e quando clico na alavanca novamente ele checa os demons na sala e sumona apenas os que eu matei com GOD.

OBS³: Ele também está checando se tem player na sala (Usei o GM como test), ele não deixa puxar a alavanca e avisa que tem player na sala ^^

 

Nesse caso, acho que está tudo funcionando, o problema mesmo é só q o player não teleporta Uu

Ele tem que teleportar e ganhar storage tempAid (3029).

 

local c = {daily = "no", -- Permitir apenas 1 entrada por diawithEffects = "yes", -- Permitir EfeitosonlyOnce = "yes", -- Permitir apenas 1x a entrada de um player (se ele terminar a quest, não pode entrar)anniStor = 3030, -- Se onlyOnce for "yes" isto salvará o storage. Pode ser o mesmo U.ID da alavanca.level = 100, -- player leveltempAid = 3029, -- Isto salvará o storage na porta e piso. Tem que ser diferente da anniStor e alavanca.mob = "Demon", -- monster namecustomMobs = "no", -- Sim para mobs aleatoriosnormalMap = "no", -- Não mecha aqui. Risco de BUGtest = "yes", -- Coloque Yes caso queira testar com apenas 1 player ^^fightTime = 15, -- Em minutos. Quanto tempo os players podem ficar na sala dos demonsexhaustion = 10, -- Em segundos. Exaust da alavancaexhaustionStor = 3028, -- Salva storage do exaust da alavancaentry = {{x=194, y=118, z=9}, -- 1 player, The first position just behind switch!{x=193, y=118, z=9},{x=192, y=118, z=9},{x=191, y=118, z=9}},des = {{x=228, y=120, z=9}, -- 1 player{x=229, y=120, z=9},{x=230, y=120, z=9},{x=231, y=120, z=9}},mobPos = { -- you cann ignore this if you have 'normalMap = "yes"'{x=228, y=118, z=9},{x=230, y=118, z=9}, -- here position opposite 1{x=229, y=122, z=9}, -- here position opposite 2{x=231, y=122, z=9},{x=227, y=120, z=9},{x=226, y=120, z=9}},customMobName = { -- you cann ignore this if you have 'customMobs = "no"'"Rat","Rat","Cave Rat", -- where position opposite 1"Cave Rat", -- where position opposite 2"Rat","Rat"}}c.daily = getBooleanFromString(c.daily)c.withEffects = getBooleanFromString(c.withEffects)c.onlyOnce = getBooleanFromString(c.onlyOnce)c.customMobs = getBooleanFromString(c.customMobs)c.normalMap = getBooleanFromString(c.normalMap)c.test = getBooleanFromString(c.test)local anniEvent = 0function onUse(cid, item, fromPosition, itemEx, toPosition)if(item.itemid == 1946) thenif(not c.daily) or c.test thendoTransformItem(item.uid, 1945)elsedoPlayerSendDefaultCancel(cid, RETURNVALUE_NOTPOSSIBLE)endreturn trueendif(item.itemid ~= 1945) then return true endif(exhaustion.check(cid, c.exhaustionStor)) then return true endexhaustion.set(cid, c.exhaustionStor, c.exhaustion)local fighter = {}fighter = getSpectators(c.des[1], 3, 3)if fighter ~= nil thenfor _, pid in ipairs(fighter) doif isPlayer(pid) thenif(c.withEffects) thendoCreatureSay(cid, "Halo! Halo!\nWe are still fighting here!", TALKTYPE_MONSTER, nil, cid, c.des[1])endreturn doPlayerSendDefaultCancel(cid, RETURNVALUE_NOTPOSSIBLE)endendfor _, pid in ipairs(fighter) doif isCreature(pid) thendoRemoveCreature(pid)endendendif(anniEvent ~= 0) then stopEvent(anniEvent) endlocal players = {}for _, position in ipairs(c.entry) dolocal pid = getTopCreature(position).uidif(pid == 0 or not isPlayer(pid) or getPlayerLevel(pid) < c.level) thenif(c.withEffects) thendoCreatureSay(cid, "Need a player with lvl "..c.level, TALKTYPE_MONSTER, nil)doSendMagicEffect(position, CONST_ME_TUTORIALARROW)endreturn doPlayerSendDefaultCancel(cid, RETURNVALUE_NOTPOSSIBLE)elseif(c.onlyOnce and getCreatureStorage(pid, c.anniStor) > 0) thenif(c.withEffects) thendoCreatureSay(cid, "That fighter\ncan't do anni again.", TALKTYPE_MONSTER, nil)doSendMagicEffect(position, CONST_ME_TUTORIALARROW)endreturn doPlayerSendDefaultCancel(cid, RETURNVALUE_NOTPOSSIBLE)endtable.insert(players, pid)if c.test then break endendif normalMap thenlocal zmienne = {{'-3','-2'}, {'-1','-2'}, {'-2','2'}, {'0','2'}, {'1','0'}, {'2','0'}} -- horizontallyfor i, pos in ipairs(zmienne) doc.mobPos = c.des[1]c.mobPos.x = c.mobPos.x + tonumber(pos[1])c.mobPos.y = c.mobPos.y + tonumber(pos[2])doCreateMonster(c.customMobs and c.customMobName or c.mob, c.mobPos)endelsefor i, pos in ipairs(c.mobPos) dodoCreateMonster(c.customMobs and c.customMobName or c.mob, pos)endendfor i, pid in ipairs(players) dodoSendMagicEffect(c.entry, CONST_ME_POFF)doTeleportThing(pid, c.des, false)doSendMagicEffect(c.des, CONST_ME_ENERGYAREA)doCreatureSetStorage(pid, c.tempAid, 1)if c.test then break endenddoTransformItem(item.uid, 1946)anniEvent = addEvent(function()for i, pid in ipairs(players) doif getCreatureStorage(pid, c.tempAid) == 1 thendoCreatureSetStorage(pid, c.tempAid, -1)doRemoveCondition(pid, CONDITION_INFIGHT)local pos = getClosestFreeTile(cid, c.entry, false, false)pos.y = pos.y +1doTeleportThing(pid, pos, false)doSendMagicEffect(getThingPosition(pid), CONST_ME_TELEPORT)doCreatureSay(pid, "Time is up!", TALKTYPE_MONSTER)endenddoTransformItem(item.uid, 1945)end, c.fightTime*60*1000)return trueend

 

@UP

Link para o comentário
Compartilhar em outros sites

0 respostass a esta questão

Posts Recomendados

Até agora não há respostas para essa pergunta

×
×
  • Criar Novo...