codetoad.com
  ASP Shopping CartForum & BBS
  - all for $20 from CodeToad Plus!
  
  Home || ASP | ASP.Net | C++/C# | DHTML | HTML | Java | Javascript | Perl | VB | XML || CodeToad Plus! || Forums || RAM 
Search Site:
Search Forums:
  Numbered output from text.  BDwinsAlt at 02:53 on Monday, June 19, 2006
 

Well, I am making this bot for this game. When you !addprize name:event it gives the person the prize.

The text file looks like this:

Brad:event:John

meaning, Reciever:item:Giver.

When you type !listprize it sends you something like this:

You have 250 bounty + Prox (given by BDwinsAlt)
You have 500 bounty + 2xProx(given by BDwinsAlt)

How can I make it number it.
Then instead of a player typing !prizeme for the 250 bounty and !prizeme sne for the 500 bounty, let them type !prizeme 1 (for the line number)

Example:
1.You have 250 bounty + Prox (given by BDwinsAlt)
2.You have 500 bounty + 2xProx(given by BDwinsAlt)

!prizeme 2

Then !listprize shows:
1.You have 250 bounty + Prox (given by BDwinsAlt)

-----------------------------------------------------
All I need to know is how to Identify the lines being sent as numbers and then when they use !prizeme they can use numbers. Now other players are on there but there is a section were it only searches for the line starting with the players name. So I can't use basic line numbers.

Please help.








CodeToad Experts

Can't find the answer?
Our Site experts are answering questions for free in the CodeToad forums








Recent Forum Threads
•  POSIX timing out a transaction
•  Crystal Report Generation in .net
•  HTTP status 408 - j_security_check
•  this is weird
•  this is weird
•  Re: simple series problem - help needed
•  File encryption help
•  New user, trying to figure out how `find` works....
•  Re: opening a second window


Recent Articles
What is a pointer in C?
Multiple submit buttons with form validation
Understanding Hibernate ORM for Java/J2EE
HTTP screen-scraping and caching
a javascript calculator
A simple way to JTable
Java Native Interface (JNI)
Parsing Dynamic Layouts
MagicGrid
Caching With ASP.Net


© Copyright codetoad.com 2001-2006