First, the item IDs that we'll be using.
389160000 Fragment of Arrogance
119301000 Sherion
159301000 Lugias
139301000 Avedon
169301000 Helenid Cross Bow
189601000 Hell Blood
189602000 Garp
189603000 Elysium
199301000 Holy Animor
EVENT 22001
E SELECT_MSG 16084 61000 60000 42010 60001 42020 60002 42030 60003 22040 60004 42050 60005 42060 60006 42070 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 ;
END
Now, this is our menu for the Chaotic Generator. First things first, to link a NPC to a certain part of EVT coding, it starts with the EVENT number. In this case, 22001 is linked to 137 byType(In your K_NPC table). There is no real link as to why it's like that, I believe we found out that it was hard-coded into the ebenezer. Now lets move on to the Menu(SELECT_MSG), I'll explain what each one is.
16084 - The ID Number of the NPC(It doesn't need to be correct, it's just for notes.)
61000 - The main text you find at the top when you open a menu, this information is located in 'Quest_Talk_us.tbl'
60000 - The first button in the menu, this is located in 'Quest_Menu_us.tbl'
42010 - This is the first event number you want to have, the menu button you just made above refers to this event.
60001 - This is the second button on the menu, again located in 'Quest_Menu_us.tbl'
52020 - Again, this is the event's number and it refers to the button you made above.
Basically, the same thing keeps going on until you have the whole menu finished.
Now, you should have your Quest_Menu_us.tbl looking something like this now..(Note, we'll only be using the Fragment of Avarice in this guide, but I figured I'd show you how it would be done if you were to make the full thing.)
60000 Fragment of Arrogance
60001 Fragment of Gluttony
60002 Fragment of Rage
60003 Fragment of Sloth
60004 Fragment of Lechery
60005 Fragment of Jealousy
60006 Fragment of Avarice
And your Quest_Talk_us.tbl looking like this.
61000 Welcome to the Chaotic Generator, you can turn in your fragments here for a chance at getting Bifrost Items.
61001 Sorry, you don't have the required fragment.
Okay, the tbls are set, now lets do the database-sided stuff. We'll need to add an exchange into the ITEM_EXCHANGE table.
Your table should look something like below :
Quote:
40001 15012 Chaotic Generator Sherion 101 389160000 1 0 0 0 0 0 0 0 0 119301000 1000 111210001 2000 111110001 2000 246001001 2000 246002001 3000
40002 15012 Chaotic Generator Lugias 101 389160000 1 0 0 0 0 0 0 0 0 159301000 1000 151210001 2000 151110001 2000 206001001 2000 206002001 3000
40003 15012 Chaotic Generator Avedon 101 389160000 1 0 0 0 0 0 0 0 0 119301000 1000 111210001 2000 111110001 2000 246001001 2000 246002001 3000
40004 15012 Chaotic Generator Helenid Cross Bow 101 389160000 1 0 0 0 0 0 0 0 0 169301000 1000 168410001 2000 168310001 2000 246001001 2000 246002001 3000
40005 15012 Chaotic Generator Hell Blood 101 389160000 1 0 0 0 0 0 0 0 0 189601000 1000 181110001 2000 181010001 2000 266001001 2000 266002001 3000
40006 15012 Chaotic Generator Garp 101 389160000 1 0 0 0 0 0 0 0 0 189602000 1000 181110001 2000 181010001 2000 266001001 2000 266002001 3000
40007 15012 Chaotic Generator Elysium 101 389160000 1 0 0 0 0 0 0 0 0 189603000 1000 181110001 2000 181010001 2000 266001001 2000 266002001 3000
Now, the database is done, the TBLs are done, now we need to do the EVT part of it all.
So, first we start off with the Menu.
EVENT 22001
E SELECT_MSG 16084 61000 60000 42010 60001 42020 60002 42030 60003 22040 60004 42050 60005 42060 60006 42070 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 ;
END
Now, 42010 is the Fragment of Avarice, so we'll only be doing that one for now.
EVENT 42010 ; Fragment of Avarice
E RUN_EVENT 42011 ; The RUN_EVENT's basically make one event expand into many others, and links them together, great for checking multiple things.
E RUN_EVENT 42012
END
EVENT 42011 ; First we'll check to see if the item doesn't exist, if it doesn't, End, and display a message.
A HOWMUCH_ITEM 389160000 0 0
E SAY -1 -1 61001 -1 -1 -1 -1 -1 -1 -1
E RETURN
END
EVENT 42012 ; Now we'll check to see if they have a fragment, if you have atleast 1 fragment, roll the dice and run the events.
A HOWMUCH_ITEM 389160000 1 9999
E ROLL_DICE 7 ; Roll a dice 7 times(The number of items we have)
E RUN_EVENT 42013
E RUN_EVENT 42014
E RUN_EVENT 42015
E RUN_EVENT 42016
E RUN_EVENT 42017
E RUN_EVENT 42018
E RUN_EVENT 42019
END
EVENT 42013 ; DICE FOR SHERION
A CHECK_DICE 1
E RUN_EXCHANGE 40001
END
EVENT 42014 ; DICE FOR LUGIAS
A CHECK_DICE 2
E RUN_EXCHANGE 40002
END
EVENT 42015 ; DICE FOR AVEDON
A CHECK_DICE 3
E RUN_EXCHANGE 40003
END
EVENT 42016 ; DICE FOR HELENOID
A CHECK_DICE 4
E RUN_EXCHANGE 40004
END
EVENT 42017 ; DICE FOR HELL BLOOD
A CHECK_DICE 5
E RUN_EXCHANGE 40005
END
EVENT 42018 ; DICE FOR GARP
A CHECK_DICE 6
E RUN_EXCHANGE 40006
END
EVENT 42019 ; DICE FOR ELYSIUM
A CHECK_DICE 7
E RUN_EXCHANGE 40007
END