excluding 2 npc's from #chat tell

Need some help with that macro you're working on or aren't quite sure how to get your macro to do something? Ask here!

Moderator: MacroQuest Developers

psychoticwrath
decaying skeleton
decaying skeleton
Posts: 5
Joined: Mon Nov 10, 2003 3:21 pm

excluding 2 npc's from #chat tell

Post by psychoticwrath » Mon Nov 10, 2003 3:29 pm

#chat tell

sub main
/doevents
/return

#event_chat
/echo it worked
/return


I'm wondering how i can exclued 2 NPC vendors that "tell me" how much a price for something is

User avatar
blueninja
a grimling bloodguard
a grimling bloodguard
Posts: 541
Joined: Thu Aug 28, 2003 7:03 am
Location: Göteborg, Sweden

Post by blueninja » Mon Nov 10, 2003 7:01 pm

Simple way would be to put something like this in the event sub:

Code: Select all

/if "@Param0"~~"vendorname tells you" /return

psychoticwrath
decaying skeleton
decaying skeleton
Posts: 5
Joined: Mon Nov 10, 2003 3:21 pm

params

Post by psychoticwrath » Mon Nov 10, 2003 10:42 pm

aren't params made by /macro <name> <param0>
if so how would this help my situation? or is there another way to set it up?
i dont understand :(
or is there a way to get params from tells?

User avatar
blueninja
a grimling bloodguard
a grimling bloodguard
Posts: 541
Joined: Thu Aug 28, 2003 7:03 am
Location: Göteborg, Sweden

Post by blueninja » Tue Nov 11, 2003 5:19 am

Sorry, forgot the difference between chat events and other events. Other events will send the whole line of text that triggered the event as @Param0, chat events will send the name of the sender as @Param1 so do this instead

Code: Select all

Sub Event_Chat
/if "@Param1"=="Vendorname" /return
..blahahbha...
/return

wassup
Official Guardian and Writer of TFM
Official Guardian and Writer of TFM
Posts: 1487
Joined: Sat Oct 26, 2002 5:15 pm

Post by wassup » Tue Nov 11, 2003 5:45 am

blueninja wrote:Sorry, forgot the difference between chat events and other events. Other events will send the whole line of text that triggered the event as @Param0, chat events will send the name of the sender as @Param1 so do this instead

Code: Select all

Sub Event_Chat
/if "@Param1"=="Vendorname" /return
..blahahbha...
/return
Along the same idea as blueninja...

Code: Select all

Sub Event_Chat
/if "@Param1"!="Vendorname1" {
    /if "@Param1"!="Vendorname2" {
        code for what you want to do if not these two vendors
    }
}
/return