Welcome to the Builder Academy

Question AnotherQuestion: variables

More
08 Aug 2012 01:41 #570 by Papaya Pete
I was trying to find a way to make a variable accumulate over time as different one-time quests are completed. For example, if a battle is done when a player is fairly low level compared to the boss, giving the stat "valor" to the player. As he does more and more acts that are courageous, that "valor" variable goes up.

If I was to do this, would I do something like this...?
Code:
if %actor.varexists(blackspot_valor)% if %actor.varexists(valor)% set valtemp %valor% eval valor (%valtemp% + 1) remote valor %actor.id% else set valor 1 remote valor %actor.id% end

Or am I treating this too much like computer code? Seems like there should be a way to do this...

Please Log in or Create an account to join the conversation.

More
08 Aug 2012 03:25 #574 by Vatiken
I'm not completely sure what you are trying to accomplish so forgive me if I'm a bit off the mark here. But If I'm using triggers to keep track of a variable, let's say a relationship with a certain guild, this is how I'd go about it.
Code:
*I just did something nice for "the guild"... if %actor.varexists(rating_for_the_guild)% eval rating_for_the_guild %actor.rating_for_the_guild) + 10 else set rating_for_the_guild 10 end remote rating_for_the_guild %actor.id%

tbaMUD developer/programmer
The following user(s) said Thank You: Papaya Pete

Please Log in or Create an account to join the conversation.

More
08 Aug 2012 05:35 #577 by Papaya Pete
Ah I was doing the wrong format, didn't think of using %actor.valor%...

Yeah, you got the idea exactly, sorry I didn't explain it too well. Remember the Sword in the Stone? Where you had to have some traits to be deemed worthy of pulling it free? I was thinking of trying something like that. Once there is a playerbase it would be interesting to see how people play.

Thanks again for the help! :)

Please Log in or Create an account to join the conversation.

Time to create page: 0.189 seconds