English [Mora]de/buffs script icon

7 comments
06.08.22 12:40:28 pm
like 4 like it!
56 kb, 145 Downloads
Mora
User
Offline Off
Hello there guyzz. us

I found no identical or similar scripts in the F.A. (my bleeding debuff is a crap y'all know) and so there is my vision of debuffs and buffs scripts.
Ladies and gentlemen, welcome:
IMG:https://i.ibb.co/SfJ5s0r/db-logo.png


Description: de'buff(next d'b) script is a kind of imposed effects which might be or good(health regeneration, saving ammo and others) or bad(bleeding, slow down and others). This script is realised with small hud interface that might tell You all needed information about current d'b You has.

I have put some examples in the db.lua already, You can try them by using commands:
>
db.all(id)
- simply imposes all d'b to the player
>
db.remove(id,'Name')
- removes a specific d'b
>
db.add(id,'Name'[,source])
- adds a specific d'b to the player.
'Name' in both commands is uses string.lower() and string.gsub(Name,'_',' ') (since cs2d console is not loving "Space bettween words") so in the console You might type /lua db.add(1,'Ammo_save') and it will work.

A things that ENGINE works with and things that SHOULD be in: >

^ keep in mind if You want to use new hook for Your d'b, You might firstly add this hook(if not exists) and set options there:
Code:
1
2
3
4
5
6
7
8
9
10
db.attack = function(id)
     for k,v in pairs(Players[id].db_table) do
          for key, value in pairs(db.list[k].Hooks) do
               if key == "attack" then
                    db.list[k].Hooks[key](id)
               end
          end
     end
end
addhook("attack","db.attack")


√ You can edit all the files but keep in mind they're not fully yours.
× I have no permission from Terraria guys, these images taken as example from wikipedia.
imageimageimageimageimage
edited 2×, last 23.08.22 09:43:42 am
ok This file has been reviewed and approved by Infinite Rain (13.08.22 10:18:55 pm)

Comments

7 comments
Goto Page
To the start Previous 1 Next To the start

Log in!

You need to log in to be able to write comments!Log in
23.12.22 04:48:45 pm
like I like it!
Up
Noobzz
User
Offline Off
Wow that was great! You're Creative
09.12.22 04:53:10 am
Up
Mochi
User
Offline Off
Terraria reference, this is good script, I Like it!
06.08.22 08:38:12 pm
Up
Mora
User
Offline Off
Yeah, I love Terraria, and the first idea instead of drawing my own examples of icon I firstly thought about this game)
06.08.22 07:26:42 pm
like I like it!
Up
Mami Tomoe
User
Offline Off
I like the Terraria vibes.
06.08.22 04:17:27 pm
like I like it!
Up
khaled1968
User
Offline Off
take my likes
06.08.22 04:13:09 pm
Up
Mora
User
Offline Off
Yeah, I'm trying to make some more functions experiments but I still don't know how I can optimize hooks usage without using two loops in cases when de'buff has no specified hook in the table but hook is triggered anyway.
06.08.22 02:27:29 pm
like I like it!
Up
Masea
Super User
Offline Off
It is elegant to link hooks and buffs together. Well done.
To the start Previous 1 Next To the start