Anyone know Letoscript?
ForSerious
Member Posts: 466
I have a script to reward XP for unlocking things, and another for disarming traps. I got sick of doing it one by one and found letoscript and moneo.
After playing around for a bit, I was able to make a script that kind of works. Trying to look up syntax for Letoscript is like trying to find living mammoths. Specifically I need to check if the OnDisarm or OnUnlock already have a script assigned and not override it. Was hoping to check the length of the existing string or something, but who knows if that's even a function, and if it is, what letters to input to call it.
Also, I don't want to award XP if the locked object needs a key to unlock. I had the script working for that, but then it started ignoring that condition randomly.
After playing around for a bit, I was able to make a script that kind of works. Trying to look up syntax for Letoscript is like trying to find living mammoths. Specifically I need to check if the OnDisarm or OnUnlock already have a script assigned and not override it. Was hoping to check the length of the existing string or something, but who knows if that's even a function, and if it is, what letters to input to call it.
Also, I don't want to award XP if the locked object needs a key to unlock. I had the script working for that, but then it started ignoring that condition randomly.
0
Comments
If you post the script that stops working randomly, I'll have a look at it.
I'll be doing a few more tests, but KeyRequired == 0 is the part that stopped working in that it gets ignored and assigns the script. I just assume double ampersand is the and condition notation because that's most common. Does that mean if exists? (Like JavaScript ? after a parameter variable)
I've never tried replace - to change the current element only, it's something like
I'm not at my desk to double-check the syntax or field names, so if that doesn't work, refer to the examples that ship with moneo on the Vault.
I included some syntax notes in the moneo package on the Vault.
Changing to eq seems to be what I needed. I had to replace 'replace' and I seem to have it working: