Jump to content

Does anyone have a full list of moodle change scripting commands?


Sejemus

Recommended Posts

Heya everyone,

 

I'm looking for a full list of moodle script commands that lets me change moodle through items. I have found the following atm.

HungerChangeUnhappyChangeBoredomChangeStressChangeFatigueChangeThirstChange

But I can't find anyone to add happy. I thought that putting a "-" on the UnhappyChange would give happyness, but it doesn't appear to be that way. So if anyone know of anymore commands that is not on this list, please tell me :)

 

Thanks in advance,

Sejemus.

 

Link to comment
Share on other sites

Damn.. How do I apply happyness then?

With UnhappyChange. Just use negative numbers for positive effects. This applies to probably all of those values. eg. hunger change positive numbers make you more hungry and negative fills you up.

Link to comment
Share on other sites

 

Damn.. How do I apply happyness then?

With UnhappyChange. Just use negative numbers for positive effects. This applies to probably all of those values. eg. hunger change positive numbers make you more hungry and negative fills you up.

 

I tried that, but it didn't work.

 

setUnhappyChange() and getUnhappyChange() on the item classes.

 

Look in the IsoGameCharacter.Stats class for the commands to directly edit character stats, just remember to open up the class with the getStats() function.

So I have to change it in Lua for it to work properly? I just modified a food item to change the stats.

Link to comment
Share on other sites

If you're just changing the scripts, Suomiboi is right. You should look at some of the other items to see the correct format.

Well, I tried to put UnhappyChange on a food item which did give unhappyness. But when I put a negative number on UnhappyChange, nothing happens.

 

 

EDIT:

I'm trying to mess around with it in Lua. But I keep getting a stack trace saying I'm doing it wrong.

What is the correct syntax?

This is what I tried: "getSpecificPlayer(0):getStats():setUnhappyChange(50.0);"

Link to comment
Share on other sites

UnhappyChange=-10 would reduce unhappiness by 10 when eaten if you're editing the item object.

 

setUnhappyChange is a function of the item classes, not the stat class. You really sound like you should stick to playing with the item objects and not messing with the lua at this point....

Link to comment
Share on other sites

Well, I'm still learning.

 

Lua is quite new to me and I'm not all in on the pz classes. :)


But I'll mark it as solved, as I apparently did have it right in the first place. I'll just have to mess around with it some more.

 

Thanks to everyone :)

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...