User Control Panel
Advertisements

HELP US, HELP YOU!

Shop
Goto page Previous  1, 2, 3  Next
 
Post new topic   Reply to topic    Bot Depot Forum Index -> Code Help
View unanswered posts
Author Message
virus101
Young One
Young One


Joined: 17 Mar 2004
Posts: 72

Reputation: 27.5Reputation: 27.5Reputation: 27.5

PostPosted: Tue Apr 06, 2004 7:38 pm    Post subject: Reply with quote

i have a good rpg i made with a shop, andromeda ... joe stole mine Razz maybe i could convert it to morph, add me to msn (codeblooded@hotmail.com)
Back to top
JoeX
Agent
Agent


Joined: 02 Jan 2004
Posts: 2153

Reputation: 72.7

PostPosted: Tue Apr 06, 2004 7:44 pm    Post subject: Reply with quote

dont lie, I used the thing keenie had the return bit thing
_________________
Heroes NBC
Back to top
virus101
Young One
Young One


Joined: 17 Mar 2004
Posts: 72

Reputation: 27.5Reputation: 27.5Reputation: 27.5

PostPosted: Tue Apr 06, 2004 10:03 pm    Post subject: Reply with quote

imma blow you up... *lazy* stole it from me once ;p *shoot shoot bang boom*.. leet haxor.. :wub: <-- lmao
Back to top
Cer
Upgraded Agent
Upgraded Agent


Joined: 03 Feb 2004
Posts: 3776
Location: Michigan
Reputation: 146.9
votes: 4

PostPosted: Tue Apr 06, 2004 11:09 pm    Post subject: Reply with quote

Well, I have my bot's point system worked out.

Add cody@cks.kirsle.net and type !pinfo

I made my own slots that use numbers instead of emoticons because I want it to be fully compatible and AIM doesn't have access to all those MSN emoticons, so... yeah.

In the slots, however much you bet... if your slot result is positive, you get that + what you betted, added to your points. But if the slot result is negative, you get that - what you betted, removed from your points. So if you bet all you have, you can double+ if you win, or double- if you lose. Razz

_________________
Current Site (2008) http://www.cuvou.com/
Back to top
Calum
Not Yet a God
Not Yet a God


Joined: 21 Feb 2004
Posts: 373
Location: england
Reputation: 34.7Reputation: 34.7Reputation: 34.7

PostPosted: Tue Apr 06, 2004 11:57 pm    Post subject: Reply with quote

Cer Your Points Thing Works Really Well
You know for them Do You Use Callbacks
And Is There Anyway To Do Them Without?
Cause i might give it a try
Back to top
Cer
Upgraded Agent
Upgraded Agent


Joined: 03 Feb 2004
Posts: 3776
Location: Michigan
Reputation: 146.9
votes: 4

PostPosted: Wed Apr 07, 2004 12:20 am    Post subject: Reply with quote

