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
➜ midas bot on smaug
It is now over 60 days since the last post. This thread is closed.
Refresh page
Posted by
| Teeto
(7 posts) Bio
|
Date
| Wed 28 Dec 2005 03:14 PM (UTC) |
Message
| I am a complete moron when i comes to this i need a trigger/alias/macros or script to allow me to midas items when told to and then give 90% of the gold back and keep 10% of it for the order. can someone please help me in an idiots style ie put t so it's easy to copy or paste or email the saves to teeto_69@hotmail.com so i can give them a try thanks
| Top |
|
Posted by
| Nick Gammon
Australia (23,162 posts) Bio
Forum Administrator |
Date
| Reply #1 on Thu 29 Dec 2005 03:15 AM (UTC) |
Message
| This is so general it is impossible to answer. What do you see (MUD output). What do you want to do exactly?
I doubt if anyone will actually write a script from scratch, but if you try to write one and run into problems, people here will be pleased to help. |
- Nick Gammon
www.gammon.com.au, www.mushclient.com | Top |
|
Posted by
| Teeto
(7 posts) Bio
|
Date
| Reply #2 on Thu 29 Dec 2005 02:36 PM (UTC) |
Message
| here's the basics someone gives you something
say want me to midas it
if answered yes c midas something give 90% coins someone
if no give something someone
| Top |
|
Posted by
| Zeno
USA (2,871 posts) Bio
|
Date
| Reply #3 on Thu 29 Dec 2005 04:05 PM (UTC) |
Message
| You didn't didn't answer what Nick had asked.
Quote: What do you see (MUD output). What do you want to do exactly?
We're looking for the exact output. |
Zeno McDohl,
Owner of Bleached InuYasha Galaxy
http://www.biyg.org | Top |
|
Posted by
| Teeto
(7 posts) Bio
|
Date
| Reply #4 on Fri 30 Dec 2005 07:05 AM (UTC) Amended on Fri 30 Dec 2005 07:36 AM (UTC) by Teeto
|
Message
| k copying and pasting the text
You have 691,476 copper, 4 silver, 9,921 gold and 0 platinum pieces. it makes gold so it's the only one that matters
OK. is the succesful midas spell
Teeto gives you A wizards hat. is the give text
Teeto says in common 'yes' is the say text
so the trigger is * gives you *
then response is say are you sure you want me to midas %2 %1?
then * says in common 'yes' response is cast midas "the item"
ok. gold is the response here and that's as far as i can get
i just can't figure how to set it to remeber what item to cast midas on or what player gives you the gold and how to only give them back 90% of the gold | Top |
|
Posted by
| Nick Gammon
Australia (23,162 posts) Bio
Forum Administrator |
Date
| Reply #5 on Fri 30 Dec 2005 09:52 PM (UTC) |
Message
| |
Posted by
| Teeto
(7 posts) Bio
|
Date
| Reply #6 on Sat 31 Dec 2005 01:59 PM (UTC) |
Message
| <triggers>
<trigger
enabled="y"
ignore_case="y"
match="* says in common 'midas *'"
sequence="100"
>
<send>c midas %2
med
med
say I am Ready for the next item now.
gold</send>
</trigger>
</triggers>
this is the trigger i'm using as a donation bot i can't get it to remember the item the person who gave it or how much gold to return ideally i want to be to say do you want me to midas this if yes midas give 90% gold back if no give item back so it would look like this only i have no clue where to go from this point
<triggers>
<trigger
enabled="y"
ignore_case="y"
match="*gives you *"
sequence="100"
>
<send>say are you sure you want me to midas %2 %1?
</send>
</trigger>
</triggers>
<triggers>
<trigger
enabled="y"
ignore_case="y"
match="* says in common 'yes'"
sequence="100"
>
<send>c midas *
med
med
say I am Ready for the next item now.
gold</send>
</trigger>
</triggers>
<triggers>
<trigger
enabled="y"
ignore_case="y"
match="#0000 gold'"
sequence="100"
>
<send>give 90% gold %1
</send>
</trigger>
</triggers>
the last to are hypothetical because they don't work :(
how would i set it up with say a variable to remember the person and item like setvar %1 @character %2 @item in the original trigger?
| Top |
|
Posted by
| Nick Gammon
Australia (23,162 posts) Bio
Forum Administrator |
Date
| Reply #7 on Sat 31 Dec 2005 08:08 PM (UTC) |
Message
| It isn't totally clear to me how this midas stuff works, but this should get you a bit closer to your goal. I have made a trigger with a bit of a script attached to it. I am using Lua scripting language (set in scripting preferences) as that lets me put up a dialog box.
<triggers>
<trigger
custom_colour="2"
enabled="y"
ignore_case="y"
match="* says in common 'midas *'"
send_to="12"
sequence="100"
>
<send>
who = "%1"
item = "%2"
SetVariable ("who", "%1") -- remember who
SetVariable ("item", "%2") -- remember what item
if utils.msgbox ("Are you sure you want me to midas %2 %1",
"Midas", "yesno", "?") == "yes" then
Send ("c midas %2")
Send ("gold")
Send ("give 90%% gold %1")
end -- if</send>
</trigger>
</triggers>
This uses the new feature, introduced recently, that lets you display a dialog box, thus you can ask a question and get a yes/no answer in the middle of a script.
I have also remembered the name of the person and the item name in MUSHclient variables, although I haven't used them in this script. |
- Nick Gammon
www.gammon.com.au, www.mushclient.com | Top |
|
Posted by
| Teeto
(7 posts) Bio
|
Date
| Reply #8 on Sat 31 Dec 2005 08:24 PM (UTC) Amended on Sat 31 Dec 2005 08:44 PM (UTC) by Teeto
|
Message
| alright i copyed that and pasted it to triggers but it's sayin scripts aren't enabled?
this is what pops up when it is enabled
[string "Trigger: "]:8: attempt to call field `msgbox' (a nil value)
stack traceback:
[string "Trigger: "]:8: in main chunk
and thank you btw i didn't want to seem ungrateful
| Top |
|
Posted by
| Nick Gammon
Australia (23,162 posts) Bio
Forum Administrator |
Date
| Reply #9 on Sat 31 Dec 2005 08:51 PM (UTC) |
Message
| |
Posted by
| Teeto
(7 posts) Bio
|
Date
| Reply #10 on Sun 01 Jan 2006 03:39 PM (UTC) |
Message
| ok this is fairly close but i want it to send say do you want me to midas this and if the other character says yes then midas if he\she says no give item who the box is awesome and i've used it to set up attack programs btw it is to awesome for that purpose and i designed an auto heal script on what i've learned i just can't seem to get it to finish the script on last problem give 90% gold isn't a command it just sez i don't have that item | 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.
27,906 views.
It is now over 60 days since the last post. This thread is closed.
Refresh page
top