TFS 1.X+ Problem with movement/OnEquip

Discussion in 'Support' started by Animera, Mar 13, 2018.

  1. Animera

    Animera * * * * *

    Joined:
    Dec 9, 2008
    Messages:
    2,193
    Likes Received:
    355
    Best Answers:
    1
    DISTRO: TFS 1.2

    When i try to register an itemid with a script instead of the onEquipItem function, the item attributes do not work anymore e.g. (physical resistance, magiclevelpoints etc).

    Any solution for this in lua or by source editing?(prefered lua as i am not known yet with the source editing language).

    Code (Text):
    1. return callFunction(player, item.uid, slot)
    I've tried this but i only get an error (nil value).

    Kind regards
     
    Last edited: Mar 13, 2018
  2. Best Answer:
    Post #6 by Colors, Mar 13, 2018
  3. Sun

    Sun Knowledge is power - France is bacon

    Joined:
    Jan 26, 2015
    Messages:
    293
    Likes Received:
    211
    Best Answers:
    13
    what are you trying to do? you might not even have to use onEquip
     
  4. Animera

    Animera * * * * *

    Joined:
    Dec 9, 2008
    Messages:
    2,193
    Likes Received:
    355
    Best Answers:
    1
    When a player on equip, it will receive conditions and storages by values from the item. and so its stats/attributes.
     
  5. Sun

    Sun Knowledge is power - France is bacon

    Joined:
    Jan 26, 2015
    Messages:
    293
    Likes Received:
    211
    Best Answers:
    13
    in 0.4 it's callFunction(cid, item.uid, slot, true)
    try and see if callFunction(player, item.uid, slot, true) works

    alternatively you could possibly make a workaround with Player:onMoveItem
     
    Last edited: Mar 13, 2018
  6. Animera

    Animera * * * * *

    Joined:
    Dec 9, 2008
    Messages:
    2,193
    Likes Received:
    355
    Best Answers:
    1
    Unfortunatly no result..
    How i would do it with onMoveItem? i guess it will need slotdata?

    I've found this:
    Changes to how movement and events work · Mkalo/[email protected]

    It will make the attributes work, but the script doesn't.
     
  7. Colors

    Colors

    Joined:
    Mar 22, 2013
    Messages:
    929
    Likes Received:
    258
    Best Answers:
    3
    Best Answer
    Animera likes this.
  8. Animera

    Animera * * * * *

    Joined:
    Dec 9, 2008
    Messages:
    2,193
    Likes Received:
    355
    Best Answers:
    1
    Thanks, i've compiled it without errors.
    Unfortunatly no results, script executed, on equip doesn't work anymore (not only the attributes but stuffs as rings now won't execute either..)


    EDIT: I've managed to make it work. For those who wants to know how. Check the link. Also check the posts made earlier in the thread to make it work.
     
    Last edited: Mar 13, 2018

Share This Page

Loading...