Name: Invincibility
Type: Staff Tool
Author: John Doe
Description: Maxes out arrows, bombs, health, magic and keeps them at cap.
Notes: Say on duty/off duty to toggle the tool.
if (playertouchsme) {
timeout=.05;
toweapons Staff/Invincibility;
}
if (playerenters||timeout||isweapon||playerchats) {
timeout=.05;
}
if (isweapon) {
if (timeout) {
if (onduty) {
if (! weaponsenabled) {
enableweapons;
}
if (playerhearts<playerfullhearts) {
playerhearts=playerfullhearts;
}
if (playerdarts<99) {
playerdarts=99;
}
if (playerbombs<99) {
playerbombs=99;
}
if (playermp<100) {
playermp=100;
}
}
}
if (playerchats) {
if (! onduty) {
if (strequals(#c,on duty)) {
set onduty;
setplayerprop #c,You are now on duty!;
}
if (strequals(#c,off duty)) {
setplayerprop #c,You are already off duty!;
}
}
if (onduty) {
if (strequals(#c,on duty)) {
setplayerprop #c,You are already on duty;
}
if (strequals(#c,off duty)) {
unset onduty;
setplayerprop #c,You are now off duty!;
}
}
}
}