Jump to content

Nurimansyah

Members
  • Posts

    1
  • Joined

  • Last visited

Everything posted by Nurimansyah

  1. I think the correct one is, you should edit both Client and Server side. Doing so: In client side, just update System/OngoingQuestInfoList_Sakray.lub (You should decrypt with luadec into System/OngoingQuestInfoList_Sakray.lua Then, use below format: -- Example Quest Info List -- QuestList = { [1] = { -- This is the ID of the quest. Please remember/note it down. Title = "Quest Title", -- The quest title that shown on quest board. Description = { -- Quest description. "Some long quest description", "You can use ^FF0000Hex Color^000000,", "An <URL>URL <INFO>https://google.com</INFO></URL>", "A <NAVI>Navigation <INFO>WILOW,0,0,3,-222,0</INFO></NAVI>", "Or an <ITEM>Item <INFO>501</INFO></ITEM> information" }, Summary = "Some summary", -- Summary, -- Optional Properties IconName = "ico_gq.bmp", -- This is the quest icon displayed. It should reside on "data/texture/유저인터페이스/renew_questui/xxx.bmp" (Note for the file must be save with korean encoding) NpcSpr = "4_F_KHELLISIA", -- NPC Sprite name. Located at "data/sprite/npc/NPC_NAME" (Note: Input without .spr extension) NpcNavi = "prontera", -- Destination map name NpcPosX = 115, -- Destination npc X location NpcPosY = 181, -- Destination npc Y location RewardItemList = { -- Reward item list. You can have more items in it -- First Item { ItemID = 501, -- ItemID ItemNum = 10 -- Item quantity }, -- Second Item { ItemID = 502, -- ItemID ItemNum = 5 -- Item quantity } -- ...and so forth }, } } Next, you need to update your server side, by open and update these file: db/import/quest_db.yml And add your quest inside it: (Note the quest ID you've saved before) ... add after "Header:" Body: - Id:2 Title: Quest Title # Same as the "OngoingQuestInfoList_Sakray.lua" # Optional, if you want to add some monster, define here. (Please read the documation in the first fold of this .yml) Targets: - Mob: PORING Count: 5 Finally, you can adjust your quest in your NPC script, like this: prontera,159,186,4 script TestQuest 90,{ mes "Hello, this script just for testing quest"; next(); switch(select("Take quest", "Report Quest", "Bye")) { case 1: if (checkquest(2) == -1) { setquest 2; mes "Quest Taken"; } else { mes "Sorry, but you already have the quest"; } break; case 2: if (checkquest(2) == 0 || checkquest(2) == 1) { mes "Well done!"; mes "This is the rewards"; getitem 501,10; getitem 502,5; erasequest 2; } else if (checkquest(2) == 2) { mes "Sorry, you've completed the quest"; } else if (checkquest(2) == -1) { mes "It's look like you have not take the quest"; } break; case 3: mes "Bye..."; break; } end; } Last not least, don't forget to compile your lua file to lub using luac. That's some tutorial for update/creating a custom quest. So, in summary, you only need 3 things to setup, which is: Setup in client side -> Update OngoingQuestInfoList_Sakray.lub Setup in server side -> Update db/import/quest_db.yml Setup npc to trigger the quest === Screenshot - Without Monster Screenshot - With Monster === Hope this help ?
×
×
  • Create New...