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

Magical Items for TFS 1.2/3

Are you excited to try out this system?

  • Yes!

  • No


Results are only viewable after voting.
@bayview
any thoughts why those errors are appearing? returning nil value
any help will be appreciated

/Nixez
I think that method is from something other code i wrote, i explained i wasn't 100% certain that that movements script was the correct one. I think I might have to re-write the entire library. Or atleast look for the correct files...

Yea its from my tiered source code lol

I'll fix everything tonight or tomorrow & make a new thread since this one will be a little confusing for people looking to use this system.

Try this code as the movement script
Lua:
function onEquip(player, item, slot)
    local slots = player:getSlotItem(slot)
    if slots then
        if slots.itemid ~= item.itemid then
            return true
        else
            local name = item:getName()
            player:transformMagicItemTo(item, slot, name)
            player:setMagicItemCondition(item, slot, name)
            player:setMagicItemSpells(item, slot, name)
        end
    end
    return true
end

function onDeEquip(player, item, slot)
    local name = item:getName()
    player:unsetMagicItemCondtion(item, slot, name, true)
    player:unsetMagicItemSpells(item, slot, name)
    player:transformMagicItemFrom(item, slot, name)
    return true
end
 
Last edited by a moderator:
1st Sorry for the double post
second i tried the movements script and the error is gone and i can equip and deequip with no error's
How ever no changes made to skills or what so ever
Code:
spellbook       regen   1
spellbook       manashield      1
spellbook       attributes      1
spellbook       regen   1
spellbook       manashield      1
spellbook       attributes      1
here what shows on the console when i equip "configured item by me" which is in this case a normal spellbook
Look :
Code:
04:05 You see a spellbook (Def:14).
It weighs 18.00 oz.
It shows your spells and can also shield against attacks when worn.
Wearing this spellbook will grant the bearer a boost in [Hp:5] regen.
Ye who bears this mystical spellbook is granted an ancient magical shield.
Wearing this spellbook will grant the bearer these attributes [Max Health:50] [Max Mana:50] [Sword:5] [Club:5] [Axe:5] in stats.

@bayview
 
1st Sorry for the double post
second i tried the movements script and the error is gone and i can equip and deequip with no error's
How ever no changes made to skills or what so ever
Code:
spellbook       regen   1
spellbook       manashield      1
spellbook       attributes      1
spellbook       regen   1
spellbook       manashield      1
spellbook       attributes      1
here what shows on the console when i equip "configured item by me" which is in this case a normal spellbook
Look :
Code:
04:05 You see a spellbook (Def:14).
It weighs 18.00 oz.
It shows your spells and can also shield against attacks when worn.
Wearing this spellbook will grant the bearer a boost in [Hp:5] regen.
Ye who bears this mystical spellbook is granted an ancient magical shield.
Wearing this spellbook will grant the bearer these attributes [Max Health:50] [Max Mana:50] [Sword:5] [Club:5] [Axe:5] in stats.

@bayview
oke well try using this version, I have too many files to look through but this one is the one dated last.
 

Attachments

  • old_version_magical_items.tar.gz
    12.9 KB · Views: 30 · VirusTotal
Sure thing you get a multi like :)
How about a like? Or even a small donation to the cause?
About donations, be sure that i won't let any good scripter that i use some of their free released epic systems into my up comming project 'Wink-wink'
Those scripters will be mentioned At my Credits page and even a small amount of money could be donated to them.
Thanks for your sharing efforts and also for you kindness helping me solve the problem i had.

/Nixez
 
@bayview yo there
Do you mind shedding some light on how to use a gem or whatever on the item to upgrade it's tier? tier is already scripted in Magical items.lua
Code:
x:setTier(1, "ancient tiara", 1)
    x:attributes({'max health', 'max mana', 'sword','club', 'axe', 'distance'}, {150, 150, 15, 15, 15, 15})
    x:regen({'hp', 'mana'}, 15)
   
    x:setTier(1, "ancient tiara", 2)
    x:attributes({'max health', 'max mana', 'sword','club', 'axe', 'distance'}, {250, 250, 25, 25, 25, 25})
    x:regen({'hp', 'mana'}, 215)


/Nixez
 
bump @bayview
@bayview yo there
Do you mind shedding some light on how to use a gem or whatever on the item to upgrade it's tier? tier is already scripted in Magical items.lua
Code:
x:setTier(1, "ancient tiara", 1)
    x:attributes({'max health', 'max mana', 'sword','club', 'axe', 'distance'}, {150, 150, 15, 15, 15, 15})
    x:regen({'hp', 'mana'}, 15)
  
    x:setTier(1, "ancient tiara", 2)
    x:attributes({'max health', 'max mana', 'sword','club', 'axe', 'distance'}, {250, 250, 25, 25, 25, 25})
    x:regen({'hp', 'mana'}, 215)


/Nixez
 
Not sure if I understood this system 100%

Example, can I set random stats for a Magic Plate Armor when it drops from monsters? Like, it would randomly roll +sword, or +club.
If yes, can I use a random range for the bonus? Like, it would roll between +2 sword and +5 sword.

Thanks in advance, I'll take a closer look later or tomorrow.
 
Back
Top