• 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!
  • New resources must be posted under Resources tab. A discussion thread will be created automatically, you can't open threads manually anymore.

Action Exp Ring Works with CLICK, With images !!

God Nixez

Member
Joined
Sep 20, 2009
Messages
410
Reaction score
17
The ring which is used is Death ring
Death_Ring.gif


First copy this 2 codes in your action.xml "usually Data>actions"
Code:
<action itemid="[COLOR="lime"]6300[/COLOR]" event="script" value="YOURSCRIPTNAME.lua"/>
Code:
<action itemid="[COLOR="lime"]6301[/COLOR]" event="script" value="YOURSECONDSCRIPTNAME.lua"/>

Green is the item id choose whatever you want

I would like you to notice first script.lua must be different than the second script.lua

Now when you finish adding the codes above add this 2 scripts each one in different.lua

Code:
local config = { 
    rate = 1.5,
} 

function onUse(cid, item, fromPosition, itemEx, toPosition)
if doPlayerRemoveMoney(cid, [COLOR="red"]20000[/COLOR]) then
itemEx=itemid == [COLOR="lime"]6300[/COLOR]
doCreatureSay(cid, "Your extra experience rate has been activated! It is now: " .. config.rate .. "x doubled your former experience rate.", TALKTYPE_ORANGE_1, true, cid) 
            doPlayerSetExperienceRate(cid, config.rate) 
            doTransformItem(item.uid,[COLOR="lime"]6301[/COLOR])
else
				doCreatureSay(cid, "You don't have enough money to Start Other exp condition !", TALKTYPE_ORANGE_1, true, cid)
end
			return true
		end

Red is the cash in gold which will be taken when u use the item
Green is the item id choose what you want

Code:
function onUse(cid, item, slot) 
    if(item.itemid == [COLOR="lime"]6301[/COLOR]) then 
        doPlayerSetExperienceRate(cid, 1.0) 
           doCreatureSay(cid, "Your extra experience rate has ended.", 

TALKTYPE_ORANGE_1,true,cid) 
            doTransformItem(item.uid,[COLOR="lime"]6300[/COLOR]) 
    end 
end
Green is the item id's

Now items.xml part
add those codes
Code:
<item id="[COLOR="lime"]6300[/COLOR]" article="a" name="[COLOR="orange"]disabled exp ring[/COLOR]">
		<attribute key="weight" value="80" />
		<attribute key="slotType" value="ring" />
		<attribute key="transformEquipTo" value="6301" />
		<attribute key="stopduration" value="1" />
		<attribute key="showduration" value="0" />
	</item>
	<item id="[COLOR="lime"]6301[/COLOR]" article="a" name="[COLOR="orange"]enabled exp ring[/COLOR]">
		<attribute key="weight" value="80" />
		<attribute key="slotType" value="ring" />
		<attribute key="decayTo" value="0" />
		<attribute key="transformDeEquipTo" value="6300" />
		<attribute key="duration" value="480" />
		<attribute key="armor" value="1" />
		<attribute key="showduration" value="0" />
	</item>

Orange is the item name you can change it for what ever you want
Green is the item id you can choose what u want

Now images
If you have money and click on it this happends
25que6f.png


When you click other time to disable it
5mwwf6.png


if you click while not having the cash u set up
308bh35.png


Well that's all
Credits goes to me ;p

id's 6300 and 6301 can be changed for what you want

I guess that's the first time i post here on otland, Don't flame please.
patch v1
http://otland.net/f81/exp-ring-works-click-images-115311/index3.html#post1161872
 
Last edited:
Use CODE tags instead of PHP so you can show the red stuff, else the code wont be clean.
Good work.
 
Use CODE tags instead of PHP so you can show the red stuff, else the code wont be clean.
Good work.

First thnx
Second okay i used CODE tags thanks ;>
17 views only one?
c'mon guys ;p
first time here

some posts please
omg no replies why xD
 
Last edited by a moderator:
Well i didnot personally test but i guess it will work ;p
works on mine 0.4.1

give it a shoot if it works post here ;p it will i doubt :)
 
What kind of bug did u fix?private msg me ;p
well it's working for me 100 % no bugs maybe other tfs would be thankful if u post it here ;p
 
Code:
<attribute key="duration" value="14400" />
14400 is the time you want
Code:
<attribute key="decayTo" value="0" />
0 means it will get lost
after the time you set it will be removed
add this also
Code:
<attribute key="showduration" value="1" />
That's if u wanna make it decay
else the script u can use the ring and use it again to disable when u enable it again it takes 10 crystal coins or what you set
p.s if you logout exp goes normally :p
 
can I make it so it uses like for ex christmas tokens instead of money ? instead of DoRemoveMoney or what it is to like doRemoveItemiD -> IDD. yeah u understand
 
Back
Top