[GUIDE] Add Custom Quest (In Any Tab)

Dastgir

Core Developer
Messages
3,805
Points
0
Discord
Dastgir#1460
IRC Nickname
Dastgir
Github
dastgirp
Emulator
Client Version
2019-02-28 RE
Hello Community,

Yesterday, I was trying to make Quest Appear on other TAB's and result was successful.

Prerequisite:

  • You need latest ROClientside Repository : https://github.com/ROClientSide/Translation/
  • https://github.com/ROClientSide/Translation/commit/9d93ef1 (This Commit is necessary)
  • you need Client >= 2014-10-22 (Haven't Tested with old clients, You can test and tell if it works
    default_smile.png
    )

Here's a Guide:

questluafilelist.lub:

You need 2 files, local_XYZquest_list and l_XYZ_list and in the folders as mentioned below:

Add Following lines to questluafilelist.lub(at end of file) without EXTENSIONS as mentioned below:

Add[[localquest\local_dastgirquest_list]]
Add[[localquest\questinfo\l_dastgir_list]]


local_dastgirquest_list.lub(Sample Files, Modify to your needs):

LOCAL_DastgirQuest_List = {
{
name = [[Dastgir Custom Quests]],
imagefile = [[ep_test_sample.bmp]],
list = {
{
name = [[Novice]],
list = {
{
name =[[Test1]],
scrfilename = [[DastgirQuest]],
questID = 1019,
},
{
name =[[Test2]],
scrfilename = [[DastgirQuest]],
questID = 1017,
}
}
},
{
name = [[Quests 11~25]],
list = {
{
name =[[11-15]],
scrfilename = [[DastgirQuest]],
questID = 1017,
},
{
name =[[16-20]],
scrfilename = [[DastgirQuest]],
questID = 1019,
},
}
}
}
}
}

_G.QuestTable.add(LOCAL_DastgirQuest_List, "EVENT")


It needs Following line at the bottom for compulsary

_G.QuestTable.add(LOCAL_XYZQuest_List, "TAB")
where TAB's are

EVENT
LOCAL
EP
NEW
RECOMMENDED

Replace LOCAL_XYZQuest_List with Table name at top of this file...

l_dastgir_list.lub(Sample File, Modify to your needs):

DastgirQuest_List = {
[1019] = {
NPCFromName = [[Dastgir]],
NPCFromMap = [[new_1-1]],
NPCFromSpr = [[4_M_01]],
NPCFromX = 63,
NPCFromY = 53,
NPCToName = [[Dastgir]],
NPCToMap = [[prontera]],
NPCToSpr = [[4_M_01]],
NPCToX = 86,
NPCToY = 84,
Item = [[]],
PrizeItem = [[]],
Title = [[Event QuestInfo ]],
Info = [[Testing the Event.]],
QuickInfo = [[QuickInfo.]],
Hunt1 = [[]],
Hunt2 = [[]],
Hunt3 = [[]],
Time = [[0]],
LV = [[0]],
},
[1017] = {
NPCFromName = [[Dastgir-1]],
NPCFromMap = [[prontera]],
NPCFromSpr = [[4_BRICKPILE]],
NPCFromX = 84,
NPCFromY = 123,
NPCToName = [[Dastgir-2]],
NPCToMap = [[payon]],
NPCToSpr = [[4_BOARD3]],
NPCToX = 76,
NPCToY = 114,
Item = [[]],
PrizeItem = [[]],
Title = [[Event QuestInfo ]],
Info = [[Testing the Event.]],
QuickInfo = [[QuickInfo.]],
Hunt1 = [[Alarm]],
Hunt2 = [[]],
Hunt3 = [[]],
Time = [[0]],
LV = [[0]],
},

}

_G.QuestTable.addList("DastgirQuest",DastgirQuest_List)

In this file too, you need Following line in the end

_G.QuestTable.addList("XYZQuest",XYZQuest_List)

where XYZQuest_List is table_name(mentioned in first line of this file), (Please see the quotes)

and that's it. put it into your GRF, and it will work

NOTE: Many Functions are modified, so you would need quest_function.lub provided in the repository

