- This topic has 3 replies, 2 voices, and was last updated 9 years ago by PseudoKnight.
-
AuthorPosts
-
August 10, 2012 at 12:08 am #2354PseudoKnightMember
Someone requested that I post this.
This is placed in the config.txt file, where all command aliases are placed.
[sourcecode language=”plain”]
*:/join $player = >>>
try(assign(@player, pinfo($player)[0]), @ex, die('Failed.')) #check if the player exists and assign it to @player
import(@requests) #bring up the current list of requests
tmsg(@player, color(b), player(), ' has requested to join you. /accept')
msg(color(b), 'Request to join sent to ', @player, '.')
array_set(@requests, @player, array('join', player())) #add this request to the request list array
export(@requests) #save it so other scripts can access it
<<<*:/invite $player = >>>
try(assign(@player, pinfo($player)[0]), @ex, die('Failed.'))
import(@requests)
tmsg(@player, color(b), player(), ' has requested that you join them. /accept')
msg(color(b), 'Invitation sent to ', @player, '.')
array_set(@requests, @player, array('invite', player()))
export(@requests)
<<<*:/accept = >>>
import(@requests)
if(!array_index_exists(@requests, player()), die('There is nothing to accept.')) #if no requests for player, stop
if(@requests[player()][0] == 'invite') { #if there's an invite request
msg(color(b), 'Teleporting to '.@requests[player()][1].' in 3 seconds…')
tmsg(@requests[player()][1], color(b), 'Teleporting '.player().' in 3 seconds…')
_warmuptp(3, player(), ploc(@requests[player()][1])) #run the warmuptp procedure
} else { #if there's a join request
msg(color(b), 'Teleporting '.@requests[player()][1].' in 3 seconds…')
tmsg(@requests[player()][1], color(b), 'Teleporting to '.player().' in 3 seconds…')
_warmuptp(3, @requests[player()][1], ploc())
}
array_remove(@requests, player()) #remove this request from the list
export(@requests)
<<<
[/sourcecode]Put this in the auto_include.ms file, where all global procedures are kept.
[sourcecode language=”plain”]
# Warm-up a TP with potion and sound effects
proc(_warmuptp, @length, @player, @loc,
set_peffect(@player, 9, 1, 6) #screen warping effect
set_timeout(@length * 1000, closure( #delay for the @length specified in seconds
make_effect(ploc(@player), 'GHAST_SHOOT', 20) #teleport sound
set_ploc(@player, @loc) #move the player to @loc, an array of coordinates and world
set_peffect(@player, 15, 1, 2) #make them blind just for a second while the world loads
make_effect(@loc, 'GHAST_SHOOT', 20)
))
)
[/sourcecode]August 11, 2012 at 11:43 pm #2363LatsuMemberI haven’t been able to test it out yet. I have been busy with activities with my family. Ill have my friend add the script to our server tomorrow. Also, how do you prevent uninvited guests from playing on a server? we just had an experience with griefing and are flabbergasted that someone got ahold of our IP address.
August 12, 2012 at 5:33 am #2364PseudoKnightMemberYou can use the built-in whitelisting feature. Set white-list in the server.properties file to true. Then add player names in white-list.txt, one per line.
Or, if you want more permissions flexibility going forward, install a permissions plugin like permissionsbukkit, permissionsex, or bpermissions. Then, for instance, in permissionsbukkit you could set the default group’s permissions.build to false. They can join the server, but won’t be able to do anything until added to a group with permissions.build true. This is how we do it on FSMC, but it can be overkill for a server with just a few people. It’s called greylisting.
August 18, 2012 at 11:12 pm #2416PseudoKnightMemberBTW, you should use these builds usually:
http://build.sk89q.com/job/CommandHelper/lastStableBuild/
The dev.bukkit.org builds are olllld. -
AuthorPosts
- The forum ‘General’ is closed to new topics and replies.