Whats Wrong with this Quest Script?

chikwidik

Dedicated Member
Dedicated Member
Jun 20, 2003
23
0
77
;Info [ Npc Name{Quest} X=28 Y=33 MapName={Palace} ]
[@main]
#IF
check [122] 1
#SAY
You Have Already Completed This Quest! Get Lost! \
<Exit/@Exit> \\
#ELSESAY
Hello <$USERNAME>. Welcome to AstroWorld Server! \
I need Someone to help me get some things back \
for me that i had stolen from my house, do you \
think you would be able to help me? I will \
Reward you with a rare item if you can help me! \
<Tell me More./@tellme1> \\
<Sound Dodgy./@exit> \\

[@tellme1]
#IF
#SAY
When i was out walking my dog yesterday i heard \
a strange noise coming from the woods near to \
Wooma Temple, when i went to see where it was coming \
From a man approached me with a strange looking weapon \
in his hand. Then all i remember was hearing a strange \
sound and a flash of light brighter than i have ever \
seen before. \\
<More/@tellme2>

[@tellme2]
#IF
#SAY
The next thing i can remember is waking up with a sore \
Head. Then i realised it was much much worse! I had been \
going to Bichon Province to store some very rare items \
in my storage. When i checked to see where they were \
they had gone and in there place was a note from the \
old man. He said................ \\

<Im willing/@will> \
<No Way Mate/@exit> \ \

[@will]
#IF
#SAY
Ok Im glad you can help i will need you to get me the \
following items. \
From the WoomaTaurus a glass ring. \
From The EvilTongs a Townteleport. \
From The Scarecrow a PowerRing. \ \

<I have Got Them/@gotem> \
<Ill Go and get them/@exit> \ \

[@gotem]
#IF
CHECKITEM GlassRing
CHECKITEM TownTeleport
CHECKITEM PowerRing
#ACT
TAKE GlassRing
TAKE TownTeleport
take Powerring
goto @tele
#ELSEACT
#SAY
You dont have all the items. \
<Sorry/@exit> \ \


[@tele]
#ACT
GIVE TeleportRing
SET [122] 1
CLOSE

The npc works ok but it does not take any items out of the bag it just gives teleport ring without having the items!

Im Pretty new to writing npc scripts so please go easy on me!!!

Thanks in Advance.....
 

Tahriel

LOMCN Veteran
Veteran
Jun 1, 2004
320
0
93
chikwidik said:
;Info [ Npc Name{Quest} X=28 Y=33 MapName={Palace} ]
[@main]
#IF
check [122] 1
#SAY
You Have Already Completed This Quest! Get Lost! \
<Exit/@Exit> \\
#ELSESAY
Hello <$USERNAME>. Welcome to AstroWorld Server! \
I need Someone to help me get some things back \
for me that i had stolen from my house, do you \
think you would be able to help me? I will \
Reward you with a rare item if you can help me! \
<Tell me More./@tellme1> \\
<Sound Dodgy./@exit> \\

[@tellme1]
#IF
#SAY
When i was out walking my dog yesterday i heard \
a strange noise coming from the woods near to \
Wooma Temple, when i went to see where it was coming \
From a man approached me with a strange looking weapon \
in his hand. Then all i remember was hearing a strange \
sound and a flash of light brighter than i have ever \
seen before. \\
<More/@tellme2>

[@tellme2]
#IF
#SAY
The next thing i can remember is waking up with a sore \
Head. Then i realised it was much much worse! I had been \
going to Bichon Province to store some very rare items \
in my storage. When i checked to see where they were \
they had gone and in there place was a note from the \
old man. He said................ \\

<Im willing/@will> \
<No Way Mate/@exit> \ \

[@will]
#IF
#SAY
Ok Im glad you can help i will need you to get me the \
following items. \
From the WoomaTaurus a glass ring. \
From The EvilTongs a Townteleport. \
From The Scarecrow a PowerRing. \ \

<I have Got Them/@gotem> \
<Ill Go and get them/@exit> \ \

[@gotem]
#IF
CHECKITEM GlassRing
CHECKITEM TownTeleport
CHECKITEM PowerRing
#ACT
TAKE GlassRing
TAKE TownTeleport
take Powerring
goto @tele
#ELSEACT
#SAY
You dont have all the items. \
<Sorry/@exit> \ \


[@tele]
#ACT
GIVE TeleportRing
SET [122] 1
CLOSE

