Problem with Tell Forwarding

Need help with a macro you are writing? Ask here!

Moderator: MacroQuest Developers

a15141312
decaying skeleton
decaying skeleton
Posts: 8
Joined: Thu May 06, 2004 4:00 am

Problem with Tell Forwarding

Post by a15141312 » Thu Aug 05, 2004 12:58 am

Code: Select all

#Event Forward "#1# tells you, #2#"
Sub Main
	/declare Forward outer ${Param0}
	:loop
		
		/doevents
	/goto :loop
:end
/return

Sub Event_Forward(item1, item2)
	/tell ${Forward} ${item2} told ${Me.Name}: ${item1}
/return
	
when i get a tell it sends out:

you told Master, ' Friend told Bot: Friend tells you, ' Is it working yet?'

i want it to send out:

you told Master, ' Friend told Bot: ' Is it working yet?'



anyone have any idea how i can get #2# to stop gathering the whole string?

Rusty~
a hill giant
a hill giant
Posts: 244
Joined: Wed Apr 14, 2004 2:55 pm

Post by Rusty~ » Thu Aug 05, 2004 12:00 pm

ok.. in event subs, the first param is always the entire line. so you'd want to change:

Code: Select all

Sub Event_Forward(item1, item2) 
   /tell ${Forward} ${item2} told ${Me.Name}: ${item1} 
/return 
to

Code: Select all

Sub Event_Forward(line,item1, item2) 
   /tell ${Forward} ${item2} told ${Me.Name}: ${item1} 
/return 

a15141312
decaying skeleton
decaying skeleton
Posts: 8
Joined: Thu May 06, 2004 4:00 am

Post by a15141312 » Thu Aug 05, 2004 5:49 pm

thx much sir :)