begin _TOH_ruby
short doOnce
float timer
;GLOBAL b_PickedUp (Gameplay->Globals)
if (MenuMode == 1 )
Return
endif
if ( OnActivate == 1 )
set b_PickedUp to 1
endif
if ( b_PickedUp == 1 )
Return
endif
if ( GetDistance Player < 256 )
if ( doOnce == 0 )
MessageBox "You come across a finely crafted marble statue holding out a bowl. A woman's voice calls out to you, seeming to come from everywhere. Speaking in unison with the woman's voice is a deeper, darker sounding voice. 'Through darkness into light the stranger has come, a path seldom traveled and conquered by none. For they who have overcome, I offer thee a gift. A gift for the strong, a gift for the swift.'".
set doOnce to 1
endif
set timer to ( timer + GetSecondsPassed )
if ( timer >= 30 )
if ( doOnce == 1 )
Cast "blood sacrifice" Player
set doOnce to 2
endif
endif
else
if ( timer != 0 )
set timer to 0
endif
if ( doOnce != 0 )
set doOnce to 0
endif
endif
end
I have no idea about scripting, so I don't know where the problem with picking up the ruby could be coming from. One thing I wanted to make sure of is that IF the player DOES pick up the ruby and leaves the area, the message will no longer be displayed and the spell will no longer be cast for the rest of the game, even if he/she returns to the statue. This might already be present in the script. If the player does NOT pick up the ruby, I do want the message to be displayed again, but not necessarily every time he/she approcahes the statue. In other words, I don't want this message fillinng up the screen. Maybe every so often to give each message time to disappear on it's own. Since I can't pick up the ruby, which triggers the script, I can't test any of this out, including the time delay and spell casting. Anyone have any ideas on what I should do?
Edit: I'm not exactly sure how to hide the script (or any other long entries in the forums) so it doesn't take up half the page. If someone could tell me how to do that, that would also be very appreciated by me (as well as anyone else reading).