- Joined
- Dec 26, 2013
- Messages
- 1,693
- Solutions
- 12
- Reaction score
- 965
Hello Otland!
Today I bring a release for everyone. I have worked on this script for awhile now and I have gotten it ready for everyone here. I became inspired when I seen a script for TFS 1.x for healing potions using a percent of max health, same thing with the mana potions for mana. Anyways the script was very very much bugged, and missed alot of features. It also relied heavily on functions from compat.lua instead of meta methods. So I did my best to convert it to something for an RPG type feel. During that process I decided to make options that you guys may want to change, and started creating a super configurable potions system.
CREDITS:
@Ninja for helping me with a problem determining if the summon was a guild or party members.
@otland for all the resources and help with learning.
@Limos and @forgee both special thanks for helping me to develop my skills and easing the learning process.
||||Features||||
-- Potions are based of Max Percents and individually configurable for each potion.
-- Potions are also based of Level and Magic level, which can be configured for all potions.
-- Potions can be used on Summons -- Configurable
--- Can be used on Guild Members Summon -- Configurable
--- Can be used on Party Members Summon -- Configurable
-- Potion's formula has min and max percents -- Configurable
-- Anti-Hotkey protection (realPvpMode) -- Configurable
-- Remove on Use -- Configurable
-- Splashable (with decay) -- Configurable for individual potions.
-- Level Requirements -- Configurable for individual potions.
-- Vocation Requirements -- Configurable for individual potions.
-- Unique Exhaust/Cooldown System -- Configurable for individual potions.
--- Potions with same "spellid" share same exhaust. However two potions with same "spellid" can have different exhaust values. Default set up for different exhausts for mana potions, health (little) and health (big), and spirit potion. Spell Id is sent as icon. Cooldown don't interfere with spells of same spell Id.
-- Misclick Protection: Doesn't allow use on stuff far away (good because it's splashable and if you have remove on use enabled), summons (if disabled), monsters, and Npc's.
If there is any other features I am missing that should be mentioned please let me know.
Only thing that should be explained that isn't in comments in the script is the table, but really that should be self-explanatory. If anyone has a problem, just post here and I will help you.
FULLY TESTED BUG FREE
If you do use this, please keep my credits in the script, and it wouldn't hurt to get a like.
[Lua] potions.lua - Pastebin.com
Version 1.1 is done.
New version depends on this lib.
[TFS 1.X] Player:isCreatureFriend()
[Lua] potion - Pastebin.com
Sorry guys, apparently the code is over 1000 characters by itself.
NEW VERSION v12
Changelog:
Today I bring a release for everyone. I have worked on this script for awhile now and I have gotten it ready for everyone here. I became inspired when I seen a script for TFS 1.x for healing potions using a percent of max health, same thing with the mana potions for mana. Anyways the script was very very much bugged, and missed alot of features. It also relied heavily on functions from compat.lua instead of meta methods. So I did my best to convert it to something for an RPG type feel. During that process I decided to make options that you guys may want to change, and started creating a super configurable potions system.
CREDITS:
@Ninja for helping me with a problem determining if the summon was a guild or party members.
@otland for all the resources and help with learning.
@Limos and @forgee both special thanks for helping me to develop my skills and easing the learning process.
||||Features||||
-- Potions are based of Max Percents and individually configurable for each potion.
-- Potions are also based of Level and Magic level, which can be configured for all potions.
-- Potions can be used on Summons -- Configurable
--- Can be used on Guild Members Summon -- Configurable
--- Can be used on Party Members Summon -- Configurable
-- Potion's formula has min and max percents -- Configurable
-- Anti-Hotkey protection (realPvpMode) -- Configurable
-- Remove on Use -- Configurable
-- Splashable (with decay) -- Configurable for individual potions.
-- Level Requirements -- Configurable for individual potions.
-- Vocation Requirements -- Configurable for individual potions.
-- Unique Exhaust/Cooldown System -- Configurable for individual potions.
--- Potions with same "spellid" share same exhaust. However two potions with same "spellid" can have different exhaust values. Default set up for different exhausts for mana potions, health (little) and health (big), and spirit potion. Spell Id is sent as icon. Cooldown don't interfere with spells of same spell Id.
-- Misclick Protection: Doesn't allow use on stuff far away (good because it's splashable and if you have remove on use enabled), summons (if disabled), monsters, and Npc's.
If there is any other features I am missing that should be mentioned please let me know.
Only thing that should be explained that isn't in comments in the script is the table, but really that should be self-explanatory. If anyone has a problem, just post here and I will help you.
FULLY TESTED BUG FREE
If you do use this, please keep my credits in the script, and it wouldn't hurt to get a like.
[Lua] potions.lua - Pastebin.com
Version 1.1 is done.
Fixed enum causing debug.
Updated for tfs 1.1 compatibility
Cleaned up monster checks: Now depend upon Player:isCreatureFriend() method.
Updated for tfs 1.1 compatibility
Cleaned up monster checks: Now depend upon Player:isCreatureFriend() method.
New version depends on this lib.
[TFS 1.X] Player:isCreatureFriend()
[Lua] potion - Pastebin.com
Sorry guys, apparently the code is over 1000 characters by itself.
NEW VERSION v12
Changelog:
- Replaced some parameters eg. player = caster ect.
- Updated for 1.2 and 1.3 (unoffically) compatibility.
- Integrated isCreatureFriend function in from lib.
- Updated Commentation.
- Reworked some variables (removed unused, renamed, added new).
Attachments
-
potions-v12.lua9.2 KB · Views: 247 · VirusTotal
Last edited by a moderator: