[Home] [Downloads] [Search] [Help/forum]

Gammon Software Solutions forum

See www.mushclient.com/spam for dealing with forum spam. Please read the MUSHclient FAQ!

[Folder]  Entire forum
-> [Folder]  MUSHclient
. -> [Folder]  General
. . -> [Subject]  Need small script help.. nothing major, I just can't remember

Home  |  Users  |  Search  |  FAQ
Username:
Register forum user name
Password:
Forgotten password?
(New message)
Subject: Need small script help.. nothing major, I just can't remember
Name:
Your forum user name.
Register forum user name
Password:
Your forum password.
Forgotten password?
Message:
Message to be posted (in English, please)
Maximum of 6000 characters. Text only please, no HTML.
Forum codes:
Check this if your message uses 'forum codes' or templates (auto-detected for new posts).
Forum codes Templates

Save this message ...


Subject review (reverse sequence)

Posted by Nick Gammon   Australia  (18,772 posts)  [Biography] bio   Forum Administrator
Date Fri 27 Jun 2003 09:04 PM (UTC)  quote  ]
Message
How are you giving control - with a trigger? Sounds a bit dodgy - couldn't someone fake a line with the controller's name on it? I suggest using the chat system - that lets you give control to someone who you authorise. that is much harder to fake. You could also write a plugin script to filter commands as they come in to discard ones you don't want them to do.

- Nick Gammon

www.gammon.com.au, www.mushclient.com
[Go to top] top

Posted by Flannel   USA  (1,230 posts)  [Biography] bio
Date Fri 27 Jun 2003 08:18 AM (UTC)  quote  ]
Message
Think the easiest thing to do would have it go into a series of if-then-elseif-etc statements to check for things on the 'banned list' and then have an else which actually sends it.

By doing it individually, you can have a different message for each (a message saying 'youre not authorized to use that command' or whatnot).

~Flannel

Messiah of Rose
Eternity's Trials.

Clones are people two.
[Go to top] top

Posted by David B   USA  (80 posts)  [Biography] bio
Date Fri 27 Jun 2003 08:12 AM (UTC)  quote  ]
Message
I have this controler script that lets me give control of my character to a fellow group member.

sub Controler (name, line, wilds)
if wilds (1) = world.getvariable ("Controler") then
world.send wilds (2)
else
world.send "gt ^B" & wilds (1)& ": ^GYou are not my Controller at the moment. Only: " & world.getvariable ("Controler") & " can Control me"
end if
end sub


The only problem with this is it also allows my controler access to certain commands I don't want them to use... I.E. global channels, The muds Configure options, and ofcourse my password(big bad juju!!) What I'd like to do is have it ignore the following commands:

config *, password *, ooc *, ic *, opray *

the trigger is: * tells the group '<my characters name> *'

For some reason I just can't remember how to do this.

My code(with a LOT of Nicks help) to fame:

sub OnAutoCombo (TriggerName, TriggerLine, arrWildCards)
dim AutoCombo
AutoCombo = split (arrWildCards (1))
Dim i, attack
for i=lbound (AutoCombo ) to ubound (AutoCombo )
Select Case AutoCombo (i)
case "rp" attack = "punch right"
case "lp" attack = "punch left"
case "s" attack = "sweep"
case "r" attack = "roundhouse"
case else attack = "" ' unknown attack type
End Select
if i = ubound (AutoCombo ) then
world.send "throw " + world.getvariable ("attacker") + " down"
else
world.send attack + " " + world.GetVariable ("attacker")
end if
next
end sub
[Go to top] 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.


1,611 views.

[Reply to this subject]  Reply to this subject   [New subject]  Start a new subject   [Refresh] Refresh page

Go to topic:           Search the forum


[Go to top] top

[Home]

Written by Nick Gammon - 5K

Comments to: Gammon Software support
[RH click to get RSS URL] Forum RSS feed ( http://www.gammon.com.au/rss/forum.xml )

[Best viewed with any browser - 2K]    [Internet Contents Rating Association (ICRA) - 2K]    [Web site powered by FutureQuest.Net]