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

Spikee

New Member
Joined
May 23, 2009
Messages
21
Reaction score
0
Hello, looking for a script under tfs 0.4.0 for Exp Ring, I have a script but something is not right because when I assume Ring is Ok, time is running disappears. But when he wants Remove the ring to Server Crashed ..

Please help A script that runs under The Forgotten Server 0.4.0

Regards
 
Items.xml

Code:
<item id="7697" article="an" name="exp ring">
  <attribute key="weight" value="80"/>
  <attribute key="slotType" value="ring"/>
    <attribute key="transformEquipTo" value="7708"/>
  <attribute key="stopduration" value="1"/>
  <attribute key="showduration" value="1"/>
  </item>

Code:
<item id="7708" article="a" name="exp ring">
  <attribute key="weight" value="80"/>
  <attribute key="slotType" value="ring"/>
     <attribute key="transformEquipTo" value="7697"/>
  <attribute key="decayTo" value="0"/>
  <attribute key="duration" value="1800"/>
  <attribute key="showduration" value="1"/>
   </item>

Moveevent.xml
Code:
<movevent type="Equip" itemid="7708" slot="ring" event="function" value="onEquipItem"/>
   <movevent type="Equip" itemid="7697" slot="ring" event="script" value="exp_ring.lua"/>
   <movevent type="DeEquip" itemid="7708" slot="ring" event="script" value="exp_ring.lua"/>

And I have 2 skrypt :

Code:
local config = {
  rate = 250.5
}

function onDeEquip(cid, item, slot)
  if(item.itemid == 7708) then
  doPlayerSetExperienceRate(cid, 1.0)
  doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "Your extra experience rate has ended.")
  doTransformItem(item.uid, 7708)
  end
end

function onEquip(cid, item, slot)

  if(item.itemid == 7708) then
  doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "Your extra experience rate has been activated! It is now: " .. config.rate .. "x doubled your former experience rate.")
  doPlayerSetExperienceRate(cid, config.rate)
  doTransformItem(item.uid, 7708)
  return true
  end
end

Code:
local config = {

rate = 2.0, -- 2.0 = 2x faster than normal.
un_equip = 7708, -- Item ID of the UN-Equipped ring.
equip = 7697 -- Item ID of the Equipped ring.

}

function onDeEquip(cid, item, slot)
doPlayerSetExperienceRate(cid, 1.0)
doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "Your extra experience rate has ended.")
doTransformItem(item.uid, config.un_equip)
return true
end

function onEquip(cid, item, slot)
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.")
doTransformItem(item.uid, config.equip)
doDecayItem(item.uid)
return true
end

Please HELP!!
 
Last edited:
just this and use the first script :)
Code:
<movevent type="Equip" itemid="7708" slot="ring" event="script" value="exp_ring.lua"/>
<movevent type="DeEquip" itemid="7708" slot="ring" event="script" value="exp_ring.lua"/>
 
Last edited:
I did as you say, now I do not crashuje Server but does not give more Exp ring.

I delete :
Code:
<movevent type="Equip" itemid="7697" slot="ring" event="script" value="exp_ring.lua"/>

as I did so exp ring for server crashed but exp ring did not give more exp :
Code:
<movevent type="Equip" itemid="7708" slot="ring" event="function" value="onEquipItem"/>
<movevent type="DeEquip" itemid="7708" slot="ring" event="script" value="exp_ring.lua"/>

I did so exp ring immediately server crashed rings :
Code:
<movevent type="Equip" itemid="7708" slot="ring" event="script" value="exp_ring.lua"/>
<movevent type="DeEquip" itemid="7708" slot="ring" event="script" value="exp_ring.lua"/>
 
Last edited:
Yes , it displays in the game ,

nothing now displays the server crashed immediately because I assume. and before then I founded and how I wanted to take it off just crashed
 
Back
Top