Post Reply 
 
Thread Rating:
  • 0 Votes - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Custom Buff / Debuff on Buff Bar
Author Message
EOSCPM
Apprentice
*

Posts: 22
Likes Given: 0
Likes Received: 0 in 0 posts
Joined: Apr 2014
Reputation: 0



Post: #1
Custom Buff / Debuff on Buff Bar
Hi again,

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

XuN Smile ?
04-08-2014 11:07 PM
Find all posts by this user Like Post Quote this message in a reply
XuN
Sphere Developer
*****

Posts: 852
Likes Given: 102
Likes Received: 156 in 119 posts
Joined: Jul 2013
Reputation: 30



Post: #2
RE: Custom Buff / Debuff on Buff Bar
What do you mean: the Buff icons or the Spells directly?
04-08-2014 11:10 PM
Find all posts by this user Like Post Quote this message in a reply
EOSCPM
Apprentice
*

Posts: 22
Likes Given: 0
Likes Received: 0 in 0 posts
Joined: Apr 2014
Reputation: 0



Post: #3
RE: Custom Buff / Debuff on Buff Bar
Sampe: i have necromancy skills i wanna show those skills effects on the buff bar
04-08-2014 11:12 PM
Find all posts by this user Like Post Quote this message in a reply
darksun84
Sir Spamalot
****

Posts: 1,687
Likes Given: 246
Likes Received: 162 in 151 posts
Joined: Mar 2012
Reputation: 35



Post: #4
RE: Custom Buff / Debuff on Buff Bar
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
04-08-2014 11:40 PM
Find all posts by this user Like Post Quote this message in a reply
EOSCPM
Apprentice
*

Posts: 22
Likes Given: 0
Likes Received: 0 in 0 posts
Joined: Apr 2014
Reputation: 0



Post: #5
RE: Custom Buff / Debuff on Buff Bar
@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 ?.
04-09-2014 11:53 PM
Find all posts by this user Like Post Quote this message in a reply
Shidhun
Journeyman
*

Posts: 59
Likes Given: 5
Likes Received: 3 in 3 posts
Joined: Jul 2012
Reputation: 1



Post: #6
RE: Custom Buff / Debuff on Buff Bar
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>
04-10-2014 02:28 AM
Find all posts by this user Like Post Quote this message in a reply
Feeh
Sphere Developer
*****

Posts: 156
Likes Given: 6
Likes Received: 40 in 29 posts
Joined: Sep 2012
Reputation: 4



Post: #7
RE: Custom Buff / Debuff on Buff Bar
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

Feeh/Epila - Nightly releases / SphereWiki / Github Issues / Sphere's GitHub
04-10-2014 02:29 AM
Find all posts by this user Like Post Quote this message in a reply
Coruja
Sphere Developer
*****

Posts: 987
Likes Given: 5
Likes Received: 226 in 187 posts
Joined: Jul 2012
Reputation: 7

Dimension Shard

Post: #8
RE: Custom Buff / Debuff on Buff Bar
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>
04-13-2014 03:35 AM
Find all posts by this user Like Post Quote this message in a reply
EOSCPM
Apprentice
*

Posts: 22
Likes Given: 0
Likes Received: 0 in 0 posts
Joined: Apr 2014
Reputation: 0



Post: #9
RE: Custom Buff / Debuff on Buff Bar
I missed 3 digits for text sorry and thank you all Smile
04-20-2014 11:39 PM
Find all posts by this user Like Post Quote this message in a reply
Swiftik023
Apprentice
*

Posts: 8
Likes Given: 0
Likes Received: 0 in 0 posts
Joined: Jan 2018
Reputation: 0



Post: #10
RE: Custom Buff / Debuff on Buff Bar
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
03-28-2018 02:24 AM
Find all posts by this user Like Post Quote this message in a reply
Post Reply 


Forum Jump:


User(s) browsing this thread: 1 Guest(s)