User Control Panel
Advertisements

HELP US, HELP YOU!

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


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

PostPosted: Tue Apr 06, 2004 7:33 am    Post subject: Reply with quote

Ok i was wondering if some one could start me off with a shop command eg

User:!shop
bot: Here is what we have in stock, cake, lollies,
bot: please make your selection.
User: !cake
bot: the cake cost $10
bot: You now have $50, to check what you have brought type !items
User: !items
Bot: Here is a list of your items Very Happy

and they can earn money by me editing there money files so it will have

Money folder
Item logs
Shop folder

MORPHIOUS only plz
i just want it started for me so i can do allthe rest like adding new items and stuff myself Smile :unsure:
Back to top
GiL
Not Yet a God
Not Yet a God


Joined: 06 Jan 2004
Posts: 344

Reputation: 35.3Reputation: 35.3Reputation: 35.3Reputation: 35.3

PostPosted: Tue Apr 06, 2004 7:41 am    Post subject: Reply with quote

first, no one is going to do it for you, they will give help but not do it for you.
second, wheres the fun in not making it yourself from scratch?
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: Tue Apr 06, 2004 8:01 am    Post subject: Reply with quote

I dont know how i would do it myself if i new how to make it do the stuff i want Neutral
Back to top
GiL
Not Yet a God
Not Yet a God


Joined: 06 Jan 2004
Posts: 344

Reputation: 35.3Reputation: 35.3Reputation: 35.3Reputation: 35.3

PostPosted: Tue Apr 06, 2004 8:02 am    Post subject: Reply with quote

so ask for help. if *lazy* want to no how then the only way is to practice. i reckon *lazy* should try to understand some basic commands here first before trying something as complex as that
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: Tue Apr 06, 2004 8:08 am    Post subject: Reply with quote

ok then

tho what would i put if i wanted say 1 file to copy somthing from another file?
Back to top
UnShavenGod
Young One
Young One


Joined: 26 Feb 2004
Posts: 99

Reputation: 28.7Reputation: 28.7Reputation: 28.7

PostPosted: Tue Apr 06, 2004 9:39 am    Post subject: Reply with quote

doing something like that in a chatbot is a really questionable idea.

I would do a html version --- or maybe even perl/tk

But text based is confusing, very challenging to program , and not as fun to use.
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 1:04 pm    Post subject: Reply with quote

Oh, this gives me an idea for my bot. B)

I'm gonna use my "points" variable I created for all users but haven't done anything with yet, and the game commands will give the user points (i.e. hangman and tictactoe), getting more points for how fast you solve the hangman puzzles, etc.

And then they can trade their points for "real" items, like desktop wallpapers and screensavers. Very Happy

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


Joined: 23 Dec 2003
Posts: 395

Reputation: 37.8Reputation: 37.8Reputation: 37.8Reputation: 37.8

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

Cool Idea. I have a point system for my BOT, and I was wondering what rewards I could give them Razz
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 1:19 pm    Post subject: Reply with quote

lol

My ideas:
Quote:
HangMan - 10 Points Possible
15 - Bonus - Guess the word without guessing any letters!
10 - Guess the word after guessing 1 letter!
8 - Guess after 2 letters!
6 - Guess after 3 letters!
4 - Guess after 4 letters!
2 - Guess after anymore than 4 letters.
1 - Choose every single letter to solve the puzzle.
And then get bonus points for how many vowels you used to guess the word, i.e. no vowels = 5 points, 1 vowel = 4 points, etc. - there's 5 vowels, you get one point for each one you don't use!

TicTacToe - 5 points possible
You get 1 point for each square you mark an "X" on, but you do not redeem any points unless you win.

Rock, Paper, Scissors - 2 points possible
2 - If you win
1 - If it's a draw
0 - If you lose

Guess My Number Game - 10 points possible
10 - Win on Insane Mode (1-100)
8 - Win on Hard Mode (1-50)
6 - Win on Normal Mode (1-20)
4 - Win on Easy Mode (1-10)
2 - Win on Simple Mode (1-5)
0 - If you lose


Those are my plans so far. Very Happy

_________________
Current Site (2008) http://www.cuvou.com/
Back to top
davidk
Senior Member
Senior Member


Joined: 14 Feb 2004
Posts: 195
Location: United Kingdom, Europe, Earth, Solar system, The Milky Way, The Universe, the 3rd Dimension.
Reputation: 31.1Reputation: 31.1Reputation: 31.1

PostPosted: Tue Apr 06, 2004 2:01 pm    Post subject: Reply with quote

According to Ste it's Illegal to make one... :-"
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 2:33 pm    Post subject: Reply with quote

Illegal to make what?
_________________
Current Site (2008) http://www.cuvou.com/
Back to top
-Calum-
Senior Member
Senior Member


Joined: 14 Feb 2004
Posts: 182

Reputation: 31.1Reputation: 31.1Reputation: 31.1

PostPosted: Tue Apr 06, 2004 2:40 pm    Post subject: Reply with quote

Hes a beginner like most people , i'm no good at this but why not help him ???? he'll learn from it
Back to top
eric256
The Keymaker
The Keymaker


Joined: 03 May 2006
Posts: 2292
Location: Colorado
Reputation: 47Reputation: 47Reputation: 47Reputation: 47Reputation: 47

PostPosted: Tue Apr 06, 2004 2:46 pm    Post subject: Reply with quote

Help him with what? He didn't ask a question. Here is my input though. Don't store stuff in a whole bunch of directories. Its messy. Instead store all of a users info in a single user file or all users in a single users file. Use storable or data::dumper to save data (see tutorials in the articles section.) Then have a store file that stores all the possible items and the stores current inventory of each. Other than that you just need to learn to use hashes in perl, there is a tutorial on that as well.
_________________
Eric256
Proud previous owner and current admin of Bot-depot.com
Back to top
Siebe
God Like
God Like


Joined: 06 Jan 2004
Posts: 562
Location: Netherlands
Reputation: 39.8Reputation: 39.8Reputation: 39.8Reputation: 39.8

PostPosted: Tue Apr 06, 2004 2:50 pm    Post subject: Reply with quote

Or a MySQL DB, which is often faster, easier to update, delete from, add to etcetera Smile
Back to top
rickbot
Young One
Young One


Joined: 12 Mar 2004
Posts: 55

Reputation: 27.3Reputation: 27.3Reputation: 27.3

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

err, ok. you said start off.
Quote:
if ($msg eq "shop")
{
   if (!exists $self->{callback})
   {
      $self->{callback} = 'shop';
      &send($self, "WHat Would You Like to buy? To see a choice of items type !shopmenu");
      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;
   }
}


This is just a 'add' command modified. your going to have to make the rest of the files, though. Wink
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 1, 2, 3  Next
Page 1 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