Author Topic: Quest flags question  (Read 16233 times)

0 Members and 1 Guest are viewing this topic.

Offline Tocharaeh

  • Sr. Member
  • ****
  • Posts: 283
    • View Profile
    • 4Dimensions on Facebook!
Quest flags question
« on: June 28, 2009, 08:09:40 pm »
hey. I just have a couple quetions concerning quest flags (variables I think...dunno).

I have evals down and they are very easy to set, but they're temporary as far as I can tell. How exactly should I go about setting variables on players?

The reason being is that I plan on hvaing players work their way through the storyline, instead of having them having to restart everytime there is a crash/reboot/death. I want players to be able to pick up where they left off easily.

For example:

Ultimate Goal is to Gain Trust of Mob
Player starts quest A
Player Finishes quest A, and gains slight trust. (var 1)
Player Starts and finishes quest B, gains more trust. (var 1 turns to Var 2)
Players continues down list, until final quest in series (quest E) is complete (Var 2,3- ends in Var5)
Mob Now Trusts Player (not to be triggered by items as that would be abusable.) (Var 6 enables story continuation)
Mob Trusts player, and starts series of events in main quest. (finish quest, and have new flag set for quest item, while keeping var 6 to repeat quest as needed from proper point with story main mob)


How would I go about setting variables on a player, then replacing and so on as above?

Any chance I could get a couple good examples taht I can build from, and/or maybe have some time set aside to have a one on one tutorial? Thanks so much guys.

-Tochie
trying to finish
-Tocharaeh D'Araesth
The Dirty Ol'' Drow that time left behind in fear of obliteration!

Offline Prometheus

  • the bang your head against the wall coder.
  • Administrator
  • Sr. Member
  • *****
  • Posts: 365
    • View Profile
Re: Quest flags question
« Reply #1 on: June 28, 2009, 09:46:18 pm »
From what I can tell and I'm not an scripter is you use this:
 remote variable_name %actor.id%
Then you can test for the variable name using this:
if %actor.varexists(variable_name)%
blah
blah
blah

Hope this helps a little bit.

Prometheus

Offline Fizban

  • Maniacal Scroder!
  • Administrator
  • Full Member
  • *****
  • Posts: 183
  • Fizban, the Mangy Wizard
    • MSN Messenger - Fizban1216@hotmail.com
    • AOL Instant Messenger - Fizban1216
    • View Profile
    • Email
Re: Quest flags question
« Reply #2 on: June 28, 2009, 10:06:39 pm »
Prom is correct.

To set a variable for instance you could do:

set quest_done 1
remote quest_done %actor.id%

to check for the existence of the variable you'd do:

if %actor.varexists(quest_done)%

to check the value of the variable you can do:

if %actor.quest_done% == #

This would only be done if you raised the number by 1 each time they completed a quest, this is often done for quests where you want the prize to decrease as they complete it more times.

To raise the value of the variable you would do something like:

Code: [Select]
if %actor.varexists(quest_done)%
  eval quest_done %actor.quest_done% + 1
else
  set quest_done 1
end
remote quest_done %actor.id%

Offline Molly

  • Administrator
  • Hero Member
  • *****
  • Posts: 691
    • View Profile
Re: Quest flags question
« Reply #3 on: June 29, 2009, 09:26:48 am »
Some additional feedback to multiple step quests:

Use a name on the flag that you are sure will be unique, since when using remote flags, if you accidentally use a flag that's already is used for another quest, it will screw up both of them.

Fiz' suggestion of increasing the number of the questflag can be used in two ways:
1. To decrease the reward you get, each time the quest is completed.
2. To put you one step farther in the quest, in your case increasing the trust of the mob.

(The second option is what I generally use myself for multi-step quests. Then, if you want the quest to be repeatable, you need to set another flag for when the quest is completed, and use that to decide the size of reward).

However, this is not quite as easy as it seems at first looks.

The multiple step quest flag can be set in several ways, for instance the way Fiz described or by using the following lines:
If %actor.varexists(quest_done)%
 if %actor.quest_done% == 1
  set quest_done 2
  remote quest_done %actor.id%
 endif
endif

The first if_check is used for the mob to recognise that the actor started the quest, while the second shows at what stage in the quest  he has reached.
Normally the mob will just pick up what stage the player has reached and allow them to go on from there, meaning that the player has to go through the entire quest in the right order. But sometimes the player screws up the flags by forgetting what he is supposed to do, or even losing the instruction note from the mob. To prevent this, you can make a greet script refresh their memory of what the mob wants, based on the flag. You can even make the mob provide them with new order lists, recipies or whatever they need to deliver multiple items at a time. This is how for instance the Roger Young and Heracles quests are set up.

But you can also use the numbers to have the mob give out random assignments each time the player arrives. I have a couple of scripts on Andrea Orsini, which makes him randomly send the player out on 7 different assignments, provided he's got the flag from the original Bravo quest. A greet script explains which object the mob wants and sets the corresponding number of the andrea flag, and the receive script checks if the object corresponds with the number. After each completed assignment the flag resets to 0. If the player should try to turn in any of the other six objects, he gets kicked out, and has to ask for a new assignment the next time the mob reloads.

