
Tudo que Frenesy postou
- [TFS 0.4] EXP por HIT
- [TFS 0.4] EXP por HIT
-
[TFS 0.4] EXP por HIT
Você pode tentar assim. -- CONFIGURAÇÕES DE EXPERIENCIA -- useStages = false -- Usar sistema de Stages , true/false premiumMultipliqueExp = 2 -- Players Premiums terão exp multiplicada, caso não querer deixe 1. rateExp = 300 -- Exp caso não for usar stages. local stages = { -- ["DELEVEL-ATELEVEL"] = EXP, (OBS: NUNCA REPETIR O MSM NUMERO, SEMPRE COLOCAR UM A MAIS.) ["1-50"] = 300, ["51-100"] = 250, ["101-150"] = 200, ["151-200"] = 150, ["201-250"] = 100, ["251-300"] = 50, ["351-400"] = 25, } ultimateExp = 15 -- exp que vai usar caso o level do player não tiver mais na tabela . -- CONFIGURAÇÕES DA PARTY partyPorcent = 40 -- Quantos Porcento da exp vai para os membros da party levelBlockParty = 1000 -- Diferença Maxima de Level permitida para membro da party ganhar exp. expShareRadiusX = 30 -- Distancia maxima permitida no eixo X para membro da party ganhar exp. expShareRadiusY = 30 -- Distancia maxima permitida no eixo Y para membro da party ganhar exp. expShareRadiusZ = 1 -- Distancia maxima permitida no eixo Z para membro da party ganhar exp. -- CONFIGURAÇÕES DE RINGS -- local rings = { -- [ID DO ANEL] = EXP MULTIPLICADA POR X EXP. [3048] = 2, [3049] = 4, [3050] = 6, } -- FIM DAS CONFIGURAÇÕES -- function CalculeExp(monsterhp, exptotal, hit) hit = hit <= monsterhp and math.ceil(exptotal * hit / monsterhp) or 0 return hit < 0 and 0 or hit end function isSummon(cid) return getCreatureMaster(cid) end function onStatsChange(cid, attacker, type, combat, value) if isPlayer(attacker) and isMonster(cid) then if getCreatureStorage(cid, 50001) ~= 1 then doCreatureSetStorage(cid, 50002, getMonsterInfo(getCreatureName(cid)).experience * rateExp) doCreatureSetStorage(cid, 50001, 1) end end if type == STATSCHANGE_HEALTHLOSS then if isMonster(cid) then if isCreature(attacker) then local _cid = isSummon(attacker) and getCreatureMaster(attacker) or attacker if isPlayer(_cid) then if useStages then for strstage, experience in pairs(stages) do tabstage = string.explode(strstage, "-") if getPlayerLevel(_cid) >= tonumber(tabstage[1]) and getPlayerLevel(_cid) <= tonumber(tabstage[2]) then ultimateExp = experience end end experienceRate = ultimateExp else experienceRate = rateExp end local expgain = CalculeExp(getCreatureMaxHealth(cid), getMonsterInfo(getCreatureName(cid)).experience * experienceRate, value) if getCreatureStorage(cid, 50002) > 0 then if getCreatureStorage(cid, 50002) - expgain < 0 then expgain = getCreatureStorage(cid, 50002) end doCreatureSetStorage(cid, 50002, getCreatureStorage(cid, 50002) - expgain) local ringexp = 1 for idring, expring in pairs(rings) do if getPlayerSlotItem(_cid, 9).itemid == idring then ringexp = expring break end end local premiumMultipliqueExp = isPremium(_cid) and premiumMultipliqueExp or 1 expgain = expgain * ringexp * premiumMultipliqueExp local party = false if isInParty(_cid) then local partyMembers, expParty = getPartyMembers(getPartyLeader(_cid)), expgain / 100 * partyPorcent for indice, partyMember in pairs(partyMembers) do attackerLevel, partyLevel = getPlayerLevel(_cid), getPlayerLevel(partyMember) attackerPos, partyPos = getThingPos(_cid), getThingPos(partyMember) x = false if math.abs(attackerLevel - partyLevel) > levelBlockParty then x = true elseif math.abs(attackerPos.x - partyPos.x) > expShareRadiusX then x = true elseif math.abs(attackerPos.y - partyPos.y) > expShareRadiusY then x = true elseif attackerPos.z ~= partyPos.z then x = true elseif _cid == partyMember then x = true end if x then partyMembers[indice] = nil end end if #partyMembers ~= 0 then expParty = math.ceil(expgain / 100 * partyPorcent) expmember = math.ceil(expParty / #partyMembers) for _, member in pairs(partyMembers) do if member ~= _cid then doPlayerSendTextMessage(member, 12, "You received "..expmember.." party exp.") doSendAnimatedText(member, expmember, 215) doPlayerAddExp(member, expmember) end end doPlayerSendTextMessage(_cid, 12, "You gain "..expgain.." exp. (" ..partyPorcent.."% send to party)") doSendAnimatedText(_cid, expgain - expParty, 215) doPlayerAddExp(_cid, expgain - expParty) party = true else party = false end end if not party then doPlayerAddExp(_cid, expgain) doSendAnimatedText(getThingPos(_cid), expgain, 215) end end end end end end return true end function onCombat(cid, target) if isMonster(target) and not isSummon(target) and not isPlayer(target) then registerCreatureEvent(target, "ExpGain") end return true end
-
Storages - Pesa o servidor?
Estou desenvolvendo um servidor que trabalha com bastantes storages. Se o servidor chegar a, digamos, 150 jogadores simultâneos, o banco de dados ficará com mais ou menos 4 milhões de linha de storages armazenadas. Como eu gostaria de ficar checando storages o tempo todo durante o jogo, fico me perguntando se isso pesaria no servidor. Durante o server-save eu limpo o banco de dados, retirando as storages não usadas. Isso diminui drasticamente a quantidade de linhas, mas logo elas enchem novamente. Então é isso, minha dúvida é bem simples - eu acho. Desde já, eu agradeço a atenção.
-
[PROBLEMA] Client travado...
Para saber se o problema é no OTClient ou nas modificações na sourcer do servidor, você pode verificar o Terminal do OTClient (Acho que é Ctrl + T) e ver se possui alguma mensagem de erro - em vermelho - por lá.
-
Sistema de Medalhões! Solicite aqui!
Gostei muito desse sistema. Graficamente falando, está linda essas sprites também.
-
AUMENTAR CAMPO DE VISÃO OTCLIENT?
Aquele tutorial agora cairia bem.
-
Cargos, Ranks e a volta do sistema de Medalhas!
Gostei muito do novo estilo. Acho que ficou mais "clean", sabe? Eu curti. Minha sugestão seria mudar um pouco as cores do TK. Assim, na hora da mudança, a sensação de novidade fica maior. Mas é só uma sugestão boba. Estão fazendo um ótimo trabalho. Parabéns a toda a equipe.
-
Atualização em breve! Nova Equipe, redução de ADS, site mais rápido e outras novidades!
Que show! Aguardo ansioso por eventos e coisas que tornam o fórum mais animado. Ansioso pra vê o novo layout do site.
- APaguem esse post
-
Procuro Alguem que edite meu otserv!
Eu faço de tudo. Mapa, Script, Sistemas e até Modificações no OTClient - embora pareça não ser o seu caso. Manda mensagem inBox por aqui caso ainda precise de ajuda.
-
Nao consigo por pz pelo RME... ajudem pf
As vezes as configurações de pisos especiais está desabilitada. Pressionando a tecla E elas são acionadas novamente. Fica a dica pra quem tiver um problema parecido.
-
Compro SSA no npc e vem com 1 carga
Já tentou por lua? local keywordHandler = KeywordHandler:new() local npcHandler = NpcHandler:new(keywordHandler) NpcSystem.parseParameters(npcHandler) function onCreatureAppear(cid) npcHandler:onCreatureAppear(cid) end function onCreatureDisappear(cid) npcHandler:onCreatureDisappear(cid) end function onCreatureSay(cid, type, msg) npcHandler:onCreatureSay(cid, type, msg) end function onThink() npcHandler:onThink() end local shopModule = ShopModule:new() npcHandler:addModule(shopModule) shopModule:addBuyableItem({'scarf'}, 2661, 250, 'scarf') shopModule:addBuyableItem({'bronze amulet'}, 2172, 250, 200, 'bronze amulet') shopModule:addBuyableItem({'silver amulet'}, 2170, 250, 200, 'silver amulet') shopModule:addBuyableItem({'garlic necklace'}, 2199, 250, 150, 'garlic necklace') shopModule:addBuyableItem({'protection amulet'}, 2200, 250, 250, 'protection amulet') shopModule:addBuyableItem({'dragon necklace'}, 2201, 250,200, 'dragon necklace') shopModule:addBuyableItem({'strange talisman'}, 2161, 250,200, 'strange talisman') shopModule:addBuyableItem({'crystal necklace'}, 2125, 250, 'crystal necklace') shopModule:addBuyableItem({'amulet of loss'}, 2173, 10000, 'amulet of loss') shopModule:addBuyableItem({'wedding ring'}, 2121, 990,'wedding ring') shopModule:addBuyableItem({'time ring'}, 2169, 2000,'time ring') shopModule:addBuyableItem({'sword ring'}, 2207, 500,'sword ring') shopModule:addBuyableItem({'stealth ring'}, 2165, 5000,'stealth ring') shopModule:addBuyableItem({'signet ring'}, 7697, 15000,'signet ring') shopModule:addBuyableItem({'ring of the sky'}, 2123, 48000,'ring of the sky') shopModule:addBuyableItem({'ring of healing'}, 2214, 2000,'ring of healing') shopModule:addBuyableItem({'power ring'}, 2166, 100,'power ring') shopModule:addBuyableItem({'might ring'}, 2164, 5000,'might ring') shopModule:addBuyableItem({'life ring'}, 2168, 900,'life ring') shopModule:addBuyableItem({'gold ring'}, 2179, 32000,'gold ring') shopModule:addBuyableItem({'energy ring'}, 2167, 2000,'energy ring') shopModule:addBuyableItem({'dwarven ring'}, 2213, 2000,'dwarven ring') shopModule:addBuyableItem({'death ring'}, 6300, 4000,'death ring') shopModule:addBuyableItem({'crystal ring'}, 2124, 1000,'crystal ring') shopModule:addBuyableItem({'club ring'}, 2209, 500,'club ring') shopModule:addBuyableItem({'axe ring'}, 2208, 500,'axe ring') shopModule:addBuyableItem({'wolf tooth chain'}, 2129, 400,'wolf tooth chain') shopModule:addBuyableItem({'beetle necklace'}, 11374, 6000,'beetle necklace') shopModule:addBuyableItem({'ancient amulet'}, 2142, 800,'ancient amulet') shopModule:addBuyableItem({'demonbone amulet'}, 2136, 128000,'demonbone amulet') shopModule:addBuyableItem({'golden amulet'}, 2130, 6600,'golden amulet') shopModule:addBuyableItem({'scarab amulet'}, 2135, 800,'scarab amulet') shopModule:addBuyableItem({'star amulet'}, 2131, 2000,'star amulet') shopModule:addBuyableItem({'platinum amulet'}, 2171, 10000,'platinum amulet') shopModule:addBuyableItem({'elven amulet'}, 2198, 500, 50,'elven amulet') shopModule:addBuyableItem({'glacier amulet'}, 7888, 6000,'glacier amulet') shopModule:addBuyableItem({'leviathan/s amulet'}, 10220, 12000, 5,'leviathan/s amulet') shopModule:addBuyableItem({'lightning pendant'}, 7889, 6000,'lightning pendant') shopModule:addBuyableItem({'magma amulet'}, 7890, 6000, 200,'magma amulet') shopModule:addBuyableItem({'sacred tree amulet'}, 10219, 12000, 5,'sacred tree amulet') shopModule:addBuyableItem({'bonfire amulet'}, 10218, 12000, 5,'bonfire amulet') shopModule:addBuyableItem({'shockwave amulet'}, 10221, 12000, 5,'shockwave amulet') shopModule:addBuyableItem({'stone skin amulet'}, 2197, 5000, 5,'stone skin amulet') shopModule:addBuyableItem({'terra amulet'}, 7887, 6000, 200, 'terra amulet') npcHandler:addModule(FocusModule:new())
-
Erro Monstros não dão Respawn
Vocês por acaso já tentaram usar a função: function onSpawn(cid) Quem sabe também até possa atrasar o spawn do monstro em 100 milisegundos, tipo: addEvent (setCreatureName, 100, cid, NEWNAME, NEWDESC)
-
[PEDIDO] Script gerando efeito em cima de NPC
Ah... se fosse pra qualquer um ver, até daria pra fazer. Mas um efeito visível apenas para quem tem a storage? Essa é complicado. Vou comentar aqui pra acompanhar, porque se alguém conseguir, eu também quero. Creio eu que envolva o Client, já que é um recurso visual apenas pra você. Mas, posso estar falando bobagens. Espero que consiga.
-
Como alterar/Add uma nova font no Otserver ?
Em tempos remotos, consegui uma vez seguindo esse tutorial, usando o GIMP. https://otland.net/threads/otclient-font-creator.257389/
-
(Resolvido)[Ajuda] Recompensas
Que tal assim? Não tentei, hein. Estou no trabalho. kkkk local dias = 1 function onLogin(cid) -- Monday = Segunda -- Tuesday = Terça -- Wednesday = Quarta -- Thursday = Quinta -- Friday = Sexta -- Saturday = Sabado -- Sunday = Domingo DoubleXP = {"Friday", "Saturday", "Sunday", "Thursday"} storage = 2883123 storage_loot = 289991 items = { item_ID = 11505, stamina_potion = 11644, critical_stone = 11752, } qtdes = { qtde = 1, qtde_stone = 2, } if isInArray(DoubleXP, os.date("%A")) then if getStorageAccount(cid, storage_loot, 2) then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, "--[Double XP ]--\n --[Double Loot ]--\nHoje Estamos em evento Double XP e Loot aproveite!!") return doPlayerSendCancel(cid, "voce ja recebeu a skin box.") end setPlayerStorageValue(cid, storage_loot, 1) if getPlayerStorageValue(cid, storage_loot) == 1 then doPlayerSendTextMessage(cid,22,"Voce logou no periodo em que o Evento de Fim de Semana estava ativo, voce recebeu 1 Critical Stone, 1 Stamina Potion, 1 Dia Premium, Parabens") doPlayerAddItem(cid, items.item_ID, qtdes.qtde) doPlayerAddItem(cid, items.stamina_potion, qtdes.qtde) doPlayerAddItem(cid, items.critical_stone, qtdes.qtde_stone) doPlayerAddPremiumDays(cid, dias) setPlayerStorageValue(cid, storage_loot, 2) doPlayerSendMailByName(getCreatureName(cid), doCreateItemEx(items.item_ID, qtde), getPlayerTown(cid)) doSendMagicEffect(getThingPos(cid), effectChest) end setPlayerStorageValue(cid, storage, 1) doPlayerSetRate(cid, SKILL__LEVEL, 2.0) doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, "--[Double XP ]--\n --[Double Loot ]--\nHoje Estamos em evento Double XP e Loot aproveite!!") else doSendMagicEffect(getCreaturePosition(cid), 358) setPlayerStorageValue(cid, storage, 2) setPlayerStorageValue(cid, storage_loot, 3) end return true end function getStorageAccount(cid, key, value) local chars = {} local query = db.getResult("SELECT `id` FROM `players` WHERE `account_id` = '"..getPlayerAccountId(cid).."';") if query:getID() == -1 then return true end repeat local player = query:getDataString("id") table.insert(chars, player) until not query:next() query:free() for i = 1, #chars do local check = db.getResult("SELECT * FROM `player_storage` WHERE `player_id` = '"..chars[i].."' and `key` = '"..key.."' and `value` = '"..value.."';") if check:getID() == 0 then return true end end return false end
-
Quest ou Dungeon de 1 unico player
Pera, pera. Não entendi bem. Quando um jogador já estiver na área de missão, outro jogador AINDA poderia entrar, mas deverá ficar em outra localização dentro daquela mesma área? Como assim? Se o seu pedido fosse: "Se a área de Quest já estiver em uso por outro jogador, qualquer um que tentar entrar será impedido até o outro finalizar e liberar a área" seria mais fácil de fazer e compreender.
-
PROCURO SPRITER E SCRIPTER PARA COMEÇA UM PROJETO NOVO DE RPG!!
Aqui que era o espaço para você postar mais informações sobre o projeto. Aqui você venderia seu peixe e os interessados que entrariam em contato. A dica que lhe damos é reformular novamente seu tópico com todas as ideias que você tem em mente. Se forem realmente bacanas e valerem o esforço, tenho certeza que achará uma equipe. Mas precisa convencê-los.
-
Trade OFF - Shop Offline
@Azzus22 Não testei o script, porém, só o fato de vim aqui melhorar o script para quem precisa já merece elogios. Sobre sua dúvida, já pensou em olhar o script de criar itens do OTServ (o famoso /i )? Pelo menos parece um pouco com sua dúvida. Tipo assim: local ret = RETURNVALUE_NOERROR if(param == '') then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Esta faltando comandos.") return true end if(ret ~= RETURNVALUE_NOERROR) then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Não existe esse item") return true end Não testei, não sei se dará certo, mas...
-
(Resolvido)Pedido! Item Q Invoca Tal Monstro Para Ajuda O Play
Dentro do arquivo do XML monstro tem algo assim: <flag summonable="1"/>
-
onUseWeapon
Uma dúvida rápida. A função onUseWeapon somente reconhece as arma que estão na mão (CONST_SLOT_LEFT). Será que teria como eu fazer essa mesma função reconhecer uma arma que está no Slot de munição (CONST_SLOT_AMMO)? Mais ou menos tipo: if Alguma coisa then CONST_SLOT_LEFT else CONST_SLOT_AMMO end Minha ideia é fazer com que uma arma seja usada mesmo ela estando em outro slot do inventário que não seja a mão. E aí, tem como?
-
[OTClient] TibiaGun 1.0
@Soldarkness Clique aqui para fazer o download do cliente.
-
[PEDIDO] Tile para encher stamina
É porque o comando está por UniqueID. Sempre que tiver mais de 1 tile com o mesmo UniqueID, ele dá essas mensagens no console. Para resolver, deveria usar ActionID, algo mais ou menos assim: <movevent type="StepIn" actionid="23641" event="script" value="addstamina.lua"/> <movevent type="StepOut" actionid="23641" event="script" value="addstamina.lua"/>
-
[OTClient] TibiaGun 1.0
Veja o gráfico (Clique para aumentar). No final haverá o que ainda preciso para deixar o servidor online. Algumas imagens In-Game: Clique para aumentar a imagem.