CreatureEvent [TFS 1.1] Ultimate item stat system (elements, skills, exp, loot and more)

Discussion in 'GlobalEvents, Spells & CreatureEvents' started by zbizu, Mar 7, 2015.

  1. bonfim25

    bonfim25 New Member

    Joined:
    Jan 17, 2011
    Messages:
    17
    Likes Received:
    0
    Best Answers:
    0
    the only thing that changed was the alteration that Sir Islam said to work the action the rest was already working normal. !
     
  2. chrillefock

    chrillefock Member

    Joined:
    Jul 4, 2009
    Messages:
    88
    Likes Received:
    21
    Best Answers:
    0
    Lua Script Error: [CreatureScript Interface]
    data/creaturescripts/scripts/stats.lua:eek:nLogin
    data/creaturescripts/scripts/stats.lua:22: attempt to call global 'stat_onLogin'
    (a nil value)
    stack traceback:
    [C]: in function 'stat_onLogin'
    data/creaturescripts/scripts/stats.lua:22: in function <data/creaturescr
    ipts/scripts/stats.lua:21>

    anyone know what i have done wrong?
     
  3. SlayingWorld

    SlayingWorld Active Member

    Joined:
    Jan 23, 2014
    Messages:
    120
    Likes Received:
    27
    Best Answers:
    0
    I got the same error, running it on the latest TFS 1.2, then everything goes nuts as it fails to load all the rest libs from global
     
  4. SlayingWorld

    SlayingWorld Active Member

    Joined:
    Jan 23, 2014
    Messages:
    120
    Likes Received:
    27
    Best Answers:
    0
    Nvm Fixed it
     
    William Sezo likes this.
  5. William Sezo

    William Sezo Rookie but passionate

    Joined:
    May 6, 2016
    Messages:
    43
    Likes Received:
    4
    Best Answers:
    0
    how did you fix it SlayingWorld?
     
  6. William Sezo

    William Sezo Rookie but passionate

    Joined:
    May 6, 2016
    Messages:
    43
    Likes Received:
    4
    Best Answers:
    0
    Wish I knew, I would love to have this system on my server... can't seem to make it work on TFS 1.2
     
  7. Aeronx

    Aeronx Member

    Joined:
    Dec 17, 2015
    Messages:
    288
    Likes Received:
    10
    Best Answers:
    0
    It works on TFS 1.2 There's many incompatibilities with other systems. Try it on a clean TFS 1.2 server, and then you'll know if its something on your server or just that you missed something :p
     
    William Sezo likes this.
  8. William Sezo

    William Sezo Rookie but passionate

    Joined:
    May 6, 2016
    Messages:
    43
    Likes Received:
    4
    Best Answers:
    0
    Got on top of it yesterday and got it working!
    Don't ask me what I did tho...

    Thanks!
     
  9. William Sezo

    William Sezo Rookie but passionate

    Joined:
    May 6, 2016
    Messages:
    43
    Likes Received:
    4
    Best Answers:
    0
    It works for upgrading with the stones, but the +X items are not dropping from monsters.
    Does anyone know how to fix this?
     
  10. Aeronx

    Aeronx Member

    Joined:
    Dec 17, 2015
    Messages:
    288
    Likes Received:
    10
    Best Answers:
    0
    Actually they drop, but there's a problem with that part,
    That even random crap items like torches or bones get
    Upgraded! I got it working fine on a tfs 1.2, just recheck
    Your steps, and redo them if necessary. It works, not as
    It should, but it works. The fixes needs to be done by yourself
    Or ask someone to do it for you.
     
    William Sezo likes this.
  11. William Sezo

    William Sezo Rookie but passionate

    Joined:
    May 6, 2016
    Messages:
    43
    Likes Received:
    4
    Best Answers:
    0
    Thanks Aeronx, I'll do that.
     
  12. God Mythera

    God Mythera Well-Known Member

    Joined:
    Aug 11, 2012
    Messages:
    1,900
    Likes Received:
    207
    Best Answers:
    0
    Anyone got this working with TFS 1.2?
     
  13. RazorBlade

    RazorBlade Snek Premium User

    Joined:
    Nov 7, 2009
    Messages:
    2,009
    Likes Received:
    597
    Best Answers:
    0
    considering the differences in code for 1.1 vs 1.2 are small, I can't imagine why it wouldn't work with 1.2. I don't remember for sure which version I was using when I tried this system but it worked fine. It was probably 1.2.
     
  14. God Mythera

    God Mythera Well-Known Member

    Joined:
    Aug 11, 2012
    Messages:
    1,900
    Likes Received:
    207
    Best Answers:
    0
    I did everything it said and my server wont open, if i was to test it again it would be when i get a dedi host ;d
     
  15. Kemixe

    Kemixe New Member

    Joined:
    Jul 18, 2014
    Messages:
    6
    Likes Received:
    1
    Best Answers:
    0

    When I try to use GEM_BASIC_LEVEL and GEM_ADD_SLOT, it works, but when I try to use the others, this error


    Code (Text):
    1. Lua Script Error: [Action Interface]
    2. data/actions/scripts/slot.lua:onUse
    3. data/lib2/stats.lua:1470: attempt to index a nil value
    4. stack traceback:
    5.         [C]: in function '__index'
    6.         data/lib2/stats.lua:1470: in function 'stat_onUse'
    7.         data/actions/scripts/slot.lua:3: in function <data/actions/scripts/slot.lua:1>
    Code (Text):
    1.     GEM_BASIC_LEVEL = 2280,
    2.     GEM_ADD_SLOT = 2281,
    3.     GEM_RANDOM = 2282,
    4.     GEM_RARE = 2283,
    5.     GEM_EPIC = 2284,
    6.     GEM_LEGENDARY = 2296,
    7.     gems_power = {
    8.         [2297] = {min_wl = 0, max_wl = 4, min_el = 0.3, max_el = 0.6, sl = function() return 2 end}, -- rare
    9.         [2298] = {min_wl = 3, max_wl = 6, min_el = 0.6, max_el = 0.7, sl = function() return 3 end}, -- epic
    10.         [2299] = {min_wl = 5, max_wl = 9, min_el = 0.8, max_el = 1, sl = function() return 4 end}, -- legendary
    11.         [2300] = {min_wl = 0, max_wl = 9, min_el = 0.3, max_el = 1, sl = function() return math.random(2, 4) end} -- random
    Line 1470:
    Code (Text):
    1.                 if item2:generateStats(u, STATS_SYSTEM_CONFIG.gems_power[item.itemid].sl(), math.random(STATS_SYSTEM_CONFIG.gems_power[item.itemid].min_wl, STATS_SYSTEM_CONFIG.gems_power[item.itemid].max_wl), math.floor(STATS_SYSTEM_CONFIG.maxLevel * STATS_SYSTEM_CONFIG.gems_power[item.itemid].min_el), math.ceil(STATS_SYSTEM_CONFIG.maxLevel * STATS_SYSTEM_CONFIG.gems_power[item.itemid].max_el)) then
    2.                     toPosition:sendMagicEffect(CONST_ME_MAGIC_GREEN)
    3.                     doRemoveItem(item.uid, 1)
    4.                     player:sendTextMessage(MESSAGE_INFO_DESCR, "Item modification successful.")
    5.                     return true
    6.                 else
    7.                     player:sendTextMessage(MESSAGE_INFO_DESCR, "Erro1.")
    8.                 end
    Actions:
    Code (Text):
    1. function onUse(player, item, fromPosition, itemEx, toPosition)
    2. if not (Item(itemEx.uid) or not Creature(itemEx.uid)) or itemEx.itemid == 2173 then return false end
    3. stat_onUse(player, item, fromPosition, itemEx, toPosition)
    4. return true
    5. end


    Thx!
     
    Last edited: Dec 19, 2016
  16. Kemixe

    Kemixe New Member

    Joined:
    Jul 18, 2014
    Messages:
    6
    Likes Received:
    1
    Best Answers:
    0
    Fixed! Working now.
     
  17. Exos

    Exos New Member

    Joined:
    Dec 20, 2016
    Messages:
    14
    Likes Received:
    0
    Best Answers:
    0
    Does someone know where can I increase the loot chance to test the loot please? Thank you
     

Share This Page

Loading...