Jump to content

Recommended Posts

Posted

Hi guys!

 

With this script you can send announces in-game via web.

 

You need configure your telnet.properties in config folder of you gameserver

 

Example

 

EnableTelnet = True

# This is the port L2J should listen to for incoming telnet
# requests.
# Default: 12345
StatusPort = 12345

# If the following is not set, a random password is generated on server startup.
# Usage: StatusPW = somePass
StatusPW = PASSWORD

# This list can contain IPs or Hosts of clients you wish to allow. Hostnames must be resolvable to an IP.
# Example: 0.0.0.0,host,0.0.0.1,host2,host3,host4,0.0.0.3
# Default: 127.0.0.1,localhost
ListOfHosts = 127.0.0.1,localhost

 

 

 

Remember your php files must stay in allowed host.

 

 

announce.php (or index, or what you like)

 

<html>
<head>
<title>Announce</title>
<style type="text/css">
<!--

.formname { width: 700px; 
font-size: 12px;
font-family: tahoma,helvetica;
color: #222222;
background-color: #F1F1F1;
border:2px solid #444444;
border-top-width : 2px;
border-right-width : 2px;
border-bottom-width : 2px;
border-left-width : 2px;
text-indent : 2px;

}

.form { width: 100px; 
font-size: 12px;
font-family: tahoma,helvetica;
color: #202020;
border:2px solid #000000;
text-indent : 2px;
}



body,td,th {
font-family: Verdana, Arial, Helvetica, sans-serif;
font-size: 12px;
color: #cccccc;
background-color: #333333;
}

-->
</style>

</head>
<body>
<?php
echo "
	<br><br><table border=\"0\" cellpadding=\"0\" cellspacing=\"0\" align=\"center\">
	<tr>
	<td class=\"noborderback\"><form action=\"makeannounce.php\"><input name=\"sendchat\" maxlength=\"140\" size=\"50\" type=\"text\" value=\"\" class=\"formname\"></td></tr>
	<tr><td align=\"right\"><input value=\"Send Announcement\" onclick=\"submit\" height=\"9\" type=\"submit\" class=\"form\">
	</form></td>
	</tr></table>
";
?>
</body>
</html>

 

 

makeannounce.php

 

<?php
$usetelnet = fsockopen("HOST OR IP", "TELNET PORT", $errno, $errstr, 30);
if($usetelnet) {

$sendchat = $_REQUEST['sendchat'];
$give_string = 'announce ' . $sendchat; // Don't touch... but... "announce" is the Telnet command, maybe you can "discover" other commands.

fputs($usetelnet, "PASSWORD"); //this is password of telnet in telnet.properties you can change it
fputs($usetelnet, "\r\n"); // Don't touch xD
fputs($usetelnet, $give_string); // Don't touch xD
fputs($usetelnet, "\r\n"); // Don't touch xD
fputs($usetelnet, "exit\r\n"); // Don't touch... mmmmm... Exit (?)
}
?>

<!-- This retunr to the "index", in this case, announce.php after sending the announcement.  -->
<meta http-equiv="refresh" content="0.1; URL=announce.php">

 

 

And...

 

All telnet commands:

 

status - displays basic server statistics.

performance - shows server performance statistics.

forcegc - forced garbage collection.

purge - removes finished threads from thread pools.

memusage - displays memory amounts in JVM.

announce <text> - announces <text> in game.

msg <nick> <text> - Sends a whisper to char <nick> with <text>.

gmchat <text> - Sends a message to all GMs with <text>.

gmlist - lists all gms online.

kick - kick player <name> from server.

shutdown <time> - shuts down server in <time> seconds.

restart <time> - restarts down server in <time> seconds.

abort - aborts shutdown/restart.

give <player> <itemid> <amount>

enchant <player> <itemType> <enchant> (itemType: 1 - Helmet, 2 - Chest, 3 - Gloves, 4 - Feet, 5 - Legs, 6 - Right Hand, 7 - Left Hand, 8 - Left Ear, 9 - Right Ear , 10 - Left Finger, 11 - Right Finger, 12- Necklace, 13 - Underwear, 14 - Back, 15 - Belt, 0 - No Enchant)

extlist - list all loaded extension classes

extreload <name> - reload and initializes the named extension or all if used without argument

extinit <name> - initilizes the named extension or all if used without argument

extunload <name> - unload the named extension or all if used without argument

debug <cmd> - executes the debug command (see 'help debug').

jail <player> [time]

unjail <player>

 

 

PS: Commands that expect an answer not serve this purpose because there is no console.

However you can use several like (announce, msg, gmchat, kick, shutdown, restart, give (only if char is online), enchat.... etc..)

 

 

Hope you like this  ;)  (credits to me)

Posted

Good, it is really great.

But I will pass because I don't have a serv. ... :)

But still, thx for this :)

It is really great.. I think ;D

Posted

Good Share, can you put credits? Or maybe its yours.

 

Credits to me ;)

 

