Eai Galera suave ? bom vim aqui pedir a ajuda de vocês .. preciso de um script !online diferente que ele funcione normalmente só que no final apareça tipo isso .
EXEMPLO / IMAGEM :
Desde já , agradeço !
Eai Galera suave ? bom vim aqui pedir a ajuda de vocês .. preciso de um script !online diferente que ele funcione normalmente só que no final apareça tipo isso .
EXEMPLO / IMAGEM :
Desde já , agradeço !
Atenciosamente : AdilsonTsunami
Te ajudei? click em
Meus Trabalhos:
Substitua a talkaction online.lua por essa:
local config = { showGamemasters = getBooleanFromString(getConfigValue('displayGamemastersWithOnlineCommand')) } function onSay(cid, words, param, channel) local players = getPlayersOnline() local strings = {""} local vocationCount = { [1] = 0, [2] = 0, [3] = 0, [4] = 0, } local i, position = 1, 1 local added = false for _, pid in ipairs(players) do if(added) then if(i > (position * 7)) then strings[position] = strings[position] .. "," position = position + 1 strings[position] = "" else strings[position] = i == 1 and "" or strings[position] .. ", " end end local voc = getPlayerVocation(pid) if voc > 4 then voc = voc-4 end vocationCount[voc] = vocationCount[voc] + 1 if((config.showGamemasters or getPlayerCustomFlagValue(cid, PLAYERCUSTOMFLAG_GAMEMASTERPRIVILEGES) or not getPlayerCustomFlagValue(pid, PLAYERCUSTOMFLAG_GAMEMASTERPRIVILEGES)) and (not isPlayerGhost(pid) or getPlayerGhostAccess(cid) >= getPlayerGhostAccess(pid))) then strings[position] = strings[position] .. getCreatureName(pid) .. " [" .. getPlayerLevel(pid) .. "]" i = i + 1 added = true else added = false end end doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, (i - 1) .. " jogadores online:") for i, str in ipairs(strings) do if(str:sub(str:len()) ~= ",") then str = str .. "." end str = str .. " \n"..vocationCount[1].." sorcerers, "..vocationCount[2].." druids, "..vocationCount[3].." paladins, "..vocationCount[4].." knights jogando agora." doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, str) end return true end
Ajudei? CURTIR não cai o dedo.
Mano primeiramente obrigado por responder meu post, mais deu um erro não funcionou não tipo meu ot tem 6 vocações , sorcerer , druid, knight , paladin , miner , elf tem como vc add ae ?
Atenciosamente : AdilsonTsunami
Te ajudei? click em
Meus Trabalhos:
Qual o id delas?
1 , 2 ,3 ,4 ,5 ,6 .. esses são os id das vocações iniciais , agora eu te pergunto depois que ele se promover ainda vai aparecer ele na lista ?
Atenciosamente : AdilsonTsunami
Te ajudei? click em
Meus Trabalhos:
local config = { showGamemasters = getBooleanFromString(getConfigValue('displayGamemastersWithOnlineCommand')) } function onSay(cid, words, param, channel) local players = getPlayersOnline() local strings = {""} local vocationCount = { [1] = 0, [2] = 0, [3] = 0, [4] = 0, [5] = 0, [6] = 0, } local i, position = 1, 1 local added = false for _, pid in ipairs(players) do if(added) then if(i > (position * 7)) then strings[position] = strings[position] .. "," position = position + 1 strings[position] = "" else strings[position] = i == 1 and "" or strings[position] .. ", " end end local voc = getPlayerVocation(pid) if voc > 6 then voc = voc-6 end vocationCount[voc] = vocationCount[voc] + 1 if((config.showGamemasters or getPlayerCustomFlagValue(cid, PLAYERCUSTOMFLAG_GAMEMASTERPRIVILEGES) or not getPlayerCustomFlagValue(pid, PLAYERCUSTOMFLAG_GAMEMASTERPRIVILEGES)) and (not isPlayerGhost(pid) or getPlayerGhostAccess(cid) >= getPlayerGhostAccess(pid))) then strings[position] = strings[position] .. getCreatureName(pid) .. " [" .. getPlayerLevel(pid) .. "]" i = i + 1 added = true else added = false end end doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, (i - 1) .. " jogadores online:") for i, str in ipairs(strings) do if(str:sub(str:len()) ~= ",") then str = str .. "." end str = str .. " \n"..vocationCount[1].." sorcerers, "..vocationCount[2].." druids, "..vocationCount[3].." paladins, "..vocationCount[4].." knights, "..vocationCount[5].." miner, "..vocationCount[6].." elf jogando agora." doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, str) end return true end
Deu o mesmo erro cara , não funfa de jeito nenhum !
Esse script aki funfa é quase igual acho que vc pode dar uma editadinha!
local config = { showGamemasters = getBooleanFromString(getConfigValue('displayGamemastersWithOnlineCommand')) } function onSay(cid, words, param, channel) local players = getPlayersOnline() local strings = {""} local sorc,druid,paladin,knight,rook = 0,0,0,0,0 local i, position = 1, 1 local added = false for _, pid in ipairs(players) do -- Implementacion por Xafterin. if isSorcerer(pid) then sorc = sorc + 1 elseif isDruid(pid) then druid = druid + 1 elseif isPaladin(pid) then paladin = paladin + 1 elseif isKnight(pid) then knight = knight + 1 end --- if(added) then if(i > (position * 7)) then strings[position] = strings[position] .. "," position = position + 1 strings[position] = "" else strings[position] = i == 1 and "" or strings[position] .. ", " end end if((config.showGamemasters or getPlayerCustomFlagValue(cid, PLAYERCUSTOMFLAG_GAMEMASTERPRIVILEGES) or not getPlayerCustomFlagValue(pid, PLAYERCUSTOMFLAG_GAMEMASTERPRIVILEGES)) and (not isPlayerGhost(pid) or getPlayerGhostAccess(cid) >= getPlayerGhostAccess(pid))) then strings[position] = strings[position] .. getCreatureName(pid) .. " [" .. getPlayerLevel(pid) .. "]" i = i + 1 added = true else added = false end end doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, (i - 1) .. " player(s) online on OT Server:") for i, str in ipairs(strings) do if(str:sub(str:len()) ~= ",") then str = str .. ". ".. sorc .." sorcerers, ".. druid .." druids, ".. paladin .." paladins, ".. knight .." knights and ".. rook .." rookies." end doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, str) end return true end
Atenciosamente : AdilsonTsunami
Te ajudei? click em
Meus Trabalhos:
local config = { showGamemasters = getBooleanFromString(getConfigValue('displayGamemastersWithOnlineCommand')) } function onSay(cid, words, param, channel) local players = getPlayersOnline() local strings = {""} local sorc,druid,paladin,knight,miner,elf = 0,0,0,0,0,0 local i, position = 1, 1 local added = false for _, pid in ipairs(players) do -- Implementacion por Xafterin. if isSorcerer(pid) then sorc = sorc + 1 elseif isDruid(pid) then druid = druid + 1 elseif isPaladin(pid) then paladin = paladin + 1 elseif isKnight(pid) then knight = knight + 1 end --- if(added) then if(i > (position * 7)) then strings[position] = strings[position] .. "," position = position + 1 strings[position] = "" else strings[position] = i == 1 and "" or strings[position] .. ", " end end if((config.showGamemasters or getPlayerCustomFlagValue(cid, PLAYERCUSTOMFLAG_GAMEMASTERPRIVILEGES) or not getPlayerCustomFlagValue(pid, PLAYERCUSTOMFLAG_GAMEMASTERPRIVILEGES)) and (not isPlayerGhost(pid) or getPlayerGhostAccess(cid) >= getPlayerGhostAccess(pid))) then strings[position] = strings[position] .. getCreatureName(pid) .. " [" .. getPlayerLevel(pid) .. "]" i = i + 1 added = true else added = false end end doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, (i - 1) .. " player(s) online on OT Server:") for i, str in ipairs(strings) do if(str:sub(str:len()) ~= ",") then str = str .. ". ".. sorc .." sorcerers, ".. druid .." druids, ".. paladin .." paladins, ".. knight .." knights ".. miner .." miners and ".. elf .." elfs." end doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, str) end return true end
Pegou mano. Reputado Por Ajudar mais tem um defeito... o script só ta lendo knight , sorcs ,druid,paladin .. miner e elf ele não ta lento nao . quando logo um elf diz que nao tem nenhum!
Acho que você esqueceu de editar essa parte :
local i, position = 1, 1 local added = false for _, pid in ipairs(players) do -- Implementacion por Xafterin. if isSorcerer(pid) then sorc = sorc + 1 elseif isDruid(pid) then druid = druid + 1 elseif isPaladin(pid) then paladin = paladin + 1 elseif isKnight(pid) then knight = knight + 1
Atenciosamente : AdilsonTsunami
Te ajudei? click em
Meus Trabalhos:
Leia meus comentários no código
local config = { showGamemasters = getBooleanFromString(getConfigValue('displayGamemastersWithOnlineCommand')) } function onSay(cid, words, param, channel) local players = getPlayersOnline() local strings = {""} local sorc,druid,paladin,knight,miner,elf = 0,0,0,0,0,0 local i, position = 1, 1 local added = false for _, pid in ipairs(players) do -- Implementacion por Xafterin. if isSorcerer(pid) then sorc = sorc + 1 elseif isDruid(pid) then druid = druid + 1 elseif isPaladin(pid) then paladin = paladin + 1 elseif isKnight(pid) then knight = knight + 1 elseif isInArray({5, 5}, getPlayerVocation(pid)) then -- Coloque o id da voc miner, id da voc promote miner miner = miner + 1 elseif isInArray({6, 6}, getPlayerVocation(pid)) then -- Coloque o id da voc elf, id da voc promote elf elf = elf + 1 end --- if(added) then if(i > (position * 7)) then strings[position] = strings[position] .. "," position = position + 1 strings[position] = "" else strings[position] = i == 1 and "" or strings[position] .. ", " end end if((config.showGamemasters or getPlayerCustomFlagValue(cid, PLAYERCUSTOMFLAG_GAMEMASTERPRIVILEGES) or not getPlayerCustomFlagValue(pid, PLAYERCUSTOMFLAG_GAMEMASTERPRIVILEGES)) and (not isPlayerGhost(pid) or getPlayerGhostAccess(cid) >= getPlayerGhostAccess(pid))) then strings[position] = strings[position] .. getCreatureName(pid) .. " [" .. getPlayerLevel(pid) .. "]" i = i + 1 added = true else added = false end end doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, (i - 1) .. " player(s) online on OT Server:") for i, str in ipairs(strings) do if(str:sub(str:len()) ~= ",") then str = str .. ". ".. sorc .." sorcerers, ".. druid .." druids, ".. paladin .." paladins, ".. knight .." knights ".. miner .." miners and ".. elf .." elfs." end doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, str) end return true end
Alguns dos meus trabalhos no fórum
Projeto Tutores de Scripting (encerrado)
Evento Blood Castle Automático
Killua Task System
Killua Automatic Raids System
Função AccountStorageValue
Player Pull Action (puxar jogador)
NPC Trocador - Troca itens por outros (SIMPLIFICADO)
Teleportar Membros Da Guild Para Seu Lado
Itens Ganhando Exp e Upando (Upgrade System)
Como usar addEvent - Tutorial
Sistema de Cultivo (Plantação)
Cart System (Andar de carrinho)
Valeu ae pela ajuda galera!
Resolvido!
Atenciosamente : AdilsonTsunami
Te ajudei? click em
Meus Trabalhos:
Tópico movido para a seção de dúvidas e pedidos resolvidos.
Alguns dos meus trabalhos no fórum
Projeto Tutores de Scripting (encerrado)
Evento Blood Castle Automático
Killua Task System
Killua Automatic Raids System
Função AccountStorageValue
Player Pull Action (puxar jogador)
NPC Trocador - Troca itens por outros (SIMPLIFICADO)
Teleportar Membros Da Guild Para Seu Lado
Itens Ganhando Exp e Upando (Upgrade System)
Como usar addEvent - Tutorial
Sistema de Cultivo (Plantação)
Cart System (Andar de carrinho)