Welcome to the Builder Academy

Question Events: How to display 'em

More
05 Nov 2012 09:59 #986 by zusuk
Someone asked me on my MUD how to display active events to your char, you can add this to its own little command or pop it into your score sheet.

On that note, I do want to add the timer on how much time is left on these, so if someone knows off the top of their head how to display that, please add it to this post. Otherwise I will try to research it later.

Cheers folks :)
Code:
send_to_char(ch, "\tC-------------- \tWCool Downs\tC -------------------------------\tn\r\n"); if (char_has_mud_event(ch, eTAUNT)) send_to_char(ch, "Taunt\r\n"); if (char_has_mud_event(ch, eLAYONHANDS)) send_to_char(ch, "Lay on Hands\r\n"); if (char_has_mud_event(ch, eTREATINJURY)) send_to_char(ch, "Treat Injuries\r\n"); if (char_has_mud_event(ch, eMUMMYDUST)) send_to_char(ch, "Epic Spell: Mummy Dust\r\n"); if (char_has_mud_event(ch, eDRAGONKNIGHT)) send_to_char(ch, "Epic Spell: Dragon Knight\r\n"); if (char_has_mud_event(ch, eGREATERRUIN)) send_to_char(ch, "Epic Spell: Greater Ruin\r\n"); if (char_has_mud_event(ch, eHELLBALL)) send_to_char(ch, "Epic Spell: Hellball\r\n"); if (char_has_mud_event(ch, eEPICMAGEARMOR)) send_to_char(ch, "Epic Spell: Epic Mage Armor\r\n"); if (char_has_mud_event(ch, eEPICWARDING)) send_to_char(ch, "Epic Spell: Epic Warding\r\n");

Website
www.luminariMUD.com

Main Game Port
luminariMUD.com:4100

Please Log in or Create an account to join the conversation.

More
06 Nov 2012 04:47 #995 by Vatiken

zusuk wrote: Someone asked me on my MUD how to display active events to your char, you can add this to its own little command or pop it into your score sheet.

On that note, I do want to add the timer on how much time is left on these, so if someone knows off the top of their head how to display that, please add it to this post. Otherwise I will try to research it later.

Cheers folks :)

Code:
send_to_char(ch, "\tC-------------- \tWCool Downs\tC -------------------------------\tn\r\n"); if (char_has_mud_event(ch, eTAUNT)) send_to_char(ch, "Taunt\r\n"); if (char_has_mud_event(ch, eLAYONHANDS)) send_to_char(ch, "Lay on Hands\r\n"); if (char_has_mud_event(ch, eTREATINJURY)) send_to_char(ch, "Treat Injuries\r\n"); if (char_has_mud_event(ch, eMUMMYDUST)) send_to_char(ch, "Epic Spell: Mummy Dust\r\n"); if (char_has_mud_event(ch, eDRAGONKNIGHT)) send_to_char(ch, "Epic Spell: Dragon Knight\r\n"); if (char_has_mud_event(ch, eGREATERRUIN)) send_to_char(ch, "Epic Spell: Greater Ruin\r\n"); if (char_has_mud_event(ch, eHELLBALL)) send_to_char(ch, "Epic Spell: Hellball\r\n"); if (char_has_mud_event(ch, eEPICMAGEARMOR)) send_to_char(ch, "Epic Spell: Epic Mage Armor\r\n"); if (char_has_mud_event(ch, eEPICWARDING)) send_to_char(ch, "Epic Spell: Epic Warding\r\n");


char_had_mud_event() returns the the Mud Event, so you technically do something like:
Code:
if ((pMudEvent = char_has_mud_event(ch, eTAUNT))) send_to_char(ch, "Taunt: Duration: %ld\r\n", event_time(pMudEvent->pEvent));

tbaMUD developer/programmer

Please Log in or Create an account to join the conversation.

More
06 Nov 2012 13:04 #997 by zusuk
Ah awesome, thanks Vatiken :)

Website
www.luminariMUD.com

Main Game Port
luminariMUD.com:4100

Please Log in or Create an account to join the conversation.

Time to create page: 0.185 seconds