組隊經驗
想問問各位高手每個圖組隊只有1經
但離隊後卻得到原有既經驗值
只哪個部份出錯了 經驗過高,過了組隊的上限,這樣就每人只能分得1經驗,印象中好似是這樣 vbnn20 發表於 2012-5-8 02:48 PM static/image/common/back.gif
經驗過高,過了組隊的上限,這樣就每人只能分得1經驗,印象中好似是這樣
可以如何修正呢@@? 夢想水滸 發表於 2012-5-8 03:03 PM static/image/common/back.gif
可以如何修正呢@@?
:49;忘記了,試試改低有問題地區怪物的經驗值吧,(很久以前聽過的,但忘了如何修正) 热血是降低经验值上限和玩家升级所需经验,不过可以再服务器的updateexp.lua里处理问题自己找找<<<脚本里面 updateexp.lua--UpdateExp
AdjustData("HP", -Damage, Target) --decrease target HP
if GetData("HP", Target) <= 0 then-- If it die, cancel the attack
DeactiveAttackEvent()
DeactiveAttackEvent(Target)
end
if IsTargetEnemy() == 1then -- if attacker is someone can recv gold and exp
AddMark(Target)
SetData("WakeUp", 1, Target)
EnemyLv = GetData("Lv", Target)
if GetData("HP", Target) <= 0 then -- if it die
Exp = GetData("ExpGain", Target) --find the bouns exp
TotalLv = 0
IncExp = 0
Teamlist = GetTeamMembers() -- get the member list
index, member = next(Teamlist, nil) -- get the first member
while member ~= nil do --while it has member
if GetData("Lv", member) - EnemyLv < 10 and GetData("HP", member) > 0 and GetSqDistance(member) < 10000 then
TotalLv = TotalLv + GetData("Lv", member)
IncExp = IncExp + 10
end
index, member = next(Teamlist, index) --get next member
end
if IncExp ~= 0 then
Exp = Exp * (90 + IncExp) / 100
end
index, member = next(Teamlist, nil) -- get the first member
if member == nil then -- no team member
if GetData("Lv") - EnemyLv < 10 then
AdjustData("Exp" , Exp)
end
else
while member ~= nil do --while it has member
if GetData("Lv", member) - EnemyLv < 10 and GetData("HP", member) > 0 and GetSqDistance(member) < 10000 then
ExpGain = Exp * GetData("Lv", member) / TotalLv
if ExpGain < 1then
ExpGain = 1
end
AdjustData("Exp",ExpGain , member) --increase EXP
end
index, member = next(Teamlist, index) --get next member
end
end
scriptName = GetEnemyScript(Target)
DropTreasure(Target)
RemoveEnemy(Target)
if scriptName ~= nil then
SetData("NPC", 0)
func = loadfile("script\\"..scriptName)
func()
end
end
end
tiggoiv 發表於 2012-5-8 05:02 PM static/image/common/back.gif
updateexp.lua
更改这档案有用吗? :18;我之前改过。。好像没什么用处:49; :49;很久之前我還以為經驗倍率是改這個,但是改了沒用 改了這個檔案就可以解決問題嗎~~
高手們我還有幾個腳本的問題不會處理
可以加我MSN嗎@@? tiggoiv 發表於 2012-5-8 05:02 PM static/image/common/back.gif
updateexp.lua
改好左架啦?