A Alhifar Member May 21, 2009 #2 if( have_skill( $skill[madrigal] ) )... To buy a skill, I believe you would have to use visit_url()
mredge73 Member May 21, 2009 #3 the skill numbers go from 0 to 8201 for some reason looking at the mafia internal database. to get a list you will have to do something like this: Code: for i from 1 upto 8500 { skill it = to_skill(i); if( have_skill( it ) ) print(to_string(it)); } This takes a while so some other way may be more efficient, you can replace the print() with an array of skills if you like.
the skill numbers go from 0 to 8201 for some reason looking at the mafia internal database. to get a list you will have to do something like this: Code: for i from 1 upto 8500 { skill it = to_skill(i); if( have_skill( it ) ) print(to_string(it)); } This takes a while so some other way may be more efficient, you can replace the print() with an array of skills if you like.
Rinn Developer May 21, 2009 #4 This'll be much more efficient: Code: skill [int] skills; file_to_map("classskills.txt", skills); void main() { foreach i in skills { if(!have_skill(skills[i])) { remove skills[i]; } } foreach i in skills { print(skills[i]); } }
This'll be much more efficient: Code: skill [int] skills; file_to_map("classskills.txt", skills); void main() { foreach i in skills { if(!have_skill(skills[i])) { remove skills[i]; } } foreach i in skills { print(skills[i]); } }