! ! Default Fortune Teller script.. Well, Sort of. ! The orginal one had a BUG, but luckily I, AbyssDragon, found it and zapped ! it with bug spray. All I had to do was add 1 shrimpy little line to fix it. ! I could tell you what that was, but then I'd have to kill you. ! Just replace this with the old TELLER.SCR and the BUG will be fixed, unless ! you've done something really wierd with your other scripts. ! ! (c) DC Software, 1989-1995 ! Edited by AbyssDragon with no affiliation to DC Software !------------------------------------------------------------------------! :@TALK ! Talk to the character ! !------------------------------------------------------------------------! if player.hp = 0 then writeln( player.name, " is dead!" ); STOP; endif; if npc.count = 0 then L0 = msgbox( ERROR, 1, "Ok", "ERROR: NPC Script called with no NPC selected!" ); STOP; endif; if npc.picture >= 0 then viewpcx(npc); endif; loadtext( npc.text ); ! Get the NPC's text block ! loadvfl( npc.voice ); ! Get the NPC's voice block ! ! First, say hello.. ! if NPC.V0 > 0 then writeln( "Hello ", player.name, ". What brings you back?" ); else writeln( "How may I help you?" ); endif; ! Now, set some variables.. NPC.V0 = 1; ! From know on, remember we've been here L1 = select$( "Tell Fortune", npc.value, "Leave", -1 ); if L1 <> 0 then if NPC.V0 > 0 then writeln( "As you wish.." ); else writeln( "Fine, but you may live to regret it.." ); endif; goto XSTOP; endif; if npc.value > group.gold then writeln( "You don't have enough money.." ); goto XSTOP; endif; dec( group.gold, npc.value ); readtext( npc.text ); pause; paint(window); goto XSTOP; !-----------------------------------------------------------------! ! All STOPs now lead here so the screen can be restored if needed ! !-----------------------------------------------------------------! :XSTOP if npc.picture >= 0 then paint(window); ! Assumes the picture fits in the window ! endif; stats(-1); ! Restore Stats area ! STOP;