PDA

View Full Version : Subclass compilation?


dayne411
22.01.2006, 14:09
Since it seems so many are looking for a subclass system of some sort, i figured maybe some others would be interested in compiling one to share amongst the community. My personal preferance would be one with stacking skills and interracial changes, from what i understand the easiest to script correctly also =)


class class_changer : default_npc
handler 3 // TALKED
variable_begin
"talker"
"myself"
"_choiceN"
"_code"
"_from_choice"
variable_end

shift_sp 1
push_event // talker
push_const 32
add
fetch_i
S379. "classchanger.htm"
push_string S379
func_call 43 // func[ShowPage]
shift_sp -2
shift_sp -1
handler_end

handler 32 // MENU_SELECTED
variable_begin
"talker"
"ask"
"reply"
"myself"
"_choiceN"
"_code"
"_from_choice"
variable_end

push_event // ask
push_const 100
add
fetch_i
push_const 512
negate
equal
branch_false L2132
L2131
shift_sp 1
push_event // talker
push_const 32
add
fetch_i
push_event // reply
push_const 104
add
fetch_i
func_call 144 // func[ClassChange]
shift_sp -2
shift_sp -1
L2132
handler_end


from my very little understanding of the ai.obj this snipit looks like it can easily be molded into a system of my previous description.

Sorry for having such small contribution to this, i am more than confused.

Flamestrike
22.01.2006, 18:09
The one ur talking about it has already been done ages ago, but didn't got shared.

dayne411
22.01.2006, 19:29
yea thats my point, i figured maybe as a community we could compile one for share =S