Initial commit
Adding all of the current content for Anphillia Unlimited.
This commit is contained in:
48
_module/nss/anph_goinroll10.nss
Normal file
48
_module/nss/anph_goinroll10.nss
Normal file
@@ -0,0 +1,48 @@
|
||||
void main()
|
||||
{
|
||||
|
||||
object oGoinus = OBJECT_SELF;
|
||||
object oPlayer = GetLastSpeaker();
|
||||
int goldnumber = GetGold(oPlayer);
|
||||
|
||||
if (goldnumber < 10)
|
||||
{
|
||||
SpeakString("Come back when ye have enough gold chap");
|
||||
}
|
||||
if (goldnumber >= 10)
|
||||
{
|
||||
TakeGoldFromCreature(10, oPlayer,TRUE);
|
||||
|
||||
int nRollGoinus=d6();
|
||||
int nRollPlayer=d6();
|
||||
|
||||
if (nRollPlayer > nRollGoinus)
|
||||
{
|
||||
DelayCommand( 6.0, SpeakString("Argh...you won..there, take yer gold"));
|
||||
DelayCommand( 6.0, GiveGoldToCreature(oPlayer,20));
|
||||
}
|
||||
|
||||
if (nRollPlayer == nRollGoinus)
|
||||
{
|
||||
DelayCommand( 6.0, SpeakString("Hmmm...that'd be a tie then...well, take yer gold back.."));
|
||||
DelayCommand( 6.0, GiveGoldToCreature(oPlayer,10));
|
||||
}
|
||||
if (nRollPlayer < nRollGoinus)
|
||||
{
|
||||
DelayCommand( 6.0, SpeakString("Yeah...I won !"));
|
||||
}
|
||||
|
||||
string sNamePC = GetName(oPlayer);
|
||||
string sNameGoin = GetName(oGoinus);
|
||||
|
||||
string sRollGoinus=IntToString(nRollGoinus);
|
||||
string sRollPlayer=IntToString(nRollPlayer);
|
||||
|
||||
AssignCommand( oGoinus, ActionPlayAnimation (ANIMATION_LOOPING_GET_MID, 3.0, 3.0));
|
||||
DelayCommand( 2.0, AssignCommand( oGoinus, SpeakString(sNameGoin+"Rolled a d6 and gets a: "+sRollGoinus)));
|
||||
|
||||
DelayCommand( 2.0, AssignCommand( oPlayer, ActionPlayAnimation (ANIMATION_LOOPING_GET_MID, 3.0, 3.0)));
|
||||
DelayCommand( 4.0, AssignCommand( oPlayer, SpeakString(sNamePC+"Rolled a d6 and gets a: "+sRollPlayer)));
|
||||
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user