Ir para conteúdo

Exp Rig


ncjoao

Posts Recomendados

movements/script

 

expring.lua

local rate = 1.2 -- 20%
function onEquip(cid, item, slot) 
if(item.itemid ~= 7697) then 
doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "Your exp rate + "..((rate - 1)*100).."%.") 
doPlayerSetExperienceRate(cid, rate) 
doTransformItem(item.uid, 7708 ) 
return TRUE
end 
return TRUE
end 
function onDeEquip(cid, item, slot) 
if(item.itemid ~= 7708) then 
return TRUE
end 
doPlayerSetExperienceRate(cid, 1.0) 
doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "Your extra experience rate has ended.") 
doTransformItem(item.uid,7697) 
return TRUE
end

 

 

movements.xml

<movevent type="Equip" itemid="7697" slot="ring" event="function" value="onEquipItem"/>
<movevent type="Equip" itemid="7708" slot="ring" event="script" value="expring.lua"/>
<movevent type="DeEquip" itemid="7708" slot="ring" event="script" value="expring.lua"/>

 

 

no items.xml modifique:

 

<item id="7708" article="a" name="ring">

<attribute key="weight" value="40" />

<attribute key="slotType" value="ring" />

</item>

 

<item id="7697" article="a" name="signet ring">

<attribute key="weight" value="80" />

<attribute key="slotType" value="ring" />

</item>

 

Por:

 

<item id="7708" article="a" name="Experience ring">

<attribute key="weight" value="80"/>

<attribute key="slotType" value="ring"/>

<attribute key="decayTo" value="0"/>

<attribute key="duration" value="480"/>

<attribute key="showduration" value="1"/>

</item>

 

<item id="7697" article="an" name="Experience 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>

Link para o comentário
Compartilhar em outros sites

movements/script

 

expring.lua

local rate = 1.2 -- 20%
function onEquip(cid, item, slot) 
if(item.itemid ~= 7697) then 
doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "Your exp rate + "..((rate - 1)*100).."%.") 
doPlayerSetExperienceRate(cid, rate) 
doTransformItem(item.uid, 7708 ) 
return TRUE
end 
return TRUE
end 
function onDeEquip(cid, item, slot) 
if(item.itemid ~= 7708) then 
return TRUE
end 
doPlayerSetExperienceRate(cid, 1.0) 
doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "Your extra experience rate has ended.") 
doTransformItem(item.uid,7697) 
return TRUE
end

 

 

movements.xml

<movevent type="Equip" itemid="7697" slot="ring" event="function" value="onEquipItem"/>
<movevent type="Equip" itemid="7708" slot="ring" event="script" value="expring.lua"/>
<movevent type="DeEquip" itemid="7708" slot="ring" event="script" value="expring.lua"/>

 

 

no items.xml modifique:

 

<item id="7708" article="a" name="ring">

<attribute key="weight" value="40" />

<attribute key="slotType" value="ring" />

</item>

 

<item id="7697" article="a" name="signet ring">

<attribute key="weight" value="80" />

<attribute key="slotType" value="ring" />

</item>

 

Por:

 

<item id="7708" article="a" name="Experience ring">

<attribute key="weight" value="80"/>

<attribute key="slotType" value="ring"/>

<attribute key="decayTo" value="0"/>

<attribute key="duration" value="480"/>

<attribute key="showduration" value="1"/>

</item>

 

<item id="7697" article="an" name="Experience 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>

 

 

 

Nada mal mas no meu 1° Ot que to querendo por on que é o styller funcionou o sistema de extra xp pelo ring mas tem um problema que se for jogado o ring no chão o server depois de 2 minutos cai eu acredito que seja um bug pra derrubar o server se puder dizer como resolver esse problema fico grato ate +

Link para o comentário
Compartilhar em outros sites

@UP

local rate = 1.3
function onEquip(cid, item, slot) 
if not isPremium(cid) then
doPlayerSendCancel(cid,"This ring is exclusive for Premium users.") 
return TRUE
elseif(item.itemid ~= 7697) then   
doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "Your exp rate + "..((rate - 1)*100).."%.") 
doPlayerSetExperienceRate(cid, rate) 
doTransformItem(item.uid, 7708) 
return TRUE
end
return TRUE
end
function onDeEquip(cid, item, slot)
if not isPremium(cid) then
return TRUE
elseif(item.itemid ~= 7708 ) then 
return TRUE
end   
   doPlayerSetExperienceRate(cid, 1.0) 
   doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "Your extra experience rate has ended.") 
   doTransformItem(item.uid,7697) 
   return TRUE
end

Editado por Vodkart
Link para o comentário
Compartilhar em outros sites

×
×
  • Criar Novo...