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.
ATCP demo scripts
ATCP demo scripts
- Attachments
-
- ATCP.xml
- (2.43 KiB) Downloaded 1203 times
Re: ATCP demo scripts
This is sample output when you move into a room:
It automatically parses the Char.Vitals string for you into a table, and the exits line too.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-
Re: ATCP demo scripts
::excellentx2::
Re: ATCP demo scripts
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.
- Alexander Divine
- Posts: 65
- Joined: Mon Dec 21, 2009 7:01 pm
Re: ATCP demo scripts
I assume this is for Imperian? Because Aetolia doesn't display ATCP.
Re: ATCP demo scripts
This is for all IRE games. Aetolia has it too - Nexus uses it.
Re: ATCP demo scripts
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:
Why does it do that and how can I get rid of it?
Why does it do that and how can I get rid of it?
Re: ATCP demo scripts
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
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.