mIRC Home    About    Download    Register    News    Help

Print Thread
Joined: Aug 2008
Posts: 14
C
Cred Offline OP
Pikka bird
OP Offline
Pikka bird
C
Joined: Aug 2008
Posts: 14
on $1:TEXT:/^!bought \d+$/iS:#private-merch:

Problem:
I got stuck from here when oliver told me its the middle part of the script i need and i need to start with variables.

Purpose:
I have a merching team and i want to be able to know how much of an item my team ahd bought. So when they type !bought 10000 or !bought 107 it will add it together and it will say how many in total are bought when you type @bought. Also i would like it to be able to take away some of the items when a member types !sold 1000 or !sold 894.

If you could help me i would realy apreciate it thanks.

Joined: Aug 2004
Posts: 7,252
R
Hoopy frood
Offline
Hoopy frood
R
Joined: Aug 2004
Posts: 7,252
Code:
on *:text:!bought &:#private-merch:{
  if $$2 !isnum {    .notice $nick Usage: !bought <number>  }
  else inc %bought $$2
}
on *:text:!sold &:#private-merch:{
  if $$2 !isnum {    .notice $nick Usage: !sold <number>  }
  else inc %sold $$2
}
on *:text:@bought:#private-merch:{
  .notice $nick %bought bought, %sold sold, $calc(%bought - %sold) in stock
}


Link Copied to Clipboard