D
Deleted member 49793
Guest
Basicly like title, a scroll you use (disapears after) making your character gain 20% more experience forever or a really high amount xD... 9999999999999 hours ^^
<?xml version="1.0" encoding="UTF-8"?>
<mod name="expscroll" author="C" enabled="yes">
<config name="settings">
<![CDATA[
extraExp = 1.20
storage = 4567
]]>
</config>
<event type="login" name="scroll" event="script">
<![CDATA[
domodlib('settings')
function onLogin(cid)
if getCreatureStorage(cid, storage) > 0 then
doPlayerSetExperienceRate(cid, extraExp)
end
return true
end
]]>
</event>
<action itemid="1981" event="script">
<![CDATA[
function onUse(cid, item, fromPosition, itemEx, toPosition)
domodlib('settings')
doRemoveItem(item.uid, 1)
doCreatureSetStorage(cid, storage, 1)
doPlayerSetExperienceRate(cid, extraExp)
return true
end
]]>
</action>
</mod>
here, +20% more exp
/mods/expscroll.xml
remember to change to the itemid you wantXML:<?xml version="1.0" encoding="UTF-8"?> <mod name="expscroll" author="C" enabled="yes"> <config name="settings"> <=!=[=C=D=A=T=A=[ extraExp = 1.20 storage = 4567 ]=]=> </config> <event type="login" name="scroll" event="script"> <=!=[=C=D=A=T=A=[ domodlib('settings') function onLogin(cid) if getCreatureStorage(cid, storage) > 0 then doPlayerSetExperienceRate(cid, extraExp) end return true end ]=]=> </event> <action itemid="1981" event="script"> <=!=[=C=D=A=T=A=[ function onUse(cid, item, fromPosition, itemEx, toPosition) domodlib('settings') doRemoveItem(item.uid, 1) doCreatureSetStorage(cid, storage, 1) doPlayerSetExperienceRate(cid, extraExp) return true end ]=]=> </action> </mod>
Thank you cyko
Thank you cyko
time is absolute i think ;xI want the extra exp lasts only 24 hours. can?. nothing else lasts 24 hours
<?xml version="1.0" encoding="UTF-8"?>
<mod name="expscroll" author="C" enabled="yes">
<config name="settings">
<![CDATA[
extraExp = 0.20 --extra exp rate percent
storage = 4567
time = 24 * 60 * 60 --how many seconds(current is 24hours)
]]>
</config>
<event type="login" name="scroll" event="script">
<![CDATA[
domodlib('settings')
function onLogin(cid)
if exhaustion.check(cid, storage) then
doPlayerSetExperienceRate(cid, 1+extraExp)
end
return true
end
]]>
</event>
<action itemid="1981" event="script">
<![CDATA[
function onUse(cid, item, fromPosition, itemEx, toPosition)
domodlib('settings')
doRemoveItem(item.uid, 1)
exhaustion.set(cid, storage, time)
doCreatureSetStorage(cid, storage, 1)
doPlayerSetExperienceRate(cid, 1+extraExp)
return true
end
]]>
</action>
</mod>
can you make it so you get +15kk exp if you use it? (0-100) and it works only once
local exp = xxxxxxxxx ---- Exp
function onUse(cid, item, fromPosition, itemEx, toPosition)
doPlayerAddExp(cid,exp)
doRemoveItem(item.uid, 1)
doPlayerSendTextMessage(cid,MESSAGE_INFO_DESCR, "You have gained " .. exp .. " experience!")
return true
end
local t = {
exp = 15000000,
storage = 16384,
levelmax = 100
}
function onUse(cid, item, fromPosition, itemEx, toPosition)
if getCreatureStorage(cid, t.storage) == -1 then
if getPlayerLevel(cid) <= t.levelmax then
doPlayerAddExp(cid, t.exp)
doSendAnimatedText(getThingPos(cid), t.exp, 215)
doRemoveItem(item.uid)
doCreatureSay(cid, 'You have gained ' .. t.exp .. ' experience!', TALKTYPE_ORANGE_1, false, cid)
doCreatureSetStorage(cid, t.storage, 1)
else
doCreatureSay(cid, 'Your level is too high.', TALKTYPE_ORANGE_1, false, cid)
end
else
doCreatureSay(cid, 'This item can only be used once.', TALKTYPE_ORANGE_1, false, cid)
end
return true
end
fro nice request^^ but waht id was it on that last script by cykotitan and santigggg