• 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!
  • 2026 staff recruitment is open! Check it out and consider applying!

Exp rate scroll

BugaS

Donżuan
Joined
Mar 12, 2009
Messages
1,219
Reaction score
9
Location
NYC
Jest ktoś zainteresowany napisaniem skryptu, który będzie działać na takiej zasadzie, że gracz używa tego scrolla i jego exp rate zmienia się x1,5 na 2h ?
 
e? ja mam skrypt na takiego ringa :D, np. podnosi exp rate o polowe na 20 min. Moge za free. :D
 
Donaj, ja nie chce ringa tylko scrolla, ktory znika.

Nawet jak stoi w temple to ma miec exp podwyzszony.

Ringi mi nie dziala (nie konczy sie czas)
 
Lol, w czym problem?

Zamiast Ringa Wstawiasz scroola i ustawiasz, ze ma 1 uzycie...

A wogole nie napisales, ile do ma dzialac...
 
Location :
data/actions/scripts/other/eexss

Code:
-- Credits: Slawkens and Edit By Shakaal
local config = {
	rate = 1.5, -- 1.5 = 1.5x faster than normal
	time = 120, -- in minutes
	storage = 20532
}

local function experienceEnd(cid)
	if isPlayer(cid) then
		doPlayerSetExperienceRate(cid, 1.0)
		setPlayerStorageValue(tid, config.storage, -1)
		doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "Your extra experience rate has passed.")
	end
end

function onUse(cid, item, fromPosition, itemEx, toPosition)
	local tid = itemEx.uid or cid
	if(not isPlayer(tid)) then
		return false
	end

	local status = getPlayerStorageValue(tid, config.storage)
	if(status ~= -1) then
		doPlayerSendTextMessage(tid, MESSAGE_INFO_DESCR, "Your extra experience rate is already activated!(Script by Shakaal) It will expire at: " .. os.date("%X", status))
		return true
	end

	doPlayerSendTextMessage(tid, MESSAGE_INFO_DESCR, "Your extra experience rate has been activated!(Script by Shakaal) It is now: " .. config.rate .. ".")
	doPlayerSetExperienceRate(tid, config.rate)
	setPlayerStorageValue(tid, config.storage, os.time() + config.time * 60 * 1000)
	doRemoveItem(item.uid, 1)
	addEvent(experienceEnd, config.time * 60 * 1000, tid)
	return true
end

Now Location :
data/actions/actions.xml

Code:
<action itemid="id scrolla" script="other/eexss.lua"/>
 
creaturescripts/scripts/scroll_login.lua
Code:
  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: " .. os.date("%X", getPlayerStorageValue(cid, storage)))
        else
            doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_RED, "You do not have any extra experience time.")
        end
        return true
end

actions/scripts/Scroll.lua

Code:
  local config = {
        rate = 2.0, -- 2x More Experience
        time = 60, -- Minutes of Exp Time
        storage = 20011
}

function onUse(cid, item, fromPosition, itemEx, toPosition)
        local tid = itemEx.uid or cid
        if(isPlayer(tid) ~= TRUE) then
                return false
        end
        if(getPlayerStorageValue(tid, config.storage) == 1) then
                doPlayerSendTextMessage(tid, MESSAGE_STATUS_CONSOLE_BLUE, "Your extra exp rate will expire at: " .. os.date("%X", getPlayerStorageValue(tid, config.storage)))
                return true
        end
        doPlayerSendTextMessage(tid, MESSAGE_STATUS_CONSOLE_ORANGE, "Your extra experience rate has been activated! It is now: " .. config.rate .. ".")
        doPlayerSetRate(tid, SKILL__LEVEL, config.rate)
        setPlayerStorageValue(tid, config.storage, os.time() + config.time * 60 * 1000)
        addEvent(endExpRate, config.time * 60 * 1000, tid)
        doRemoveItem(item.uid, 1)
        return true
end

local function endExpRate(tid)
        doPlayerSetRate(tid, SKILL__LEVEL, 1.0) --config.lua rate
        setPlayerStorageValue(tid, config.storage, -1)
        doPlayerSendTextMessage(tid, MESSAGE_STATUS_CONSOLE_RED, "Your extra experience time has ended.")
end

creaturescripts/scripts/login.lua
Code:
registerCreatureEvent(cid, "expRate")

creaturescripts/scripts/expRateCheck.lua
Code:
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: " .. os.date("%X", getPlayerStorageValue(tid, config.storage)).")
    else
        doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_RED, "You do not have any extra experience time.")
	setPlayerStorageValue(cid, storage, -1)
    end
    return true
end

Look this, and comment. Please
 
Last edited:
zaraz dam edit tylko znajde
Ok tutaj
Data/actions/scripts/expzwoj.lua
Kod:

function onUse(cid, item, frompos, item2, topos)
local exp = 900000
local pos = getPlayerPosition(cid)
doPlayerAddExp(cid,exp)
doSendMagicEffect(pos, CONST_ME_ENERGYAREA)
end

data/actions/actions.xml
Kod:
<action itemid="5958" script="expzwoj.lua" />

Moj Blad niedoczytalem Srr ale i tak go zostawie poszukam jeszcze moze bedzie
 
Back
Top