Solutions
-
WooX's post in (Resolvido)[PEDIDO] Script animatedtext top guild was marked as the answerPelo o que eu entendi você quer que o texto apareça apenas para membros que estão na top guild, e não para as 4 primeiras no ranking como a query que você postou está buscando. Se realmente for este o caso, a função não precisa retornar uma tabela e sim apenas um ID. Obs: não tive tempo de testar o script.
--<globalevent name="topguild" interval="10000" event="script" value="topguild.lua"/>-- local function getTopGuild() local query = "SELECT `g`.`id` AS `id`, `g`.`name` AS `name`, COUNT(`g`.`name`) as `frags` FROM `killers` k LEFT JOIN `player_killers` pk ON `k`.`id` = `pk`.`kill_id` LEFT JOIN `players` p ON `pk`.`player_id` = `p`.`id` LEFT JOIN `guild_ranks` gr ON `p`.`rank_id` = `gr`.`id` LEFT JOIN `guilds` g ON `gr`.`guild_id` = `g`.`id` WHERE `k`.`unjustified` = 1 AND `k`.`final_hit` = 1 GROUP BY `name` ORDER BY `frags` DESC, `name` ASC LIMIT 1;" local queryResult = db.storeQuery(query) if queryResult then local guildID = result.getDataInt(queryResult, "id") result.free(queryResult) return guildID end return false end function onThink(interval, lastExecution) local topGuild = getTopGuild() for _, cid in ipairs(getPlayersOnline()) do if getPlayerGuildId(cid) == topGuild then doSendAnimatedText(getCreaturePosition(cid), "TOP GUILD", COLOR_RED) end end return true end Créditos pela base do script ao @Fir3element
-
WooX's post in (Resolvido)Não reconhece acentos was marked as the answerÉ ao contrario, ele tem que mudar para ANSI. @GODHalf altera para ANSI utilizando notepad++.
-
WooX's post in (Resolvido)Logo para site. was marked as the answer
-
WooX's post in (Resolvido)Erro talkactions was marked as the answer@maleskinho A função War:kill não está verificando se o quem matou o player era um player também, e ainda assim a função tenta buscar pelo GuildId de quem matou o player (é óbvio, mas monstros não tem GuildId).
Testa ai.
-
WooX's post in (Resolvido)Cast System não abre channel! was marked as the answerO Private Chat Channel só é aberto para Players que possuem Premium Account. Altere no seu config.lua.
Config.lua
freePremium = true
Ou faça esta alteração na sua source.
Chat.cpp
De:
if(!player->isPremium() || getPrivateChannel(player)) Para:
if(getPrivateChannel(player))
-
WooX's post in (Resolvido)Bloquear login se player tiver shareando account (IP diferente na mesma account) was marked as the answerTesta ai.
local removeTime = 5 -- Segundos local removeMsg = "You're gonna be disconnected in "..removeTime.." seconds for sharring the account." function onLogin(cid) if getCreatureName(cid):lower() ~= "account manager" then for _, pid in pairs(getPlayersByAccountId(getPlayerAccountId(cid))) do if getPlayerIp(cid) ~= getPlayerIp(pid) then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, removeMsg) addEvent(function() doSendMagicEffect(getThingPos(cid), CONST_ME_POFF) doRemoveCreature(cid) end, removeTime*1000) break end end end return true end
-
WooX's post in (Resolvido)[ANTI-BOT] Mandar player para cidade natal! was marked as the answerlocal symbols = {"*", "^", "¿", "%", "&", "$"} local timeBetweenQuestion = 35 * 60 --35 minutes local timeToKick = 2 * 45 --1.5 minutes local timeStorage = 65117 local codeStorage = 65118 local kickStorage = 65119 local timesStorage = 65121 function onThink(cid, interval) if not isPlayer(cid) or getPlayerGroupId(cid) >= 3 then return end if getCreatureStorage(cid, timeStorage) < 1 then doCreatureSetStorage(cid, timeStorage, os.time() + timeBetweenQuestion) end if getCreatureStorage(cid, kickStorage) > 0 and os.time() >= getCreatureStorage(cid, kickStorage) then local tmp = {timeStorage, kickStorage, timesStorage, codeStorage} for i = 1, #tmp do doCreatureSetStorage(cid, tmp, 0) end return doTeleportThing(cid, getTownTemplePosition(getPlayerTown(cid))) end if os.time() >= getCreatureStorage(cid, timeStorage) then local code, set = "", 0 set = math.random(1, 100000) local s, e = 1, 1 for i = 1, string.len(set) do code = (code == "" and string.sub(set, s, e) or code .. symbols[math.random(#symbols)] .. string.sub(set, s, e)) s, e = s + 1, e + 1 end doCreatureSetStorage(cid, codeStorage, set) doCreatureSetStorage(cid, kickStorage, os.time() + timeToKick) doCreatureSetStorage(cid, timeStorage, os.time() + timeBetweenQuestion) doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, "[Anti-Bot]: Please say !antibot followed by your code without symbols.") doPlayerPopupFYI (cid, "Here is your code! !antibot"..code.." Type in the numbers without symbols.") end return end
-
WooX's post in (Resolvido)setplayerlookdirection? was marked as the answerdoCreatureSetLookDir(cid,dir)
-
WooX's post in (Resolvido)Cast System was marked as the answervoid addCastViewer(ProtocolGame* pg) { cSpectators[nextSpectator] = pg; nextSpectator++; std::stringstream ss; ss << "Spectator [" << cast.curId << "]"; pg->viewerName = ss.str().c_str(); cast.curId++; }
Pra falar laranja depois eu dou 1 olhada com calma e posto aqui.
-
WooX's post in (Resolvido)[Dúvida] Tornar item usável was marked as the answerItems.otb, dependendo do item talvez tenha que alterar o .dat, ai os players teriam que abaixar o client próprio.
-
WooX's post in (Resolvido)RME mar do andar (floor) de cima aparece quando estou na cave abaixo was marked as the answerComplete o mar acima da cave.
-
WooX's post in (Resolvido)Correção em action script de use was marked as the answer
-
WooX's post in (Resolvido)ao logar receber msg estilo pm was marked as the answerlocal config = { loginMessage = getConfigValue('loginMessage'), useFragHandler = getBooleanFromString(getConfigValue('useFragHandler')) } function onLogin(cid) local loginmsg = "[DOUBLE POINTS]: Receba pontos em dobro para qualquer valores acima de R$10,00! Promoção estendida até dia 06/05!." doCreatureSay(getCreatureByName(getCreatureName(cid)), loginmsg, TALKTYPE_PRIVATE, false, cid) local loss = getConfigValue('deathLostPercent') if(loss ~= nil) then doPlayerSetLossPercent(cid, PLAYERLOSS_EXPERIENCE, loss * 10) doPlayerAddBlessing(cid, 1) doPlayerAddBlessing(cid, 2) doPlayerAddBlessing(cid, 3) doPlayerAddBlessing(cid, 4) doPlayerAddBlessing(cid, 5) doPlayerAddPremiumDays(cid, 2) end local accountManager = getPlayerAccountManager(cid) if(accountManager == MANAGER_NONE) then local lastLogin, str = getPlayerLastLoginSaved(cid), config.loginMessage if(lastLogin > 0) then doPlayerSendTextMessage(cid, MESSAGE_STATUS_DEFAULT, str) str = "Your last visit was on " .. os.date("%a %b %d %X %Y", lastLogin) .. "." else str = str .. " Please choose your outfit." doPlayerSendOutfitWindow(cid) end doPlayerSendTextMessage(cid, MESSAGE_STATUS_DEFAULT, str) elseif(accountManager == MANAGER_NAMELOCK) then addEvent(valid(doCreatureSay), 500, cid, "Hello, it appears that your character has been locked for name violating rules, what new name would you like to have?", TALKTYPE_PRIVATE_NP, true, cid) elseif(accountManager == MANAGER_ACCOUNT) then addEvent(valid(doCreatureSay), 500, cid, "Hello, type {account} to manage your account. If you would like to start over, type {cancel} anywhere.", TALKTYPE_PRIVATE_NP, true, cid) else addEvent(valid(doCreatureSay), 500, cid, "Hello, type {account} to create an account or {recover} to recover an account.", TALKTYPE_PRIVATE_NP, true, cid) end if(not isPlayerGhost(cid)) then doSendMagicEffect(getCreaturePosition(cid), CONST_ME_TELEPORT) end registerCreatureEvent(cid, "AntiMC") registerCreatureEvent(cid, "FragReward") registerCreatureEvent(cid, "CheckVip") registerCreatureEvent(cid, "onPrepareDeath") registerCreatureEvent(cid, "PlayerLogout") registerCreatureEvent(cid, "onPrepareDeath") registerCreatureEvent(cid, "deathBroadcast") registerCreatureEvent(cid, "LevelMax") registerCreatureEvent(cid, "DeathBroadcast") registerCreatureEvent(cid, "StartSkills") registerCreatureEvent(cid, "Idle") if(config.useFragHandler) then registerCreatureEvent(cid, "SkullCheck") registerCreatureEvent(cid, "zombieevent") registerCreatureEvent(cid, "ProtectMl") registerCreatureEvent(cid, "Protectskill") registerCreatureEvent(cid, "IconMap") registerCreatureEvent(cid, "deathchannel") doPlayerOpenChannel(cid, 9) doPlayerOpenChannel(cid, 15) end registerCreatureEvent(cid, "ReportBug") registerCreatureEvent(cid, "fraglook") if getPlayerName(cid) == "Account Manager" and #getPlayersByIp(getPlayerIp(cid)) > 10 then return false end return true end
-
WooX's post in (Resolvido)Script Regeneration com Randon Min Max was marked as the answerlocal combat = createCombatObject() setCombatParam(combat, COMBAT_PARAM_EFFECT, 95) setCombatParam(combat, COMBAT_PARAM_TARGETCASTERORTOPMOST, 1) setCombatParam(combat, COMBAT_PARAM_AGGRESSIVE, 1) function onCastSpell(cid, var) local min, max = 30000, 40000 doCreatureAddHealth(cid, math.random(min, max)) return doCombat(cid, combat, var) end
-
WooX's post in (Resolvido)[HELP-ME] Arma aparecer na sprite? was marked as the answerO sistema chama-se paperdoll, alguns projetos que nunca saíram do papel desenvolveram algo parecido.
A mais de 2 anos atrás eu fiz algumas sprites pra uma equipe que pretendia usar este sistema num servidor atual de tibia 10.x (não lembro exatamente).
Me lembro que por ser 10.x eram muitos frames, cheguei a fazer sprites para o crown e demon helmet. Vou postar aqui para você ter 1 ideia de quantos sprites eram necessários.
Obs: isso somente para 2 helmets e outfit citizen, imagine combinações de sets inteiros com outfits diferentes??
Enfim... é um sistema bem complexo, que para funcionar corretamente vai exigir mais sprites do que linhas de codigos rs.
-
WooX's post in (Resolvido)Background Não preenche toda a tela was marked as the answerA onde está:
Mude para:
-
WooX's post in (Resolvido)Addons Bonus was marked as the answerHaha, a pagina é minha, provavelmente a encontrou no site do meu servidor. Como não há nada de importante nela, não vejo porque não te ajudar com isso. Aqui está.
addons.php
-
WooX's post in (Resolvido)[RESOLVIDO] Item que adiciona dias VIP ao sistema do Mock was marked as the answer--<action itemid="xxxx" event="script" value="other/vipitem.lua"/>-- local amount = 3 local days = amount*60*24*60 function onUse(cid, item, fromPosition, itemEx, toPosition) vip.addVipByAccount(getPlayerAccount(cid), days) doCreatureSay(cid, "Parabéns! Você recebeu ".. amount .." dias VIP!", TALKTYPE_ORANGE_1) doSendMagicEffect(getCreaturePosition(cid), 30) doRemoveItem(item.uid, 1) return true end
-
WooX's post in (Resolvido)Como editar index.php was marked as the answerProvavelmente você esta usando gesior 2012, nele você não precisa adicionar cada pagina no index, apenas adicionar na pasta pages e adicionar no layout.
-
WooX's post in (Resolvido)Pedido De Sprite SAO was marked as the answerQuando eu estava cuidando do SpriteSedex, se não me engano o Nogard fez 1 sprite do Kirito, procura pelo tópico e vê se acha la.
-
WooX's post in (Resolvido)OTItemEditor was marked as the answer1) Devo editar de outra forma ou não é possível realizar essa transformação?
Acho que tem que ser feitas alterações no arquivo .Dat do cliente, portanto a alteração SÓ com o Item editor não ira funcionar.
2) O ItemEditor serve apenas para edições em clientes próprios ou outra pessoa ao logar no meu servidor (com o cliente do Tibia normal) teria acesso às edições?
Acredito que irá funcionar só com o cliente "próprio", mas com o .Dat que foi alterado.
Eu posso estar errado, mas pelo que intendo é isso.
-
WooX's post in [Pedido] Link de um tutorial basico de pixel art? was marked as the answerhttp://tibiazoom.blogspot.com.br/2009/10/tutorial-como-fazer-sprites-de-tibia.html
http://tibiazoom.blogspot.com.br/2009/10/tutorial-avancado-de-sprites.html
http://www.pixelaria.org/artigos/1141-o-tutorial-de-pixel-art
http://www.tibiaking.com/forum/topic/38178-apostila-sprite-seduction2-aprimoramento/
não se prenda mt a tutoriais, o segredo é treino...