• 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!

Exp Ring With Server Stage

Joined
Sep 29, 2009
Messages
224
Reaction score
0
I Need One Exp Ring, This Give Double Exp. My Server Is Exp Stages.
The Ring Duration 30min And Later Broken.

Thx, Repp++
 
Here's the function, the script won't be to hard to make. :peace:

Lua:
doPlayerSetRate(cid, SKILL__LEVEL, getExperienceStage(getPlayerLevel(cid) * 2))
 
Not gonna work.. but its a start of something lol

Code:
function onEquipItem(cid, item)
	if(item.itemid == xxxx) then
        doPlayerSetRate(cid, SKILL__LEVEL, getExperienceStage(getPlayerLevel(cid) * 2))
	end
	return true
end
 
Put this in movements.xml:

Code:
    <movevent type="Equip" itemid="XXXX" slot="ring" event="script" value="script.lua"/>
    <movevent type="DeEquip" itemid="XXXX" slot="ring" event="script" value="script.lua"/>

Add the script on /data/movements/scripts, name it script.lua:

PHP:
function onDeEquipItem(cid, item)
	if(item.itemid == xxxx) then
		doPlayerSetRate(cid, SKILL__LEVEL, getExperienceStage(getPlayerLevel(cid)))
	end
end

function onEquipItem(cid, item)

	if(item.itemid == xxxx) then
		doPlayerSetRate(cid, SKILL__LEVEL, getExperienceStage(getPlayerLevel(cid) * 2))
	end
end

Also; tips:
  • For the next time, use [this]
  • Learn some scripting (at least lua).
 
at movement.xml and it should be work


Code:
function onDeEquipItem(cid, item)
    if(item.itemid == 1111) then
        doPlayerSetRate(cid, SKILL__LEVEL, getExperienceStage(getPlayerLevel(cid)))
    end
end

function onEquipItem(cid, item)

    if(item.itemid == 1111) then
        doPlayerSetRate(cid, SKILL__LEVEL, getExperienceStage(getPlayerLevel(cid) * 2))
    end
end
 
at movement.xml and it should be work


Code:
function onDeEquipItem(cid, item)
    if(item.itemid == 1111) then
        doPlayerSetRate(cid, SKILL__LEVEL, getExperienceStage(getPlayerLevel(cid)))
    end
end

function onEquipItem(cid, item)

    if(item.itemid == 1111) then
        doPlayerSetRate(cid, SKILL__LEVEL, getExperienceStage(getPlayerLevel(cid) * 2))
    end
end
You just copy pasted my script, didn't you? [facepalm]
 
Not gonna work.. but its a start of something lol

Code:
function onEquipItem(cid, item)
	if(item.itemid == xxxx) then
        doPlayerSetRate(cid, SKILL__LEVEL, getExperienceStage(getPlayerLevel(cid) * 2))
	end
	return true
end

lolwut? He was just stating the function, not giving any script :confused:

at movement.xml and it should be work


Code:
function onDeEquipItem(cid, item)
    if(item.itemid == 1111) then
        doPlayerSetRate(cid, SKILL__LEVEL, getExperienceStage(getPlayerLevel(cid)))
    end
end

function onEquipItem(cid, item)

    if(item.itemid == 1111) then
        doPlayerSetRate(cid, SKILL__LEVEL, getExperienceStage(getPlayerLevel(cid) * 2))
    end
end

lolwut? Copy paste much? :confused:

@Topic:

First go to /data/items/items.xml and find the ring you want to use, example:

PHP:
<item id="2209" article="a" name="club ring">
		<attribute key="weight" value="90"/>
		<attribute key="slotType" value="ring"/>
		<attribute key="transformEquipTo" value="2212"/>
		<attribute key="stopduration" value="1"/>
		<attribute key="showduration" value="1"/>
	</item>

If you're going to use that one, change it to something like:

PHP:
<item id="2209" article="a" name="exp ring">
		<attribute key="weight" value="90"/>
		<attribute key="slotType" value="ring"/>
		<attribute key="transformEquipTo" value="2212"/>
		<attribute key="stopduration" value="1"/>
		<attribute key="showduration" value="1"/>
	</item>

And look up for:

PHP:
	<item id="2212" article="a" name="club ring">
		<attribute key="weight" value="90"/>
		<attribute key="slotType" value="ring"/>
		<attribute key="decayTo" value="0"/>
		<attribute key="transformDeEquipTo" value="2209"/>
		<attribute key="skillClub" value="4"/>
		<attribute key="duration" value="1800"/>
		<attribute key="showduration" value="1"/>
	</item>

And change it to:

PHP:
<item id="2212" article="a" name="exp ring">
		<attribute key="weight" value="90"/>
		<attribute key="slotType" value="ring"/>
		<attribute key="decayTo" value="0"/>
		<attribute key="transformDeEquipTo" value="2209"/>
		<attribute key="duration" value="1800"/>
		<attribute key="showduration" value="1"/>
	</item>

If you did that now you have a ring called "exp ring" (instead of club ring) which lasts 30 minutes and the IDs are 2209 and 2212.

Now just do what Santy said in this post and use those IDs (or if you chose others from items.xml, use those).

Good luck, but you should really follow the suggestion about the translator! :rolleyes:
 
Back
Top