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

TFS 0.X AttackSpeed attribute TFS 0.3

mRefaat

Marketing and Coding
Joined
Jan 18, 2014
Messages
854
Solutions
3
Reaction score
141
Location
Egypt
Hello

I am using TFS 0.3.7 for 8.60

I was trying to use this attribute on ring like this

XML:
<item id="697" article="an" name="archer's ring">
        <attribute key="description" value="It gives you +250 Health/Mana per second, +5% Magic Damage and +25% AttackSpeed. (Can be upgraded to +1)"/>   
        <attribute key="weight" value="170"/>   
        <attribute key="increaseMagicPercent" value="105"/>   
        <attribute key="healthGain" value="250"/>
        <attribute key="healthTicks" value="1000"/>
        <attribute key="manaGain" value="250"/>
        <attribute key="showattributes" value="1"/>           
        <attribute key="manaTicks" value="1000"/>   
        <attribute key="attackspeed" value="135"/>       
        <attribute key="slotType" value="ring"/>
    </item>

but i found it is not working for items not weapon like this ring.
what should i do to make it work for rings too beside weapons?
 
Hello

I am using TFS 0.3.7 for 8.60

I was trying to use this attribute on ring like this

XML:
<item id="697" article="an" name="archer's ring">
        <attribute key="description" value="It gives you +250 Health/Mana per second, +5% Magic Damage and +25% AttackSpeed. (Can be upgraded to +1)"/>  
        <attribute key="weight" value="170"/>  
        <attribute key="increaseMagicPercent" value="105"/>  
        <attribute key="healthGain" value="250"/>
        <attribute key="healthTicks" value="1000"/>
        <attribute key="manaGain" value="250"/>
        <attribute key="showattributes" value="1"/>          
        <attribute key="manaTicks" value="1000"/>  
        <attribute key="attackspeed" value="135"/>      
        <attribute key="slotType" value="ring"/>
    </item>

but i found it is not working for items not weapon like this ring.
what should i do to make it work for rings too beside weapons?
did you get this working?
 
you might add a condition attackspeed on equip the ring and remove the condition on de quip.
attackspeed on the items.xml will do nothing because the ring isnt a weapon so better to add in on a movement
its something like that .. but you still need to define an attackspeed condition (not sure its on your sources or not)\

Lua:
local condition = createConditionObject(CONDITION_ATTRIBUTES)
setConditionParam(condition, CONDITION_PARAM_TICKS, -1)   
setConditionParam(condition, //attack speed condition, 30)
function onEquip(cid, item, slot)
if (slot ~= CONST_SLOT_RING) then
return false
end
    if(item.itemid == x) or (item.itemid == y) then --if the ring has two item ids like time ring 
   doTransformItem(item.uid, equipped ID)     --if the ring has two item ids like time ring
        doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "Your attack rate has increased")
        doAddCondition(cid, condition)
        return true
        end
        
        function onDeEquip(cid, item, slot) --on take off the ring 10502 it transforms to 10510
          if(item.itemid == xa) or (item.itemid == ya) then --if the ring has two item ids like time ring 
   doTransformItem(item.uid, old  ID)     --if the ring has two item ids like time ring
    doRemoveCondition(cid, CONDITION_ATTRIBUTES)
    doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "Your extra attack rate has ended.")
 
end
end
return true
end
tell me if i was wrong and also if you solve it tell me how it was solved
regards
 
Back
Top