Greed Progs

For builders to discuss and ask building questions.
Post Reply
Lorelie

Greed Progs

Post by Lorelie » Mon Dec 01, 2003 5:15 pm

How would a prog limiting the number of items a person can buy from one mob look? Say I wanted to only allow the PC to buy two items. I was thinking....

Code: Select all

>intercept_prog buy~
if questr(QQXX, X,Y,$n) == 0
  mpmadd $n questr 22800 X Y 1
  munintercept
  sayto $n This is very rare armour.
  sayto $n You may only buy one more
  sayto $n piece from me.
else
  if questr(QQXX, X,Y,$n) == 1
    mpmadd $n questr 22800 X Y 1
    munintercept
    sayto $n This is very rare armour.
    sayto $n You may not buy any
    sayto $n more from me.
  else
       if questr(QQXX, X,Y,$n) == 2
        sayto $n I am sorry, you have
        sayto $n bought all you can
        sayto $n from me.
       endif
   endif
endif
~
Lorelie

Post by Lorelie » Tue Dec 02, 2003 2:54 pm

Could I please see an example of a buy prog for the above circumstance?

Thanks.
Post Reply