BEGIN 9xGENIE

IF~Global("ISHGenie","GLOBAL",0)~THEN BEGIN Genie000
SAY @0
IF~~THEN REPLY @1 GOTO Genie001
IF~~THEN REPLY @2 GOTO Genie002
END

IF~~THEN BEGIN Genie001
SAY @3
=
@4
=
@5
IF~~THEN REPLY @6 GOTO Genie003
IF~~THEN REPLY @7 GOTO Genie002
END

IF~~THEN BEGIN Genie002
SAY @8
IF~~THEN DO ~SetGlobal("ISHGenie","GLOBAL",10) DestroySelf()~ EXIT
END

IF~~THEN BEGIN Genie003
SAY @9
IF~~THEN DO ~SetGlobal("ISHGenie","GLOBAL",1)~ EXIT
END

IF~GlobalGT("ISHGenie","GLOBAL",0) GlobalLT("ISHGenie","GLOBAL",3)~THEN BEGIN Genie004
SAY @10
IF~Dead("9xGBoy") Global("ISHGenie","GLOBAL",2)~THEN REPLY @11 GOTO Genie006
IF~!Dead("9xGBoy") Global("ISHGenie","GLOBAL",2)~THEN REPLY @12 GOTO Genie005
IF~~THEN REPLY @13 GOTO Genie007
END

IF~~THEN BEGIN Genie006
SAY @14
=
@15
=
@16
IF~~THEN DO ~SetGlobal("ISHGenie","GLOBAL",5) GivePartyGold(5000)~ EXIT
END

IF~~THEN BEGIN Genie005
SAY @17
=
@18
=
@19
=
@20
IF~~THEN REPLY @21 GOTO Genie007
IF~~THEN REPLY @22 GOTO Genie008
END

IF~~THEN BEGIN Genie007
SAY @23
IF~~THEN DO ~SetGlobal("ISHGenie","GLOBAL",7) DestroySelf()~ EXIT
END

IF~~THEN BEGIN Genie008
SAY @24
IF~~THEN DO ~SetGlobal("ISHGenie","GLOBAL",6) GiveItemCreate("WAND09",Player1,20,0,0) GiveItemCreate("ISHWAND",Player1,10,0,0) DestroySelf()~ EXIT
END