Page 2 of 2

Re: Scripting - (Any questions on scripting ask here)

PostPosted: Sun Jun 17, 2012 9:03 pm
by KGold
OMG, it was only a small typing error, and I didn't notice it...
Thank you!

Re: Scripting - (Any questions on scripting ask here)

PostPosted: Mon Jun 18, 2012 2:33 am
by Catacomber
Also here:

(posx==11) && (posy==11)) { setglobal("eyex_secretwalls",2);

All your other setglobals are different. : ) Not eyex_
All your other globals are exp1_

Re: Scripting - (Any questions on scripting ask here)

PostPosted: Mon Jun 18, 2012 11:40 am
by KGold
How inattentive I am! After making Eyeland with eyex identifier, I must accommodate to this one. Thank you!

Re: Scripting - (Any questions on scripting ask here)

PostPosted: Fri Jan 31, 2014 12:12 am
by Jacob
What language is The Quest programmed in? Lua?

Re: Scripting - (Any questions on scripting ask here)

PostPosted: Sun Aug 10, 2014 3:41 pm
by UKayeF
I have problems when trying to create a new spell. This comes up when I'm trying to cast a spell that improves the player's stealth skill. According to the description given in the player's menu it is supposed to work but when casted there is absolutely no effect at all.
here are the details of the spell:

id: tqrw_spellhide
name: Hide
category: environment
target: self
price: 80 (don't think that matters though tbh)
sp base: 20
sp/skill level: 1.00
effect : fortify stealth skill by 4.00/0.00 for 10/1.00 turns

the animation on the target I used is bres_spellself01 but that's rather irrelevant I guess

thanks if you can help me!! :)

Re: Scripting - (Any questions on scripting ask here)

PostPosted: Sat Jun 24, 2017 1:47 pm
by KGold
Is it possible to modify the value of a global by adding to it or subtracting from it instead of typing in a particular one with a script?
I'm pretty sure it is, I just forgot how...

Re: Scripting - (Any questions on scripting ask here)

PostPosted: Sat Jun 24, 2017 5:26 pm
by Elendil / Redshift
KGold wrote:Is it possible to modify the value of a global by adding to it or subtracting from it instead of typing in a particular one with a script?
I'm pretty sure it is, I just forgot how...

You can only access globals with getglobal and setglobal. Of course, after you get the value, you can add and subtract to/from it.

Re: Scripting - (Any questions on scripting ask here)

PostPosted: Sun Jun 25, 2017 12:47 pm
by KGold
Elendil / Redshift wrote:
KGold wrote:Is it possible to modify the value of a global by adding to it or subtracting from it instead of typing in a particular one with a script?
I'm pretty sure it is, I just forgot how...

You can only access globals with getglobal and setglobal. Of course, after you get the value, you can add and subtract to/from it.


What's the script for it?
The only way I can modify a global's value is using this: setglobal("test_example",1); (at least the one I'm aware of)
But this uses a particular value...
In case I want the value to increase by 1 every time I touch a certain statue for instance, this won't work. Is there a way to achieve this?

Re: Scripting - (Any questions on scripting ask here)

PostPosted: Sun Jun 25, 2017 5:40 pm
by Elendil / Redshift
Code: Select all
setglobal("global", getglobal("global") + 1);

Re: Scripting - (Any questions on scripting ask here)

PostPosted: Mon Jun 26, 2017 7:17 pm
by KGold
Elendil / Redshift wrote:
Code: Select all
setglobal("global", getglobal("global") + 1);

This is what I was looking for, thank you!

Re: Scripting - (Any questions on scripting ask here)

PostPosted: Sun Mar 24, 2019 8:45 am
by FelixDent@mail.com
Hello, there. I just joined and wanted to ask if there was an API or a list of methods/commands/etc. for scripting purposes?

Re: Scripting - (Any questions on scripting ask here)

PostPosted: Mon Mar 25, 2019 7:34 am
by Elendil / Redshift
Here is the tutorial, which includes two pdfs, which have a list of all script functions.

http://www.redshift.hu/thequesteditor.htm