;'Regulus' Auction event

Item = #PARAM1
Phrase = #PARAM2

If GetUserFlag(0,16) <> 0
	GoTo END
EndIf

Rand = Random(0,23)

If Phrase <> 0
	Rand = Phrase
EndIf

If Rand = 0
	SendMessageToAll("Regulus: Let's see what I have for sale...",#MSG_BROADCAST)
ElseIf Rand = 1
	SendMessageToAll("Regulus: Ah, time to feed the mortals.",#MSG_BROADCAST)
ElseIf Rand = 2
	SendMessageToAll("Regulus: Let's see, how can I temp thee today?",#MSG_BROADCAST)	
ElseIf Rand = 3
	SendMessageToAll("Regulus: Perhaps you're interested in one of these?",#MSG_BROADCAST)
ElseIf Rand = 4
	SendMessageToAll("Regulus: Ah, how great the greed of man... Excellent...",#MSG_BROADCAST)
ElseIf Rand = 5
	SendMessageToAll("Regulus: Would a 'discounted' item be of any interest to one of you?",#MSG_BROADCAST)
ElseIf Rand = 6
	SendMessageToAll("Regulus: What is it you are interested in, I wonder?",#MSG_BROADCAST)
ElseIf Rand = 7
	SendMessageToAll("Regulus: I accept all common forms of legal tender. Silver, gold, merchandise... blood...",#MSG_BROADCAST)
ElseIf Rand = 8
	SendMessageToAll("Regulus: My items, your blood.",#MSG_BROADCAST)
ElseIf Rand = 9
	SendMessageToAll("Regulus: Your kind bores me. If only I sold intelligence, I'd make a killing. That is, if any of you were smart enough to buy any.",#MSG_BROADCAST)
ElseIf Rand = 10
	SendMessageToAll("Regulus: Homines libenter quod volunt credunt. Fatuos.",#MSG_BROADCAST)
ElseIf Rand = 11
	SendMessageToAll("Regulus: Avarus animus nullo satiatur lucro.",#MSG_BROADCAST)
ElseIf Rand = 12
	SendMessageToAll("Regulus: This item is of a high quality, I assure you. Not that you'd know the difference.",#MSG_BROADCAST)
ElseIf Rand = 13
	SendMessageToAll("Regulus: Perhaps you might desire something like this?",#MSG_BROADCAST)
ElseIf Rand = 14
	SendMessageToAll("Regulus: A few coins, a drop of blood, and you get a nice item.",#MSG_BROADCAST)
ElseIf Rand = 15
	SendMessageToAll("Regulus: What's the harm in buying items from me? Aside from physical, mental, and spiritual agony, it can't hurt.",#MSG_BROADCAST)
ElseIf Rand = 16
	SendMessageToAll("Regulus: Here's an excellant item you might be interested in. It has minimal bloodstains.",#MSG_BROADCAST)
ElseIf Rand = 17
	SendMessageToAll("Regulus: You seem overburdened by all that silver. Perhaps I can be of some help.",#MSG_BROADCAST)
ElseIf Rand = 18
	SendMessageToAll("Regulus: What about this, my naive mortals?",#MSG_BROADCAST)
ElseIf Rand = 19
	SendMessageToAll("Regulus: Why don't I relieve you of some of that heavy silver?",#MSG_BROADCAST)
ElseIf Rand = 20
	SendMessageToAll("Regulus: Here's a item that you'll hopefully use to mangle the bodies of your companions.",#MSG_BROADCAST)
ElseIf Rand = 21
	SendMessageToAll("Regulus: No sense letting this item go to waste. You can have it at a 'premium' price.",#MSG_BROADCAST)
ElseIf Rand = 22
	SendMessageToAll("Regulus: I think you ought to part with some more of your silver. I can help.",#MSG_BROADCAST)
Else
	SendMessageToAll("Regulus: What have I, that you may want?",#MSG_BROADCAST)
EndIf

SetUserFlag(1,16,-1)

Rand = Random(0,12)

If Item <> 0
	Rand = Item
EndIf

Item = 0
Price = 0
If Rand = 0
	Item = 137
	Price = 60000
ElseIf Rand = 1
	Item = 196
	Price = 120000
ElseIf Rand = 2
	Item = 118
	Price = 35000
ElseIf Rand = 3
	Item = 238
	Price = 65000
ElseIf Rand = 4
	Item = 257
	Price = 100000
ElseIf Rand = 5
	Item = 479
	Price = 125000
ElseIf Rand = 6
	Item = 293
	Price = 75000
ElseIf Rand = 7
	Item = 762
	Price = 75000
ElseIf Rand = 8
	Item = 323
	Price = 32000
ElseIf Rand = 9
	Item = 387 
	Price = 240000
ElseIf Rand = 10
	Item = 528 
	Price = 80000
Else ;Extra chance to sell Regulus Scrolls
	Item = 207
	Price = 16000
EndIf

SetUserFlag(0,16,Price)
SetUserFlag(0,17,Item)

Timer(297,1000,0,0,0)
Timer(299,60000,Price,0,0)
SpawnItem(683,Item,10,5)

Label END

Continue = 1