I'm pretty new to java and was wondering how to do the following...
Say i had a trigger
(.*) enters.
and it sent
slap %1
to the world whenever someone entered
Now if i wanted to enable and disable this trigger with an alias how would i got about it?
So far i've saved
world.EnableTrigger("(.*) enters.", true);
as a js file and surprisingly enough (told you i was new) my happyslap alias doesn't turn it on as i don't know how to add the subroutine.
Any help would be much appreciated and the end aim isn't just to slap people easier.
Ok the 2nd problem, i play a mud with a hunt command which means you can hunt your target in the vain hope you'll actually kill them.
Everytime they leave a room you follow them
e.g You hunt Nick northwest.
The downside of this is if your hunting someone else who can hunt (and they are getting the better of you) they can just drag you into the wilderness, get you lost and backhunt.
Now that's all good and fair but a large number of people use a different client with a mapper on it (it's alot different from MUSHclients) which allows you to code in rooms, press a button when lost and as if by magic it takes you back to a place your familiar with.
Now what i hope to eventually achieve is this:
first make a trigger and write a script to reverse the directions i get dragged.
You hunt (.*) (.*).
so %2 gets run through a script (use string and compareTO and probably lots of if else statements to get the reverse direction n s e w nw ne se sw etc) then send the reverse direction to a variable.
Not sure if this would work though as everytime i send to a variable it clears whatever was previously in it and i'd end up wanting
e.g
Variable
Back - to hold
n
then
You follow Nick northeast
then variable
Back - to hold
n,sw
etc
Is there an addTo variable function?
Then i'd just use certain rooms to clear the variable so whenever i used "back" it'd take me back to the last known location.
Is all of this possible?
Say i had a trigger
(.*) enters.
and it sent
slap %1
to the world whenever someone entered
Now if i wanted to enable and disable this trigger with an alias how would i got about it?
So far i've saved
world.EnableTrigger("(.*) enters.", true);
as a js file and surprisingly enough (told you i was new) my happyslap alias doesn't turn it on as i don't know how to add the subroutine.
Any help would be much appreciated and the end aim isn't just to slap people easier.
Ok the 2nd problem, i play a mud with a hunt command which means you can hunt your target in the vain hope you'll actually kill them.
Everytime they leave a room you follow them
e.g You hunt Nick northwest.
The downside of this is if your hunting someone else who can hunt (and they are getting the better of you) they can just drag you into the wilderness, get you lost and backhunt.
Now that's all good and fair but a large number of people use a different client with a mapper on it (it's alot different from MUSHclients) which allows you to code in rooms, press a button when lost and as if by magic it takes you back to a place your familiar with.
Now what i hope to eventually achieve is this:
first make a trigger and write a script to reverse the directions i get dragged.
You hunt (.*) (.*).
so %2 gets run through a script (use string and compareTO and probably lots of if else statements to get the reverse direction n s e w nw ne se sw etc) then send the reverse direction to a variable.
Not sure if this would work though as everytime i send to a variable it clears whatever was previously in it and i'd end up wanting
e.g
Variable
Back - to hold
n
then
You follow Nick northeast
then variable
Back - to hold
n,sw
etc
Is there an addTo variable function?
Then i'd just use certain rooms to clear the variable so whenever i used "back" it'd take me back to the last known location.
Is all of this possible?