Ir para conteúdo

gabrielbuff

Membro
  • Registro em

  • Última visita

Tudo que gabrielbuff postou

  1. Por favor alguem poderia resolver esse erro no globalevents pra mim, toda vez que o event zombie inicia da esse erro no distro. bug distro: [28/02/2016 10:20:26] [Error - GlobalEvent Interface] [28/02/2016 10:20:27] data/globalevents/scripts/zombie event.lua:onThink [28/02/2016 10:20:27] Description: [28/02/2016 10:20:27] (luaDoRemoveItem) Item not found [28/02/2016 10:20:27] 0 [28/02/2016 10:20:27] [Error - GlobalEvents::think] Couldn't execute event: zombieevent script globalevents: local config = { playerCount = 2001, -- Global storage for counting the players left/entered in the event zombieCount = 2002, -- Global storage for counting the zombies in the event teleportActionId = 2000, -- Action id of the teleport needed for the movement script teleportPosition = {x = 1143, y = 1054, z = 7, stackpos = 1}, -- Where the teleport will be created teleportToPosition = {x = 1152, y = 1028, z = 7}, -- Where the teleport will take you teleportId = 1387, -- Id of the teleport timeToStartEvent = 2, -- Minutes, after these minutes the teleport will be removed and the event will be declared started timeBetweenSpawns = 5, -- Seconds between each spawn of zombie zombieName = "Event zombie", -- Name of the zombie that should be summoned playersNeededToStartEvent = 5, -- Players needed before the zombies can spawn. walls = {x = 1189, y = 1044, z = 7, stackpos = 1}, -- Should be the same as in the creaturescript! -- The zombies will spawn randomly inside this area fromPosition = {x = 1135, y = 1018, z = 7}, -- top left cornor of the playground toPosition = {x = 1170, y = 1040, z = 7}, -- bottom right cornor of the playground } function onThink() local tp = doCreateTeleport(config.teleportId, config.teleportToPosition, config.teleportPosition) doItemSetAttribute(tp, "aid", config.teleportActionId) doBroadcastMessage("EVENTO ZUMBI MENSAGEM: O evento 'Zumbi' começará em 2 minutos. O portal será fechado quando o evento começar.", MESSAGE_STATUS_CONSOLE_BLUE) doRemoveItem(getThingFromPos(config.walls).uid, 1) setGlobalStorageValue(config.playerCount, 0) setGlobalStorageValue(config.zombieCount, 0) addEvent(startEvent, config.timeToStartEvent * 1000 * 60) print(getGlobalStorageValue(2001)) end function startEvent() local get = getThingfromPos(config.teleportPosition) if get.itemid == config.teleportId then doRemoveItem(get.uid, 1) doCreateItem(9486, 1, config.walls) end local fromp, top = config.fromPosition, config.toPosition if getGlobalStorageValue(config.playerCount) >= config.playersNeededToStartEvent then addEvent(spawnZombie, config.timeBetweenSpawns * 1000) doBroadcastMessage("EVENTO ZUMBI MENSAGEM: Boa sorte no evento 'Zumbi' jogadores! O portal foi fechado! E o primeiro zumbi aparecerá em 5 segundos.", MESSAGE_STATUS_CONSOLE_BLUE) doCreateItem(9486, 1, config.walls) for x = fromp.x, top.x do for y = fromp.y, top.y do for z = fromp.z, top.z do areapos = {x = x, y = y, z = z, stackpos = 253} getPlayers = getThingfromPos(areapos) if isPlayer(getPlayers.uid) then doBroadcastMessage(getPlayers.uid, "EVENTO ZUMBI MENSAGEM: O primeiro zumbie vai aparecer em " .. config.timeBetweenSpawns .. " segundos. Boa sorte!", MESSAGE_STATUS_CONSOLE_BLUE) end end end end else doBroadcastMessage("EVENTO ZUMBI MENSAGEM: O evento 'Zumbi' não pode ser iniciado pelo pequeno número de jogadores participando. No mínimo " .. config.playersNeededToStartEvent .. " jogadores é necessário!", MESSAGE_STATUS_CONSOLE_BLUE) doCreateItem(9486, 1, config.walls) for x = fromp.x, top.x do for y = fromp.y, top.y do for z = fromp.z, top.z do areapos = {x = x, y = y, z = z, stackpos = 253} getPlayers = getThingfromPos(areapos) if isPlayer(getPlayers.uid) then doTeleportThing(getPlayers.uid, getTownTemplePosition(getPlayerTown(getPlayers.uid)), false) doSendMagicEffect(getPlayerPosition(getPlayers.uid), CONST_ME_TELEPORT) end end end end end end function spawnZombie() if getGlobalStorageValue(config.playerCount) >= 2 then pos = {x = math.random(config.fromPosition.x, config.toPosition.x), y = math.random(config.fromPosition.y, config.toPosition.y), z = math.random(config.fromPosition.z, config.toPosition.z)} doSummonCreature(config.zombieName, pos) doSendMagicEffect(pos, CONST_ME_MORTAREA) setGlobalStorageValue(config.zombieCount, getGlobalStorageValue(config.zombieCount)+1) doBroadcastMessage("EVENTO ZUMBI MENSAGEM: Um novo zumbi apareceu! Agora temos: " .. getGlobalStorageValue(config.zombieCount) .. " zumbis no evento!", MESSAGE_STATUS_CONSOLE_BLUE) addEvent(spawnZombie, config.timeBetweenSpawns * 1000) end end Up alguem pode ajudar?
  2. Pandawan, agora ele não conta as deaths.
  3. ele não apresenta nenhum bug no distro, mais esta contando errado os deaths.
  4. Alguem me ajuda nesse script de lookfrags? o que tem de errado nele, quando você fraga, o death tambem sobe.. function getDeaths(cid) local query, d = db.getResult("SELECT `player_id` FROM `player_killers` WHERE `player_id` = " ..getPlayerGUID(cid)), 0 if (query:getID() ~= -1) then repeat d = d+1 until not query:next() query:free() end return d end function getPlayerFrags(cid) local time = os.time() local times = {today = (time - 86400), week = (time - (7 * 86400))} local contents, result = {day = {}, week = {}, month = {}}, db.getResult("SELECT `pd`.`date`, `pd`.`level`, `p`.`name` FROM `player_killers` pk LEFT JOIN `killers` k ON `pk`.`kill_id` = `k`.`id` LEFT JOIN `player_deaths` pd ON `k`.`death_id` = `pd`.`id` LEFT JOIN `players` p ON `pd`.`player_id` = `p`.`id` WHERE `pk`.`player_id` = " .. getPlayerGUID(cid) .. " AND `k`.`unjustified` = 1 AND `pd`.`date` >= " .. (time - (30 * 86400)) .. " ORDER BY `pd`.`date` DESC") if(result:getID() ~= -1) then repeat local content = {date = result:getDataInt("date")} if(content.date > times.today) then table.insert(contents.day, content) elseif(content.date > times.week) then table.insert(contents.week, content) else table.insert(contents.month, content) end until not result:next() result:free() end local size = { day = table.maxn(contents.day), week = table.maxn(contents.week), month = table.maxn(contents.month) } return size.day + size.week + size.month end function onLook(cid, thing, position, lookDistance) if isPlayer(thing.uid) and thing.uid ~= cid then return doPlayerSetSpecialDescription(thing.uid, '\n'.. '[Frags: ' .. getPlayerFrags(thing.uid) .. ' - Deaths: ' .. getDeaths(thing.uid) .. ']') elseif thing.uid == cid then local string = 'You see yourself.' if getPlayerFlagValue(cid, PLAYERFLAG_SHOWGROUPINSTEADOFVOCATION) then string = string..' You are '.. getPlayerGroupName(cid) ..'.' elseif getPlayerVocation(cid) ~= 0 then string = string..' You are '.. getPlayerVocationName(cid) ..'.' else string = string..' You have no vocation.' end if getPlayerGuildId(cid) > 0 then string = string..' You are ' .. (getPlayerGuildRank(cid) == '' and 'a member' or getPlayerGuildRank(cid)) ..' of the '.. getPlayerGuildName(cid) string = getPlayerGuildNick(cid) ~= '' and string..' ('.. getPlayerGuildNick(cid) ..').' or string..'.' end string = string..'\n'.. '[Frags: ' .. getPlayerFrags(cid) .. ' - Deaths: ' .. getDeaths(cid) .. ']' if getPlayerFlagValue(cid, PLAYERCUSTOMFLAG_CANSEECREATUREDETAILS) then string = string..'\nHealth: ['.. getCreatureHealth(cid) ..' / '.. getCreatureMaxHealth(cid) ..'], Mana: ['.. getCreatureMana(cid) ..' / '.. getCreatureMaxMana(cid) ..'].' string = string..'\nIP: '.. doConvertIntegerToIp(getPlayerIp(cid)) ..'.' end if getPlayerFlagValue(cid, PLAYERCUSTOMFLAG_CANSEEPOSITION) then string = string..'\nPosition: [X:'.. position.x..'] [Y:'.. position.y..'] [Z:'.. position.z..'].' end return false, doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, string) end return 1 end
  5. Wakon, seu nao deu certo, apareceu varios erros no distro. vankk, valeu deu certo obrigado.
  6. Alguem poderia me ajudar.. Não consigo fazer a vocation nova do meu servidor a usar potion(ultimate health potion), Vocation nova ( Titan Gladiator) voc id="12" script potion local MIN = 900 local MAX = 1100 local EMPTY_POTION = 7635 local exhaust = createConditionObject(CONDITION_EXHAUST) setConditionParam(exhaust, CONDITION_PARAM_TICKS, (getConfigInfo('timeBetweenExActions') - 100)) function onUse(cid, item, fromPosition, itemEx, toPosition) if isPlayer(itemEx.uid) == FALSE then return FALSE end if hasCondition(cid, CONDITION_EXHAUST_HEAL) == TRUE then doPlayerSendDefaultCancel(cid, RETURNVALUE_YOUAREEXHAUSTED) return TRUE end if((not(isKnight(itemEx.uid)) or getPlayerLevel(itemEx.uid) < 130) and getPlayerCustomFlagValue(itemEx.uid, PlayerCustomFlag_GamemasterPrivileges) == FALSE) then doCreatureSay(itemEx.uid, "Only knights of level 130 or above may drink this fluid.", TALKTYPE_ORANGE_1) return TRUE end if doCreatureAddHealth(itemEx.uid, math.random(MIN, MAX)) == LUA_ERROR then return FALSE end doAddCondition(cid, exhaust) doSendMagicEffect(getThingPos(itemEx.uid), CONST_ME_MAGIC_RED) doCreatureSay(itemEx.uid, "Aaaah...", TALKTYPE_ORANGE_1) return TRUE end
  7. Nenhuma das duas deu certo. tipo queria que quando atingisse 15players maximo no evento, o 16player fosse mandado para o templo ou que o teleporte do evento sumisse evitando entrada de mais players.
  8. não somente no evento mesmo.
  9. alguem poderia me ajudar, script movements do meu zombie esta bugado, quando atinge 15 players (maximo) no evento ainda esta dando para mais gente entrar nele, bugando o evento. local config = { playerCount = 2001, -- Global storage for counting the players in the event maxPlayers = 15, -- Max players who can participate } function onStepIn(cid, item, position, lastPosition, fromPosition, toPosition, actor) if getGlobalStorageValue(config.playerCount) < config.maxPlayers then setGlobalStorageValue(config.playerCount, getGlobalStorageValue(config.playerCount)+1) if getGlobalStorageValue(config.playerCount) == config.maxPlayers then doBroadcastMessage("O evento 'Zumbi' foi lotado! E começerá em alguns instantes.", MESSAGE_STATUS_CONSOLE_BLUE) else doBroadcastMessage("O jogador (" .. getPlayerName(cid) .. ") entrou no evento 'Zumbi'! Atualmente " .. getGlobalStorageValue(config.playerCount) .. " jogadores entraram!", MESSAGE_STATUS_CONSOLE_BLUE) doBroadcastMessage("Restando "..config.maxPlayers - getGlobalStorageValue(config.playerCount).." jogadores para entrar!", MESSAGE_STATUS_CONSOLE_BLUE) end else addEvent(tpBack, 1000, cid, fromposition) doPlayerSendCancel(cid, "") doBroadcastMessage("[EVENTO ZUMBI MENSAGEM] está cheio. Já existe " .. config.maxPlayers .. " jogadores participando.", MESSAGE_STATUS_CONSOLE_ORANGE) return false end print(getStorage(config.playerCount) .. " Players in the zombie event.") return true end function tpBack(cid, fromPosition) doTeleportThing(cid, fromPosition, true) doSendMagicEffect(getPlayerPosition(cid), CONST_ME_TELEPORT) end

Informação Importante

Confirmação de Termo