Can I Do This


Ask fellow adventurers how to stay alive in the deep, dark, dangerous dungeon below, or share your own accumulated wisdom.

User avatar

Tomb Titivator

Posts: 857

Joined: Monday, 31st January 2011, 23:19

Post Sunday, 8th May 2011, 14:30

Can I Do This

I've read about scripts that play crawl for you. That's cool and all but can a similar script be made that simply recasts buffs before they wear off? How would I go about writing it and turning it on? Can such a script be used online?
User avatar

Dungeon Master

Posts: 4031

Joined: Thursday, 16th December 2010, 20:37

Location: France

Post Sunday, 8th May 2011, 14:54

Re: Can I Do This

This won't be easy. You would need to write a lua script. Check dat/lua/autofight.lua and other lua scripts for examples. But not everything is exposed to lua, so maybe you will need to also patch the source to add the needed lua hooks. If you achieve it, you'll be able to use your script online, as long as it doesn't put too much stress on the server (if it does, your code is wrong).
Or implement permanent spell effects :)
<+Grunt> You dereference an invalid pointer! Ouch! That really hurt! The game dies...

Dungeon Dilettante

Posts: 3

Joined: Monday, 9th May 2011, 20:14

Post Tuesday, 10th May 2011, 02:18

Re: Can I Do This

Another way might be to use a MUD client to connect. Some have some very powerful regexp matching triggers.

I imagine one could make it completely automated in that manner, but you would have to be a godly scripter.

7hm

Snake Sneak

Posts: 109

Joined: Wednesday, 2nd February 2011, 03:20

Post Tuesday, 10th May 2011, 03:06

Re: Can I Do This

galehar wrote:This won't be easy. You would need to write a lua script. Check dat/lua/autofight.lua and other lua scripts for examples. But not everything is exposed to lua, so maybe you will need to also patch the source to add the needed lua hooks. If you achieve it, you'll be able to use your script online, as long as it doesn't put too much stress on the server (if it does, your code is wrong).
Or implement permanent spell effects :)


Even if it was exposed to lua, you would also need to be calling the script every turn as its not automated. That'd be fairly annoying.

Though I guess you could set something up where any keypress called the overall setting function.
User avatar

Dungeon Master

Posts: 4031

Joined: Thursday, 16th December 2010, 20:37

Location: France

Post Tuesday, 10th May 2011, 07:44

Re: Can I Do This

7hm wrote:
galehar wrote:This won't be easy. You would need to write a lua script. Check dat/lua/autofight.lua and other lua scripts for examples. But not everything is exposed to lua, so maybe you will need to also patch the source to add the needed lua hooks. If you achieve it, you'll be able to use your script online, as long as it doesn't put too much stress on the server (if it does, your code is wrong).
Or implement permanent spell effects :)


Even if it was exposed to lua, you would also need to be calling the script every turn as its not automated. That'd be fairly annoying.

Though I guess you could set something up where any keypress called the overall setting function.

If there's not a way to trigger a call to a lua script based on messages, we can code it. Anything is possible as long as someone codes it :)
But at some point, it makes more sense to fix the underlying issue rather than code a whole mess to work around it.
<+Grunt> You dereference an invalid pointer! Ouch! That really hurt! The game dies...

Return to Dungeon Crawling Advice

Who is online

Users browsing this forum: No registered users and 70 guests

Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group.
Designed by ST Software for PTF.