New update, I've manage to organize a little my first quest, I decide to use Ultima Online Demo questline to be my first quest.
Code:
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
// Demo Quest //
// Ultima Online Demo Quest System //
// V1.0 - By Amon //
// 09-01-2015 //
// Britania Shard //
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
// Free to use, but please don't remove this header. //
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
//A few configurations to be set:
//All new players should start with 300gp
//Initial Stats:
//STR = 24
//DEX = 20
//INT = 21
//AR = 5
//New players items: - pants, shirt, shoe, shield, longsword, a book, a candle, a dagger a longsword [practice weapon]
//All new players should start the game at Ocllo INN.( 3670, 2618, 0 )
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
// QUEST GENERATOR //
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
[FUNCTION F_DEMO_QUEST_REMOVE]
SRC.CLEARTAGS
//tag0.demo_quest =
//tag0.DEMO_QUEST_WISP =
//SRC.TAG.door =
[FUNCTION F_SHOWTAGS]
SRC.SYSMESSAGE THIS IS CTAGLIST
SRC.CTAGLIST
SRC.SYSMESSAGE THIS IS TAGLIST
SRC.TAGLIST
[FUNCTION F_DEMO_QUEST_GENERATION]
serv.newitem=i_ocllo_bboard
new.attr=attr_static
new.tag.demo_quest=1
new.p=3670 2656 -2
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
// FUNCTIONS AND EVENTS //
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
[Function f_newplayer]
IF (<SRC.TAG0.DEMO_QUEST_WISP> == 1)
return 1
else
SRC.TAG0.DEMO_QUEST_WISP = 1
SRC.NEWNPC=C_WISP_QUEST
SRC.ACT.P=<SRC.P>
SRC.ACT.FLAGS=<SRC.ACT.FLAGS>|statf_conjured
SRC.ACT.SUMMONEDPET <UID>
ENDIF
///////////////////////////////////////////////////////////////////////
//Wisp Event
[FUNCTION f_WISP_SPEECH]
[EVENTS E_WISP]
ON=@NPCLookAtChar
If (<src.tag.door>!=1)
SAY Now double click on the door to open it and then walk through.
SRC.TAG.door=1
else
return 1
endif
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
// Region Checks
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
// OCLLO'S INN REGION
[REGIONTYPE r_ocllo_inn]
// OCLLO'S INN REGION
ON=@Enter
SRC.MESSAGE Welcome to <I.NAME>!
ON=@Exit
//
// OCLLO'S BLACKSMITH REGION
[REGIONTYPE r_ocllo_blacksmith]
ON=@Enter
SRC.MESSAGE Welcome to <I.NAME>!
ON=@Exit
//
// OCLLO SAGE'S HOUSE REGION
[REGIONTYPE r_ocllo_sage_house]
ON=@Enter
SRC.MESSAGE Welcome to <I.NAME>!
ON=@Exit
//
// OCLLO LIBRARY'S REGION
[REGIONTYPE r_ocllo_library]
ON=@Enter
SRC.MESSAGE Welcome to <I.NAME>!
ON=@Exit
//
// OCLLO TERRITORY'S REGION
[REGIONTYPE r_ocllo_library]
ON=@Enter
SRC.MESSAGE Welcome to <I.NAME>!
ON=@Exit
//
// OCLLO DRAGON'S NEST REGION
[REGIONTYPE r_ocllo_dragon_nest]
ON=@Enter
SRC.MESSAGE Welcome to <I.NAME>!
ON=@Exit
//
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
// AREADEF'S //
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
//Ocllo Inn
[ROOMDEF a_ocllo_inn]
NAME=Inn
GROUP=Ocllo
P=3671,2615,0,0
RECT=3664,2608,3678,2622,0
FLAGS=region_flag_nobuilding|region_flag_guarded
EVENTS=r_ocllo_inn
//
//Ocllo Blacksmith
[ROOMDEF a_ocllo_blacksmith]
NAME=Blacksmith's Shop
GROUP=Ocllo
P=3642,2595,0,0
RECT=3632,2592,3646,2598,0
FLAGS=region_flag_nobuilding|region_flag_guarded
EVENTS=r_ocllo_blacksmith
//
//Ocllo Sage House
[ROOMDEF a_ocllo_sage]
NAME=Sage's House
GROUP=Ocllo
P=3642,2687,40,0
RECT=3736,2680,3742,2694,0
RECT=3742,2681,3750,2687,0
FLAGS=region_flag_nobuilding|region_flag_guarded
EVENTS=r_ocllo_sage_house
//
//Ocllo Library
[ROOMDEF a_ocllo_library]
NAME=Ocllo Library
GROUP=Ocllo
P=3614,2473,0,0
RECT=3608,2464,3623,2479,0
FLAGS=region_flag_nobuilding|region_flag_guarded
EVENTS=r_ocllo_library
//
//Ocllo Woods
//// a_ocllo_territory
//r_ocllo_territory
//Ocllo Dragon Nest
[ROOMDEF a_ocllo_woods_dragon_nest]
NAME=Ocllo Woods
GROUP=Ocllo
P=3437,2645,39,0
RECT=3433,2641,3442,2650,0
EVENTS=r_ocllo_dragon_nest
//
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
// WISP EVENTS //
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
[COMMENT EVENTS_WISP]
1 - (after 2 steps)
2 - (After Dclick the door)
3 - (If keeping walk)
4 - (Reaching distance of 3 steps)
5 - (after closing the board and walked 2 steps)
6 - (after oppening the sage door)
7 - (After talk to the sage exit door)
8 - (After enter the blacksmith's house)
9 - (smith's hammer at 32gp)
10 - (After pass the table at sage house)
11 - (After open the inventory)
12 - (after get the glass sword)
13 - (After changing ranger direction)
14 - (After Walk into the library)
15 - (After learn tracking)
16 - (In the woods)
17 - (Near the dragon)
18 - (After open the paperdoll)
19 - (get 20steps from the dragon)
20 - (after seeing the dragon)
21 - (After killing the dragon)
22 - (After open the dragon body)
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
// SAGE EVENTS //
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
[COMMENT EVENTS_SAGE]
1 - (When see new player)
2 - (Key words: Dragon, Quest)
3 - (Key Words: Smith's, Hammer)
4 - (after returning)
5 - (After get the hammer)
6 - (after give him the sword)
7 - (after give him the sword)
8 - (ADD TO INVENTORY: a glass sword)
9 - (Keywords: Glass Sword)
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
// The Ranger EVENTS //
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
[COMMENT EVENTS_RANGER]
1 - (KEY WORD: teach, tracking)
2 - (Key words: Yes, Dragon, Kill, Slay)
3 - (Raise Traking skill to: master level 95.2)
4 - (Msg: Your skill level increases.)
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
// WISP SPEECH //
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
//wisp speech
[SPEECH spk_Wisp]
ON=*Hi*
ON=*Hello*
ON=*Greetings*
say Hail, stranger, welcome to Britania!
ON=*bye*
ON=*Good bye*
ON=*see ya*
ON=*bye*
Say Good bye for now!
[DEFNAME WISP_SPEAK]
1 Now double click on the door to open it and then walk through.
2 Lets go find the town bulletin board and see whats going on. Its to the south of here. You might want to open your map to help navigate by pressing Alt-R.
3 The bulletin board is to the X
4 Lets read the board and see whats going on in the area. Double click the bulletin board to read the messages on it.
5 That dragon sounds dangerous. We should seek the aide of the sage in town to see if he can help us out, he is to the XX (east.)
6 There's the sage, ask him about the dragon and see if he can help.
7 That sword is sure to help, lets find the blacksmith, they're to the northwest.(XXX)
8 There's the shopkeeper, say 'shopkeeper' near him to get his attention and you'll be shown his inventory to shop from.
9 Okay, we have the hammer for the sage, lets head to the southeast, back to the sage's home.
10 You need to open your inventory to give the hammer to the sage, open it by pressing Alt-I.
11 There's the hammer in your pack, while very close to the sage click on the hammer and drag it to him, them right click on the inventory window to close it.
12 Well now that we finally have our enchanted sword, let find the ranger to learn how to track the dragon down, he most likely at the library, to the (XX)northwest.
13 The Ranger is to the (Ranger Direction)
14 There is the ranger now ask him to 'teach tracking', and see how much he wants to teach you how to track.
15 You're as ready as you're going to be to take on the dragon, lets head out into the woods!
16 Be careful!
17 I have a feeling the dragon is near, you'd better wield your glass sword. First open your 'paperdoll' by pressing Alt-P now.
18 Unwield anything you're wielding by dragging it from your paperdoll to your pack. Now drag the sword from your inventory to the picture of you in the paperdoll and you will wield it!
19 Time to kill us a dragon. Click on the skills button on your paperdoll, then the arrow next to 'actions'. You should now see the tracking skill in the list if you scroll down with the red ribbon some, click on that, and then select 'creatures'. A box will appear with the monsters nearby in it, click on the dragon in that box. If there isn't a dragon, wander some more and try again.
20 There's the Dragon! Click on the button labeled 'peace' on your paperdoll. This will change you to war mode. Now walk VERY close to the dragon and doubleclick on it to begin combat!
21 Congratulations!! Take the items on the dragon's body and dragging them to your inventory.
22 Well, I have helped you all I can. I hope your adventures are as pleasant as they will be exciting!
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
// SAGE's SPEECH //
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
[DEFNAME SAGE_SPEAK]
1 Greetings again sir. Have you had any luck on your quest?
2 Ahh, a young dragonslayer are you? Well you will need help. Bring me a smith's hammer, and I can make you an enchanted sword to slay the beast with!
3 You should be able to get a smith's hammer from the blacksmith in town for a modest price.
4 Hello again! Have you found a smith's hammer for me yet? I can't make that sword without it!
5 Yes, with this I can make you an enchanter sword to slay the dragon with! All I need now is your longsword... you do have one don't you?
6 Good, now I will make your glass sowrd. Remember you can only use it once, and I can not make another!
7 SYSMESSAGE: The sage chants for a moment, and hits your longsword with the hammer shattering the steel and revealing a blade of glass!
9 That sword does potent damage, but has very limited use.
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
// Ranger SPEECH //
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
[DEFNAME RANGER_SPEAK]
1 You want to learn tracking, eh? Are you perchance going after that dragon?
2 Bless thee sir, for that cause I will teach you to track it down for free!
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
// QUEST NPC'S //
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
///////////////////////////////////////////////////////////////////////////
//Dragon - Quest NPC //
//(3437 2645 39) //
///////////////////////////////////////////////////////////////////////////
[CHARDEF c_ocllo_dragon]
ID=03b
NAME=a dragon
ICON=i_pet_dragon
SOUND=snd_monster_dragon1
CAN=mt_nonmover
DAM=65,90
ARMOR=55
DESIRES=r_dungeon,t_coin,t_gold,t_gem,t_wand,t_potion,t_scroll,t_reagent
AVERSIONS=t_trap,r_civilization
FOODTYPE=t_meat_raw
MAXFOOD=80
RESOURCES=19 i_ribs_raw,20 i_hide_barbed,6 i_reag_dragon_blood,7 i_dragonscale_red
BLOODCOLOR=colors_blood
MOVERATE=1
TAG.SlayerGroup=DRAGON,REPTILE
TEVENTS=e_carnivores3
CATEGORY=Monsters
SUBSECTION=Dragonkind
DESCRIPTION=Red Dragon (Quest)
ON=@Create
NPC=brain_dragon
FAME={5000 5999}
KARMA={-5000 -5999}
STR={795 825}
MAXHITS={475 495}
DEX={85 105}
MAXSTAM={85 105}
INT={435 475}
MAXMANA={435 475}
EVALUATINGINTEL={30.0 40.0}
MAGERY={30.0 40.0}
MAGICRESISTANCE={99.0 100.0}
TACTICS={97.0 100.0}
TAMING={120.0 130.0}
WRESTLING={90.0 92.0}
MODAR={0 10}
RESCOLD={30 40}
RESENERGY={35 45}
RESFIRE={60 70}
RESPOISON={25 35}
ON=@NPCRestock
ITEM=loot_dragon
///////////////////////////////////////////////////////////////////////////
//The Ranger //
//Green shirt, bloond hair, bow, brown pants //
//(3212,2475) //
///////////////////////////////////////////////////////////////////////////
///////////////////////////////////////////////////////////////////////////
// The Sage //
// At Ocllo house (3739 2682 40) //
//long black hair red robe (085) //
///////////////////////////////////////////////////////////////////////////
///////////////////////////////////////////////////////////////////////////
/// pet summoned WISP //
///////////////////////////////////////////////////////////////////////////
[CHARDEF C_WISP_QUEST]
ID=03a
NAME=wisp
ICON=i_pet_wisp
SOUND=snd_monster_wisp1
CAN=MT_WALK|MT_FLY|MT_NONHUM
MOVERATE=100
TEVENTS=e_wisp
CATEGORY=Monsters
SUBSECTION=Miscellaneous
DESCRIPTION=Wisp (QUEST)
ON=@Create
NPC=brain_animal
KARMA=1//neutral
STR=10
DEX={196 225}
INT=10
ITEMNEWBIE=i_light_source
ATTR=attr_magic|attr_newbie
ON=@NPCRestock
ITEM=loot_wisp
on=@NPCActFollow
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
// QUEST ITEM'S //
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
//////////////////////////////////////////////////
// Glass Sword //
//////////////////////////////////////////////////
[ITEMDEF i_glass_sword]
ID=0f61
NAME=glass sword
TYPE=t_weapon_sword
FLIP=0
SKILL=Swordsmanship
SPEED=38
VALUE=96
WEIGHT=11.4
TWOHANDS=N
TEVENTS=t_equipitem
TEVENTS=e_wisp
CATEGORY=Provisions - Weapons
SUBSECTION=Swordsmanship
DESCRIPTION=glass sword
ON=@Create
COLOR=017a
HITPOINTS={36 48}
ON=@DAMAGE
i.remove
SRC.sfx 63
update
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
//The Bulletin Board
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
[ITEMDEF i_ocllo_bboard]
ID=01e5e
TYPE=t_bboard
TDATA2=0866
FLIP=1
WEIGHT=25.3
CATEGORY=Quest
SUBSECTION=Bulletin Board
DESCRIPTION=Bulletin Board Ocllo
ON=@Create
newitem=i_quest_ocllo, 1, <uid>//the quest item goes here.
[Itemdef i_quest_ocllo]
name=Quest
type=t_message
on=@create
Title=We need your help!
body=A horrible dragon hath
body=been terrorizing our
body=forests of late. and a
body=valiant hero is
body=needed to rid us of the
body=scourge!
body=
body=Prithee, if thou canst
body=offer any aid, venture
body=forth into the forest
body=and slay this terrible
body=beast! Our best warriors
body=have tried and failed.
body=
body=for their swords merely
body=bounced off the draconian
body=hide... maybe a special
body=weapon is required, or
body=merely a stouter arm!
body=
body=Abandon us not in times
body=of need...
body=
body=-the citizens of Ocllo
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
//Ocllo Inn Doors
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
[EOF]
Allot to be done I know but slowly I am managing to do... any help is much appreciated!