Difference between revisions of "ShipBuilder(Quest)"

From CoffeeMud Wiki
Jump to navigation Jump to search
 
Line 166: Line 166:
 
</pre>
 
</pre>
 
=Notes=
 
=Notes=
.
 
  
 
This is for version v5.9.8.1
 
This is for version v5.9.8.1

Latest revision as of 00:22, 21 January 2020

CoffeeMUD
Administrator                                                  Builder                                                              Player
=CoffeeMUD Builder Information=
Basics Praetor     Player Support     Commands     Zapper Masks Advanced Races     Classes     Abilities     Socials     Scripting    
Building Behaviors     Properties     Areas     Rooms     Exits     Items     Mobs Systems Achievements     Crafting     Help Info     Ships     Planes of Existence     Quests     Triumphs    

Quest Intro

Any basic information about the set-up of the quest (such as how players get to the quest-giver)

Quest Code

set name ShipBuilder
set display Star of Avalonne Build
set author Namora

set wait 0
set interval 1
#quiet

set minplayers 1
set playermask 


set area "Avalonne"
set room Avalonne#5
set mobgroup
set mob Osse
give stat keyplayer true
give script LOAD=ShipBuilder_announcer.script

set duration 0<?xml version="1.0"?>
<FILE><NAME>ShipBuilder_items.xml</NAME><DATA><ITEMS>$COLLECTABLES_ITEMS</ITEMS></DATA></FILE>
<FILE><NAME>ShipBuilder_announcer.script</NAME>
<DATA>
ONCE_PROG 100
MPSETVAR * ShipBuilder_ALREADY_TOLD ''
MPSETVAR * ShipBuilder_REWARDED ''
MPSETVAR * ShipBuilder_WARNED ''
MPSETVAR * ShipBuilder_ACCEPTED ''
MPSETVAR * ShipBuilder_COLLECTED ''
MPSETVAR * ShipBuilder_NUMACCEPTED ''
SAY 
~

QUEST_TIME_PROG * 1
     mpsetvar $i ShipBuilder_NUMACCEPTED '$<$i ShipBuilder_ACCEPTED>.LENGTH#'
     for $0 = 0 to< '$<$i ShipBuilder_NUMACCEPTED>'
          tell "$<$i ShipBuilder_ACCEPTED>.$0" You have 1 minute to complete my quest.
     next
~

QUEST_TIME_PROG * -1
     mpsetvar $i ShipBuilder_NUMACCEPTED '$<$i ShipBuilder_ACCEPTED>.LENGTH#'
     for $0 = 0 to< '$<$i ShipBuilder_NUMACCEPTED>'
          if !QUESTWINNER('$<$i ShipBuilder_ACCEPTED>.$0' *)
               tell "$<$i ShipBuilder_ACCEPTED>.$0" You failed to complete my quest in time.
          endif
     mpqset * STATISTICS FAILED
     next
          if VAR($i ShipBuilder_REWARDED == '')
               SAY Looks like I'll have get them myself.
          endif
     MPSETVAR * ShipBuilder_NUMACCEPTED ''
     MPSETVAR * ShipBuilder_ALREADY_TOLD ''
     MPSETVAR * ShipBuilder_ACCEPTED ''
     MPSETVAR * ShipBuilder_REWARDED ''
     MPSETVAR * ShipBuilder_WARNED ''
     MPSETVAR * ShipBuilder_COLLECTED ''
~

ALL_GREET_PROG 100
     if ISLIKE($n '') and ISPC($n)
          if EVAL('NO' == 'YES') OR !QUESTWINNER($n *)
               if !STRIN('$<$i ShipBuilder_ALREADY_TOLD>' '$n')
                    if VAR($n ShipBuilder_ACCEPTED == '')
                         sayto "$n" We're out of wood already. I need to finish the ship today though!
                         MPECHOAT $n Just say 'i accept' to take on this quest.
                         MPSETVAR $i ShipBuilder_ALREADY_TOLD '$<$i ShipBuilder_ALREADY_TOLD> "$n"'
                    endif
               endif
          endif
     endif
~

GIVE_PROG all
     IF VAR($n ShipBuilder_ACCEPTED != '') AND ISLIKE($n '') and ISPC($n)
          if  EVAL('NO' != 'YES') AND QUESTWINNER($n *)
               sayto "$n" Not YOU again
               return
          endif
          if  VAR($i ShipBuilder_REWARDED == $n)
              sayto "$n" Not YOU again
              return
          endif
          if islike($o '-JAVACLASS +GenResource -MATERIAL +WOODEN -WEIGHT 1')
               mpsetvar $n ShipBuilder_COLLECTED + $%GSTAT($o weight)%
               mpjunk $o
               if var($n ShipBuilder_COLLECTED >= 30)
                    mpsetvar $i ShipBuilder_REWARDED $n
                    if EVAL('15%' != '')
                         mpexp $n 15%
                    endif
               if EVAL('' != '')
                    mpfaction $n  
               endif
               if EVAL('YES' == 'YES') AND !QUESTWINNER($n *)
                    mpoload QuestPoint
                    give "a quest point" "$n"
               endif
               if EVAL('' != '') AND EVAL('' > 0)
                    mpoload 
                    give  "$n"
               endif
               mpquestwin $n *
               SAY Well done, kid! As promised I will get you on the ship. For now I need to finish the ship so maybe you should visit Deorae for some meat to go with your journey. After that Ealu will have your ticket ready. Have a safe journey.
               mpendquest *
               mpqset * STATISTICS SUCCESS
                    IF EVAL('DeoraeHunt' != '')
                         mpstartquest DeoraeHunt
                    ENDIF
               else
                    sayto "$n" That's $<$n ShipBuilder_COLLECTED>/30.
               endif
          else
               sayto "$n" This is not what I asked for.
               give "$o" "$n"
          endif
     else
          sayto "$n" What's this?
          give "$o" "$n"
     endif
~

SPEECH_PROG p i accept
     if ISLIKE($n '') and ISPC($n)
          if  EVAL('NO' == 'YES') OR !QUESTWINNER($n *)
               if VAR($n ShipBuilder_ACCEPTED == '')
                    sayto "$n" Well if you want to help out, I need about thirty bundles of wood. If you get this for me I will make sure you get a free ride on the new ship.
                    mpenable $n Chopping 100
                    mpscript $n INDIVIDUAL LOAD=ShipBuilder_playertrack.script
                    mpqset * REMAINING 0
                    mpqset * STATISTICS ACCEPTED
                    MPSETVAR $i ShipBuilder_ACCEPTED '$<$i ShipBuilder_ACCEPTED> $n'
                    mpsetvar $n ShipBuilder_ACCEPTED 'YES'
                    mpsetvar $n ShipBuilder_COLLECTED 0
               else
                    sayto "$n" Yes, yes, I know .. now off with you.
               endif
          endif
     endif
~
</DATA></FILE>
<FILE><NAME>ShipBuilder_playertrack.script</NAME>
<DATA>
ONCE_PROG 100
     mpsetvar $i INSTRUCTIONS Well if you want to help out, I need about thirty bundles of wood. If you get this for me I will make sure you get a free ride on the new ship.
~
RAND_PROG 99
     if QVAR(* REMAINING == '')
          MPENDQUEST $i
     else
     mpsetvar $i TIME_REMAINING $%QVAR(* REMAINING)%
     endif
~
</DATA></FILE>



~~~~~~~~~~~~~~~~~~

Notes

This is for version v5.9.8.1