well I havent decoded it all but this is a major part you will need to learn and understand.
shift_sp 1
push_event // c1
push_const 276
add
fetch_i
push_const 4629 // 0級紅色搜魂石
func_call 81 // func[OwnItemCount]
shift_sp -2
push_const 1
equal
branch_false L90316
shift_sp 1
push_event // c1
push_const 276
add
fetch_i
push_const 4630 // 1級紅色搜魂石
push_const 1
func_call 77 // func[GiveItem1]
shift_sp -3
shift_sp -1
shift_sp 1
push_event // c1
push_const 276
add
fetch_i
push_const 4629
push_const 1
func_call 80 // func[DeleteItem1]
shift_sp -3
shift_sp -1
jump L90315
|