tem sim só ir em
config.lua
procurar por
experienceStages = false
e deixa assim
experienceStages = true
depois só ir em
data\XML\stages.xml
e editar a o gosto
Por rodrigoorgirdor, 29 de out. de 2012 em Tópicos Sem Resposta
info
Grupo: Conde
Registrado: 03/01/12
Posts: 884
Reputação: +233
Char no Tibia: Segredo

tem sim só ir em
config.lua
procurar por
experienceStages = false
e deixa assim
experienceStages = true
depois só ir em
data\XML\stages.xml
e editar a o gosto
info
Grupo: Príncipe
Registrado: 19/08/10
Posts: 4k
Reputação: +1.1k
Gênero: Masculino

q eu saiba isso n vai funcionar em notle... ;x a exp eh calculada diretamente no script de onDeath dos pokes.. duvido muito q stage vai mudar algu '--'
info
Grupo: Conde
Registrado: 25/04/12
Posts: 752
Reputação: +125
Gênero: Masculino

Slicer, no meu server ta com stage '='
@Sclier, tentei editar direto no arquivo creaturescript/scripts/pokeexp.lua
e da esse erro...:
[29/10/2012 21:27:03] [Error - CreatureScript Interface][29/10/2012 21:27:03] data/creaturescripts/scripts/pokeexp.lua:onDeath
[29/10/2012 21:27:03] Description:
[29/10/2012 21:27:03] (internalGetPlayerInfo) Player not found when requesting player info #3
[29/10/2012 21:27:03] [Error - CreatureScript Interface]
[29/10/2012 21:27:03] data/creaturescripts/scripts/pokeexp.lua:onDeath
[29/10/2012 21:27:03] Description:
[29/10/2012 21:27:03] data/creaturescripts/scripts/pokeexp.lua:12: attempt to compare number with boolean
[29/10/2012 21:27:03] stack traceback:
[29/10/2012 21:27:03] data/creaturescripts/scripts/pokeexp.lua:12: in function 'giveExpToPlayer'
[29/10/2012 21:27:03] data/creaturescripts/scripts/pokeexp.lua:123: in function <data/creaturescripts/scripts/pokeexp.lua:64>
function e a tentativa
local function giveExpToPlayer(pk, expTotal, givenexp, expstring) --alterado v2.7-- playerAddExp(pk, expTotal)
if getPlayerLevel(cid) >= 1 and getPlayerLevel(cid) <= 19 then
playerAddExp(pk, expTotal)
elseif getPlayerLevel(cid) >= 20 then
playerAddExp(pk, (expTotal) * 0.80)
end
Editado Outubro 29 por GOD Gniu
info
Grupo: Príncipe
Registrado: 19/08/10
Posts: 4k
Reputação: +1.1k
Gênero: Masculino

percebeu q ta vindo como parametro 'pk' e n 'cid'? ;x
info
Grupo: Conde
Registrado: 25/04/12
Posts: 752
Reputação: +125
Gênero: Masculino

God, coloca o stages true no config.lua e faz assim
Troca o que tem no data/xml/stages.lua
por isso
<?xml version="1.0" encoding="UTF-8"?>
<stages>
<config enabled="1"/>
<world id="0" multiplier="1">
<stage minlevel="1" maxlevel="50" multiplier="100"/>
<stage minlevel="51" maxlevel="80" multiplier="50"/>
<stage minlevel="81" maxlevel="120" multiplier="35"/>
<stage minlevel="121" maxlevel="200" multiplier="20"/>
<stage minlevel="201" maxlevel="250" multiplier="15"/>
<stage minlevel="251" maxlevel="300" multiplier="10"/>
<stage minlevel="301" maxlevel="350" multiplier="5"/>
<stage minlevel="351" maxlevel="400" multiplier="3"/>
<stage minlevel="401" multiplier="2"/>
</world>
</stages>
Se é stages que voce quer isso vai funcionar ![]()
msmo trocando o parametro ele ñ funciona..
[29/10/2012 21:39:29] [Error - CreatureScript Interface]
[29/10/2012 21:39:29] data/creaturescripts/scripts/pokeexp.lua:onDeath
[29/10/2012 21:39:29] Description:
[29/10/2012 21:39:29] (internalGetPlayerInfo) Player not found when requesting player info #3
[29/10/2012 21:39:29] [Error - CreatureScript Interface]
[29/10/2012 21:39:29] data/creaturescripts/scripts/pokeexp.lua:onDeath
[29/10/2012 21:39:29] Description:
[29/10/2012 21:39:29] data/creaturescripts/scripts/pokeexp.lua:12: attempt to compare number with boolean
[29/10/2012 21:39:29] stack traceback:
[29/10/2012 21:39:29] data/creaturescripts/scripts/pokeexp.lua:12: in function 'giveExpToPlayer'
[29/10/2012 21:39:29] data/creaturescripts/scripts/pokeexp.lua:116: in function <data/creaturescripts/scripts/pokeexp.lua:57>
testado com player lvl 8
esperança eh a ultima q morre... (testando stages.xml)...
nada aconteceu mudando o stages.xml, e sim eu alterei no config.lua para usar stages...
Editado Outubro 29 por GOD Gniu
info
Grupo: Príncipe
Registrado: 19/08/10
Posts: 4k
Reputação: +1.1k
Gênero: Masculino

