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

Action [TFS 1.2+] Simple Smithing Skill w/ Options

I'm pretty sure that could be added to the system as well (In fact, you can already add ML to items with it, as well as skills). You will have to decide which items will have the bonus magic level instead of boosted arm, def. Then just add a check on the script and, instead of applying a normal refine you will add magic level to it instead. You get the idea.
 
i tried to add static magic level (no refine addition) but its not add any just say it is..

XML:
    <item id="25887" article="a" name="star wand">
        <attribute key="description" value="This weapon was forged by the great starfall material, if you lucky during smithing period you might enchanting the weapon and improve its quality." />
        <attribute key="weight" value="1900" />
        <attribute key="weaponType" value="wand" />
        <attribute key="shootType" value="energy" />
        <attribute key="magiclevelpoints" value="1" />
        <attribute key="range" value="3" />
    </item>

you sure it can be done without add more code to it?

i add this line and magic level not turn green and add +1.
XML:
<attribute key="magiclevelpoints" value="1" />

just checking if it's system related or not. if it's not system id better move this question to support thread 😅
 
You will have to modify the script a bit to check if the item is a wand, and then you can use Zbizu's System to add the property you want.

Pseudo code
Code:
if item == wand then
    item:addSlot(ml, 1)
end

The addSlot function and 'ml' already exist in Zbizu's system.

EDIT:
Forgot to mention, I will give you another hint as I imagine you want players to be able to get better ml refines as their skill advances.
You can retrieve a slot value for checks too, so for example this function:
Code:
item:getStatsSlots()
This will return the item's slot information, if we take for example the pseudo code I wrote, it will return this table:
Code:
{
[1] = {'ml', '1'},
}
In which [1] is the slot number, 'ml' is the attribute, and 1 is the value of that ml refine.

With such information you have the power to control every aspect of the ml boosting. For example, let's say you want a maximun value of 3 for ml, you could do something like this:

Pseudo Code, again.
Code:
if item == wand then    --Check if item is wand/rod, whatever you like
local r = item:getStatSlots()    --Checks for the item slots
    if r[1][2] == 0 or r[1][2] == nil then        --Checks if the item has already a ml slot, if the value is 0 then proceed
        item:addSlot(ml, 1)        --Adds the slot with magic level 1 bonus
    elseif r[1][2] < 3 then        --Checks if the slot value is less than 3, if it is, proceed
        item:removeSlot(1)    --We have to remove the previous slot
        item:addSlot(ml, r[1][2] + 1)    --Takes the value of the previous ml slot and adds 1
    end
end
 
Last edited:
Back
Top