Well I have always been annoyed how there was a warpto and no summon, So I decided to make my own.
This script will put Summon directly underneath warpto.
It also removes a divider which I feel is unnecessary anyway.
-Enjoy
PHP Code:
function onActionServerSide() {
if (params[0] == "summon" && player.hasrightflag("warptoxy")) {
//Checks if the player is summoning and has the right to.
for (temp.p: allplayers) {
if (p.nick == params[1]) {
temp.plyr = p;
}
}
//May summon wrong player if two people have the same name
//this happens as their account is not stored in the list of players, just their name.
plyr.setlevel2(player.level, player.x, player.y);
//Warps the player.
} else {
player.chat = "You don't have sufficent rights!";
//If they don't have the rights to summon.
}
}
//#CLIENTSIDE
function onFirstResponderChanges(obj) {
if (obj.name == "PlayerList_Menu") {
if (!graalversion< 6) {
//It is known to not add to the list properly when using V5.
with(PlayerList_Menu) {
insertrow(4, 11, "Summon (Staff)");
//Adds the summon row to the list.
width = 133;
removerow(8);
//Removes the unneeded divider.
}
}
}
}
function PlayerList_Menu.onSelect() {
if (params[1] == "Summon (Staff)") {
//If you click on summon
temp.plyr = PlayerList_List.getselectedtext();
triggerserver("weapon", this.name, "summon", plyr);
}
}