Page 1 of 7

ATCP demo scripts

Posted: Sat Jan 23, 2010 12:48 pm
by Vadi
These scripts demonstrate the use of event handlers for catching ATCP messages. You can also retrieve the data via the atcp table, but it doesn't demo that because it's too basic.

Requires Mudlet 1.0.6.

Re: ATCP demo scripts

Posted: Sat Jan 23, 2010 1:15 pm
by Vadi
This is sample output when you move into a room:
Room ID: 13895
Current room title: An opulent foyer

table {
1: 'n'
2: 'e'
3: 'w'
4: 'd'
}

table {
'max_mana': '3637'
'current_willpower': '15435'
'max_willpower': '15435'
'current_health': '6063'
'next_level': '63'
'current_endurance': '22708'
'max_health': '4762'
'current_mana': '4364'
'max_endurance': '22710'
}
An opulent foyer.
A sigil in the shape of a small, rectangular monolith is on the ground. A runic totem
is planted solidly in the ground.
You see exits leading north, east, west, and down.
6063h, 4364m, 22708e, 15435w ex-
It automatically parses the Char.Vitals string for you into a table, and the exits line too.

Re: ATCP demo scripts

Posted: Sat Jan 23, 2010 3:21 pm
by demonnic
::excellent::

Re: ATCP demo scripts

Posted: Sat Jan 23, 2010 4:29 pm
by Jules
::excellentx2::

Re: ATCP demo scripts

Posted: Tue Jan 26, 2010 3:48 pm
by Vadi
Please note that 1.0.6 isn't out yet, these scripts won't work on 1.0.5. But as soon as you upgrade, they will.

Re: ATCP demo scripts

Posted: Tue Jan 26, 2010 5:28 pm
by Alexander Divine
I assume this is for Imperian? Because Aetolia doesn't display ATCP. :(

Re: ATCP demo scripts

Posted: Tue Jan 26, 2010 5:42 pm
by Vadi
This is for all IRE games. Aetolia has it too - Nexus uses it.

Re: ATCP demo scripts

Posted: Mon Mar 15, 2010 8:50 pm
by Ilithyia
I imported this demo script to experiment with modifying the autosipper to use ATCP instead of the prompt, and I keep getting 'table {}' appear as seen in the screenshot below:
Image

Why does it do that and how can I get rid of it?

Re: ATCP demo scripts

Posted: Mon Mar 15, 2010 9:35 pm
by Vadi
You don't need this demo script to make ATCP work... it's a demo of how to use it :) So removing it will get rid of the echos.

Re: ATCP demo scripts

Posted: Mon Mar 15, 2010 9:44 pm
by Ilithyia
Oh, I understand that ATCP will work without this script, but by looking at the script, I can't understand why it does that weird 'table' thing. I was hoping if I understood why it did it in the demo script, I can avoid doing it another script using ATCP.