on *:text:give * a present TreeServ:#: { inc %presents.num 1
if ($2 ison $chan) { msg $chan $2 $+ $chr(44) you have received a present, check your PM! (%presents.num presents given so far) | msg $2 $nick gives you a present, To open type 'open present' Note: For each present you are given, you may open that many! You have: --- presents! }
else { msg $2 $nick gives you a present, To open type 'open present' Note: For each present you are given, you may open that many! | notice $nick present sent. }
inc %pres. [ $+ [ $2 ] ] 1 } }
on *:text:open present:?:{ if (%pres. [ $+ [ $nick ] ] != $null) && (%pres. [ $+ [ $nick ] ] != 0) { msg $nick You open the present... | msg $nick It is $read(presents.txt,n) | dec %pres. [ $+ [ $nick ] ] 1 } }