The npc works ok but it does not take any items out of the bag it just gives teleport ring without having the items!

Im Pretty new to writing npc scripts so please go easy on me!!!

Thanks in Advance.....

Dunno if caps counts on commands in npcs but it might do. worth a shot. change all these to lowercase letters and see if it works. also could u please post the part where it dosent work :)
 

WiseWarrior

LOMCN Veteran
Veteran
Loyal Member
Nov 16, 2003
327
0
42
14 NeverNeverLand
see a few things

1) Remove the #IF's where there not needed, i consider it to make a script look ****e lol
2) if you have Give item you MUST specify an amount same with take or checkitem eg

#IF
checkitem itemname 1
#ACT
Take itemname 1
give item 1
#SAY
Here\ \
<Exit/@exit>

3) wtf you on about lol commands dont need to be in caps so shh

4) something useful to know, theres only 9/10 lines on the lom GUI for npc text
 

WiseWarrior

LOMCN Veteran
Veteran
Loyal Member
Nov 16, 2003
327
0
42
14 NeverNeverLand
is it lol...sorry well havnt been to mir2 in awhile im use to mir 3 (yes i no mir3 you can script all u want lol and you get a scroll bar which i like alot better)
 

chikwidik

Dedicated Member
Dedicated Member
Jun 20, 2003
23
0
77
i have edited the script now it works but if you press i have the items and you dont it doesnt do anything and if you have the items it gives you the teleport ring and then goes to the screen that says you do not have all the items? anyone edit what i have done and repost how it should be plz!!

;Info [ Npc Name{Quest} X=28 Y=33 MapName={Palace} ]
[@main]
#IF
check [123] 1
#SAY
You Have Already Completed This Quest! Get Lost! \
<Exit/@Exit> \\
#ELSESAY
Hello <$USERNAME>. Welcome to AstroWorld Server! \
I need Someone to help me get some things back \
for me that i had stolen from my house, do you \
think you would be able to help me? I will \
Reward you with a rare item if you can help me! \
<Tell me More./@tellme1> \\
<Sound Dodgy./@exit> \\

[@tellme1]
#IF
#SAY
When i was out walking my dog yesterday i heard \
a strange noise coming from the woods near to \
Wooma Temple, when i went to see where it was coming \
From a man approached me with a strange looking weapon \
in his hand. Then all i remember was hearing a strange \
sound and a flash of light brighter than i have ever \
seen before. \\
<More/@tellme2>

[@tellme2]
#IF
#SAY
The next thing i can remember is waking up with a sore \
Head. Then i realised it was much much worse! I had been \
going to Bichon Province to store some very rare items \
in my storage. When i checked to see where they were \
they had gone and in there place was a note from the \
old man. He said................ \\

<Im willing/@will> \
<No Way Mate/@exit> \ \

[@will]
#IF
#SAY
Ok Im glad you can help i will need you to get me the \
following items. \
From the WoomaTaurus a glass ring. \
From The EvilTongs a Townteleport. \
From The Scarecrow a PowerRing. \ \

<I have Got Them/@gotem> \
<Ill Go and get them/@exit> \ \

[@gotem]
#IF
CHECKITEM GlassRing 1
CHECKITEM TownTeleport 1
CHECKITEM PowerRing 1
#ACT
TAKE GlassRing 1
TAKE TownTeleport 1
take Powerring 1
goto @tele
#ELSEACT
#SAY
You dont have all the items. \
<Sorry/@exit> \ \


[@tele]
#ACT
GIVE TeleportRing 1
SET [123] 1
CLOSE





Thankyou in advance.....
 
Last edited:

Judges

LOMCN Member
Aug 5, 2004
139
2
44
[@gotem]
#IF
CHECKITEM GlassRing 1
CHECKITEM TownTeleport 1
CHECKITEM PowerRing 1
#ACT
TAKE GlassRing 1
TAKE TownTeleport 1
take Powerring 1
goto @tele
#ELSEACT <- This should be #ELSESAY
#SAY <- Whys that there? you don't need it.
You dont have all the items. \
<Sorry/@exit> \ \


[@tele]
#ACT
GIVE TeleportRing 1
SET [123] 1
CLOSE


This is a quick glimps.
 
Last edited:

Tahriel

LOMCN Veteran
Veteran
Jun 1, 2004
320
0
93
dude u use elsesay when u have #SAY previously dont u?? Oo same with ACT