Postado Fevereiro 28, 2022 3 anos .Qual servidor ou website você utiliza como base? Servidor styller tfs 1.5 Qual o motivo deste tópico? Reescrever script de EXP POR HIT de 0.4 para tfs 1.x Está surgindo algum erro? Se sim coloque-o aqui. Citar A versão do script é para TFS 0.4 gostaria de auxilio para fazer funcionar no tfs 1.x. Você tem o código disponível? Se tiver publique-o aqui: -- CONFIGURAÇÕES DE EXPERIENCIA -- useStages = true -- Usar sistema de Stages , true/false premiumMultipliqueExp = 1.1 -- Players Premiums terão exp multiplicada, caso não querer deixe 1. rateExp = 500 -- Exp caso não for usar stages. --TABELA DOUBLE EXP. PARA EVENTO --local stages = { -- ["DELEVEL-ATELEVEL"] = EXP, (OBS: NUNCA REPETIR O MSM NUMERO, SEMPRE COLOCAR UM A MAIS.) --["1-23"] = 100, --["24-30"] = 50, --["31-44"] = 36, --["45-150"] = 20, --["151-220"] = 16, --["221-240"] = 12, --["241-260"] = 8, --["261-290"] = 4, --["291-370"] = 2, --["371-500"] = 1.8, --["501-2000"] = 1.2, --} --TABELA ORIGINAL, VOLTAR APÓS DOUBLE EXP. local stages = { -- ["DELEVEL-ATELEVEL"] = EXP, (OBS: NUNCA REPETIR O MSM NUMERO, SEMPRE COLOCAR UM A MAIS.) ["1-23"] = 100, ["24-30"] = 25, ["31-44"] = 18, ["45-150"] = 10, ["151-220"] = 8, ["221-240"] = 6, ["241-260"] = 4, ["261-290"] = 2, ["291-370"] = 1, ["371-500"] = 0.9, ["501-2000"] = 0.6, } ultimateExp = 0.1 -- exp que vai usar caso o level do player não tiver mais na tabela . -- CONFIGURAÇÕES DA PARTY partyPorcent = 1 -- Quantos Porcento da exp vai para os membros da party levelBlockParty = 40 -- 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. [12673] = 1.5, } -- 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) and canUseSharedExperience(_cid) and isPartySharedExperienceActive(_cid) then local partyMembers = getPartyMembers(getPartyLeader(_cid)) local sorc,druid,paladin,knight = 0,0,0,0 for i = 1, #partyMembers do if isSorcerer(partyMembers[i]) then sorc = 1 else if isDruid (partyMembers[i]) then druid = 1 else if isPaladin (partyMembers[i]) then paladin = 1 else if isKnight (partyMembers[i]) then knight = 1 end end end end end local soma = knight + druid + sorc + paladin if (soma == 1) then partyExpMultiplier = 0.1 else if (soma == 2) then partyExpMultiplier = 0.8 else if (soma == 3) then partyExpMultiplier = 0.9 else if (soma == 4) then partyExpMultiplier = 1.1 end end end end local partyMembers, expParty = getPartyMembers(getPartyLeader(_cid)), expgain / 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 expgain = math.ceil(expgain * partyExpMultiplier) expParty = math.ceil(expgain * partyPorcent) expmember = math.ceil(expParty) for _, member in pairs(partyMembers) do if member ~= _cid then doPlayerSendTextMessage(member, 12, "You received "..expmember.." party exp.") doPlayerAddExp(member, expmember) end end doPlayerSendTextMessage(_cid, 12, "You gain "..expgain.." exp.") 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 Você tem alguma imagem que possa auxiliar no problema? Se sim, coloque-a aqui.
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.