Using target name

Need some help with your MUD client? Forgot your password? Get help here.
Forum rules
- Use common sense and be respectful towards each other at all times, even when disagreeing.
- Do not reveal sensitive game information. Guild secrets, player seconds are examples of things not allowed.
Post Reply
User avatar
Drazson
Expert
Posts: 263
Joined: 24 Jan 2016 21:27

Using target name

Post by Drazson » 25 May 2017 11:15

I want to auto-appraise my enemies when the fight starts. Can I have a trigger that considers who my target is?
For example, something like "k *" = "do kill *, appraise *" or without the do command by using the client extra aliases.

User avatar
Tarax the Terrible
Myth
Posts: 1331
Joined: 09 Mar 2010 20:33
Location: UK

Re: Using target name

Post by Tarax the Terrible » 25 May 2017 12:10

In any client enemy is a target built in to the game. (When you are fighting something)

So things like these work

Code: Select all

compare stats with enemy
look at enemy
glance at enemy
health enemy
slap enemy
say to enemy Now you die!
So all you need is

Code: Select all

trigger 
Pattern. you attack
Command. appraise enemy
compare stats with enemy
Whatever else u want
In terms of killing things <it> is kinda of useful but breaks down a lot. <kill it> but after u kill one it might be the corpse etc.

To get more fancy u use the invisible gmcp data the game will send ur client if it supports it
Mine doesn't but there are aliases and scripts talking about it on the forum. Stuff like
gmcp.player.last enemy killed
gmcp.room.what mobs are present



it is more useful for equipment

Code: Select all

get item from rack
appraise it

get sword from rack
appraise it
Useful to make sure u use non saving equipment first. I just have a trigger firing <appraise it> every time I see "from the rack"
http://genesisquests.pbworks.com/
Join up and help each other with Quests :)

User avatar
Drazson
Expert
Posts: 263
Joined: 24 Jan 2016 21:27

Re: Using target name

Post by Drazson » 25 May 2017 12:19

I didn't know about the "enemy" being a thing. Thanks about that one, it helps! May I ask another one?
How about wanting to discern when I meet people of certain races? Whatever their description.
For example how do I write this:

Trigger: (?:A|An) (whatever 1st characteristic) (whatever 2nd characteristic) (minotaur|ogre).
Commands: say Oi there tall guy.

User avatar
Tarax the Terrible
Myth
Posts: 1331
Joined: 09 Mar 2010 20:33
Location: UK

Re: Using target name

Post by Tarax the Terrible » 25 May 2017 14:02

Off the top of my head I'd only know a zmud example.

The general topic about what you want to do there regardless of client is called "pattern matching"
So to use pattern matching in the game client you would set up the trigger as "regexp"
Which stands for regular expression.
https://en.wikipedia.org/wiki/Regular_expression

So you can set up a trigger with key phrases and wild cards

Not able to tell you off hand how you pass those wild cards as variables into commands. But there are example scripts in the client section. Think it relies on the trigger setting client variables then the script using them.

Look at Britanica's example for tap screen.
Had code in it where if you find a certain herb type u do a certain action.

gl
http://genesisquests.pbworks.com/
Join up and help each other with Quests :)

Post Reply
http://tworzymyatmosfere.pl/przescieradla-jedwabne-z-gumka/