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

Solved Not working

70011983

Ners
Joined
Nov 21, 2011
Messages
354
Solutions
1
Reaction score
56
Location
Croatia
So here I came again at the forum,asking for a fix of 2 things:

~FIRST~
So,found the script about the "exp" ring somewhere ,well, I wanted it to be a item which ahs to be used,not a ring,so tried to "play" with the script:
Code:
local config = {
 
        rate            = 2.0,  -- 2.0 = 2x faster than normal.
 
}
        if getConfigValue("experienceStages") == "yes" then
           doPlayerSetExperienceRate(cid, getExperienceStage(getPlayerLevel(cid))*2)
        else
           doPlayerSetExperienceRate(cid, getConfigValue("rateExperience")*2)
        end
        doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "Your extra experience rate has 

been activated! It is now: " .. config.rate .. "x doubled your former experience rate.")
        doRemoveItem(item.uid, 1) 	
        return true
end

~SECOND~
Why this doesn't work?
Code:
    <item id="2122" article="a" name="life booster">
        <attribute key="slotType" value="ring" />	
        <attribute key="maxManaPointsPercent" value="115"/>
        <attribute key="maxHitPointsPercent" value="115"/>	
        <attribute key="showattributes" value="1" />	
        <attribute key="weight" value="100" />
I got it in movements too,doesnt work and there is no error in the console.
 
Last edited:
1. example better , I can't understand you want ,item decay to other item Onuse?

2.
Lua:
<item id="2122" article="a" name="life booster">
        <attribute key="slotType" value="ring" />	
        <attribute key="showattributes" value="1" />	
        <attribute key="weight" value="100" />/lua]
        <attribute key="maxmanapercent" value="125" />
       <attribute key="maxhitpointspercent" value="125" />
       <attribute key="weight" value="1000" />
movements.xml
Lua:
	<movevent type="Equip" itemid="2122" slot="ring" event="function" value="onEquipItem"/>
	<movevent type="DeEquip" itemid="2122" slot="ring" event="function" value="onDeEquipItem"/>
 
1. I want it to be a ITEM that TEMPORARY GIVES MORE EXP,but it should be a click-gone item "Onuse" or how its called,just like the food,click gone [I script bady haha]

2. It works now,hah 1 change,lol thx about it,repped you,hopping for the other one to be fixed too..
 
Ok i make 1 function easy ,look i created for you one exp medal
Lua:
function onUse(cid, item, fromPosition, itemEx, toPosition)
if getPlayerLevel(cid) >= 1 then
doPlayerSetExperienceRate(cid, 2) <-- edit [2] are 200 , [3] 300 %, etc..
doSendMagicEffect(getPlayerPosition(cid), CONST_ME_MAGIC_RED)
doCreatureSay(cid, "200% de exp!!", TALKTYPE_MONSTER)
doRemoveItem(item.uid)
return TRUE
else
doCreatureSay(cid, "You need level 10+ for use experience medal.", TALKTYPE_ORANGE_1)
end
end
and now , goto items.xml ,and search ID your item and added this:
Lua:
<attribute key="showduration" value="1" />
<attribute key="duration" value="14400" />
Edit duration time ,so time end your item not works more ,test this
 
Back
Top