onConnect/onStart event?

Post Reply
Ornir
Posts: 31
Joined: Thu Apr 07, 2011 8:15 am

onConnect/onStart event?

Post by Ornir »

Is there an event that is raised on starting mudlet or connecting to a mud?

User avatar
Vadi
Posts: 5042
Joined: Sat Mar 14, 2009 3:13 pm

Re: onConnect/onStart event?

Post by Vadi »

I think there is one called onConnect actually.

User avatar
Heiko
Site Admin
Posts: 1548
Joined: Wed Mar 11, 2009 6:26 pm

Re: onConnect/onStart event?

Post by Heiko »

In the recent 2.0-rc2 release there is a: sysProfileLoaded event that gets raised after all scrips have been loaded, compiled and run, but before connecting to the server. When Mudlet establishes a network connection with the server Mudlet calls a special Lua function that can be overwritten by the user.

Ornir
Posts: 31
Joined: Thu Apr 07, 2011 8:15 am

Re: onConnect/onStart event?

Post by Ornir »

What function?

User avatar
Heiko
Site Admin
Posts: 1548
Joined: Wed Mar 11, 2009 6:26 pm

Re: onConnect/onStart event?

Post by Heiko »

onConnect()

Ergo in some script object you put:

function onConnect()
echo("We're connected to the server.\n")
end

Ornir
Posts: 31
Joined: Thu Apr 07, 2011 8:15 am

Re: onConnect/onStart event?

Post by Ornir »

Is there a function/ event I can use when my splitscreen scrollback buffer goes back to fullscreen (i.e. ctrl enter, scrolling all the way down, etc.)? Mudlet is reporting to my mud that I have a terminal of 11 lines or so, and it doesnt update it when the splitscreen is gone.

I want to set the height manually when the splitscreen is gone so the mud doesn't page the output and irritate my data capture triggers.

Thanks.

User avatar
Vadi
Posts: 5042
Joined: Sat Mar 14, 2009 3:13 pm

Re: onConnect/onStart event?

Post by Vadi »

There is not at the moment

Widjet
Posts: 30
Joined: Thu Apr 22, 2010 1:43 am

Re: onConnect/onStart event?

Post by Widjet »

Heiko wrote:onConnect()

Ergo in some script object you put:

function onConnect()
echo("We're connected to the server.\n")
end
Incidentally, that function is called even if it doesn't exist - I always used to get a 'attempt to call a nil value' error in the error log before I implemented that function just to shut it up.

User avatar
Vadi
Posts: 5042
Joined: Sat Mar 14, 2009 3:13 pm

Re: onConnect/onStart event?

Post by Vadi »


Post Reply