Notice: Any messages purporting to come from this site telling you that your password has expired, or that you need to verify your details, confirm your email, resolve issues, making threats, or asking for money, are
spam. We do not email users with any such messages. If you have lost your password you can obtain a new one by using the
password reset link.
Due to spam on this forum, all posts now need moderator approval.
Entire forum
➜ MUSHclient
➜ General
➜ New to MUSHclient
It is now over 60 days since the last post. This thread is closed.
Refresh page
Pages: 1
2 3
4
5
Posted by
| Nick Gammon
Australia (23,133 posts) Bio
Forum Administrator |
Date
| Reply #15 on Sun 27 Nov 2005 07:38 PM (UTC) |
Message
| I don't play Lusternia and it goes beyond the scope of what I can offer here to sit down and write a healing system from scratch for every user of MUSHclient.
I can show you the general idea, as I have done here, and if you have a specific query about why something isn't working you are welcome to post it, and I am sure someone will try to help. |
- Nick Gammon
www.gammon.com.au, www.mushclient.com | Top |
|
Posted by
| Gid
(18 posts) Bio
|
Date
| Reply #16 on Sun 27 Nov 2005 08:25 PM (UTC) |
Message
| Correct me if I'm wrong, but just omitting it from the output would not keep it from setting off the trigger.
Just FYI, the Achaea healing system is almost exactly the same as the Lusternia one. The way I'm doing it is that I followed Nick's instructions exactly except that instead of setting up just one table and cure alias, I set up 4: One for eating, applying, smoking, and drinking. I'm pretty sure it will work, but I havn't actually put anything to use yet, as I am really busy from other stuff right now. | Top |
|
Posted by
| Metsuro
USA (389 posts) Bio
|
Date
| Reply #17 on Sun 27 Nov 2005 09:29 PM (UTC) |
Message
| I wasn't asking for you to do it, i meant because there are more then one way to heal an affliction drinking eatting applying and smoking, each having its own blance, how might I set that up using the tables and such? |
Everything turns around in the end | Top |
|
Posted by
| Metsuro
USA (389 posts) Bio
|
Date
| Reply #18 on Sat 03 Dec 2005 11:28 PM (UTC) |
Message
| ok well I want to take what we've learned from this and use it to make a script to automaticly bind spirits. some of the spirits are like snake horse and monkey. once you bind you have to wait for blance to bind again... but I cant seem to figure it out... |
Everything turns around in the end | Top |
|
Posted by
| Jestre
(13 posts) Bio
|
Date
| Reply #19 on Sun 04 Dec 2005 03:05 AM (UTC) |
Message
| >>ok well I want to take what we've learned from this and use it to make a script to automaticly bind spirits. some of the spirits are like snake horse and monkey. once you bind you have to wait for blance to bind again... but I cant seem to figure it out...
For this you just need to create a trigger that responds to the balance regain and fire off then turns itself off. That's what I did for something similar. I have it turn itself off so it doesn't keep firing. | Top |
|
Posted by
| Metsuro
USA (389 posts) Bio
|
Date
| Reply #20 on Sun 04 Dec 2005 03:13 AM (UTC) |
Message
| in total i want to make an alias Def start a chain of defensing using the table i thought it would be the easiest way, since it uses two different blances and several different things like spiritbonding... gripping and breathing deep and stuff like that... so what I want is an alias to trigger a chain matching on when i have the blance to do another def, then have another alias tell me all defenses I have up (the game has one but it takes balance to check it... this way I can save me some time and balance...) and then be able to add more defenses if I need them... |
Everything turns around in the end | Top |
|
Posted by
| Metsuro
USA (389 posts) Bio
|
Date
| Reply #21 on Sun 04 Dec 2005 04:42 PM (UTC) |
Message
| I thought I would need to use two tables... one of all the defense and one with none of them in it, and then find a way to compare the two tables and move the next one(do the command for the def) so it will be in the second table. |
Everything turns around in the end | Top |
|
Posted by
| Metsuro
USA (389 posts) Bio
|
Date
| Reply #22 on Sun 04 Dec 2005 11:33 PM (UTC) |
Message
| Is it me... or does no one even read this thread anymore... |
Everything turns around in the end | Top |
|
Posted by
| Nick Gammon
Australia (23,133 posts) Bio
Forum Administrator |
Date
| Reply #23 on Sun 04 Dec 2005 11:58 PM (UTC) |
Message
|
Quote:
I thought I would need to use two tables...
This isn't really a question so it is hard to respond.
What you have said is all pretty general. If you posted some sample output from the MUD, and your aliases/triggers and associated scripts, and said what was happening, and what you expected to happen, that might be a question someone could answer.
Quote:
... find a way to compare the two tables ...
Give us a concrete example, to demonstrate you have tried to solve the problem, what you have tried, and in what way it doesn't work.
When you say "compare the two tables" do you mean:
- What is in one table but not the other?
- What is in both tables?
- Are they the same?
- Are we comparing keys or values?
|
- Nick Gammon
www.gammon.com.au, www.mushclient.com | Top |
|
Posted by
| Metsuro
USA (389 posts) Bio
|
Date
| Reply #24 on Mon 05 Dec 2005 12:10 AM (UTC) |
Message
| Well I've been thinking about it... and it would seem I'd need to use several different tables with each different thing so to say. I've got spiritbonding I want to put into a table
spiritbond sun - this beging the command
You call upon the spirit of sun and a warm ray of sunlight infuses you with confidence. - this being the output using the command gives
You have recovered equilibrium. - this would be the balance message.
Then I have things like this:
spiritbond night- command once more
It must be night to bond with mother night. - output
Meaning the defense isn't used then. And what I want to do is set up a table of defenses and compare it to another to check to see if I have the defense up or not, and if not to do it. But however then i'd need a herb table potion table, and a few more for the other different types of defenses I could use. And for those... they may not even use the same balance... Then I was thinking and though of coming up with an alias for different deffing up types, like default, arena, war, spirit, herb, salve, and such... Ya its alot to do... specially since I've not learned much about Lua... I haven't tried any scripts or aliases yet... expect the first one you gave to get it more to lusternia curing which I think I can do for the most part... but the rest of my ideas are a little out there... and was wondering if some of it was even possible?
|
Everything turns around in the end | Top |
|
Posted by
| Nick Gammon
Australia (23,133 posts) Bio
Forum Administrator |
Date
| Reply #25 on Mon 05 Dec 2005 09:40 PM (UTC) |
Message
|
Quote:
I haven't tried any scripts or aliases yet ...
What? At all? Or to solve this problem?
Before you try something complex like a healing system you want to get the general hang of scripting. Start with something simpler, like counting how many times you see a particular mob, or make a table of the different things you fight. Although you may not particularly need such a thing, the practice you get in writing it will show you the general techniques for tackling something harder. |
- Nick Gammon
www.gammon.com.au, www.mushclient.com | Top |
|
Posted by
| Metsuro
USA (389 posts) Bio
|
Date
| Reply #26 on Mon 05 Dec 2005 09:55 PM (UTC) |
Message
| well since the time of your post, I was trying to use the script you gave and play around with it.. but cause I dont know if what I want is even possible I dont know If i could know where to look at.. |
Everything turns around in the end | Top |
|
Posted by
| Nick Gammon
Australia (23,133 posts) Bio
Forum Administrator |
Date
| Reply #27 on Mon 05 Dec 2005 11:39 PM (UTC) Amended on Tue 06 Dec 2005 02:50 AM (UTC) by Nick Gammon
|
Message
|
Quote:
... and was wondering if some of it was even possible
Basically anything is possible in a script, some things are more work than others, that is all.
Again I suggest to start with a simple script, and work up from that. If you haven't done much scripting, a complex healing/balance script will seem hard, until you learn the basics. |
- Nick Gammon
www.gammon.com.au, www.mushclient.com | Top |
|
Posted by
| Metsuro
USA (389 posts) Bio
|
Date
| Reply #28 on Tue 06 Dec 2005 01:23 AM (UTC) |
Message
| I have a quick question then, what is this doing
for _, v in ipairs (cures) do
if afflicted_by [v.name] then
if v.cure ~= "" then -- some afflictions might not have cures
Send ("outb ", v.cure) -- get out of bag
Send ("eat ", v.cure) -- eat it
ColourNote ("black", "yellow", "Curing " .. v.name ..
" with " .. v.cure)
eating = true
return -- done
end -- of having a cure for it
end -- found one
end -- for
I understand what its doing from the sends and down but the if checks and the for I dont |
Everything turns around in the end | Top |
|
Posted by
| Metsuro
USA (389 posts) Bio
|
Date
| Reply #29 on Wed 07 Dec 2005 12:07 AM (UTC) |
Message
| I meant more along the lines of what is the in _, doing? and what is it? |
Everything turns around in the end | Top |
|
The dates and times for posts above are shown in Universal Co-ordinated Time (UTC).
To show them in your local time you can join the forum, and then set the 'time correction' field in your profile to the number of hours difference between your location and UTC time.
163,309 views.
This is page 2, subject is 5 pages long:
1
2 3
4
5
It is now over 60 days since the last post. This thread is closed.
Refresh page
top