- Joined
- Aug 5, 2008
- Messages
- 1,581
- Reaction score
- 80
Hello! Thank you JDB who created this wonderful script, but i have a problem with it. Also players on my server have started to complain.
Here is the script: actions.xml
scroll.lua
and the creaturescript: creaturescript.xml
login.lua
and the script: ExtraExpRate.lua
1. Players have complained that if they die, they loose the exprate bonus.
2. If players relog their character they loose the extra experience bonus.
3. Is it possible to make some kinda lifering function? Meaning; They have a ring they wear, with 300minutes/5 hours and when it wears off the experience bonus is lost?
4. Is it possible the amulet to save the extra experience rate even if they logout or relog their character?
Once again, someone who is nice enough to have a look at this editing my scripts. I am willing to give 5 euros to, if you have paypal.
Thanks in advance!
Here is the script: actions.xml
Lua:
<action itemid="2196" event="script" value="scroll.lua"/>
scroll.lua
Lua:
local config = {
rate = 1.6, -- 4x More Experience
time = 5, -- Hours of Exp Time
storage = 20011
}
function onUse(cid, item, fromPosition, itemEx, toPosition)
if(getPlayerStorageValue(cid, config.storage) == -1) then
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, "Your extra experience rate is now: " .. config.rate .. ". It will last for ".. config.time .." hours.")
doPlayerSetRate(cid, SKILL__LEVEL, config.rate)
setPlayerStorageValue(cid, config.storage, os.time() + config.time * 3600 * 1000)
addEvent(endExpRate, config.time * 3600 * 1000, cid)
doRemoveItem(item.uid, 1)
else
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "You still have extra experience time left.")
end
return true
end
local function endExpRate(cid)
doPlayerSetRate(cid, SKILL__LEVEL, 6.0) --config.lua rate
setPlayerStorageValue(cid, config.storage, -1)
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_RED, "Your extra experience time has ended.")
end
and the creaturescript: creaturescript.xml
Lua:
<event type="login" name="expRate" event="script" value="extraExpRate.lua"/>
login.lua
Lua:
registerCreatureEvent(cid, "expRate")
and the script: ExtraExpRate.lua
Lua:
local storage = 20011
function onLogin(cid)
if(getPlayerStorageValue(cid, storage) == 1) then
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Your extra exp rate will expire at:")
else
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_RED, "You do not have any extra experience time.")
setPlayerStorageValue(cid, storage, -1)
end
return true
end
1. Players have complained that if they die, they loose the exprate bonus.
2. If players relog their character they loose the extra experience bonus.
3. Is it possible to make some kinda lifering function? Meaning; They have a ring they wear, with 300minutes/5 hours and when it wears off the experience bonus is lost?
4. Is it possible the amulet to save the extra experience rate even if they logout or relog their character?
Once again, someone who is nice enough to have a look at this editing my scripts. I am willing to give 5 euros to, if you have paypal.
Thanks in advance!