como exatamente tu troco o parametro? ;x
info
Grupo: Conde
Registrado: 25/04/12
Posts: 752
Reputação: +125
Gênero: Masculino

LOL mano
, tu reinicio o server pra testar? aqui funciona, estranho.....
soh alterei o pk pelo cid...
Slicer como eu uso essa conta...
playerAddExp(pk, math.floor(getPlayerStorageValue(pk, 44405) * expPokes * getDamageMapPercent(pk, cid)))
nunca usei esse math.floor...
como uso uma storage pra divisão com esse math.floor, igual o exemplo de cima?
Editado Outubro 29 por GOD Gniu
info
Grupo: Príncipe
Registrado: 19/08/10
Posts: 4k
Reputação: +1.1k
Gênero: Masculino

tu deixou assim?
local function giveExpToPlayer(pk, expTotal, givenexp, expstring) --alterado v2.7 -- playerAddExp(pk, expTotal) if getPlayerLevel(pk) >= 1 and getPlayerLevel(pk) <= 19 then playerAddExp(pk, expTotal) elseif getPlayerLevel(pk) >= 20 then playerAddExp(pk, (expTotal) * 0.80) end
e o math.floor arredonda um valor para menos, exemplo..
7.8548741
ele arredonda para 7...
deixei assim:
local function giveExpToPlayer(pk, expTotal, givenexp, expstring) --alterado v2.7
-- playerAddExp(pk, expTotal)
if getPlayerLevel(pk) >= 1 and getPlayerLevel(pk) <= 19 then
playerAddExp(pk, expTotal)
elseif getPlayerLevel(pk) >= 20 then
playerAddExp(pk, (expTotal) * 0.80)
end
assim:
local function giveExpToPlayer(pk, expTotal, givenexp, expstring) --alterado v2.7-- playerAddExp(pk, expTotal)
if getPlayerLevel(cid) >= 1 and getPlayerLevel(cid) <= 19 then
playerAddExp(pk, expTotal)
elseif getPlayerLevel(cid) >= 20 then
playerAddExp(pk, (expTotal) * 0.80)
end
e assim:
local function giveExpToPlayer(pk, expTotal, givenexp, expstring) --alterado v2.7
-- playerAddExp(pk, expTotal)
if getPlayerLevel(cid) >= 1 and getPlayerLevel(cid) <= 19 then
playerAddExp(cid, expTotal)
elseif getPlayerLevel(cid) >= 20 then
playerAddExp(cid, (expTotal) * 0.80)
end
e nenhum funciono..
Editado Outubro 29 por GOD Gniu
info
Grupo: Príncipe
Registrado: 19/08/10
Posts: 4k
Reputação: +1.1k
Gênero: Masculino