ScreenShot:

g8vS2mB.jpg


Please Don't Remove credits in the quest_function file...

 
Last edited by a moderator:
Quazi said:
i think it's not working on 2013 client.. i use 2013-08-07 client..

i already tried using your sample and it doesn't appear on the EVT tab..

3485yc3.jpg
default_laugh.png
 
default_biggrin.png
 
default_tongue.png
 
default_smile.png
 
default_wink.png
 
default_tongue.png
Just use new client then xD
 
Hi, works only on RagexeRE
does not work on Ragexe, Quest window is empty...
tested on:
2014-10-22bRagexe.exe does not work
2015-05-13aRagexe.exe does not work
2015-09-16aRagexe.exe does not work
2015-10-29aRagexeRE.exe working
 
but I need client until 2015-09
where can I download RagexeRE ?

 
Hunt1 = [[Poring]], = client crah
Item = [[Jellopy]], = no image


 

 
Last edited by a moderator:
You don't need to diff with anything else.

 
Hi, works only on RagexeRE? does not work on Ragexe, Quest window is empty...tested on:2014-10-22bRagexe.exe does not work2015-05-13aRagexe.exe does not work2015-09-16aRagexe.exe does not work2015-10-29aRagexeRE.exe working but I need client until 2015-09where can I download RagexeRE ? Hunt1 = [[Poring]], = client crahItem = [[Jellopy]], = no image 
The format was never like that..Format are:

Item = [[< image = "929">Immortal Heart<\end> (5)]],

Hunt1 = [[ < link = "LITTLE_FATUM">Little Fatum<\end> x 6 ]],

In Item, It is ItemID in image="ItemID"

While in Hunt, link="SPRITE_NAME"

 
DastgirQuest_List = {
[1019] = {
NPCFromName = [[Dastgir]],
NPCFromMap = [[new_1-1]],
NPCFromSpr = [[4_M_01]],
NPCFromX = 63,
NPCFromY = 53,
NPCToName = [[Dastgir]],
NPCToMap = [[prontera]],
NPCToSpr = [[4_M_01]],
NPCToX = 86,
NPCToY = 84,
Item = [[< image = "929">Immortal Heart<\end> (5)]],
PrizeItem = [[]],
Title = [[Event QuestInfo ]],
Info = [[Testing the Event.]],
QuickInfo = [[QuickInfo.]],
Hunt1 = [[]],
Hunt2 = [[]],
Hunt3 = [[]],
Time = [[0]],
LV = [[0]],
},
[1017] = {
NPCFromName = [[Dastgir-1]],
NPCFromMap = [[prontera]],
NPCFromSpr = [[4_BRICKPILE]],
NPCFromX = 84,
NPCFromY = 123,
NPCToName = [[Dastgir-2]],
NPCToMap = [[payon]],
NPCToSpr = [[4_BOARD3]],
NPCToX = 76,
NPCToY = 114,
Item = [[]],
PrizeItem = [[]],
Title = [[Event QuestInfo ]],
Info = [[Testing the Event.]],
QuickInfo = [[QuickInfo.]],
Hunt1 = [[ < link = "LITTLE_FATUM">Little Fatum<\end> x 6 ]],
Hunt2 = [[]],
Hunt3 = [[]],
Time = [[0]],
LV = [[0]],
},

}

_G.QuestTable.addList("DastgirQuest",DastgirQuest_List) 
 
still crashes...

if thi is empty all ok Hunt1 = [[ ]] or Item = [[]],

And why only 2015-10-29aRagexeRE.exe shows the quests?

all other exe are empty like here... no quests at all

3485yc3.jpg


Add[[localquest\local_dastgirquest_list]]
Add[[localquest\questinfo\l_dastgir_list]]

and what is this code for? maybe this causes the problem with crash?

quest_function.lub

