[Freeciv-Dev] (PR#12706) Events framework
[Top] [All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
<URL: http://bugs.freeciv.org/Ticket/Display.html?id=12706 >
Hello,
Here is a small Lua toy that you may find interesting. Basically it
allows running Lua commands via the civserver console. I also made a
couple of custom Freeciv functions that will be acessible from Lua.
Including:
* log (logs messages to the console)
* notify (sends a message to a nation)
* foundNewTech(gives a nation a new tech)
* changeGold(modifies a nation's gold by a certain amount)
To try it out:
1) Get Lua from:
http://www.lua.org/ftp/lua-5.0.2.tar.gz
2) cd freeciv/
3) tar zxvf lua-5.0.2.tar.gz
4) mv lua-5.0.2 lua
5) gzip -dc lua.diff.gz | patch -p0
6) ./autogen.sh
7) make
A small demo:
Run civclient; Start New Game; Start; choose the Romans; press Ok;
Open the Science report by pressing F6.
Then type these lines in the client chatline:
1) /run foundNewTech("Roman", "Gunpowder")
2) /run changeGold("Roman", 100)
3) /run notify("Roman", "*** Hello World! ***")
Have fun using your new cheat module!
lua.diff.gz
Description: GNU Zip compressed data
- [Freeciv-Dev] Re: (PR#12706) Events framework, Vasco Alexandre da Silva Costa, 2005/04/02
- [Freeciv-Dev] Re: (PR#12706) Events framework, Benoit Hudson, 2005/04/02
- [Freeciv-Dev] Re: (PR#12706) Events framework, Mike Kaufman, 2005/04/02
- [Freeciv-Dev] Re: (PR#12706) Events framework, Peter Schaefer, 2005/04/02
- [Freeciv-Dev] Re: (PR#12706) Events framework, Benedict Adamson, 2005/04/03
- [Freeciv-Dev] (PR#12706) Events framework,
Vasco Alexandre da Silva Costa <=
- [Freeciv-Dev] (PR#12706) Events framework, Vasco Alexandre da Silva Costa, 2005/04/03
- [Freeciv-Dev] (PR#12706) Events framework, Jason Short, 2005/04/04
- [Freeciv-Dev] Re: (PR#12706) Events framework, Per I. Mathisen, 2005/04/04
- [Freeciv-Dev] Re: (PR#12706) Events framework, Vasco Alexandre da Silva Costa, 2005/04/04
- [Freeciv-Dev] Re: (PR#12706) Events framework, Per I. Mathisen, 2005/04/05
- [Freeciv-Dev] (PR#12706) Events framework, Jason Short, 2005/04/07
- [Freeciv-Dev] (PR#12706) Events framework, Jason Short, 2005/04/07
- [Freeciv-Dev] (PR#12706) Events framework, Vasco Alexandre da Silva Costa, 2005/04/07
- [Freeciv-Dev] (PR#12706) Events framework, Vasco Alexandre da Silva Costa, 2005/04/07
- [Freeciv-Dev] Re: (PR#12706) Events framework, Benoit Hudson, 2005/04/07
|
|