• There is NO official Otland's Discord server and NO official Otland's server list. The Otland's Staff does not manage any Discord server or server list. Moderators or administrator of any Discord server or server lists have NO connection to the Otland's Staff. Do not get scammed!

Lua [HELP]Boost PVP rate x2

Yusuf El-Shora

Herizona-Ots
Joined
Jul 19, 2015
Messages
170
Reaction score
6
Location
Lala-Land
Hello Otlanders!

I'm using tfs 0.4 for client 8.6.
I got an double exp rate script, which boost the exp gained from killing monsters, and this is it:


Lua:
local otswe = {
storage = 5995, -- Put Unused Storage Here
time_end = 120*60*1000, -- Edit Time Here
end_text = "The Powers Of The Gods Has Expired.", -- Editable Text
cancel_text = "Sorry, But You Already Effected By The Gods.", -- Editable Text
text_onuse = "2X", -- Editable Magic Text Max 8 letters
exp_rate = 2.0, -- New Exprience Rate
old_rate = 1.0 -- Old Exprience Rate
}

function onUse(cid, item, frompos, item2, topos)
if getPlayerStorageValue(cid,otswe.storage) == 1 then
doPlayerSendTextMessage(cid,MESSAGE_STATUS_CONSOLE_ORANGE, otswe.cancel_text)
return false
end
if isPlayer(cid) then
doCreatureSay(cid, "You Have Gained Powers from The Gods! You Will Gain Twice Faster Experience For 2 Hours! ", TALKTYPE_ORANGE_1)
doSendAnimatedText(getCreaturePosition(cid), otswe.text_onuse ,TEXTCOLOR_RED)
doSendMagicEffect(getCreaturePosition(cid), math.random(28, 30))
doPlayerSetRate(cid, SKILL__LEVEL, 2)
addEvent(otswe_exp_scroll,otswe.time_end,cid)
setPlayerStorageValue(cid, otswe.storage, 1)
doRemoveItem(item.uid, 1)
end
return true
end

function otswe_exp_scroll(rate, cid)
if isPlayer(rate) then
doPlayerSetRate(rate, SKILL__LEVEL, otswe.old_rate)
doPlayerSendTextMessage(rate,MESSAGE_STATUS_CONSOLE_RED, otswe.end_text)
setPlayerStorageValue(rate, otswe.storage, 0)
end
end


But as the title said I want the players to have double rate for all earned Exp including ( monsters / players"PVP" ).

Or if someone able to make the double exp only for killing players (PVP), I will appreciate that alot :)

BUMP

BUMP !!
no one?!

BUMP
 
Last edited by a moderator:
Hello Otlanders!

I'm using tfs 0.4 for client 8.6.
I got an double exp rate script, which boost the exp gained from killing monsters, and this is it:


Lua:
local otswe = {
storage = 5995, -- Put Unused Storage Here
time_end = 120*60*1000, -- Edit Time Here
end_text = "The Powers Of The Gods Has Expired.", -- Editable Text
cancel_text = "Sorry, But You Already Effected By The Gods.", -- Editable Text
text_onuse = "2X", -- Editable Magic Text Max 8 letters
exp_rate = 2.0, -- New Exprience Rate
old_rate = 1.0 -- Old Exprience Rate
}

function onUse(cid, item, frompos, item2, topos)
if getPlayerStorageValue(cid,otswe.storage) == 1 then
doPlayerSendTextMessage(cid,MESSAGE_STATUS_CONSOLE_ORANGE, otswe.cancel_text)
return false
end
if isPlayer(cid) then
doCreatureSay(cid, "You Have Gained Powers from The Gods! You Will Gain Twice Faster Experience For 2 Hours! ", TALKTYPE_ORANGE_1)
doSendAnimatedText(getCreaturePosition(cid), otswe.text_onuse ,TEXTCOLOR_RED)
doSendMagicEffect(getCreaturePosition(cid), math.random(28, 30))
doPlayerSetRate(cid, SKILL__LEVEL, 2)
addEvent(otswe_exp_scroll,otswe.time_end,cid)
setPlayerStorageValue(cid, otswe.storage, 1)
doRemoveItem(item.uid, 1)
end
return true
end

function otswe_exp_scroll(rate, cid)
if isPlayer(rate) then
doPlayerSetRate(rate, SKILL__LEVEL, otswe.old_rate)
doPlayerSendTextMessage(rate,MESSAGE_STATUS_CONSOLE_RED, otswe.end_text)
setPlayerStorageValue(rate, otswe.storage, 0)
end
end


But as the title said I want the players to have double rate for all earned Exp including ( monsters / players"PVP" ).

Or if someone able to make the double exp only for killing players (PVP), I will appreciate that alot :)

BUMP

BUMP !!
no one?!

BUMP

AFAIK there is no way to change the multiplier for PvP exp.
All you have is the variable in config.lua (for all players).

So source edit (if you had been using 1.x you could have used events to add a multiplier).
 
Back
Top