Code:
QuestTable.func_quest_lower_exchange_imagetag = 
function( msg )

	local imagetag_front_startpos, imagetag_front_endpos = string.find( msg, [[<%s*image%s*=%s*"%d*"%s*>]] );
	if( nil == imagetag_front_startpos or nil == imagetag_front_endpos ) then return msg; end
	local imagetag_front = string.sub( msg, imagetag_front_startpos, imagetag_front_endpos );

	local imagetag_rear_startpos, imagetag_rear_endpos = string.find( msg, [[<%s*\end%s*>]], imagetag_front_endpos + 1  );
	if( nil == imagetag_rear_startpos or nil == imagetag_rear_endpos ) then return msg; end
	local imagetag_rear = string.sub( msg, imagetag_rear_startpos, imagetag_rear_endpos );

	local name = string.sub( msg, imagetag_front_endpos + 1, imagetag_rear_startpos - 1 );

	local num_startpos, num_endpos = string.find( imagetag_front, [["%d*"]] );
	if( nil == num_startpos or nil == num_endpos ) then return msg; end
	local itidstr = string.sub( imagetag_front, num_startpos + 1, num_endpos - 1 );

	local tagstr = string.format( [[<ITEM>%s<INFO>%s</INFO></ITEM>]], name, itidstr );
	local final = "";
	if( imagetag_front_startpos > 1 ) then final = final .. string.sub( msg, 1, imagetag_front_startpos - 1 ); end
	final = final .. tagstr;
	if( imagetag_rear_endpos < #msg ) then final = final .. string.sub( msg, imagetag_rear_endpos + 1 ); end

	return QuestTable.func_quest_lower_exchange_imagetag( final );	

end

QuestTable.func_quest_lower_exchange_linktag = 
function ( msg )

	local linktag_front_startpos, linktag_front_endpos = string.find( msg, [[<%s*link%s*=%s*".*">]] );
	if( nil == linktag_front_startpos or nil == linktag_front_endpos ) then return msg; end
	local linktag_front = string.sub( msg, linktag_front_startpos, linktag_front_endpos );

	local linktag_rear_startpos, linktag_rear_endpos = string.find( msg, [[<%s*\end%s*>]], linktag_front_endpos + 1  );
	if( nil == linktag_rear_startpos or nil == linktag_rear_endpos ) then return msg; end
	local linktag_rear = string.sub( msg, linktag_rear_startpos, linktag_rear_endpos );

	local name = string.sub( msg, linktag_front_endpos + 1, linktag_rear_startpos - 1 );

	local spritename_startpos, spritename_endpos = string.find( linktag_front, [[".*"]] );
	if( nil == spritename_startpos or nil == spritename_endpos ) then return msg; end
	local spritename = string.sub( linktag_front, spritename_startpos + 1, spritename_endpos - 1 );

	local tagstr = string.format( [[<NAVI>%s<INFO>%s,0,0,3,-222</INFO></NAVI>]], name, spritename );
	local final = "";
	if( linktag_front_startpos > 1 ) then final = final .. string.sub( msg, 1, linktag_front_startpos - 1 ); end
	final = final .. tagstr;
	if( linktag_rear_endpos < #msg ) then final = final .. string.sub( msg, linktag_rear_endpos +1 ); end


	return QuestTable.func_quest_lower_exchange_linktag( final );

end
 
Last edited by a moderator:
I cant find where to change the names for the tabs on the side where you click "Act" "Pen" "Rec" "Epi" "Loc" "Evt" "New" 

I would like to change these if possible :/ 

 
It works, but quest doesn't show in Event tab. It shows in Act tab only
And when I open the client, it shows this in local file, "[string "buf"]:45: bad argument #1 to 'ipairs' (table expected, got nil)":
I have 2015_11_94Ragexe.

 
Hello Community,

Yesterday, I was trying to make Quest Appear on other TAB's and result was successful.

Prerequisite:



Here's a Guide:

questluafilelist.lub:

You need 2 files, local_XYZquest_list and l_XYZ_list and in the folders as mentioned below:

Add Following lines to questluafilelist.lub(at end of file) without EXTENSIONS as mentioned below:

Add[[localquest\local_dastgirquest_list]]
Add[[localquest\questinfo\l_dastgir_list]]




local_dastgirquest_list.lub(Sample Files, Modify to your needs):

LOCAL_DastgirQuest_List = {
{
name = [[Dastgir Custom Quests]],
imagefile = [[ep_test_sample.bmp]],
list = {
{
name = [[Novice]],
list = {
{
name =[[Test1]],
scrfilename = [[DastgirQuest]],
questID = 1019,
},
{
name =[[Test2]],
scrfilename = [[DastgirQuest]],
questID = 1017,
}
}
},
{
name = [[Quests 11~25]],
list = {
{
name =[[11-15]],
scrfilename = [[DastgirQuest]],
questID = 1017,
},
{
name =[[16-20]],
scrfilename = [[DastgirQuest]],
questID = 1019,
},
}
}
}
}
}

_G.QuestTable.add(LOCAL_DastgirQuest_List, "EVENT")




It needs Following line at the bottom for compulsary

_G.QuestTable.add(LOCAL_XYZQuest_List, "TAB")


where TAB's are

EVENT
LOCAL
EP
NEW
RECOMMENDED


Replace LOCAL_XYZQuest_List with Table name at top of this file...

l_dastgir_list.lub(Sample File, Modify to your needs):

DastgirQuest_List = {
[1019] = {
NPCFromName = [[Dastgir]],
NPCFromMap = [[new_1-1]],
NPCFromSpr = [[4_M_01]],
NPCFromX = 63,
NPCFromY = 53,
NPCToName = [[Dastgir]],
NPCToMap = [[prontera]],
NPCToSpr = [[4_M_01]],
NPCToX = 86,
NPCToY = 84,
Item = [[]],
PrizeItem = [[]],
Title = [[Event QuestInfo ]],
Info = [[Testing the Event.]],
QuickInfo = [[QuickInfo.]],
Hunt1 = [[]],
Hunt2 = [[]],
Hunt3 = [[]],
Time = [[0]],
LV = [[0]],
},
[1017] = {
NPCFromName = [[Dastgir-1]],
NPCFromMap = [[prontera]],
NPCFromSpr = [[4_BRICKPILE]],
NPCFromX = 84,
NPCFromY = 123,
NPCToName = [[Dastgir-2]],
NPCToMap = [[payon]],
NPCToSpr = [[4_BOARD3]],
NPCToX = 76,
NPCToY = 114,
Item = [[]],
PrizeItem = [[]],
Title = [[Event QuestInfo ]],
Info = [[Testing the Event.]],
QuickInfo = [[QuickInfo.]],
Hunt1 = [[Alarm]],
Hunt2 = [[]],
Hunt3 = [[]],
Time = [[0]],
LV = [[0]],
},

}

_G.QuestTable.addList("DastgirQuest",DastgirQuest_List)


In this file too, you need Following line in the end

_G.QuestTable.addList("XYZQuest",XYZQuest_List)


where XYZQuest_List is table_name(mentioned in first line of this file), (Please see the quotes)

and that's it. put it into your GRF, and it will work

NOTE: Many Functions are modified, so you would need quest_function.lub provided in the repository

ScreenShot:

g8vS2mB.jpg


Please Don't Remove credits in the quest_function file...
Good Day Sir,

I followed the instruction but I got errors. below are the errors that Im having. I think I got a problem with this file

because the link is dead. would you mind sir if you can give me a copy.

I hope you can help me out.

Thank you.

2.PNG

1.PNG

 
Last edited by a moderator:
adding item on the list crash the client
Item = [[< image = "929">Immortal Heart<\end> (5)]],

how can I fix?

 
mind telling your client's date?
Hello there. Im using 2015-11-04aRagexe client.

Edit:

I manage to make it work. For everyone crashing on the item tag

here is the fix

 

local imagetag_front_startpos, imagetag_front_endpos = string.find(msg, [[<%s*image%s*=%s*"%d*"%s*>]]);

Just replace the above line with the line below.

local imagetag_front_startpos, imagetag_front_endpos = string.find(msg, [[<%s*image%s*=%s*\"%d*\"%s*>]]);


Hope this helps everyone who are looking for the answer.

 
Last edited by a moderator:
Back
Top