|
Einder Novice
Joined: 03 Jan 2008 Posts: 48
|
Posted: Tue Aug 05, 2014 10:10 am
Help with Kill Script |
I've been working on creating an alias that executes a series of commands. Unfortunately when I try to set the trigger to get the mob name for remove a spell affection, I end up with the last mob in the room instead of the one I'm attacking, or I end up with the first command sent to the mud. Can this be fixed?
Code: |
#CLASS {kill}
#ALIAS kill {
victim=%1
#t+ kill-1
ko @victim
fighting=1
}
#ALIAS kill3 {
#t- kill-1
#t- kill-2
#t+ kill-3
backstab @victim
}
#ALIAS kill4 {
#t- kill-1
#t- kill-2
#t- kill-3
}
#ALIAS kill2 {
#if (%pos( @victim, @sancmob) > 0) {
#t- kill-1
#t+ kill-2
remsanc @victim
} {
#t- kill-1
#t- kill-2
#t+ kill-3
backstab @victim
}
}
#ALIAS throwsoul {
get soul @potions
swap soul @held
throw soul @victim
grab @held
}
#VAR fighting {0}
#VAR sancmob {kaveto is resting here. (blue aura)}
#VAR victim {Rudi}
#TRIGGER {^{He|She|It} glows with a bright light!$} {
sancmob = %null
sancmob = %lower( %line2)
} "" {disable}
#TRIGGER {^{He|She|It} is surrounded by a black halo!$} {
sancmob = %null
sancmob = %lower( %line2)
} "" {disable}
#TRIGGER {You (&%w) (*) with a soul potion.} {#IF ({%1})=({missed}) {throwsoul}}
#CLASS 0
#CLASS {kill|kill-3}
#TRIGGER {makes a strange sound but is suddenly very silent as you place} {kill4}
#TRIGGER {makes a strange sound as you place} {kill4}
#TRIGGER {you don't know {his|her|its} anatomy well enough} {
kil @victim
kill4
}
#CLASS 0
#CLASS {kill|kill-1}
#TRIGGER {already out cold.} {kill3}
#TRIGGER {You manage to hit {him|her|it}, but not quite where you wanted.} {
kill4
fighting=1
}
#TRIGGER {like you don't know where to hit} {kill3}
#TRIGGER {you can't find a weak spot} {kill3}
#TRIGGER {Looks like you didn't even manage to hit {him|her|it}.} {ko @victim}
#TRIGGER {is out cold.} {kill3}
#CLASS 0
#CLASS {kill|kill-2}
#TRIGGER {stops glowing.$} {kill3}
#TRIGGER {~| %d %d %d ~|} {#if (%pos( "Ok.", %line3) > 0) {remsanc @victim}}
#CLASS 0 |
The Mud output is as follows:
Code: |
Kaveto is resting here. (Blue Aura)
He glows with a bright light!
A wise priest is standing here. (Blue Aura)
He glows with a bright light!
His eyes shine in a soft blue!
|
|
|
Last edited by Einder on Wed Aug 06, 2014 10:32 am; edited 1 time in total |
|
|
|
Progonoi Magician
Joined: 28 Jan 2007 Posts: 430
|
Posted: Wed Aug 06, 2014 4:02 am |
Oh boy, several years later and you're still hung up on that simplistic bot script from Finished Scripts, so cute :)
Have a look at the discussion I and Arminas had a while, while, while back. If I recall correctly, it had plentiful of useful ideas before we turned to PM and started to build the bot for earnest (oh the memories from ~2010 or so)
Bottom line: you won't get any help here anyways, botting is forboten |
|
_________________ The Proud new owner of CMud.
--------------------------------
Intel Core i5-650 3,2GHz
4 DD3 RAM
GTX 460 768MB
Win 7 Home Premium 64x
-------------------------------- |
|
|
|
Einder Novice
Joined: 03 Jan 2008 Posts: 48
|
Posted: Wed Aug 06, 2014 4:24 am |
This is not a bot script. It's a simple edit of my kill command.
As well I know bots are illegal in most all mud's. Though I do know that the definition of a bot varies from mud to mud.
All this script is meant to actually accomplish is going from a simple kill command (hit mob) to a more complex one (knockout mob, debuff, then backstab). I'm fine with it if no one has any ideas on how to help or wants to, but I don't want it assumed that because kill is in the subject that it's automagically a bot either.
EDIT: changed post based on the fact that after thinking it through, my wording sounded more like I was trying to fight which I wasn't. |
|
|
|
MattLofton GURU
Joined: 23 Dec 2000 Posts: 4834 Location: USA
|
Posted: Thu Aug 07, 2014 12:17 am |
You will likely want to investigate multistate triggers, they can handle a lot of the old stuff that longtime zmud users got comfortable using/working around. One large example is the frequent use of #T+ and #T- to manage trigger order (the old way would be subject to lag issues).
|
|
_________________ EDIT: I didn't like my old signature |
|
|
|
Einder Novice
Joined: 03 Jan 2008 Posts: 48
|
Posted: Fri Aug 08, 2014 6:11 am |
How does a multistate trigger work in an alias like this? or in general for that matter. The help file is confusing on the subject
|
|
|
|
|
|