mIRC Home    About    Download    Register    News    Help

Print Thread
#86021 09/06/04 03:00 AM
Joined: Jun 2003
Posts: 56
G
Babel fish
OP Offline
Babel fish
G
Joined: Jun 2003
Posts: 56
Now you'd think there would be a way this could be done
Here is what i need...

on *:text:!value*:#: { msg $chan $read(rsvalues.txt, w, * %rs.prices $+ * ) }

What i want is what ever comes after !value like !Value Battle Axe to then reply Battle Axe is: 15k <--- I have everything in my text file for that.. here is what i currently have going

on *:text:!value*:#: { msg $chan $read(rsvalues.txt, w, * %rs.prices $+ * ) }

(-19:50:13-) (@X) !value Rune Legs
(-19:50:13-) (@Vash) Rune Legs Costs: 55k (55,000gp)
(-19:50:14-) (@X) !value Rune Plate
(-19:50:14-) (@Vash) Rune Legs Costs: 55k (55,000gp)

But it just displays Legs again after i asked for Plate..
and this is whats in my text file

Rune Legs Costs: 55k (55,000gp)
Rune Plate Costs: 70k (70,000gp)

How do i get it to display what ever It asks for in the text file?

!Value Rune Plate
Rune Plate Costs: 70k (70,000gp)

and so on down the list...


- Andrew Berquist, Windfyre Network
#86022 09/06/04 03:50 AM
Joined: May 2003
Posts: 79
A
Babel fish
Offline
Babel fish
A
Joined: May 2003
Posts: 79
Replace:
Code:
on *:text:!value*:#: { msg $chan $read(rsvalues.txt, w, * %rs.prices $+ * ) }

by:
Code:
on *:text:!value*:#: { msg $chan $read(rsvalues.txt, w, $+(*,$2-,*) ) }

It should works fine I guess.

#86023 09/06/04 04:10 AM
Joined: Jun 2003
Posts: 56
G
Babel fish
OP Offline
Babel fish
G
Joined: Jun 2003
Posts: 56
Thanks much!


- Andrew Berquist, Windfyre Network
#86024 09/06/04 04:45 PM
Joined: May 2003
Posts: 79
A
Babel fish
Offline
Babel fish
A
Joined: May 2003
Posts: 79
You're welcome smile


Link Copied to Clipboard