player:tell("Starting.."); banned = this.con:banned(); online = this.con.online; admins = this.con:admins(); if (player.location != this.location) return; elseif (player in banned) player:tell("Sorry, you have been banned from the network."); return; elseif (!online) player:tell("Sorry, the Instant Transportation network is offline."); return; elseif (this in banned) player:tell("Sorry, this node has been banned from the network."); return; elseif (this.location in banned) player:tell("Sorry, this room has been banned from the network."); return; endif linelen = player:linelen(); start = ""; for junk in [1..linelen] start = start + "-"; endfor player:tell("[blue]", start, "[normal]"); player:tell($string_utils:center("Welcome to the Instant Transportation", linelen)); player:tell($string_utils:center("network.", linelen)); player:tell(); player:tell($string_utils:center("This network allows you to travel instantly to", linelen)); player:tell($string_utils:center("any place that has an ITN node.", linelen)); player:tell(); player:tell($string_utils:center("Please select an option:", linelen)); player:tell($string_utils:center("a) Travel to a node", linelen)); player:tell($string_utils:center("b) Setup a node", linelen)); player:tell($string_utils:center("c) Send a message to the owner", linelen)); if (player in admins) player:tell($string_utils:center("d) Manage the network", linelen)); endif option = "z"; player:tell(); while ((((option != "a") && (option != "b")) && (option != "c")) && (option != "d")) option = $command_utils:read(); if ((((option != "a") && (option != "b")) && (option != "c")) && (option != "d")) player:tell("Invalid Option."); player:tell(); endif endwhile $command_utils:suspend_if_needed(); if (option == "a") LIST = this.con:list(banned, {this}); if (LIST == {}) player:tell($string_utils:center("Sorry, no nodes are open right now.", linelen)); player:tell("[red]", start, "[normal]"); return; endif player:tell("[blue]", start, "[normal]"); player:tell($string_utils:center("Please select a node to travel to:", linelen)); player:tell(); for node in (LIST) player:tell(tostr(node in LIST), ". ", node.location:title(), "."); endfor $command_utils:suspend_if_needed(); max = length(LIST); `NUM = $code_utils:toint($command_utils:read()) ! E_TYPE => $maxint'; if (((NUM == E_TYPE) || ((NUM > max) || (NUM < 1))) || (NUM == $maxint)) player:tell($string_utils:center("Invalid node number.", linelen)); player:tell("[red]", start, "[normal]"); return; endif node = LIST[NUM]; nodel = node.location; if ((!nodel:acceptable(player)) || (!nodel:is_unlocked_for(player))) player:tell($string_utils:center("That node will not accept you for transport right now, sorry.", linelen)); return; endif player:tell($string_utils:center(tostr("Travelling to ", nodel:title(), " in three seconds (via ", node:title(), ")"), linelen)); this.location:announce(player:title(), " has initiated a transfer sequence on the ", this:title(), " for ", nodel:title(), "."); nodel:announce_all(node:title(), " starts to power up."); suspend(2); if (player.location == this.location) nodel:announce_all("A small portal opens next to ", node:title(), "."); player:tell($string_utils:center("Thankyou for using the ITN Network. (One Second)", linelen)); player:tell("[red]", start, "[normal]"); else return; endif suspend(1); if (player.location == this.location) player:moveto(nodel); if (player.location == nodel) nodel:announce(player:title(), " steps out of the portal as it closes."); this.location:announce(player:title(), " steps into the portal and disappears."); return; else player:tell("[red]Sorry, the transfer appears to have failed.[normal]"); nodel:announce_all(node:title(), " powers down and the portal disappears."); this.location:announce(player:title(), " has not transferred due to a ITN error."); return; endif else return; endif return; elseif (option == "b") generic = this.con.generic; player:tell("[blue]", start, "[normal]"); player:tell($string_utils:center("To setup your own node please read the help on", linelen)); player:tell($string_utils:center(tostr(generic:title(), " [", generic, "]"), linelen)); player:tell(); player:tell($string_utils:center("Thankyou for using the ITN Network.", linelen)); player:tell("[red]", start, "[normal]"); return; elseif (option == "c") to = this.owner; subject = "ITN Message"; from = this; player:tell("[blue]", start, "[normal]"); player:tell($string_utils:center("Please enter a message to send to the owner", linelen)); msg = $command_utils:read_lines(); player:tell($string_utils:center("Your message has been sent.", linelen)); player:tell(); player:tell($string_utils:center("Thankyou for using the ITN Network.", linelen)); player:tell("[red]", start, "[normal]"); $mail_agent:send_message(from, to, subject, msg); return; elseif (option == "d") if ((player in admins) == 0) player:tell("Invalid Option."); return; endif player:tell("[blue]", start, "[normal]"); player:tell($string_utils:center("This feature has been moved to the ITT Center (accessible by ITT)", linelen)); player:tell(); player:tell($string_utils:center("Thankyou for using the ITN Network.", linelen)); player:tell("[red]", start, "[normal]"); endif