The Dawn Of Time
The Official Forums for the Dawn Of Time Mud Codebase
 
Log in Register FAQ Memberlist Search The Dawn Of Time Forum Index Goto the Official Dawn Website

Example Object Mprog - Quest Journal

 
Post new topic   Reply to topic    The Dawn Of Time Forum Index » Mobprog Questions
View previous topic :: View next topic  
Author Message
mmoritz80



Joined: 21 Sep 2018
Posts: 18
Location: Ohio

PostPosted: Sun Jan 20, 2019 12:29 am    Post subject: Example Object Mprog - Quest Journal Reply with quote

This quest journal is an object that runs a prog whenever a player looks at the object. All the prog does is echo at the player the name of the quests they are on based on the tokens they carry (301, 302, & 303 as examples).

If a player is not on one of the possible quests (ie they don't have the token), that part of the script doesn't get printed out on screen.

Quest Journal Item (trigger lookat_post)
Code:
Vnum: 500     Type: scroll     Level: 0          Area[1]: global.are
Cost: 0       Weight: 0.0 lbs Condition: 100    Material: paper         
Absolute size: 0      Relative size: 50   
Name: quest journal
Short desc: A quest journal
Short desc: `YA quest journal`=?
Long descr: You have set out upon the following quests:
Long descr: `YYou have set out upon the following quests:`=?
There are no extended descriptions.
Wear Flags:    [take no_sac]
Extra Flags:   [burnproof nodegrade nodrop nolocate nonmetal noremove]
Extra2 Flags:  [nodecay nosell]
Class Allowances: all classes
[v0] Level:  [0]
[v1] Spell:  none
[v2] Spell:  none
[v3] Spell:  none
[v4] Spell:  none

MUDPrograms for object [  500]:
Object mudprog triggers: lookat_post
 Number Vnum Trigger Phrase   <Positions>
 ------ ---- ------- --------------------
[    0]   500 lookat_post 100   <all possible>


The Mob Prog:
Code:
=============================================================================
Vnum:   500     Area[1]: global.are
Title: Quest Log  Author(s): Phaedra
Last editor: Phaedra on Sat Jan 19 06:04:48 2019 (16 minutes, 36 seconds ago)
Code:
if hastoken $n 301
    mob echoat $n You are on quest: Test 01.
endif
if hastoken $n 302
    mob echoat $n You are on quest: Test 02.
endif
if hastoken $n 303
    mob echoat $n You are on quest: Test 03.
endif

=============================================================================
Currently no mobiles directly use this program.
Note that the code could still be accessed via the 'mp call' command...
e.g. mp force inventor mp call 500 $n
Objects that use mudprog 500 follow:
500 A quest journal - lookat_post (100).
=============================================================================


The results depend on which tokens a player has on them:
Code:
Look Journal
You have set out upon the following quests:
You are on quest: Test 01.
You are on quest: Test 02.
You are on quest: Test 03.



_________________
Lands of Oneiro pre-alpha development phase

Melissa's Game Dev Blog
Back to top
View user's profile Send private message Visit poster's website
mmoritz80



Joined: 21 Sep 2018
Posts: 18
Location: Ohio

PostPosted: Fri Feb 01, 2019 2:05 pm    Post subject: Reply with quote

Here's a simple object prog that will check to see if a player has a high enough language skill level to read a book.

The Item
Code:
Vnum: 1001    Type: book       Level: 0          Area[1]: global.are
Cost: 0       Weight: 0.5 lbs Condition: 100    Material: paper         
Absolute size: 0      Relative size: 50   
Name: test book
Short desc: a test book
Long descr: A test book lies here.
---=======================================================================---
Extended descriptions keywords:
 1) book                                                         (  31 bytes)
    This is a long and sad story.
---=======================================================================---
Wear Flags:    [take hold]
Extra Flags:   [none]
Extra2 Flags:  [none]
Class Allowances: all classes
[v0] Open = 0     [0]

MUDPrograms for object [ 1001]:
Object mudprog triggers: lookat_pre
 Number Vnum Trigger Phrase   <Positions>
 ------ ---- ------- --------------------
[    0]  1001 lookat_pre 100   <all possible>


The Mud Prog
Code:

Vnum:  1001     Area[1]: global.are
Title: test langugage skill check  Author(s): Phaedra
Last editor: Phaedra on Thu Jan 31 19:57:49 2019 (2 minutes, 59 seconds ago)
Code:
if hasskill $n elven < 50
    mob echoat $n You don't know enough Elven to read this book. See help languages.
    mob preventobjectaction
endif


The Result at Elven skill level 49:
Code:

l book
You don't know enough Elven to read this book. See help languages.


And at Elven 50:
Code:

l book
This is a long and sad story.



_________________
Lands of Oneiro pre-alpha development phase

Melissa's Game Dev Blog
Back to top
View user's profile Send private message Visit poster's website
mmoritz80



Joined: 21 Sep 2018
Posts: 18
Location: Ohio

PostPosted: Sat Feb 16, 2019 4:27 am    Post subject: Reply with quote

Started working on a guide for mud progs.

MP Commands: http://bit.ly/2UAQ2pk
If Checks: http://bit.ly/2SJoiC1



_________________
Lands of Oneiro pre-alpha development phase

Melissa's Game Dev Blog
Back to top
View user's profile Send private message Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic    The Dawn Of Time Forum Index » Mobprog Questions All times are GMT + 13 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001-2005 phpBB Group
Theme created by Vjacheslav Trushkin