void main() { // Retrieve the object/item being used object oItem = GetEventParamObject(0); // Assuming OBJECT_SELF is the PC using the item object oPC = OBJECT_SELF; string sPCName = GetName(oPC); // Define the text to be spoken and messaged // The delay in seconds before the message is sent // Command the PC to speak a string immediately AssignCommand(oPC, ActionSpeakString( " [" + sPCName + " consumes a thick, juicy brownie.]")); if(GetHasFeat(FEAT_DIAMOND_BODY, oPC) || GetHasFeat(FEAT_VENOM_IMMUNITY, oPC)) { // If the PC has either feat, they are immune to the effects SendMessageToPC(oPC, "You snort the blue, grotty powder, but since you're immune to poisons and disease, it doesn't have any effect on you."); } else { // Send a delayed message to the PC DelayCommand(5.0, SendMessageToPC(oPC, " [As you snort the powder, you feel your head feeling fuzzy, funny. Words begin to slur.]")); DelayCommand(35.0, SendMessageToPC(oPC, "[Soon, you begin to feel giddy, finding humor in strange things. Your vision seems to broaden- what was once at the corner of your eye is now visible.]")); DelayCommand(60.0, AssignCommand(oPC, ActionSpeakString(" [" + sPCName + "'s eyes dilate slowly, features flush, but lips turning slightly blue.]"))); DelayCommand(65.0, SendMessageToPC(oPC, "[Your mind seems to expand, what was once a locked closet because a vast mansion, filled with answers. A formless, colorful blob is now your butler, guiding you through the hallways of your mind. Your speech is thoroughly slurred, barely comprehensible, but you firmly believe you're speaking the elegant truths of the universe, the vast encyclopedia of knowedge before you, waiting to be uncovered.]")); DelayCommand(215.0, SendMessageToPC(oPC, "[Objects in motion begin to leave after images, your mind seems to find this particularly hilarious...]")); DelayCommand(400.0, SendMessageToPC(oPC, "[You feel a sudden, and overwhelming desire for food. A snack attack, of the highest degree!].")); DelayCommand(465.0, SendMessageToPC(oPC, "[Colors tremble in your view, or is the shapes of the people and objects you see?]")); DelayCommand(530.0, AssignCommand(oPC, ActionSpeakString(" " + sPCName + "'s stomach rumbles loudly."))); DelayCommand(700.0, SendMessageToPC(oPC, "[No matter how much you eat, you remain hungry, the colors fill your vision, a glorious kaledeiscope, a mental landscape by which tapestries are made and paintings are created. You feel like dipping your fingers into the paint and smearing it over to create something amazing...]")); DelayCommand(1200.0, SendMessageToPC(oPC, "[Slowly, things return to normal, you're left with a splitting headache, that no amount of caffeine will cure...]")); } }