VB (or any other lang) App for Ingame

smoochy boys on tour

MrSam

Dedicated Member
Dedicated Member
May 31, 2005
171
0
62
This was me thinking about VB apps, came up with this.

Should be pretty easy to be honest.




Basically, this puts your own forums ingame in real time. (Or any other forums you choose.)



You read your own forums, I'd reccomend setting up a special feed for this. I built one of these myself in PHP for PHPBB, but if you find this hard I'm sure RSS feed mods are VERY easy to come across.

Then you parse this into a NPC text file and save it. Your app repeats this process every 2 mins.




Here's some pseudo code for updating the NPC file. I don't know any languages so this is just a rough outline. (PHP style)



echo "[@main]
#SAY
Hello, welcome to the Notice Board. This shows the forums that can be found at http://www.myserver.com/forum.

<Read forum/@readforum>
Exit/@exit


[@readforum]";


$i = 0;
while($i < 10){

echo "<" . $topictitles[$i] . "/@postno" . $topicnos[$i] . ">";
$i++;
}


$i = 0;
while($i< 10){

echo "

[@postno" . $topicnos[$i] . "]
#SAY
" . $topictexts[$i]";

$i++;
}
 

MrSam

Dedicated Member
Dedicated Member
May 31, 2005
171
0
62
You'd need to break it up into sections with "Next Page" links too. I was gonna do this in the pseudo code but it was getting long and it was only meant as a simple demo. I'm sure everyone could work it out. :)


Also obviously you need to parse out anything like quote marks and [ ] etc... so people can't take advantage massively.


The last part is getting this guy to be updated in real time. I don't think this has ever been tested, but Ledu allows you to use GM commands, and I BELIEVE this would include the one to reload all NPCs on screen. Make this happen every x minutes (to avoid rediculous load on server). Also make sure this NPC is only one on screen.


There you go -- people can browse the latest forum stuff ingame while they're bored selling etc. Just run the app when you run all the other programs to start your server.
 

Far

tsniffer
Staff member
Developer
May 19, 2003
20,184
30
2,788
540
i dont see how creating a vb application enables you to add new server commands in to the game?
 

Sean

Developer
Golden Oldie
Loyal Member
May 13, 2003
699
0
172
The idea's good, it's all well updating the NPC file in real time but as far as I know the NPC file is loaded into memory and then loaded from there; not loaded from the text file every time someone wishes to view it, someone correct me if i'm wrong :)

[Farril] Your completly misunderstanding him :)
 

MrSam

Dedicated Member
Dedicated Member
May 31, 2005
171
0
62
Minion said:
The idea's good, it's all well updating the NPC file in real time but as far as I know the NPC file is loaded into memory and then loaded from there; not loaded from the text file every time someone wishes to view it, someone correct me if i'm wrong :)

[Farril] Your completly misunderstanding him :)



This is entirely correct mate, NPCs, as I understand it, are loaded all at once at the start -- then from memory. But there is a GM command to re-load all NPCs scripts on the screen (updating them from the text file).

This idea revolves around the assumption that this command can be run from an NPC script file (Ledu allows you to use a lot of GM commands)- so every 2 minutes or so you tell it to update the NPC.

This would essentially keep an NPC updated in real time.
 

Sean

Developer
Golden Oldie
Loyal Member
May 13, 2003
699
0
172
In which case; should be easy to pull it off :)
 

Solitude

LOMCN VIP
VIP
Apr 22, 2003
325
0
153
South Wales
But then there's the problem of calculating and breaking down long posts and translating special characters etc etc. This could be done, but it's a lot of work just to read the forums, when you can just Alt + Tab over to your web browser :p

--Solitude--
 

NickAKAVexus

Golden Oldie
Golden Oldie
Apr 16, 2005
1,427
1
145
New york
Soli obviously if you're the server owner you won't post big announcments if its going to crash the program? You could also just make it so the variable only holds the alphabet very easy to do.

I think if people did more of this little crap there would be more to look foward to. Instead we always have the people downing it and giving all the reasons why it shouldn't be done. :-/
 

Sean

Developer
Golden Oldie
Loyal Member
May 13, 2003
699
0
172
Solitude said:
But then there's the problem of calculating and breaking down long posts and translating special characters etc etc. This could be done, but it's a lot of work just to read the forums, when you can just Alt + Tab over to your web browser :p

--Solitude--

Not really alot of work, a good few hours and you'd have it sorted, some simple MySQL queries would do the trick.