Hi all, I am trying to get the quest script system working on my shard, and I am having some odd parsing problems after adding one of the quests to the quest pc.
My system is running V0.56b Pre-Release Found at:
http://prerelease.sphere.torfo.org/
I am using the latest nightly script build for V0.56c
This is currently a self-play testing/learning shard, so I'm not too worried about the issues with the TYPEDEF etc changes, but this could be why things are failing...
Anyway the script in question is the Quest system found here:
http://scripts.sphere.torfo.org/ - latest version.
When I setup the npc quester, and add one of the included quests that use the Cliloc the system acts perfect. But when I try to add one of the quests that start at 500 in the quest list, I get a strange bunch of errors on the server console.
To make things easier to understand I have included what the contents of each part of the scripts I am using, not the entire script, just the part that is in question.
From sphere_quest_quests.scp
Code:
The one that works
QUEST_1_NAMELOCALIZED 1074755 //Culinary Crisis
QUEST_1_TEXTLOCALIZED 1074756 //Quest history
QUEST_1_TEXTCOMPLETELOCALIZED 1074759
QUEST_1_TEXTUNCOMPLETELOCALIZED 1074758
QUEST_1_TEXTREFUSELOCALIZED 1074757
QUEST_1_OBJECTIVEAMOUNT 2
QUEST_1_OBJECTIVE1_TYPE 1
QUEST_1_OBJECTIVE1 20 i_fruit_dates
QUEST_1_OBJECTIVE2_TYPE 1
QUEST_1_OBJECTIVE2 5 i_cheese_wheel
QUEST_1_PRIZES 1
QUEST_1_PRIZETYPE1 1 //item
QUEST_1_PRIZEID1 tm_questbagtreasure A bag of treasure.
The one that is fails (non cliloc )
QUEST_500_NAMELOCALIZED Gold? it's elementary!
QUEST_500_TEXTLOCALIZED Won't you help me? I am but a poor miner, trying to make a living, but these golden elementals keep coming from the ground, and I am too weak to fight them...
QUEST_500_TEXTCOMPLETELOCALIZED Wow thank you, now perhaps I can get back to mining.
QUEST_500_TEXTUNCOMPLETELOCALIZED Kill the golden elementals for me
QUEST_500_TEXTREFUSELOCALIZED Hmph!
QUEST_500_OBJECTIVEAMOUNT 1
QUEST_500_OBJECTIVE1_TYPE 2
QUEST_500_OBJECTIVE1 4 gold_ele
QUEST_500_PRIZES 1
QUEST_500_PRIZETYPE1 1 //item
QUEST_500_PRIZEID1 tm_questbagtreasure A bag of treasure.
After adding the 2 quests to the npc, using:
Code:
.set.tag.quests=2
.set.tag.quest1.id=1
.set.tag.quest2.id=500
I get no errors, all is fine. But when I click on the NPC to see the quests I get only one quest in the window, Quest 1, and Quest 500 has only the arrow to click to the next page. On my console I get this:
Code:
22:20:ERROR:(sphere_quest_dialogs.scp,365)Undefined symbol 'Tutorial'
22:20:ERROR:(sphere_quest_dialogs.scp,381)Undefined symbol 'Tutorial'
22:20:ERROR:(sphere_quest_dialogs.scp,395)Undefined symbol 'Hello'
22:20:ERROR:(sphere_quest_dialogs.scp,414)Undefined symbol 'Tutorial'
22:20:ERROR:(sphere_quest_dialogs.scp,498)Undefined symbol 'Tutorial'
22:20:ERROR:(sphere_quest_dialogs.scp,566)Undefined symbol 'Tutorial'
22:20:ERROR:(sphere_quest_dialogs.scp,575)Undefined symbol 'Go'
22:20:ERROR:(sphere_quest_dialogs.scp,590)Undefined symbol 'Tutorial'
22:20:ERROR:(sphere_quest_dialogs.scp,599)Undefined symbol 'Well'
The section in question from sphere_quest_dialogs.scp is here:
Code:
360 page 1
361 if <tag0.quests>
362 dorigin 100 80
363 for <tag0.quests>
364 if !(<def0.quest_<dtag0.quest<dlocal._for>.id>_ischain>) && !(<src.hasthischain <tag0.quest<dlocal._for>.id>>)
365 if <def0.quest_<dtag0.quest<dlocal._for>.id>_namelocalized>
366 if <ehnum <def.quest_<dtag0.quest<dlocal._for>.id>_namelocalized>>
367 xmfhtmlgumpcolor *0 *25 240 20 <eval <def.quest_<dtag0.quest<dlocal._for>.id>_namelocalized>> 0 0 32767
368 else
369 dhtmlgump *0 *25 240 20 0 0 <def.bfont_white><def.quest_<dtag0.quest<dlocal._for>.id>_namelocalized>
370 endif
371 else
372 dhtmlgump *0 *25 240 20 0 0 <def.bfont_white><def.quest_<dtag0.quest<dlocal._for>.id>_name>
373 endif
374 button +260 *0 026b0 026b1 1 0 <dlocal._for>
375 endif
376 endfor
377 endif
So, I think the problem is within this section at least for the title portion of the quest. Line 365, looking farther down the script I see similar code.
Code:
page 2
if <src.ctag0.questviewid>
if <def0.quest_<dtag0.quest<src.dctag0.questviewid>.id>_namelocalized>
if <ehnum <def.quest_<dtag0.quest<src.dctag0.questviewid>.id>_namelocalized>>
xmfhtmlgumpcolor 155 105 200 20 <eval <def.quest_<dtag0.quest<src.dctag0.questviewid>.id>_namelocalized>> 0 0 7952
else
dhtmlgump 155 105 200 20 0 0 <def.bfont_questodesc><def.quest_<dtag0.quest<src.dctag0.questviewid>.id>_namelocalized>
endif
else
dhtmlgump 155 105 200 20 0 0 <def.bfont_questodesc><def.quest_<dtag0.quest<src.dctag0.questviewid>.id>_name>
endif
if <def0.quest_<dtag0.quest<src.dctag0.questviewid>.id>_ischain> || <def0.quest_<dtag0.quest<src.dctag0.questviewid>.id>_chain>
xmfhtmlgumpcolor 93 135 150 20 1075024 0 0 7952
else
xmfhtmlgumpcolor 93 135 150 20 1072202 0 0 7952
endif
if <def0.quest_<dtag0.quest<src.dctag0.questviewid>.id>_textlocalized>
if <ehnum <def.quest_<dtag0.quest<src.dctag0.questviewid>.id>_textlocalized>>
xmfhtmlgumpcolor 93 150 317 190 <eval <def.quest_<dtag0.quest<src.dctag0.questviewid>.id>_textlocalized>> 0 1 26574
else
dhtmlgump 93 150 317 190 0 0 <def.bfont_questtext><def.quest_<dtag0.quest<src.dctag0.questviewid>.id>_textlocalized>
endif
else
dhtmlgump 93 150 317 190 0 0 <def.bfont_questtext><def.quest_<dtag0.quest<src.dctag0.questviewid>.id>_text>
endif
if <isempty <def.quest_<dtag0.quest<src.dctag0.questviewid>.id>_ischain>>
button 125 370 02eef 02ef0 0 1 0
endif
button 280 370 02ee9 02eea 0 3 0
button 95 400 02ee0 02ee1 1 0 101
button 310 400 02ef2 02ef3 1 0 102
endif
page 3
if <src.ctag0.questviewid>
if <def0.quest_<dtag0.quest<src.dctag0.questviewid>.id>_namelocalized>
if <ehnum <def.quest_<dtag0.quest<src.dctag0.questviewid>.id>_namelocalized>>
xmfhtmlgumpcolor 155 105 200 20 <eval <def.quest_<dtag0.quest<src.dctag0.questviewid>.id>_namelocalized>> 0 0 7952
else
dhtmlgump 155 105 200 20 0 0 <def.bfont_questodesc><def.quest_<dtag0.quest<src.dctag0.questviewid>.id>_namelocalized>
endif
else
dhtmlgump 155 105 200 20 0 0 <def.bfont_questodesc><def.quest_<dtag0.quest<src.dctag0.questviewid>.id>_name>
endif
xmfhtmlgumpcolor 93 135 70 20 1049073 0 0 7952
xmfhtmlgumpcolor 93 150 130 20 1072208 0 0 7952
dorigin 93 140
if <tag0.quest<src.dctag0.questviewid>.failed>
xmfhtmlgumpcolor 250 150 50 20 500039 0 0 24673
endif
if <def0.quest_<dtag0.quest<src.dctag0.questviewid>.id>_riddle>
dtext 220 172 1153 RIDDLE
else
for <def.quest_<dtag0.quest<src.dctag0.questviewid>.id>_objectiveamount>
args = <strarg <def.quest_<dtag0.quest<src.dctag0.questviewid>.id>_objective<dlocal._for>>>,<streat <def.quest_<dtag0.quest<src.dctag0.questviewid>.id>_objective<dlocal._for>>>
doswitch <def0.quest_<dtag0.quest<src.dctag0.questviewid>.id>_objective<dlocal._for>_type>
local.blank
begin // objective type = 1 = get
xmfhtmlgumpcolor *0 *28 70 20 1072205 0 0 26574
dtext +42 *0 1153 <argv[0]> <serv.itemdef.<argv[1]>.name>
tilepichue +272 *0 <serv.itemdef.<argv[1]>.id> <itemtilepiccolor <argv[1]>>
if <def0.quest_<dtag0.quest<src.dctag0.questviewid>.id>_objective<dlocal._for>_time>
xmfhtmlgumpcolor +7 *15 130 20 1062379 0 0 26574
dtext +127 *0 1153 <questtimeremaining <tag0.quest<src.dctag0.questviewid>.id>>
endif
end
begin // objective type = 2 = kill
xmfhtmlgumpcolor *0 *28 70 20 3005010 0 0 26574
dtext +32 *0 1153 <argv[0]> <serv.chardef.<argv[1]>.name>
if <def0.quest_<dtag0.quest<src.dctag0.questviewid>.id>_objective<dlocal._for>_time>
xmfhtmlgumpcolor +7 *15 130 20 1062379 0 0 26574
dtext +127 *0 1153 <questtimeremaining <tag0.quest<src.dctag0.questviewid>.id>>
endif
if !<isempty <def.quest_<dtag0.quest<src.dctag0.questviewid>.id>_objective<dlocal._for>_location>>
xmfhtmlgumpcolor +7 *15 70 20 3005105 0 0 26574
dtext +127 *0 1153 <def.quest_<dtag0.quest<src.dctag0.questviewid>.id>_objective<dlocal._for>_location>
endif
end
begin // objective type = 3 = deliver
local.deliverquest = 1
xmfhtmlgumpcolor *0 *28 70 20 1072207 0 0 26574
dtext +47 *0 1153 <argv[0]> <serv.itemdef.<argv[1]>.name>
if <def0.quest_<dtag0.quest<src.dctag0.questviewid>.id>_objective<dlocal._for>_time>
xmfhtmlgumpcolor +7 *15 130 20 1062379 0 0 26574
dtext +127 *0 1153 <questtimeremaining <tag0.quest<dctag0.quesviewid>.id>>
endif
end
begin // objective type = 4 = escort
xmfhtmlgumpcolor *0 *28 70 20 1072206 0 0 26574
dtext +67 *0 1153 <def.quest_<dtag0.quest<src.dctag0.questviewid>.id>_objective<dlocal._for>>
if <def0.quest_<dtag0.quest<src.dctag0.questviewid>.id>_objective<dlocal._for>_time>
xmfhtmlgumpcolor +7 *15 130 20 1062379 0 0 26574
dtext +127 *0 1153 <questtimeremaining <tag0.quest<dctag0.quesviewid>.id>>
endif
end
begin // objective type = 5 = craft
local.blank
end
begin // objective type = 6 = loot
args = <strarg <def.quest_<dtag0.quest<src.dctag0.questviewid>.id>_objective<dlocal._for>_targ>>,<streat <def.quest_<dtag0.quest<src.dctag0.questviewid>.id>_objective<dlocal._for>_targ>>
xmfhtmlgumpcolor *0 *28 70 20 1072205 0 0 26574
dtext +42 *0 1153 <argv[0]> <serv.itemdef.<argv[1]>.name>
tilepichue +272 *0 <serv.itemdef.<argv[1]>.id> <itemtilepiccolor <argv[1]>>
if <def0.quest_<dtag0.quest<src.dctag0.questviewid>.id>_objective<dlocal._for>_time>
xmfhtmlgumpcolor +7 *15 130 20 1062379 0 0 26574
dtext +127 *0 1153 <questtimeremaining <tag0.quest<src.dctag0.questviewid>.id>>
endif
end
enddo
endfor
endif
button 125 370 02eef 02ef0 0 2 0
button 280 370 02ee9 02eea 0 4 0
button 95 400 02ee0 02ee1 1 0 101
button 310 400 02ef2 02ef3 1 0 102
endif
page 4
if <src.ctag0.questviewid>
if <def0.quest_<dtag0.quest<src.dctag0.questviewid>.id>_namelocalized>
if <ehnum <def.quest_<dtag0.quest<src.dctag0.questviewid>.id>_namelocalized>>
xmfhtmlgumpcolor 155 105 200 20 <eval <def.quest_<dtag0.quest<src.dctag0.questviewid>.id>_namelocalized>> 0 0 7952
else
dhtmlgump 155 105 200 20 0 0 <def.bfont_questodesc><def.quest_<dtag0.quest<src.dctag0.questviewid>.id>_namelocalized>
endif
else
dhtmlgump 155 105 200 20 0 0 <def.bfont_questodesc><def.quest_<dtag0.quest<src.dctag0.questviewid>.id>_name>
endif
xmfhtmlgumpcolor 93 140 70 20 1072842 0 0 7952
dorigin 100 140
for <def.quest_<dtag0.quest<src.dctag0.questviewid>.id>_prizes>
gumppic +0 *25 1210
dhtmlgump +30 -1 280 20 0 0 <def.bfont_questprizetextcolor><streat <def.quest_<dtag0.quest<src.dctag0.questviewid>.id>_prizeid<dlocal._for>>>
endfor
button 125 370 02eef 02ef0 0 3 0
button 95 400 02ee0 02ee1 1 0 101
button 310 400 02ef2 02ef3 1 0 102
endif
page 5
if <src.ctag0.questviewid>
gumppic 135 107 1210
if !<isempty <args>>
if <def0.quest_<src.dtag0.quest<src.dctag0.questviewid>.id>_namelocalized>
if <ehnum <def.quest_<src.dtag0.quest<src.dctag0.questviewid>.id>_namelocalized>>
xmfhtmlgumpcolor 155 105 200 20 <eval <def.quest_<src.dtag0.quest<src.dctag0.questviewid>.id>_namelocalized>> 0 0 7952
else
dhtmlgump 155 105 200 20 0 0 <def.bfont_questodesc><def.quest_<src.dtag0.quest<src.dctag0.questviewid>.id>_namelocalized>
endif
else
dhtmlgump 155 105 200 20 0 0 <def.bfont_questodesc><def.quest_<src.dtag0.quest<src.dctag0.questviewid>.id>_name>
endif
if <def0.quest_<src.dtag0.quest<src.dctag0.questviewid>.id>_textrefuselocalized>
if <ehnum <def.quest_<src.dtag0.quest<src.dctag0.questviewid>.id>_textrefuselocalized>>
xmfhtmlgumpcolor 93 155 317 190 <eval <def.quest_<src.dtag0.quest<src.dctag0.questviewid>.id>_textrefuselocalized>> 0 1 7952
else
dhtmlgump 93 155 317 190 0 0 <def.bfont_questodesc><def.quest_<src.dtag0.quest<src.dctag0.questviewid>.id>_textrefuselocalized>
endif
else
dhtmlgump 93 155 317 190 0 0 <def.bfont_questodesc><def.quest_<src.dtag0.quest<src.dctag0.questviewid>.id>_textrefuse>
endif
else
if <def0.quest_<dtag0.quest<src.dctag0.questviewid>.id>_namelocalized>
if <ehnum <def.quest_<dtag0.quest<src.dctag0.questviewid>.id>_namelocalized>>
xmfhtmlgumpcolor 155 105 200 20 <eval <def.quest_<dtag0.quest<src.dctag0.questviewid>.id>_namelocalized>> 0 0 7952
else
dhtmlgump 155 105 200 20 0 0 <def.bfont_questodesc><def.quest_<dtag0.quest<src.dctag0.questviewid>.id>_namelocalized>
endif
else
dhtmlgump 155 105 200 20 0 0 <def.bfont_questodesc><def.quest_<dtag0.quest<src.dctag0.questviewid>.id>_name>
endif
if <def0.quest_<dtag0.quest<src.dctag0.questviewid>.id>_textrefuselocalized>
if <ehnum <def.quest_<dtag0.quest<src.dctag0.questviewid>.id>_textrefuselocalized>>
xmfhtmlgumpcolor 93 155 317 190 <eval <def.quest_<dtag0.quest<src.dctag0.questviewid>.id>_textrefuselocalized>> 0 1 26574
else
dhtmlgump 93 155 317 190 0 0 <def.bfont_questtext><def.quest_<dtag0.quest<src.dctag0.questviewid>.id>_textrefuselocalized>
endif
else
dhtmlgump 93 155 317 190 0 0 <def.bfont_questtext><def.quest_<dtag0.quest<src.dctag0.questviewid>.id>_textrefuse>
endif
endif
button 310 400 02ee6 02ee8 1 0 0
endif
page 6
if <src.ctag0.questviewid>
gumppic 135 107 1210
if <def0.quest_<dtag0.quest<src.dctag0.questviewid>.id>_namelocalized>
if <ehnum <def.quest_<dtag0.quest<src.dctag0.questviewid>.id>_namelocalized>>
xmfhtmlgumpcolor 155 105 200 20 <eval <def.quest_<dtag0.quest<src.dctag0.questviewid>.id>_namelocalized>> 0 0 7952
else
dhtmlgump 155 105 200 20 0 0 <def.bfont_questodesc><def.quest_<dtag0.quest<src.dctag0.questviewid>.id>_namelocalized>
endif
else
dhtmlgump 155 105 200 20 0 0 <def.bfont_questodesc><def.quest_<dtag0.quest<src.dctag0.questviewid>.id>_name>
endif
if <def0.quest_<dtag0.quest<src.dctag0.questviewid>.id>_textuncompletelocalized>
if <ehnum <def.quest_<dtag0.quest<src.dctag0.questviewid>.id>_textuncompletelocalized>>
xmfhtmlgumpcolor 93 155 317 190 <eval <def.quest_<dtag0.quest<src.dctag0.questviewid>.id>_textuncompletelocalized>> 0 1 26574
else
dhtmlgump 93 155 317 190 0 0 <def.bfont_questtext><def.quest_<dtag0.quest<src.dctag0.questviewid>.id>_textuncompletelocalized>
endif
else
dhtmlgump 93 155 317 190 0 0 <def.bfont_questtext><def.quest_<dtag0.quest<src.dctag0.questviewid>.id>_textuncomplete>
endif
button 310 400 02ee6 02ee8 1 0 0
endif
page 7
if <src.ctag0.questviewid>
gumppic 135 107 1210
if <def0.quest_<dtag0.quest<src.dctag0.questviewid>.id>_namelocalized>
if <ehnum <def.quest_<dtag0.quest<src.dctag0.questviewid>.id>_namelocalized>>
xmfhtmlgumpcolor 155 105 200 20 <eval <def.quest_<dtag0.quest<src.dctag0.questviewid>.id>_namelocalized>> 0 0 7952
else
dhtmlgump 155 105 200 20 0 0 <def.bfont_questodesc><def.quest_<dtag0.quest<src.dctag0.questviewid>.id>_namelocalized>
endif
else
dhtmlgump 155 105 200 20 0 0 <def.bfont_questodesc><def.quest_<dtag0.quest<src.dctag0.questviewid>.id>_name>
endif
if <def0.quest_<dtag0.quest<src.dctag0.questviewid>.id>_textcompletelocalized>
if <ehnum <def.quest_<dtag0.quest<src.dctag0.questviewid>.id>_textcompletelocalized>>
xmfhtmlgumpcolor 93 155 317 190 <eval <def.quest_<dtag0.quest<src.dctag0.questviewid>.id>_textcompletelocalized>> 0 1 26574
else
dhtmlgump 93 155 317 190 0 0 <def.bfont_questtext><def.quest_<dtag0.quest<src.dctag0.questviewid>.id>_textcompletelocalized>
endif
else
dhtmlgump 93 155 317 190 0 0 <def.bfont_questtext><def.quest_<dtag0.quest<src.dctag0.questviewid>.id>_textcomplete>
endif
button 310 400 02ee0 02ee2 1 0 201
endif
So this is why I'm thinking is must be some sort of parsing problem, as the cliloc quests work fine, but the ones using plain text fail.
Any help on this would be awesome! I'm learning a lot about the scripting here, but I just can't get a handle on this advanced stuff.
Thanks for taking a look
PT