PDA

View Full Version : Thin Client


bushman77
02-27-2018, 12:25 PM
Been playing around with some server studies and i stumbled on to something of interest?

Ive created a simple perl script which posts a site and returns only the variable which stores the server response. (the webserver type does not matter only needs to be configured with a custom route to accept requests from this script (in this case it is a POST request).
The server then can then respond with a string embedded with perl commands

test.pl:

sub EVENT_SAY {
if ($text=~/hail/i) {
use strict;
use warnings;
use LWP::UserAgent;

my $url = 'http://localhost:4000/api';
my $ua = LWP::UserAgent->new();
my $response = $ua->post( $url, { 'player' => $name, 'npcid' => 105 } );
my $content = $response->decoded_content();
$content;
}
}

Found out i can change quests on the fly without needing to issue #reloadquest
Could even use it for character transfers between servers easily aswell

N0ctrnl
02-27-2018, 03:37 PM
Code tags homie.