What you have to bear in mind with quests are two things:
1. Players don't like one-time quests, and these are also a waste of Builder efforts, so most quest should be repeatable, but with a considerably lesser reward after the first time.
2. Some players will 'pharm' repeatable quests to the extreme, for instance by doing 'token runs' each time they log on, or by collecting scores of trading items and then turning them all in at the same time. (One way to prevent the latter is to have the quest mob purge itself each time a transaction is completed - but of course this is also rather irritating).

A quest is only really hard the first time you do it . Therefore - even with the lesser reward - repeating a quest should never be so easy that they can set up triggers to do it. This is why we use multiple step quests, or have the mob ask for different things each time. You also have to consider how long time it takes the player to fulfil the requirement after the first time, and balance the size of the reward against that. This can be a bit tricky. Too small reward and they won't bother at all, too large and collecting tokens or TP get ridiculously easy.

I generally use a factor of 5-10 myself, so if the initial reward is 1 silver token, they get a bronze the second time and a brass the third. After that you can either stick to 1 brass, if the reward is reasonably time consuming, or go over to TP, decreasing the amount of those a couple of time too, (but never down to zero).

Also keep in mind that overpowered equipment might be a way to lure players into the zone, but it's the worst possible method, since escalating the equipmet stats is detrimental to the mud. Try if possible to think of other kinds of rewards to use - gadgets that are cool and/or usable, but don't affect the fighting power of the player too much.







« Last Edit: August 29, 2009, 01:02:12 am by Molly »

Offline Tocharaeh

  • Sr. Member
  • ****
  • Posts: 283
    • View Profile
    • 4Dimensions on Facebook!
Re: Quest flags question
« Reply #4 on: June 29, 2009, 10:17:15 pm »
Thanks a ton everyone, especially Moll for her long as hell post that i appreciated greatly.

Yep, what MOlly said is exactly what I'm going for. there will be no on timers in my zone whatsoever. I'm trying to outline every step to my main story.

I have decided to split the main story up into two separate pathways. one for rogue types, and one for all other classes which eventually merge to the same ending, and so on. Eventually after the initial release of the zone, i WILL be adding to the story, providing players with eventual closure. The goal is create a rather epic storyline that DOES take a lot of time to do. I'm not going to overpowered anything eitehr. Any weapons/armor/focus tiems IN the zone will be made to mirror all others currrntly in. the idea is to give players more of something of a variety of items especially for items that will not be perzable like the achilles.

The zone is just for story, substance, and variety. However, I WILL need some assistance when walking through with IMMs to check the zone, to decide item stats, and so on. I want to be sure everything is kosher and so on.

I think I'll keep this thread open further just in case I have any other scripting questions (I always) do. I thank you for all of the input past and future ;0

-Tochie
open to suggestions
-Tocharaeh D'Araesth
The Dirty Ol'' Drow that time left behind in fear of obliteration!

Offline Tocharaeh

  • Sr. Member
  • ****
  • Posts: 283
    • View Profile
    • 4Dimensions on Facebook!
Re: Quest flags question
« Reply #5 on: July 01, 2009, 04:59:39 pm »
 Is there a way to script an item to improve climbing? basically I'd like to create a set of climbing claws that would basically make them !fail. Players would normally slip and fall when climbing/decending something. I would like to make a script that prevents the whole slipping and falling function. Any clue on how to do that?

Thanks!
-Tocharaeh D'Araesth
The Dirty Ol'' Drow that time left behind in fear of obliteration!

Offline Tocharaeh

  • Sr. Member
  • ****
  • Posts: 283
    • View Profile
    • 4Dimensions on Facebook!
Re: Quest flags question
« Reply #6 on: July 02, 2009, 12:07:15 am »
Hey, another question. Is there a way to make a script only trigger if a person has detect invis/sense life on?
-Tocharaeh D'Araesth
The Dirty Ol'' Drow that time left behind in fear of obliteration!

Offline Kvetch

  • Administrator
  • Hero Member
  • *****
  • Posts: 729
    • View Profile
    • Email
Re: Quest flags question
« Reply #7 on: July 02, 2009, 05:12:41 pm »
I believe so.  It'd be something akin to checking to see if they're flying... like I can remember how to do that.  Good luck and check with the coders.  ;)

Offline Tocharaeh

  • Sr. Member
  • ****
  • Posts: 283
    • View Profile
    • 4Dimensions on Facebook!
Re: Quest flags question
« Reply #8 on: July 04, 2009, 12:23:56 am »
So, the flyign check would be if !%actor.is_flying% I wonder what the if check would be for sense_life. Aware wouldn't be it right?
-Tocharaeh D'Araesth
The Dirty Ol'' Drow that time left behind in fear of obliteration!

Leonardo

  • Guest
Re: Quest flags question
« Reply #9 on: August 28, 2009, 06:39:11 pm »
Is there a way to script an item to improve climbing? basically I'd like to create a set of climbing claws that would basically make them !fail. Players would normally slip and fall when climbing/decending something. I would like to make a script that prevents the whole slipping and falling function. Any clue on how to do that?

Thanks!

You want to avoid a player from slipping and failing to CLIMB an object by having an item that helps them be more skilled?
Does it have to work everywhere or just in your zone?

Leonardo

  • Guest
Re: Quest flags question
« Reply #10 on: August 28, 2009, 06:42:35 pm »
Hey, another question. Is there a way to make a script only trigger if a person has detect invis/sense life on?

if %actor.affect(invisibility)%
   do something
else
   do something else
end

You can take the exact name of the spell to be put in the brackets from your AFF list. The dark-cyantext.