Anyone have a simple script I can attach to a item to emulate the PC flipping a coin? I have a follower of Tymora that makes his decisions by tossing a coin.
2 Likes
This should work for a PC:
// i_arianna0coin_ac
//:://////////////////////////////////////////////
/*
Simulate a heads or tails result
*/
//:://////////////////////////////////////////////
void main()
{
object oPC = GetItemActivator();
string sResult = "heads";
if (d2() == 1) sResult = "tails";
SendMessageToPC(oPC, "I tossed the coin, and got " + sResult);
}
For an NPC, you’ll probably want a ga_tosscoin script (the NPC will start a conversation, and then tell the result).
3 Likes
THANKS! Will try it out