SCP Quest Script - need help - phibertap - 10-24-2013 02:54 PM
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
RE: SCP Quest Script - need help - XuN - 10-24-2013 03:44 PM
If you look at it, first checks for any string inside _namelocalized, its ok if you have inside it any number or value that sphere knows [itemdef xxx],[chardef ], etc... but with text it can't be checked this way... so the _namelocalized let it for using with clilocs only and change it to def._name as it is using _name instead of _namelocalized if the second is empty. Try this:
Code:
QUEST_500_NAME Gold? it's elementary!
QUEST_500_TEXT 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_TEXTCOMPLETE Wow thank you, now perhaps I can get back to mining.
QUEST_500_TEXTUNCOMPLETE Kill the golden elementals for me
RE: SCP Quest Script - need help - Mordaunt - 10-24-2013 08:33 PM
To that I am afraid I must draw your attention to the actual script file and the "500" series quests:
Code:
QUEST_516_NAMELOCALIZED A shortage of Obsidian
QUEST_516_TEXTLOCALIZED I don't know what happened, my supplier told me he was struggling to find obsidian lately, I did hear however that you can make it if you can smelt glass at high temperatures... I guess if you know how to make glass, you could have the means to make Obsidian too...
QUEST_516_TEXTCOMPLETELOCALIZED Fantastic, so it IS true then! that should keep those whining mages off my back for a little while.
QUEST_516_TEXTUNCOMPLETELOCALIZED Do you know how to make glass? perhaps you can make that into obsidian... now what is glass made from again?
QUEST_516_TEXTREFUSELOCALIZED Yes... I didn't think you looked smart enough to make it
QUEST_516_OBJECTIVEAMOUNT 1
QUEST_516_OBJECTIVE1_TYPE 1
QUEST_516_OBJECTIVE1 30 i_reag_obsidian
QUEST_516_PRIZES 1
QUEST_516_PRIZETYPE1 1 //item
QUEST_516_PRIZEID1 15000 i_gold
I know this way at least used to work because looking at these quests, as the conversation went in IRC the other day, I think I actually wrote some of them.
Do these ones still work?
If so try something stupid just to test (I can't I don't run this script or a pack that readily supports it) comment out the custom text on each of the lines and add in a little test text of your own. See if it shows up.
RE: SCP Quest Script - need help - RanXerox - 10-25-2013 02:01 AM
In numerous places, the code looks like this:
Code:
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
Notice how it first looks if QUEST_516_NAMELOCALIZED exists, and if it does, it uses that... otherwise it uses QUEST_516_NAME ... so Xun's solution would likely work.
But if QUEST_516_NAMELOCALIZED exists... there is also an ehnum function that decides whether to use a xmfhtmlgumpcolor (which requires a cliloc number) or the dhtmlgump (which can use text.) So Mordaunt's claim that these used to work may also be true - which probably means that ehnum function (not shown) might be doing unexpected things.
RE: SCP Quest Script - need help - phibertap - 10-25-2013 02:22 AM
Okay this is starting to make a bit more sense. I will have to test stuff tonight and report back. Thanks for the info!!
RE: SCP Quest Script - need help - phibertap - 10-25-2013 03:04 PM
So I edited the sphere_quest_quests.scp, changing the quest info for quest 500, removing the LOCALIZED info.
Code:
QUEST_500_NAME Gold? it's elementary!
QUEST_500_TEXT 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_TEXTCOMPLETE Wow thank you, now perhaps I can get back to mining.
QUEST_500_TEXTUNCOMPLETE Kill the golden elementals for me
QUEST_500_TEXTREFUSE 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.
And the quest now shows up. The errors on the console continue I'm afraid.
I found the EHNUM Function:
Code:
[FUNCTION EHNUM]
IF (STRMATCH(0*,<ARGV[0]>))
RETURN 1
ELSE
RETURN 0
ENDIF
sounds like in the most simple terms of I can safely state, the script when building the dialog, it will look at the script definitions within the sphere_quest_quests.scp file, find out if the quest is based upon a cliloc type or a string type, then it will create the proper dialog system to display. It uses the ehnum function to do the test to see if its cliloc or not.
Line 365
Code:
if <def0.quest_<dtag0.quest<dlocal._for>.id>_namelocalized>
is the 1st spot where I get the error, so I wonder if there is a better way to do this.
Anyway, still mucking around with this.
PT
RE: SCP Quest Script - need help - XuN - 10-25-2013 05:25 PM
For that last problem the fix would be change the check for this one:
Code:
if !<isempty <def.quest_<dtag.quest<dlocal._for>.id>_namelocalized>>
You should check this way every time you have any string saved in defs,tags,etc because Sphere try to 'reads' what you have inside and, in this case, what the def holds are just unknown strings for sphere, if you had there i_gold or something already defined it wouldn't give error, but it's not the case.
Note: changing this line allows you to use normal text by both ways, using _text or _textlocalized
|