Quote:
|
Originally Posted by top-gear
I want to create a small quest for begginers. They will firstly talk to gallint to take the quest, then collect the keltir fangs (quest item), and after that they will talk to him again to get the prize and complete the quest. The basic reason to do this is to learn how to make a simple quest 
|
...in handler:
Code:
handler 10 // MY_DYING
variable_begin
"c1"
"myself"
"_choiceN"
"_code"
"_from_choice"
variable_end
push_event // c1
push_const 276
add
push_reg_sp
fetch_i
shift_sp 1
func_call 83 // func[GetLastAttacker]
assign
shift_sp -1
shift_sp 1
push_const 100
func_call 55 // func[Rand] Probability Drop QuestItem
shift_sp -1
push_const 20 // Prob. 20%
less
branch_false L90225 //
shift_sp 1
push_event // c1
push_const 276
add
fetch_i
push_const x1x1 // Own QuestMark ? x1x1 is QuestMark Item ID
func_call 81 // func[OwnItemCount]
shift_sp -2
push_const 1
equal
branch_false L90225
shift_sp 1
push_event // c1
push_const 276
add
fetch_i
push_const x2x2 // If Own 15 QuesItem id x2x2 (keltir fang) jump
func_call 81 // func[OwnItemCount]
shift_sp -2
push_const 15
equal
branch_false L90225
shift_sp 1
push_event // c1
push_const 276
add
fetch_i
push_const x2x2 // Get QuestItem (keltir Fang)
push_const 1
func_call 77 // func[GiveItem1]
shift_sp -3
shift_sp -1
L90225
call_super
handler_end
Then u need 2 item id (questmark that u take from magister and questitem dropped).
This is only one of many method to make a simple quest (i obmited quest sound for simplify the code)
Bye and good... xmas...