|
| Author |
Message |
m4g3_o_f4t3 Newbie

Joined: 19 Mar 2004 Posts: 42 Location: New Zealand
   
|
Posted: Tue Apr 06, 2004 7:33 am Post subject: |
|
|
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 
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 :unsure: |
|
| Back to top |
|
 |
GiL Not Yet a God

Joined: 06 Jan 2004 Posts: 344
    
|
Posted: Tue Apr 06, 2004 7:41 am Post subject: |
|
|
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

Joined: 19 Mar 2004 Posts: 42 Location: New Zealand
   
|
Posted: Tue Apr 06, 2004 8:01 am Post subject: |
|
|
I dont know how i would do it myself if i new how to make it do the stuff i want  |
|
| Back to top |
|
 |
GiL Not Yet a God

Joined: 06 Jan 2004 Posts: 344
    
|
Posted: Tue Apr 06, 2004 8:02 am Post subject: |
|
|
| 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

Joined: 19 Mar 2004 Posts: 42 Location: New Zealand
   
|
Posted: Tue Apr 06, 2004 8:08 am Post subject: |
|
|
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

Joined: 26 Feb 2004 Posts: 99
   
|
Posted: Tue Apr 06, 2004 9:39 am Post subject: |
|
|
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

Joined: 03 Feb 2004 Posts: 3776 Location: Michigan
  votes: 4
|
Posted: Tue Apr 06, 2004 1:04 pm Post subject: |
|
|
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.  _________________ Current Site (2008) http://www.cuvou.com/ |
|
| Back to top |
|
 |
dan0211 Not Yet a God

Joined: 23 Dec 2003 Posts: 395
    
|
Posted: Tue Apr 06, 2004 1:06 pm Post subject: |
|
|
Cool Idea. I have a point system for my BOT, and I was wondering what rewards I could give them  |
|
| Back to top |
|
 |
Cer Upgraded Agent

Joined: 03 Feb 2004 Posts: 3776 Location: Michigan
  votes: 4
|
Posted: Tue Apr 06, 2004 1:19 pm Post subject: |
|
|
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.  _________________ Current Site (2008) http://www.cuvou.com/ |
|
| Back to top |
|
 |
davidk Senior Member

Joined: 14 Feb 2004 Posts: 195 Location: United Kingdom, Europe, Earth, Solar system, The Milky Way, The Universe, the 3rd Dimension.
   
|
Posted: Tue Apr 06, 2004 2:01 pm Post subject: |
|
|
| According to Ste it's Illegal to make one... :-" |
|
| Back to top |
|
 |
Cer Upgraded Agent

Joined: 03 Feb 2004 Posts: 3776 Location: Michigan
  votes: 4
|
Posted: Tue Apr 06, 2004 2:33 pm Post subject: |
|
|
Illegal to make what? _________________ Current Site (2008) http://www.cuvou.com/ |
|
| Back to top |
|
 |
-Calum- Senior Member

Joined: 14 Feb 2004 Posts: 182
   
|
Posted: Tue Apr 06, 2004 2:40 pm Post subject: |
|
|
| 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

Joined: 03 May 2006 Posts: 2292 Location: Colorado
     
|
Posted: Tue Apr 06, 2004 2:46 pm Post subject: |
|
|
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

Joined: 06 Jan 2004 Posts: 562 Location: Netherlands
    
|
Posted: Tue Apr 06, 2004 2:50 pm Post subject: |
|
|
Or a MySQL DB, which is often faster, easier to update, delete from, add to etcetera  |
|
| Back to top |
|
 |
rickbot Young One

Joined: 12 Mar 2004 Posts: 55
   
|
Posted: Tue Apr 06, 2004 7:34 pm Post subject: |
|
|
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.  |
|
| Back to top |
|
 |
|