Building & Scripting > Scripting Board

Scripted Quest Rewards you would like to see

(1/3) > >>

erwin:
Post scripted quest rewards you would like to see here.

I've three of them:

a) DT detector (tells you if there is a DT in the zone).
b) "Unlimited" usage of ID scrolls - basically an object to store ID scrolls, but casts identify (reason behind this is that ID scrolls are weightless, but there are people who carry over 500+ of them, which used to cause the MUD to lag when they log in / log out)
c) Scriptable games - like Battleship, but more fun


Any others?

Xeriuth:
DT detector is a good idea and something pretty easy to script. Would you want the detector to be automatic? Or you have to do something to engage it? Also dependent would you like it to get stronger the closer you get to the DT?

Unlimited ID scrolls would also be pretty easy to script.
This could be further applied to potions, food, water, and other things of that nature?

Scriptable games become a bit more complex dependent on the type of game. Chess I think would be a neat one personally. Poker would be the best though!
What types of mini games would people like to see?

erwin:
An automatic DT detector (depending on how 4D is set up, and how the script works) might be taxing on 4D itself (particularly if it's a random script which fires every few seconds). Might be better to hard code this. A DT detector that has a cool down but gives a list of DTs in the zone / adjacent rooms would be better, but I was thinking one a DT detector which you hold (like a diving rod), and overrides the cardinal direction commands.

I'd say unlimited ID scrolls are the only thing that "should" be unlimited, as they are already weightless. There's already unlimited food and drink (or rather, inability to feel hungry / thirsty). I think healing potions have weights for a reason - else you could forego healing classes and focus on combat, so that shouldn't really be unlimited.

Script question: Rynald has already added the mod function to scripts (to make scripted games easier). However, do current scripts have recursive functionality (or rather, can we call the same FUNCTION script within the same FUNCTION script cleanly)?

Better still, would it be possible to change the scripting system to allow FUNCTION type scripts to return a set of outputs?

Parnassus:

--- Quote from: erwin on October 04, 2015, 05:04:02 pm ---a) DT detector (tells you if there is a DT in the zone).

--- End quote ---


--- Quote from: erwin on October 06, 2015, 09:40:30 am ---An automatic DT detector (depending on how 4D is set up, and how the script works) might be taxing on 4D itself (particularly if it's a random script which fires every few seconds). Might be better to hard code this. A DT detector that has a cool down but gives a list of DTs in the zone / adjacent rooms would be better, but I was thinking one a DT detector which you hold (like a diving rod), and overrides the cardinal direction commands.

--- End quote ---

The first one just suggests a detector which tells you: yes, there is or no, there isn't.  For this, all you need is code which searches for room-flags to find all the dt rooms.  Add a zone-flag for any zone with a dt room and then use either a script or a hard code with checks for the zone flag.  I think the zone flag should be accessible no matter which room in the zone you're in.

I see two possible problems with this.  The first is that I (as a non-coder) find it simple to say, "Sure, easy-peasy!  Just get someone to write code that does this!"  The second is if dts here are not hardcoded but are triggers or a mix.  On TBA, I can easily do a search for any triggers that are named dt, deathtrap or whatever and then find out if they're used or not.  The only thing I would have trouble finding is a scenario like so:  You irritate a mob and the mob turns a room into a dt.  I don't think I've ever seen anything like that and I don't expect I ever will.  4D and TBA don't have all the same code so I don't know if it's possible here.

rynald:
DTs are set in the zones, i can't imagine they will be created on the fly. But to make sure, it's possible to have the code check for all rooms in the zone for any DTs when the detector is used.

When a function is called, it runs as if it's attached to the mob/obj/room that called it. You can then use globals to pass return values:

Trigger Editor [1]

1) Name         : using return value
2) Intended for : Objects
3) Trigger types: Command
4) Numeric Arg  : 7
5) Arguments    : doit
6) Commands:
eval x 1
%echo% x = %x%
function 2 %x%
eval x %self.new_x%
%echo% after func: x = %x%

Trigger Editor [2]

1) Name         : func
2) Intended for : Objects
3) Trigger types: FUNCTION
4) Numeric Arg  : 100
5) Arguments    :
6) Commands:
eval new_x %args% + 1
global new_x

It should work as long as the attach types are the same.

Navigation

[0] Message Index

[#] Next page

Go to full version