But I take "All telnet commands list" from l2j forum.

  • 2 years later...

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now


  • Posts

    • 寒冷的冬天 — 火热的折扣。使用促销代码 WINTER 即可在我们商店的所有购买中获得 10% 折扣! 有效链接: 数字商品商店(网站): 前往 其他服务和产品: 商店 Telegram 机器人: 前往 – 通过 Telegram 信使方便访问商店。 虚拟号码服务: 前往 用于购买 Telegram Stars 的 Telegram 机器人: 前往 – 在 Telegram 中快速且优惠地购买 Stars。 SMM 面板: 前往 – 推广您的社交媒体账户。 我们想向您展示当前的 促销和特别优惠列表 ,用于购买我们服务的产品和服务: 1. 您可以在首次购买时使用促销代码:SOCNET(15% 折扣) 2. 获取 $1 商店余额或 10–20% 折扣——只需在我们的网站注册后按以下模板填写您的用户名:"SEND ME BONUS, MY USERNAME IS..." ——您需要在我们的论坛主题中发布! 3. SMM 面板首次试用可获得 $1:只需在我们的网站(Support)提交主题为 “Get Trial Bonus” 的工单。 4. 我们的 Telegram 频道和 Stars 购买机器人中每周都会赠送 Telegram Stars! 新闻: ➡ Telegram 频道: https://t.me/accsforyou_shop ➡ WhatsApp 频道: https://chat.whatsapp.com/K8rBy500nA73z27PxgaJUw?mode=ems_copy_t ➡ Discord 服务器: https://discord.gg/y9AStFFsrh 联系方式和支持: ➡ Telegram: https://t.me/socnet_support ➡ WhatsApp: https://wa.me/79051904467 ➡ Discord: socnet_support ➡ ✉ Email: solomonbog@socnet.store
    • Cold winter — hot discounts. Use promo code WINTER and get 10% off on all purchases in our store! Active links: Digital goods store (Website): Go to Other services and products: Store Telegram bot: Go to – convenient access to the store via the Telegram messenger. Virtual numbers service: Go to Telegram bot for purchasing Telegram Stars: Go to – fast and profitable purchase of Stars in Telegram. SMM Panel: Go to – promotion of your social media accounts. We want to present to you the current list of promotions and special offers for purchasing products and services of our service: 1. You can use a promo code for your first purchase: SOCNET (15% discount) 2. Get $1 on your store balance or a 10–20% discount — just write your username after registering on our website using the following template: "SEND ME BONUS, MY USERNAME IS..." – you need to post this in our forum thread! 3. Get $1 for the first trial launch of the SMM Panel: just open a ticket with the subject “Get Trial Bonus” on our website (Support). 4. Weekly Telegram Stars giveaways in our Telegram channel and in our bot for purchasing stars! News: ➡ Telegram channel: https://t.me/accsforyou_shop ➡ WhatsApp channel: https://chat.whatsapp.com/K8rBy500nA73z27PxgaJUw?mode=ems_copy_t ➡ Discord server: https://discord.gg/y9AStFFsrh Contacts and support: ➡ Telegram: https://t.me/socnet_support ➡ WhatsApp: https://wa.me/79051904467 ➡ Discord: socnet_support ➡ ✉ Email: solomonbog@socnet.store
    • Cold winter — hot discounts. Use promo code WINTER and get 10% off on all purchases in our store! Active links: Digital goods store (Website): Go to Other services and products: Store Telegram bot: Go to – convenient access to the store via the Telegram messenger. Virtual numbers service: Go to Telegram bot for purchasing Telegram Stars: Go to – fast and profitable purchase of Stars in Telegram. SMM Panel: Go to – promotion of your social media accounts. We want to present to you the current list of promotions and special offers for purchasing products and services of our service: 1. You can use a promo code for your first purchase: SOCNET (15% discount) 2. Get $1 on your store balance or a 10–20% discount — just write your username after registering on our website using the following template: "SEND ME BONUS, MY USERNAME IS..." – you need to post this in our forum thread! 3. Get $1 for the first trial launch of the SMM Panel: just open a ticket with the subject “Get Trial Bonus” on our website (Support). 4. Weekly Telegram Stars giveaways in our Telegram channel and in our bot for purchasing stars! News: ➡ Telegram channel: https://t.me/accsforyou_shop ➡ WhatsApp channel: https://chat.whatsapp.com/K8rBy500nA73z27PxgaJUw?mode=ems_copy_t ➡ Discord server: https://discord.gg/y9AStFFsrh Contacts and support: ➡ Telegram: https://t.me/socnet_support ➡ WhatsApp: https://wa.me/79051904467 ➡ Discord: socnet_support ➡ ✉ Email: solomonbog@socnet.store
    • Telegram Stars — a new digital currency inside Telegram. And right now, the best opportunities are opening for profitable purchases and participation in exclusive events. And you can purchase Telegram Stars safely and at the best price in our bot. Active links: Telegram bot for purchasing Telegram Stars: Go to – fast and profitable purchase of Stars in Telegram. Other services and products: Digital goods store (Website): Go to Store Telegram bot: Go to – convenient access to the store via the Telegram messenger. Virtual numbers service: Go to SMM Panel: Go to – promotion of your social media accounts. We want to present to you the current list of promotions and special offers for purchasing products and services of our service: 1. You can use a promo code for your first purchase: SOCNET (15% discount) 2. Get $1 on your store balance or a 10–20% discount — just write your username after registering on our website using the following template: "SEND ME BONUS, MY USERNAME IS..." — you need to post this in our forum thread! 3. Get $1 for the first trial launch of the SMM Panel: just open a ticket with the subject “Get Trial Bonus” on our website (Support). 4. Weekly Telegram Stars giveaways in our Telegram channel and in our bot for purchasing stars! News: ➡ Telegram channel: https://t.me/accsforyou_shop ➡ WhatsApp channel: https://chat.whatsapp.com/K8rBy500nA73z27PxgaJUw?mode=ems_copy_t ➡ Discord server: https://discord.gg/y9AStFFsrh Contacts and support: ➡ Telegram: https://t.me/socnet_support ➡ WhatsApp: https://wa.me/79051904467 ➡ Discord: socnet_support ➡ ✉ Email: solomonbog@socnet.store
  • Topics

×
×
  • Create New...

AdBlock Extension Detected!

Our website is made possible by displaying online advertisements to our members.

Please disable AdBlock browser extension first, to be able to use our community.

I've Disabled AdBlock