BEGIN wlsbcw01

IF ~Global("wl_oublek_portal","GLOBAL",5)~ THEN BEGIN wl_oublek_portal_cowled1 SAY ~Yes? Why are you bothering me?~
	++ ~Oublek sent me, I'm here to assist you.~ + wl_oublek_portal_cowled2
	++ ~Never mind, sorry to bother you.~ EXIT
END

IF ~~ THEN BEGIN wl_oublek_portal_cowled2 SAY ~Ah, so the fat imbecile finally found me some fodder... Let me have a look at you... Hmm, I guess you'll do. Listen carefully, I won't repeat myself.~ 
	IF ~TRUE()~ THEN GOTO wl_oublek_portal_cowled3
END

IF ~~ THEN BEGIN wl_oublek_portal_cowled3 SAY ~We've detected a portal to another plane northeast of this scattering of hovels the locals call a town. No doubt the work of some poorly trained deviant who paid for their ineptitude with their life. Regardless, the portal needs to be closed by someone skilled in the magical arts...~
	IF ~OR(2)
		Class(Player1,MAGE_ALL)
		Class(Player1,BARD_ALL)~ THEN REPLY ~So that's where I come in?~ + wl_oublek_portal_cowled3a
	IF ~!Class(Player1,MAGE_ALL)
		!Class(Player1,BARD_ALL)
		OR(2)
			Class([PC],BARD_ALL)
			Class([PC],MAGE_ALL)~ THEN REPLY ~One of my group can...~ + wl_oublek_portal_cowled3a
	IF ~!Class([PC],BARD_ALL)
		!Class([PC],MAGE_ALL)~ THEN REPLY ~That really isn't my area of expertise...~ + wl_oublek_portal_cowled3b
END

IF ~~ THEN BEGIN wl_oublek_portal_cowled3a SAY ~Don't be preposterous, this is not a job for a novice! And don't interrupt! As I was saying, someone skilled in the magical arts needs to close the portal and that's obviously why I am here...~
	IF ~TRUE()~ THEN GOTO wl_oublek_portal_cowled4
END

IF ~~ THEN BEGIN wl_oublek_portal_cowled3b SAY ~Of course it isn't, don't interrupt! As I was saying, someone skilled in the magical arts needs to close the portal and that's obviously why I am here...~
	IF ~TRUE()~ THEN GOTO wl_oublek_portal_cowled4
END

IF ~~ THEN BEGIN wl_oublek_portal_cowled4 SAY ~Your job is fittingly simple - you need to keep whatever comes through the portal distracted and out of my way while I do my work. Clear?~
	IF ~CheckStatGT(Player1,9,INT)~ THEN REPLY ~Clear.~ + wl_oublek_portal_cowled5
	IF ~CheckStatGT(Player1,9,INT)~ THEN REPLY ~Actually, could we go over it one more time?~ + wl_oublek_portal_cowled_fail
	IF ~CheckStatLT(Player1,10,INT)~ THEN REPLY ~Umm... I didn't get all of that...~ + wl_oublek_portal_cowled_fail
END

IF ~~ THEN BEGIN wl_oublek_portal_cowled5 SAY ~Good. Meet me behind the abandoned house northeast of here. And make haste, this is urgent.~
	IF ~~ THEN DO ~
		SetGlobal("wl_oublek_portal","GLOBAL",6)
		AddJournalEntry(@21,QUEST)
		EscapeArea()~ EXIT
END

IF ~~ THEN BEGIN wl_oublek_portal_cowled_fail SAY ~Never mind, you clearly lack even the modest level of intellect this task calls for. I'll have to stress my requirements to Oublek once more...~
	IF ~~ THEN DO ~
		SetGlobal("wl_oublek_portal","GLOBAL",99)
		AddJournalEntry(@24,QUEST)
		IncrementGlobal("wl_reputation_cowled","GLOBAL",-1)
//		DisplayString(Player1,@9012)
		EscapeArea()~ EXIT
END

IF ~Global("wl_oublek_portal","GLOBAL",7)~ THEN BEGIN wl_oublek_portal_cowled6 SAY ~Good, you're here. The portal is just a short walk to the northeast. Remember, I'll deal with the portal, you just keep whatever comes through distracted. I'll take the lead.~
	IF ~TRUE()~ THEN DO ~
		SetGlobal("wl_oublek_portal","GLOBAL",8)
		AddJournalEntry(@22,QUEST)
		MoveToPoint([3525.1665])~ EXIT
END

IF ~Global("wl_oublek_portal","GLOBAL",3) THEN BEGIN ~wl_oublek_portal_cowled_end SAY ~Good job. Oublek will pay you for your services, but I think you've earned yourself a bonus from me.~
	IF ~TRUE()~ THEN DO ~
		GiveItemCreate("RNDGEM04",Player1,1,1,0)
		IncrementGlobal("wl_reputation_cowled","GLOBAL",1)
//		DisplayString(Player1,@9010)
		EscapeArea()~ EXIT
END