Kade2008-01-09 19:07:53
I'm trying to figure out the best way in nexus to create a system in which I simply enter a command to target someone and then my attacks after that will be directed at them. Right now I have unique triggers to (for example) swing at each different target. I want to make it so I can change my current target. I use nexus so is it possible to do this?
Rika2008-01-09 19:15:26
You seem to make it sound like you want something more sophisticated than what I think you really want. If you just want a simple targetting script, here's one.
Alias: Something (I use 'T')
Script:
#set tar $1
Alias: Something for attacks
Script:
$tar
So say you want to target a wolf. T wolf to target and whatever your alias to attack is to attack.
Alias: Something (I use 'T')
Script:
#set tar $1
Alias: Something for attacks
Script:
$tar
So say you want to target a wolf. T wolf to target and whatever your alias to attack is to attack.
Unknown2008-01-09 19:19:11
Add a variable to represent your target. 'fightTarget' for example.
variable fightTarget
Make a short alias to change the target when you need to.
alias seti
#set fightTarget = $1
$1 is what you type after 'seti'. So typing 'seti Xikue' would set fightTarget to Xikue.
Use $fightTarget in your triggers.
variable fightTarget
Make a short alias to change the target when you need to.
alias seti
#set fightTarget = $1
$1 is what you type after 'seti'. So typing 'seti Xikue' would set fightTarget to Xikue.
Use $fightTarget in your triggers.
Kade2008-01-09 19:41:43
That worked. Thank you. If anyone wants to give me tips on actuall scripting language I would appreciate that as well.
Xavius2008-01-09 23:18:12
QUOTE(Kade @ Jan 9 2008, 01:41 PM) 475027
That worked. Thank you. If anyone wants to give me tips on actuall scripting language I would appreciate that as well.
Input, process, output. That's the entirety of all scripting and programming.
First, think about what you want your system to do. That's "output." Then, think about when you want your system to do it or what you want to do it to. That's about half of "input." Then, think about what you would do if you were doing it by hand. That's "process." (Process also helps sort the when to do it with what are called "conditionals." This is where programs get if-then statements.) Finally, rearrange it so it fits the input -> process -> output thing. Once you have your idea mapped out (programmers call it a flowchart), all you need to do is learn the syntax to get it done, and believe me, that's the easy part.
Let's say you want your system to drink health when your health falls below 70%, unless your mana or ego are below 50%. (Just for the record, I don't recommend using that formula. Example purposes only!) Your output, then, is drink health, drink mana, or drink bromide. You only want your system to try to heal you when you have potion balance. You know you have potion balance when it says you can drink another one, and you know you don't have potion balance when you drink a vial and get healed by it. That's your input. If you were doing it by hand, you'd eyeball your health, mana, and ego levels and decide based on which one needed it more. That's the process.
Now rearrange that. Your input is the messages regarding vials (healed by health, healed by mana, healed by bromide, can use a potion again). Because you want the system to do, change, or check something every time you see those lines, it's a trigger/reflex/action/whateverNexuscallsit and that's the line that sets it off. The process is checking your health, mana, and ego levels. The output is drinking health, mana, or bromide.
One problem: you haven't told your system how to recognize your health, mana, and ego levels yet, so you can't code it. Same deal! You want your system to know when your health, mana, and ego levels are low enough to drink potions. You want your system to check your max health/mana/ego and your current health/mana/ego every chance it gets, so your input is going to be SCORE for max values and your prompt for current values. If you were doing it by hand, you'd just keep those numbers in memory.
Now rearrange that. Your input is your prompt and SCORE. The process is taking those numbers, storing them, and calculating the values for when you need to drink the various potions. The output is the useful information created by storing max health/mana/ego, current health/mana/ego, and sip thresholds for health/mana/ego.
Once you have the information there for the system to use, you just translate it into Nexus code. I don't script Nexus, so I ain't doin' it, but the forums or the help files should have the information you need to do it yourself.
Daganev2008-01-10 00:52:19
You can't make a good autosipper in nexus.
Any trigger you base off your prompt will lag you out.
Any trigger you base off your prompt will lag you out.
Kade2008-01-10 18:16:42
Alright, now I'm trying to use CMUD. How do you script that now?
Daganev2008-01-10 18:28:45
QUOTE(Kade @ Jan 10 2008, 10:16 AM) 475582
Alright, now I'm trying to use CMUD. How do you script that now?
Get Catarin's free system.
Kade2008-01-10 23:51:38
I have done that. But it does not cover things like forging and defense ups. I'm looking through it and trying to get the language right, but having some roadblocks.
Unknown2008-01-10 23:57:02
in nexus
setalias bash nature curse &t ( or whatever your attack is, thinking it is druid, right?)
set a keybinding, like F1, to bash
now, to set a target, st t "target"
setalias bash nature curse &t ( or whatever your attack is, thinking it is druid, right?)
set a keybinding, like F1, to bash
now, to set a target, st t "target"