Home
About
Download
Register
News
Help
Register
Log In
Forums
Scripts & Popups
|| find the correct id ||
Forums
Active Threads
Search
Who's Online
Help
Print Thread
|| find the correct id ||
#
137681
17/12/05
12:52 PM
Joined:
Feb 2005
Posts: 74
Latvia
S
SkyD
OP
Babel fish
OP
SkyD
Babel fish
S
Joined:
Feb 2005
Posts: 74
Latvia
I can't find solution for that:
Now i make a bot, and one of his command is:
!weapon
I have a directory:
/weapons/
Those content:
knife.txt - ID 1
pistol.txt - ID 2
fork.txt - ID 3
The ID is on the line
15
If someone writes
!weapon 2
need to check all files in the
/weapons/
directory..
And if find the ID then
set %find_id 2 set %murder pistol
And then i will check
if ($1 == %find_id) { msg $nick the murder is: %murder and the murder's id is %find_id
} else { msg $nick can't find murder..
}
[color:red]m[color:blue]IRC[color:green] for EvEr
Copy Link to Clipboard
Re: || find the correct id ||
#
137682
17/12/05
01:05 PM
Joined:
Feb 2005
Posts: 74
Latvia
S
SkyD
OP
Babel fish
OP
SkyD
Babel fish
S
Joined:
Feb 2005
Posts: 74
Latvia
hmm. I think its right:
set %i 1
set %i_id $1
while (%i <= %i_id) {
set %i_id $+($read($findfile(weapons/,*.txt,%i),15))
set %find $+($read($findfile(weapons/,*.txt,%i),14))
inc %i
}
if ($1 == %i_id) {
msg $nick %i_id = %find
}
[color:red]m[color:blue]IRC[color:green] for EvEr
Copy Link to Clipboard
Hop To
News and Discussions ------
Latest News
General Discussion
Support ------
mIRC Help
Connection Issues
Scripts & Popups
Development ------
Feature Suggestions
Developers
Bug Reports
Print Thread
Switch to Threaded Mode
Show Likes
Link Copied to Clipboard
View Profile
Private Message
Website
Follow User
Forum Posts
View Profile
Private Message
Website
Follow User
Forum Posts
Forum Rules
·
Mark All Read
Contact Us
·
Help
·
mIRC Homepage