Nah I just store the points in a text file (well, I store all userdata together in each user's TXT file, points are there too).

And then I made a sub that adds, subtracts, or sets equal a number of points. It's called as easy as this:

# To add 20 points:
&point_manager ($client,$listener,'+',20);

# Remove
&point_manager ($client,$listener,'-',20);

# Set equal
&point_manager ($client,$listener,'=',20);

$client = username, i.e. myname@nowhere.net
$listener = messenger name, i.e. MSN

_________________
Current Site (2008) http://www.cuvou.com/
Back to top
Calum
Not Yet a God
Not Yet a God


Joined: 21 Feb 2004
Posts: 373
Location: england
Reputation: 34.7Reputation: 34.7Reputation: 34.7

PostPosted: Wed Apr 07, 2004 1:32 am    Post subject: Reply with quote

Andromeda is confusing

maya is well better i think
Back to top
Stephen
Senior Member
Senior Member


Joined: 03 Dec 2003
Posts: 159

Reputation: 32.8Reputation: 32.8Reputation: 32.8

PostPosted: Wed Apr 07, 2004 2:02 am    Post subject: Reply with quote

Morphious v2.0 will be coming out soon. Smile
Back to top
Calum
Not Yet a God
Not Yet a God


Joined: 21 Feb 2004
Posts: 373
Location: england
Reputation: 34.7Reputation: 34.7Reputation: 34.7

PostPosted: Wed Apr 07, 2004 2:41 am    Post subject: Reply with quote

A Bit Of Topic But Cool

Gotta See It Very Happy I Can Port Some Commands From it Very Happy

Man I :wub: maya and morph
Back to top
m4g3_o_f4t3
Newbie
Newbie


Joined: 19 Mar 2004
Posts: 42
Location: New Zealand
Reputation: 26.8Reputation: 26.8Reputation: 26.8

PostPosted: Wed Apr 07, 2004 7:11 am    Post subject: Reply with quote

ok thanks to rickbot i now have shop just wondering if i made !shopmenu
like this...

Code:
<br />$self->sendmsg("Burger, Costs £2.30\nFries, Costs £1.00\nCoke, Costs £3.50");<br />

then the user types,

User:!Burger
Bot: Here you go £2.30 has been deducted from your bank

how would it take the money out?

sorry bout this lol
Back to top
rickbot
Young One
Young One


Joined: 12 Mar 2004
Posts: 55

Reputation: 27.3Reputation: 27.3Reputation: 27.3

PostPosted: Wed Apr 07, 2004 8:14 am    Post subject: Reply with quote

it would have to be stored in a text file, but the '
Code:
<br />$self->sendmsg("Burger, Costs £2.30\nFries, Costs £1.00\nCoke, Costs £3.50");<br />
' would work perfect. I'd add it in the code i gave you though, it just seems to work better. instead of having 2 seperate commands in games. You get me?
So i suppose..added to the code i gave you already. add

Quote:
if ($msg =~ /^shopmenu (.*)$/) {
open (MENU, ">./Lib/Store/Shop/$username.txt");
$self->sendmsg("Burger, Costs £2.30\nFries, Costs £1.00\nCoke, Costs £3.50");
Then, !shopmenu EMAILADDRESS would work. if you dont want it like that you know the bits to remove.
Back to top
m4g3_o_f4t3
Newbie
Newbie


Joined: 19 Mar 2004
Posts: 42
Location: New Zealand
Reputation: 26.8Reputation: 26.8Reputation: 26.8

PostPosted: Wed Apr 07, 2004 8:32 am    Post subject: Reply with quote

Were do i put
Quote:
if ($msg =~ /^shopmenu (.*)$/) {
open (MENU, ">./Lib/Store/Shop/$username.txt");
$self->sendmsg("Burger, Costs £2.30\nFries, Costs £1.00\nCoke, Costs £3.50");

In
Quote:
if ($msg eq "shop")
{
  if (!exists $self->{callback})
  {
      $self->{callback} = 'shop';
      &send($self, "What Would You Like to buy? !shopmenu to see what you can buy ");
     
return;
  }
}
else
{
  if ($self->{callback} eq 'shop')
  {
      if ($msg eq "nothing")
      {
        &send($self, "You have left the shop, hope to see you again some time");
        delete $self->{callback};
        return;
      }
        foreach $name (split (/,/, $msg))
        {
            $name =~ s/ //g;
            $name = lc($name);
            open (FILE, ">>./Lib/Store/Shop/$username.txt");
            print FILE "$name\n";
            close FILE;
            $reply .= "$name\n";
            delete $self->{callback};
        }
      &send($self, "You have bought: \n\n$reply");
      delete $self->{callback};
      $reply = undef;

}
}
Back to top
JoeX
Agent
Agent


Joined: 02 Jan 2004
Posts: 2153

Reputation: 72.7

PostPosted: Wed Apr 07, 2004 9:06 am    Post subject: Reply with quote

QUOTE(m4g3_o_f4t3 @ Apr 7 2004, 12:32 AM)
Were do i put
Quote:

if ($msg =~ /^shopmenu (.*)$/) {
open (MENU, ">./Lib/Store/Shop/$username.txt");
$self->sendmsg("Burger, Costs £2.30\nFries, Costs £1.00\nCoke, Costs £3.50");

In
Quote:
if ($msg eq "shop")
{
  if (!exists $self->{callback})
  {
      $self->{callback} = 'shop';
      &send($self, "What Would You Like to buy? !shopmenu to see what you can buy ");
     
return;
  }
}
else
{
  if ($self->{callback} eq 'shop')
  {
      if ($msg eq "nothing")
      {
        &send($self, "You have left the shop, hope to see you again some time");
        delete $self->{callback};
        return;
      }
        foreach $name (split (/,/, $msg))
        {
            $name =~ s/ //g;
            $name = lc($name);
            open (FILE, ">>./Lib/Store/Shop/$username.txt");
            print FILE "$name\n";
            close FILE;
            $reply .= "$name\n";
            delete $self->{callback};
        }
      &send($self, "You have bought: \n\n$reply");
      delete $self->{callback};
      $reply = undef;

}
}

if its new morph

then create a file called shopmenu.pl

and put:
Quote:
if ($msg =~ /^shopmenu (.*)$/) {
open (MENU, ">./Lib/Store/Shop/$username.txt");
$self->sendmsg("Burger, Costs £2.30\nFries, Costs £1.00\nCoke, Costs £3.50");
In it,

and create another called shop.pl and put this in it:
Quote:
if ($msg eq "shop")
{
  if (!exists $self->{callback})
  {
      $self->{callback} = 'shop';
      &send($self, "What Would You Like to buy? !shopmenu to see what you can buy ");
     
return;
  }
}
else
{
  if ($self->{callback} eq 'shop')
  {
      if ($msg eq "nothing")
      {
        &send($self, "You have left the shop, hope to see you again some time");
        delete $self->{callback};
        return;
      }
        foreach $name (split (/,/, $msg))
        {
            $name =~ s/ //g;
            $name = lc($name);
            open (FILE, ">>./Lib/Store/Shop/$username.txt");
            print FILE "$name\n";
            close FILE;
            $reply .= "$name\n";
            delete $self->{callback};
        }
      &send($self, "You have bought: \n\n$reply");
      delete $self->{callback};
      $reply = undef;

}
}

_________________
Heroes NBC
Back to top
m4g3_o_f4t3
Newbie
Newbie


Joined: 19 Mar 2004
Posts: 42
Location: New Zealand
Reputation: 26.8Reputation: 26.8Reputation: 26.8

PostPosted: Wed Apr 07, 2004 9:35 am    Post subject: Reply with quote

done that but when i type !shopmenu it says
Use of uninitialized value in string eq at (eval 440) line 13. <_<
Back to top
rickbot
Young One
Young One


Joined: 12 Mar 2004
Posts: 55

Reputation: 27.3Reputation: 27.3Reputation: 27.3

PostPosted: Wed Apr 07, 2004 12:17 pm    Post subject: Reply with quote

you need to create the Shop folder in lib/store
Back to top
Display posts from previous:   
Post new topic   Reply to topic    Bot Depot Forum Index -> Code Help All times are GMT
Goto page Previous  1, 2, 3  Next
Page 2 of 3

 



Protected by phpBB Security phpBB-TweakS
phpBB Security Has Blocked 9 Exploit Attempts.
Antispam Captcha Mod by phpbb-security.com
Powered by phpBB © 2001, 2005 phpBB Group