linktree Atrinik.org - Multiplayer Online Role Playing Game  >  Development  >  Python Scripting
linktree Topic: Clearhaven Graveyard Quest
Pages: [1]   Go Down
  Print  
Author Topic: Clearhaven Graveyard Quest  (Read 4240 times)
0 Members and 1 Guest are viewing this topic. Bookmarked by 0 members.
Offline ghost101

Necroposter :P
Posts: 156
Gender: Male
« on: August 16, 2010, 10:23:36 pm »

This is my FIRST script for Atrinik. Would like someone who knows about scripting(Cleo!) to review it.
And Kiana give me time to make the Testmap and I'll post the .zip file on here. Mk. Here it is:
Code: [Select]
## @file
## Quest to get the key to Clearhaven Catacombs

from Atrinik import *
from QuestManager import *

activator = WhoIsActivator()
me = WhoAmI()
msg = WhatIsMessage().strip().lower()

## The quest.
quest = {
# Name of this quest.
"quest_name": "Undead thief",
# Type of this quest.
"type": QUEST_TYPE_KILL_ITEM,
# If the quest is of type 'QUEST_TYPE_KILL_ITEM' the following three are used.
"arch_name": "key2",
"item_name": "Cracked Graveyard Key",
# Whether to keep the quest item.
"quest_item_keep": 1,
# Message that will appear in the player's quest list about this quest.
"message": "Find the key from one of the skeletons in Clearhaven Graveyard and then talk to the gravekeeper.",
}

qm = QuestManager(activator, quest)

def main():
if msg == "hello" or msg == "hi" or msg == "hey":
if not qm.started():
me.SayTo(activator, "\nHello {0}. I lost my key, do you mind help me? ^How?^\nDo you ^accept^ this quest?".format(activator.name))
elif qm.completed():
me.SayTo(activator, "\nThank you for helping me out, you know that key goes to my house and the ^catacombs^.")
elif qm.finished():
me.SayTo(activator, "\nI appreciate you help greatly!")
                                 # Accept the quest.
elif msg == "accept":
if not qm.started():
me.SayTo(activator, "\nFind the key and you can keep it.")
qm.start()
        elif msg == "catacombs":
                if not qm.started():
                        me.SayTo(activator, "\nYes, the underground tomb of Clearhaven. Its pretty much abandoned ,so, most likely it's overrun by the undead.)
                        qm.start()         
        elif msg == "How":
                if not qm.started():
                        me.SayTo(activator, "\nWell, you might think I'm crazy, but I beleive one of those Undead monster's stole it...")       
main()
 Logged

I keel yew.
Pages: [1]   Go Up
  Print  
 
Jump to: