Take a look at:
viewtopic.php?f=16&t=1236&p=9844&hilit=TS_DFPacket#p9844. The function TS_DFPacket can be used to turn on or off the gump for each buff. The function quoted in that post has fixed clilocs and icons. You'd have to modify it to look up the correct ones based on the name of the buff.
If you want to use this sort of thing inside the WoD scripts, look for dotempmods.inc.
Turning on a gump:
As an example, in the function DoTempMod, just after SetObjProperty(who, "#mods", allmods);
add in a call to a function: SetBuffGump(who, stat, amt, duration);
Turning off a gump:
In the function UndoTheMod, use lines like TS_DFPacket(who, "Weakness", 0);
(0 is used to turn off the gump)
I wrote a little function called SetBuffGump to handle turning on the gump. I won't repeat the whole function, but for "Weakness" it would be:
Code:
function SetBuffGump(byref who, stat, amt, duration)
case ( stat )
"cstr":
TS_DFPacket(who, "Weakness", 1, duration, CStr(amt));
default:
return 1;
endcase
return 1;
endfunction
The link earlier to TS_DFPacket makes references to icons and clilocs. I ended up writing a cfg file to find the clilocs and icons to use. For "Weakness" the values might be:
icon 1042
cliloc1 1027988
cliloc2 1060485
Note: those cliloc entries might well be my own when I edited my cliloc.enu file.
Once you figure out that all you have to do is send a packet to turn on the buff's gump, and then another packet to turn off the buff's gump, the rest is detail. After that all you really have to do is refresh the gumps when you reconnect or logon and the mods haven't worn off.
I hope it helps. I'd publish the details of what I do, but it's so customised for my shard that it wouldn't be much help I don't think.