SphereCommunity
Custom Buff / Debuff on Buff Bar - Printable Version

+- SphereCommunity (https://forum.spherecommunity.net)
+-- Forum: Sphere 0.56d (/Forum-Sphere-0-56d)
+--- Forum: Script Help (/Forum-Script-Help)
+--- Thread: Custom Buff / Debuff on Buff Bar (/Thread-Custom-Buff-Debuff-on-Buff-Bar)



Custom Buff / Debuff on Buff Bar - EOSCPM - 04-08-2014 11:07 PM

Hi again,

How can i show any buff/debuff effect on buffbar ?

XuN Smile ?


RE: Custom Buff / Debuff on Buff Bar - XuN - 04-08-2014 11:10 PM

What do you mean: the Buff icons or the Spells directly?


RE: Custom Buff / Debuff on Buff Bar - EOSCPM - 04-08-2014 11:12 PM

Sampe: i have necromancy skills i wanna show those skills effects on the buff bar


RE: Custom Buff / Debuff on Buff Bar - darksun84 - 04-08-2014 11:40 PM

I think you have to enable OF_Buff in the sphere.ini, then you can use addbuff, removebuff for handling them

ADDBUFF IconId ClilocOne ClilocTwo Seconds Text1 Text2(optional) Text3(optional)

REMOVEBUFF IconId

Buff icons are in spheredefs.scp


RE: Custom Buff / Debuff on Buff Bar - EOSCPM - 04-09-2014 11:53 PM

@darksun84

Iam using addbuff like that

src.ADDBUFF 1015 1075835 1075840 4 "TEST"

but iam receiving an error like "Invalid ADDBUFF argument number 5"

what can it be ?.


RE: Custom Buff / Debuff on Buff Bar - Shidhun - 04-10-2014 02:28 AM

Code:
// Default = Player to Update
// Arguments:
// Show Buff:  ID,ClilocName,ClilocDesc,ClilocArgs1(XX),ClilocArgs2(X),Duration
// Remove Buff: ID
[FUNCTION f_buffupdate]
IF (<ISPLAYER>)&&(<ISONLINE>)
    IF (<ARGV> > 5)
        //packet,len,uid,Icon,Flags,D00,Icon,Flags,D00,duration,w0,0,cliloc1,cliloc2,D0,W1​,numlen,num1,num2,4 bytes
          SENDPACKET 0DF W03c D<UID> W<ARGV[0]> W01 D00 W<ARGV[0]> W01 D00 W<ARGV[5]> W00 00 D<ARGV[1]> D<ARGV[2]> D00 W01 D06 B<EVAL 48+(<ARGV[3]>/10)> 0 B<EVAL 48+(<ARGV[3]>%10)> 0 09 00 B(48+<ARGV[4]>) 00 00 00 00 00 00 00
    ELSE
        SENDPACKET 0DF W00b D<UID> W<ARGN1> W00
    endif
endif
RETURN 0


Example :
SRC.f_buffupdate 03F4,1200000,1200001,0,0,<TIMER>



RE: Custom Buff / Debuff on Buff Bar - Feeh - 04-10-2014 02:29 AM

http://prerelease.sphere.torfo.org/revisions.php Wrote:05-09-2006, Nazghul
- Added: Option flag OF_Buffs. When on, Sphere will automatically add and remove buff and
debuff icons to the affected players.
- Updated: sphere.ini - added new optional flag OF_Buffs
- Added: Functions ADDBUFF, REMOVEBUFF for adding and removing buff/debuff icons.
syntax: ADDBUFF IconId ClilocOne ClilocTwo Seconds Text1 Text2(optional) Text3(optional)
The text fields are supposed to hold max. 3 characters each (numbers) and will
be cut off if larger.
REMOVEBUFF IconId
These functions only work with client 5.0.3 or above.

According to the revisions, you cannot enter a text, just a 3-digit number, however reading the packet format, it does not specify the length nor the type of text


RE: Custom Buff / Debuff on Buff Bar - Coruja - 04-13-2014 03:35 AM

you can't use a custom text on addbuff, the primary "text" will be the cliloc text, you can only customize the aditional text variable (and only if the cliloc needs an aditional variable)

Example using Invisibility:
-IconID = 1036 (the invisibility icon)
-Cliloc1 = 1075825 (text: "Invisibility")
-Cliloc2 = 1075826 (text: "Makes you hidden for ~var~ seconds") <-- I cant remember exactly the text of this cliloc but its something like this
-Seconds = 60
-Aditional Text = not needed in this case

so the function will be:
SRC.ADDBUFF 1036,1075825,1075826,60,
PS: note that the last args is empty because it's not needed

this will show a cliloc like this
Quote:INVISIBILITY:
Makes you hidden for 60 seconds

if you already have buff defs set on sphere_defs.scp, it will be even easier, all you need to do is use
SRC.ADDBUFF <DEF.bufficon_invisibility>,<DEF.buffcliloc_invisibility_1>,<DEF.buffcliloc_invisibility_2>,60,
and
SRC.REMOVEBUFF <DEF.bufficon_invisibility>


RE: Custom Buff / Debuff on Buff Bar - EOSCPM - 04-20-2014 11:39 PM

I missed 3 digits for text sorry and thank you all Smile


RE: Custom Buff / Debuff on Buff Bar - Swiftik023 - 03-28-2018 02:24 AM

where I can def new buff icon ID uppper 1048 ?

in sphere_defs.scp
bufficon_Sleep 1049
bufficon_StoneForm 1050
bufficon_SpellPlague 1051

and
example: src.addbuff 1051 1070813 3010207 0 0
dont woking: ERROR: Invalid Buff Icon ID