Postado Novembro 2, 2016 8 anos Olá galera, to de volta pra pedir ajuda em dois problemas que estou tendo na distro do meu servidor, AQUI VAI A FOTO DOS ERROS DA DISTRO Agradeço deis de já quem puder me ajudar !!! o primeiro é : um erro no script Arena do EVENTO Last Man Standing Spoiler local t = { tmp = { {x = 92, y = 333, z = 7}, -- quina à noroeste (acima e à esquerda) da area onde os players devem estar para ingressar no evento {x = 98, y = 340, z = 7} -- quina à Sudeste (abaixo e à direita) }, arena = { {x = 154, y = 320, z = 7}, -- Quina de cima e à esquerda {x = 172, y = 340, z = 7}, -- quina de baixo e à direita {x = 163, y = 330, z = 7} -- Centro da Arena }, noPlayers = {x=163, y=322, z=7}, -- Para onde serão teleportados caso não haja campeão semChamps = {x=163, y=322, z=7}, -- Local para onde serão teleportados os 'players' caso passem os minutos sem campeão from = {x = 92, y = 333, z = 7}, -- quina de cima e à esquerda de onde os players serão transportados (escolha será aleatória) to = {x = 98, y = 340, z = 7}, -- quina de baixo e à direita de onde os players serão transportados (escolha será aleatória) minPlayers = 2, -- Número mínimo de players para iniciar o evento noPlayers = 1, -- Se houver este número de player na área o evento não começa prize = {2160} -- prêmio que o vencedor vai receber expRewChamps = 250000 -- Coloque aqui a experiência que o campeão ganhará. Deixe zero se não quiser. expRewPart = 100000 -- Coloque aqui a experiência que todos os 'players' que participarão ganharão. Deixe zero se não quiser. } local kick = 0 function onThink() local arenaPlayers = {} for x = t.arena[1].x, t.arena[2].x do for y = t.arena[1].y, t.arena[2].y do for z = t.arena[1].z, t.arena[2].z do local pos = {x = x, y = y, z = z} local n = getTileInfo(pos).creatures if n ~= 0 then pos.stackpos = 1 local c = getThingfromPos(pos) while c.uid ~= 0 do if c.itemid == 1 and c.type == 1 then table.insert(arenaPlayers, c.uid) if #arenaPlayers == n then break end end pos.stackpos = pos.stackpos + 1 c = getThingfromPos(pos) end end end end end if #arenaPlayers == 1 then local p = getPlayerMasterPos(arenaPlayers[1]) doTeleportThing(arenaPlayers[1], p) doSendMagicEffect(p, CONST_ME_TELEPORT) doPlayerSendTextMessage(arenaPlayers[1], MESSAGE_STATUS_CONSOLE_BLUE, "Voce ganhou este evento e recebeu este premio") doBroadcastMessage(getCreatureName(arenaPlayers[1]) .." venceu o Last Man Standing Event.") doPlayerAddItem(arenaPlayers[1], t.prize[math.random(#t.prize)], 10) if (t.expRewChamps > 0) then doPlayerAddExperience(arenaPlayers[1],t.expRewChamps) doSendMagicEffect(getPlayerPosition(arenaPlayers[1]), CONST_ME_MAGIC_RED) doSendAnimatedText(getPlayerPosition(arenaPlayers[1]), "Exp!", TEXTCOLOR_WHITE) end kick = 0 elseif #arenaPlayers > 1 then if kick == 0 then kick = os.time() else if os.time() - kick >= 840 then kick = 0 for i = 1, #arenaPlayers do doTeleportThing(arenaPlayers[i],t.semChamps) if (t.expRewPart > 0) then doPlayerAddExperience(arenaPlayers[1],t.expRewPart) end doPlayerSendTextMessage(arenaPlayers[i], MESSAGE_STATUS_WARNING, "Muito tarde, tente de novo mais tarde.") end end end elseif #arenaPlayers == 0 then kick = 0 local players = {} for x = t.tmp[1].x, t.tmp[2].x do for y = t.tmp[1].y, t.tmp[2].y do for z = t.tmp[1].z, t.tmp[2].z do local c = getTopCreature({x = x, y = y, z = z}) if c.type == 1 then table.insert(players, c.uid) end end end end if #players >= t.minPlayers then for i = 1, #players do local p = {x = math.random(t.from.x, t.to.x), y = math.random(t.from.y, t.to.y), z = math.random(t.from.z, t.to.z)} doTeleportThing(players[i], p) doSendMagicEffect(p, CONST_ME_TELEPORT) doPlayerSendTextMessage(players[i], MESSAGE_STATUS_WARNING, "A batalha começou. Sobrevivam para a glória!") end else for i = 1, #players do doTeleportThing(players[i],t.noPlayers) doPlayerSendTextMessage(players[i], MESSAGE_STATUS_WARNING, "O evento não começou porque não haviam player suficientes!") end end end return true end o segundo é : um erro no script Cpt , que é um Script de sistema party sem dano, os player que estão em party não tomam danos , gostei desse para quest's, e hunts em time Spoiler function onAttack(cid, target) if isPlayer(cid) and isPlayer(target) and isInParty(cid) and isInParty(target) then if getPlayerParty(cid) == getPlayerParty(target) then doPlayerSendCancel(cid, "You can not attack your party members") return false end end return true end Editado Novembro 2, 2016 8 anos por Micheel15 (veja o histórico de edições)
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.