Top

Shop Script


mIRC Code
+ 0 likes
Please Register to submit score.
Bookmark and Share
Average Score  0.0 (of 0 scores)
Date Added  Sep 06, 2007
Last Updated  Sep 06, 2007
Tags  ini  script  shop 

Introduction

I made this shop script for someone on the forum, so i decided to post it. You can have items for sale, and its all in an .ini file.

you start off with 1000 dollars, you can edit it to ur likings

Replace the owners name with BOTOWNER

Owner Commands:
~!addproduct <product name> <dollars worth>
~!give <nick> <dollars>

Other Commands:
~!buy <product>
~!catalog

plz leave some comments and tell me how you like it, or how i can improve it, its like my first time doing ini's :P

Grab the Code

on *:text:*:#:{ 
  if ($1 == !addproduct && $nick == BOTOWNER) writeini products.ini " $+ $gettok($2-,1- $+ $calc($numtok($2-,32) - 1),32) $+ " Value $gettok($2-,$numtok($2-,32),32) 
  if ($1 == !givemoney && $nick == BOTOWNER) set %money [ $+ [ $2 ] ] $calc($gettok(%money [ $+ [ $2 ] ],2,32) + $3)) 
  if ($1 == !buy && $ini(products.ini,$2-)) { 
    msg $chan $nick has bought a $2- for $readini(products.ini, $2-, value) dollars. 
    dec %money [ $+ [ $nick ] ] $readini(products.ini, $2-, value) 
    msg $chan You have %money [ $+ [ $nick ] ] dollars left, $nick $+ . 
  } 
  if ($1 == !catalog) { 
    var %catalog = 1 
    while (%catalog <= $ini(products.ini,0)) { 
      msg $chan Item %catalog $+ : $ini(products.ini,%catalog) ~ $readini(products.ini, $ini(products.ini,%catalog), value) dollars. 
      inc %catalog 
    } 
  } 
} 
on *:join:#: if (%money [ $+ [ $nick ] ] == $null) set %money [ $+ [ $nick ] ] 1000 

Comments

  (13)  RSS
mountaindew
Comments: 1,826
 
mIRC Snippet:  Shop Script
Posted on Sep 6, 2007 3:46 pm
buy some stuff with it :P
WIRED
Comments: 74
 
mIRC Snippet:  Shop Script
Posted on Sep 6, 2007 7:31 pm
:o nice
DarkDaemon
Comments: 49
 
mIRC Snippet:  Shop Script
Posted on Oct 19, 2007 6:22 pm
Nice JOB Now I can do my shopping on hawkee!
mountaindew
Comments: 1,826
 
mIRC Snippet:  Shop Script
Posted on Oct 19, 2007 6:23 pm
lol
DarkDaemon
Comments: 49
 
mIRC Snippet:  Shop Script
Posted on Nov 6, 2007 7:29 pm
mountaindew there a server u on?
mountaindew
Comments: 1,826
 
mIRC Snippet:  Shop Script
Posted on Nov 8, 2007 1:50 pm
i dont really go on irc, but im occasionally on #mircscripting on mesa.az.us.undernet.org
peacex
Comments: 1
 
mIRC Snippet:  Shop Script
Posted on Jan 27, 2008 4:09 pm
Very nice script. But how about more input stuff, like trading between nicks, gambling with money (some easy and fast game like tossing a coin) or some of this:
!money - to see how much money you have
!sell <product> <gold> - to sell product to the shop (since BOTOWNER makes all products, he will define buy price, while sell price is like 60-80% of buying one)
mountaindew
Comments: 1,826
 
mIRC Snippet:  Shop Script
Posted on Jan 28, 2008 1:54 pm
well i wasn't really into making this a complex script, someone on the forum wanted something simple a while back so i decided to post it
Noa Destiny
Comments: 29
 
mIRC Snippet:  Shop Script
Posted on Apr 3, 2008 9:44 am
you Should make it where you can sell items and get money back :P but you get to select the price you want to sell it at.
Dj_801
Comments: 102
 
mIRC Snippet:  Shop Script
Posted on Nov 5, 2008 6:06 pm
Code:

on *:LOAD: {
  /set $shop.owner $$?="Bot Owner"
}

so ppl don't have to Replace the owners name with BOTOWNER
WDragon
Comments: 8
 
mIRC Snippet:  Shop Script
Posted on Jan 31, 2009 1:28 pm
is there anyway you can make it so it checks the person has enough money to buy the product?
XVII
Comments: 3
 
mIRC Snippet:  Shop Script
Posted on Apr 20, 2009 10:29 am
Man... I am the only one that can't get this to work... That sucks.... :(

I have messed around with it over and over... And finally I've got a response from it.. It's an error message but at least it's now reacting....

* /writeini: insufficient parameters (line 2, remote.ini)

Scratch that got it working now.....

Is there a way you can see what each user has bought? And how do you remove products from list?

More Updates if you have no money you can STILL purchase items it puts you in the minus....

the !give (me) (kaching) doesn't work......

Looking in the code it says !givemoney ? I tried that, that also don't work.

random person
Comments: 2
 
mIRC Snippet:  Shop Script
Posted on Apr 20, 2009 1:14 pm
how come you can buy anything no matter what amount of money you have?
if you have 0 money and buy something it goes negative

Commenting Options

Register or Login to Hawkee.com or use your Facebook or Twitter account by clicking the corresponding button below.

  
Bottom