LOL o 1* era pra ter funcionando ;x posta o script todo pra eu ver...
em [ spoiler] script [ /spoiler] plz..
local balls = {11826, 11828, 11829, 11831, 11832, 11834, 11835, 11837,11737, 11739, 11740, 11742, 11743, 11745, 11746, 11748}
local function playerAddExp(cid, exp)
doPlayerAddExp(cid, exp)
doSendAnimatedText(getThingPos(cid), exp, 215)
end
local function giveExpToPlayer(pk, expTotal, givenexp, expstring) --alterado v2.7
-- playerAddExp(pk, expTotal)
if getPlayerLevel(pk) >= 1 and getPlayerLevel(pk) <= 19 then
playerAddExp(pk, expTotal)
elseif getPlayerLevel(pk) >= 20 then
playerAddExp(pk, (expTotal) * 0.80)
end
local firstball = getPlayerSlotItem(pk, 8)
if not isInParty(pk) and firstball and getItemAttribute(firstball.uid, expstring) and getItemAttribute(firstball.uid, expstring) > 0 then
local percent = getItemAttribute(firstball.uid, expstring) <= 1 and getItemAttribute(firstball.uid, expstring) or 1
local gainexp = math.ceil(percent * givenexp)
doItemSetAttribute(firstball.uid, expstring, 0)
givePokemonExp(pk, firstball, expTotal) --alterado v2.7
elseif isInParty(pk) and firstball.uid ~= 0 then
givePokemonExp(pk, firstball, expTotal*3) --alterado v2.7
end
for b = 1, #balls do
local pokes = getItemsInContainerById(getPlayerSlotItem(pk, 3).uid, balls)
if #pokes >= 1 then
for _, uid in pairs (pokes) do
if not isInParty(pk) and getItemAttribute(uid, expstring) and getItemAttribute(uid, expstring) > 0 then
local percent = getItemAttribute(uid, expstring) <= 1 and getItemAttribute(uid, expstring) or 1
local gainexp = math.ceil(percent * givenexp)
doItemSetAttribute(uid, expstring, 0)
givePokemonExpInBp(pk, uid, gainexp, balls) --alterado v2.7
elseif isInParty(pk) and getItemAttribute(uid, expstring) and getItemAttribute(uid, expstring) > 0 then
givePokemonExpInBp(pk, uid, expTotal*3, balls)
end
end
end
end
end
function onDeath(cid, corpse, deathList)
--if not isCreature(cid) then return true end
if isSummon(cid) or not deathList or corpse.itemid == 0 or getCreatureName(cid) == "Evolution" then return true end
-------------Edited Golden Arena------------------------- --alterado v2.7 \/\/
if getPlayerStorageValue(cid, 22546) == 1 then
setGlobalStorageValue(22548, getGlobalStorageValue(22548)-1)
doItemSetAttribute(corpse.uid, "golden", 1)
end
if getPlayerStorageValue(cid, 22546) == 1 and getGlobalStorageValue(22548) <= 0 then
local wave = getGlobalStorageValue(22547)
for _, sid in ipairs(getPlayersOnline()) do
if isPlayer(sid) and getPlayerStorageValue(sid, 22545) == 1 then
if getGlobalStorageValue(22547) < #wavesGolden+1 then
doPlayerSendTextMessage(sid, 21, "Wave "..wave.." will begin in "..timeToWaves.."seconds!")
doPlayerSendTextMessage(sid, 28, "Wave "..wave.." will begin in "..timeToWaves.."seconds!")
addEvent(creaturesInGolden, 100, GoldenUpper, GoldenLower, false, true, true)
addEvent(doWave, timeToWaves*1000)
elseif getGlobalStorageValue(22547) == #wavesGolden+1 then
doPlayerSendTextMessage(sid, 20, "You have win the golden arena! Take your reward!")
doPlayerAddItem(sid, 2152, getPlayerStorageValue(sid, 22551)*2) --recompensa no final da golden!
setPlayerStorageValue(sid, 22545, -1)
doTeleportThing(sid, getClosestFreeTile(sid, posBackGolden), false)
setPlayerRecordWaves(sid)
end
end
end
if getGlobalStorageValue(22547) == #wavesGolden+1 then
endGoldenArena()
end
end
--------------------------------------------------- /\/\
local givenexp = getWildPokemonExp(cid)
local expstring = ""..cid.."expEx"
local killer = getItemAttribute(corpse.uid, "corpseowner")
if givenexp > 0 then
for a = 1, #deathList do
local pk = deathList[a]
if isCreature(pk) then
local list = getSpectators(getThingPosWithDebug(pk), 30, 30, false)
local expTotal = math.floor(playerExperienceRate * givenexp * getDamageMapPercent(pk, cid))
local party = getPartyMembers(pk)
if isInParty(pk) and getPlayerStorageValue(pk, 4875498) <= -1 then
expTotal = math.floor(expTotal/#party) --alterado v2.6.1
-- for i = 1, #party do
-- if isInArray(list, party) then
-- giveExpToPlayer(party, expTotal, givenexp, expstring)
-- end
-- end
for i = 1, #party do
if isInArray(list, party) and getDamageMapPercent(party, cid) > 0 then --alterado v2.8
giveExpToPlayer(party, expTotal, givenexp, expstring)
end
end
else
giveExpToPlayer(pk, expTotal, givenexp, expstring) --alterado v2.7
end
end
end
end
if isNpcSummon(cid) then
local master = getCreatureMaster(cid)
doSendMagicEffect(getThingPos(cid), getPlayerStorageValue(cid, 10000))
doCreatureSay(master, getPlayerStorageValue(cid, 10001), 1)
doRemoveCreature(cid)
return false
end
doItemSetAttribute(corpse.uid, "offense", getPlayerStorageValue(cid, 1011))
doItemSetAttribute(corpse.uid, "defense", getPlayerStorageValue(cid, 1012))
doItemSetAttribute(corpse.uid, "speed", getPlayerStorageValue(cid, 1013))
doItemSetAttribute(corpse.uid, "vitality", getPlayerStorageValue(cid, 1014))
doItemSetAttribute(corpse.uid, "spattack", getPlayerStorageValue(cid, 1015))
doItemSetAttribute(corpse.uid, "level", getLevel(cid))
doItemSetAttribute(corpse.uid, "gender", getPokemonGender(cid))
return true
end
info
Grupo: Artesão
Registrado: 28/09/12
Posts: 106
Reputação: +1
No pda, tem como reduzir a 25 % a experiencia ganha , quando se está em um determinado level ?
Explicando: Por exemplo: eu estou no level 74, mato um onix, ganho 1000 de experiencia.
quero saber se tem como configurar pra quando eu chegar no level 75 o onix dar 750 de experiencia.