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. Sir Islam

    Sir Islam Never Give Up

    Joined:
    Jun 6, 2008
    Messages:
    500
    Likes Received:
    115
    Best Answers:
    0
    just delete this line from stats.lua http://pastebin.com/cD17xq1S
    Code (Text):
    1. if not(Item(target) or Creature(target)) then return false end
    at line 1236

    then make this
     
    Kemixe and dkangel83 like this.
  2. dkangel83

    dkangel83 Member

    Joined:
    Mar 31, 2010
    Messages:
    102
    Likes Received:
    8
    Best Answers:
    0
    Hiho Sir, its working almost flawless,

    Code (Text):
    1. Lua Script Error: [Action Interface]
    2.  
    3. data/actions/scripts/slot.lua:onUse
    4. data/stats.lua:1239: attempt to call method 'isItem' (a nil value)
    5. stack traceback:
    6.         [C]: in function 'isItem'
    7.         data/stats.lua:1239: in function 'stat_onUse'
    8.         data/stats.lua:1446: in function 'stat_onUse'
    9.         data/actions/scripts/slot.lua:3: in function <data/actions/scripts/slot.lua:1>
    [edit]About the problem above, just removed the line and its okay.. and removed -- from line 1445 so player now will know whats going on.. is about duplicate item..

    twas like this
    Code (Text):
    1.                                 --player:sendTextMessage(MESSAGE_INFO_DESCR, "Duplicate stat, try again.")
    2.                                 stat_onUse(player, item, fromPosition, itemEx, toPosition, attempt + 1)
    3.  
    and i just changed to this
    Code (Text):
    1.                                 player:sendTextMessage(MESSAGE_INFO_DESCR, "Duplicate stat, try again.")
    2.                                 --stat_onUse(player, item, fromPosition, itemEx, toPosition, attempt + 1)
    3.  
    //
    Also if i remove an item all stats are re-set, not back to original, its just like a click.. it returns to back and reset all again..

    Ex.: base stats mana 100, with equipment mp+450 = 550, if i remove any equipment it will make mana back to 100 maintaining the 500, imagine in a hunt u need to put a ssa and your mana/hp goes down for this action? :p

    Quick video about the problem
    just sharing the bugs that i've found[/edit]

    last but not least im very glad for the help.. thanks alot :D once more :)
     
    Last edited: Aug 1, 2015
  3. Codinablack

    Codinablack Dreamer

    Joined:
    Dec 26, 2013
    Messages:
    1,119
    Likes Received:
    347
    Best Answers:
    0
    Please don't post stuff like that. People think they can guilt a person into helping them, but in reality it is more of a deterrent than motivation.
     
    dkangel83 likes this.
  4. dkangel83

    dkangel83 Member

    Joined:
    Mar 31, 2010
    Messages:
    102
    Likes Received:
    8
    Best Answers:
    0
    Well 1st i didnt meant that.. i dont want to be rude, dont get like it but before saying things try to know what is the real meaning.. dont intended to .. was just sharing a view.. its a good system and he may be busy thats why he cant be here helping.. its really sad.. if being busy isnt the real reason.. well good thing that the place is plenty of skilled ppl who can do it instead..

    so please dont be mad on me nor try to pretend know what is the real meaning fo a thing just cuz u think that ure right about or so.. im a noob about things still in learn so by know my best is try ask why, how, and when i really cant do by myself (most of times) i ask for help..

    the worst part in post something is that others may not understand in right way.. you cant hear the voice, the way that the 'person' say things helps to understand .. once again i never meant to, nor meant to be rude.. so dont get me in this way :)

    :)
     
  5. Wafel1337

    Wafel1337 New Member

    Joined:
    Aug 27, 2009
    Messages:
    6
    Likes Received:
    1
    Best Answers:
    0
    Hello, is it possible to make create item with specific atributtes already? Like as the reward from quest someone gets Lifesteal sword??
     
  6. Codinablack

    Codinablack Dreamer

    Joined:
    Dec 26, 2013
    Messages:
    1,119
    Likes Received:
    347
    Best Answers:
    0
    Yes, that is the whole point in this system is to create items with attributes, doesn't matter how they are created....
     
    dkangel83 likes this.
  7. Wafel1337

    Wafel1337 New Member

    Joined:
    Aug 27, 2009
    Messages:
    6
    Likes Received:
    1
    Best Answers:
    0
    Thanks for your answer :) can you maybe make some example how to make an item with static attributes which than I can make as reward for quest?
     
  8. dkangel83

    dkangel83 Member

    Joined:
    Mar 31, 2010
    Messages:
    102
    Likes Received:
    8
    Best Answers:
    0
    i think the guy mean that he wants to create a item like /i with attributes already set on it..
    maybe a script that makes the item get attributes when onUse a reward chest, so peoplo could get a good item from a hard quest w/o having to try get from loot nor using stones..

    Would be a great feature anyway.. Idont know how it work but im prety sure that he meant like that

    The system is perfect already anyway
     
  9. Wafel1337

    Wafel1337 New Member

    Joined:
    Aug 27, 2009
    Messages:
    6
    Likes Received:
    1
    Best Answers:
    0
    Yea that's exactly what I wanted to say :) I can't use stones because of "You can't use this object." and I wanted to stay with lootable sloted with no upgrades with low chance and wanted to make some predefined items with slots as reward for quests or some weak sloted items as starting shit :)
     
  10. dkangel83

    dkangel83 Member

    Joined:
    Mar 31, 2010
    Messages:
    102
    Likes Received:
    8
    Best Answers:
    0
    About this problem "you cant use" if you read previous post you'll find a way to fix.. i was having the same problem.. then Sir Islam helped me with.. but would be kool being able to set in someway the item to use as quest reward..
     
  11. Wafel1337

    Wafel1337 New Member

    Joined:
    Aug 27, 2009
    Messages:
    6
    Likes Received:
    1
    Best Answers:
    0
    Yea I just fixed it :) so at this moment it's impossible to get items with attributes as quest reward or as firstitems?
     
  12. dkangel83

    dkangel83 Member

    Joined:
    Mar 31, 2010
    Messages:
    102
    Likes Received:
    8
    Best Answers:
    0
    Since theres no way to setup the attr to item i guess not..

    i dont think its a hard thing to do.. since the system is there.. i just dont know how.. but sure it can be done for someone who understand the system and lua coding
     
  13. Wafel1337

    Wafel1337 New Member

    Joined:
    Aug 27, 2009
    Messages:
    6
    Likes Received:
    1
    Best Answers:
    0
    Maybe someone will help us with that :) I am LowBOB so I can't do this alone with my actual skills
     
    dkangel83 likes this.
  14. Codinablack

    Codinablack Dreamer

    Joined:
    Dec 26, 2013
    Messages:
    1,119
    Likes Received:
    347
    Best Answers:
    0
    There are functions in this library that all you have to do is use them in a movement, creaturescript, action, talkaction, ect. to make custom items however you want. I would suggest action script obviously if you want to make it a quest item.
     
  15. dkangel83

    dkangel83 Member

    Joined:
    Mar 31, 2010
    Messages:
    102
    Likes Received:
    8
    Best Answers:
    0
    We know man.. but you must remember we are pro like you nor others.. even trying to manage based in others scripts it would be like hell to us.. once again i dont mean to be rude.. but if u dont wanna help why do this kind of post.. you're just saying the same as i did.. instead being like others.. give some tip or so.. saying something taht we already know isnt to help.. yourent being construtive nor critic .. just being like those kids who use to say "face it up"

    "i dont think its a hard thing to do.. since the system is there.. i just dont know how.. but sure it can be done for someone who understand the system and lua coding"

    i know theres a way do to.. we just dont know how..
     
  16. Ninja

    Ninja 「Speedwagon Foundation」 Staff Member Global Moderator

    Joined:
    Apr 6, 2010
    Messages:
    5,874
    Likes Received:
    1,474
    Best Answers:
    12
    You can assign attributes to an item by using the method Item.generateStats. There are two examples between L2731-2745.
     
    Codinablack and dkangel83 like this.
  17. dkangel83

    dkangel83 Member

    Joined:
    Mar 31, 2010
    Messages:
    102
    Likes Received:
    8
    Best Answers:
    0
    Thanks for.. i didnt paid any attention to that part when i saw cuz i though twas part of older tfs compatibility code. twas a fast reading.. really my bad..

    anyway you came to give the tip about where we could find.. thanks for.. sorry for any trouble in your topic.. :) dont want ppl to look at me as trouble maker cuz i dont .. once again im in learning .. i just need to pay better attention to things..

    Im really glad for your support

    Regards
    DeCarvalho
     
  18. Leo32

    Leo32 Getting back into it...

    Joined:
    Sep 21, 2007
    Messages:
    711
    Likes Received:
    109
    Best Answers:
    0
    Next step would be having the affixes appear in the monster loot list message.
    Code already exists for 0.4, will convert myself and post later.

    If anyone has done it already, I'd appreciate a link!
     
    dkangel83 likes this.
  19. daiver

    daiver New Member

    Joined:
    Oct 22, 2008
    Messages:
    23
    Likes Received:
    3
    Best Answers:
    0
    Good, as you can put the upgrade in percentage?

    Example: You see a giant sword (Atk: 46, Def: 22).
    You see a giant sword + 5 (Atk: 61, Def: 32).

    Acutalmente is this: You see a giant sword (Atk: 46, Def: 22).
    You see a legendary giant sword +5 (Atk: 71, Def: 47).

    This is for that rises from 5 to 5 and not by percentage, how could ahcer for every slight turn up the item, not 5 atack if 5% + of attack as in the first example? ...

    In advance thank you very much, excuse my English, I'm Spanish :(
     
  20. Leo32

    Leo32 Getting back into it...

    Joined:
    Sep 21, 2007
    Messages:
    711
    Likes Received:
    109
    Best Answers:
    0

Share This Page

Loading...