Stalemate

Stalemate is a plugin for creating the most bloody stalemates Minecraft has ever known. Players will struggle simply to break a block at the top of that ugly structure. Oh, I'm sorry, that's the other team's fort. Anyway, the plugin coordinates the joining, building, and fighting aspects of a real war, except for that players guard a pointless ugly block, dubbed the "Holy Block" in the code, but I think players would call it a "liability". Please don't let it die. It gets really sad when it dies, especially if you do it to your own. Players spend 5 minutes joining, 5 minutes building, and a whole lot of time fighting to destroy a block at each team's fort. Last team standing wins. Times are configurable.


Configuration:


The configuration file is NOT named "config.yml" as with many other plugins. It's named "config.xml". Because my needs were so robust, yet I needed to keep the configuration simple and user friendly, the config is written in XML. Please note that the parser is not very lenient; ensure that your XML is as well-formed as possible, i.e. all tags are closed. Comments inside the configuration will guide you. It's really intuitive, and allows the modification of pretty much everything in the plugin, including error messages. In the config.xml, there is a place to submit a list of scripts that begin execution on the enabling of the plugin. The scripts are written one instruction per line. The working directory is the data folder (all relative paths start from the data folder). Instruction reference:
pushint arg1 - Pushes arg1 to the stack as an integer type.
store - Pops the name of the variable and then the value of the variable off the stack and associates the value with the name.
fetch - Fetches the variable stored based on the variable name, which is popped off the stack.
pushbool arg1 - Pushes arg1 to the stack as a boolean type.
pushdouble arg1 - Pushes arg1 to the stack as a double.
pushfloat arg1 - Pushes arg1 to the stack as a float.
pushlong arg1 - Pushes arg1 to the stack as a long.
pushstring arg1 - Pushes the string arg1 to the stack.
pushchar arg1 - Pushes the character arg1 to the stack.
pushnull - Pushes a null reference to the stack.
array - Creates an array by first popping the length off the stack. Then the interpreter pops the class name of the type off of the stack. Finally, the elements are popped off the stack. The created array is pushed to the stack. Set and get array elements by using Array.set and Array.get.
value - Specifies the exit code of the executed script.
invoke - Pops the target object, class name, method name, parameters, and signature class names (one at a time) in that order. The result of the invocation is pushed to the stack. Void invocations push null to the stack.
delete - Deletes the variable created by store. Pops the name off the stack.
label - Creates a label on the specified line. When the label is used, control transfers to the next line.
goto - Goes to a specified label, whose name is popped off the stack.
if labelname - Goes to labelname if the boolean on top of the stack is true. The boolean is popped off.
equals - Calls .equals on the object on top of the stack, with parameter set as the next object on the stack.
refequals - Same as equals, except using reference equality.
dup - Duplicates the item on the top of the stack.
gt - Pushes true to the stack if the item on top of the stack is greater than that of the next item, false otherwise.
not - Toggles the boolean value on top of the stack.
lt - See gt.
numberequals - Same as equals, but uses numerical equality.
or - Boolean OR operation on top two items.
and - See or.
xor - See or.
convert_b/c/i/f/d/l/s - Pops the first item off of the stack and converts it to the specified type, pushing the result.
Types: b - byte, c - char, i - int, f - float, d - double, l - long, s - short

Bitwise instructions: All of these pop the operands off of the stack.
bxor - Bitwise XOR.
bor - Bitwise OR.
band - Bitwise AND.
bnot - Bitwise NOT.

call label - Transfers control to instruction at label. To get back, use the return instruction.
return - Transfers control back to call statement.
instanceof - Implements the Java instanceof operator.
getclass name - Convenience instruction for Class.forName(java.lang.String)
loadfile name - Loads script file.
construct - Constructs an object. Pops the class name, parameters, and signature classes of the parameters off of the stack in that order. Pushes the created object.
getfield - Gets a field in an object. Pops the field name, target object, and target class in that order. Pushes the field to the stack.
setfield - Sets a field in an object. Pops the field name, target object, field value, target class and then sets the field. Nothing is pushed.
execute - Pops number of instructions to execute off the stack. Pops instructions off and executes in order of popping.
gotoln line - Transfers control to line.

Commands:


/stalemate is the basic one.
/stalemate help - Display the help page.
/stalemate war - Starts a war, with your team only.
/stalemate joinwar <otherteam> - Makes your team join a war.
/stalemate join <player> - Joins the team of a specified player.
/stalemate ptrap - Place a trap.
/stalemate rtrap - Remove a trap.

Permissions:


Most permissions are configurable. However, the basic permission (stalemate.basic) is required to use any command.
Default permissions are stalemate.<command name>, with the exception of /stalemate war which is stalemate.start.

Use:

First:
Create/join your team! Type /stalemate join <otherplayer/teamname>. If you put in another player's name, you will join his/her team. If you put anything else, you get a new team! WARNING: All teams are erased on server restart! If you forget, do /stalemate join and it will show your team name!
Second:
The creator of the team then gets to join his team into a war (or start one for that matter). Just do /stalemate joinwar <otherteam> or /stalemate war! It's the administrator's fault if you don't have permission to do so.
Third:
Wait for some 5 minutes as other teams decide to join. Then get building! You have 5 minutes to build a fort to defend the holy block!
Fourth:
Kill the other teams! And break their holy blocks! NOTE: To get the latest version, clone the git repository and build.

Comments

Posts Quoted:
Reply
Clear All Quotes

About This Project

Categories

Members

Recent Files