[NEWBIE] Question about interpret_espec()

From: Templar Viper (templarviper@hotmail.com)
Date: 04/29/02

Excuse me for this completely moronic question, but I pulled my hair out for this one. The function interpret_espec(), located in db.c, causes me some problems. I've adjusted olc, and the builder can choose different attack types (hit, sting etc), and a certain percentage of chance that the attack is actually made. So you could have 4 attack types, from which 1 attacks each round, but the other attacks could only be made once in every four rounds, depending on the builders choice. So far so good. I've managed to make olc actually save the variables into the mob-file, the problem is that I can't get them out anymore.

This is an example file setup:
<-rest of mob file->
BareHandAttack: 2
Att1: 14 (type of weapon) 100 (percentage)
Att2: 9 100
Att3: 2 43
Now in interpret_espec() I want this to be loaded. An example setup.

CASE("BareHandAttack") {
    RANGE(0, 99);
    mob_proto[i].mob_specials.attack_type = num_arg;

I wanted to extract the two variables from one line, so I made this:

CASE("Att1") {
 TRANGE(0, 100);
 T2RANGE(0, 100);  
 sscanf(line, "Att1: %d %d", &t, &t2);
   mob_proto[i].mob_specials.attack1 = t;
   mob_proto[i].mob_specials.attackpercentage1 = t2; 

For some reason or another the variables don't seem to load properly. Sorry once again for this question.

   | FAQ: http://qsilver.queensu.ca/~fletchra/Circle/list-faq.html |
   | Archives: http://post.queensu.ca/listserv/wwwarch/circle.html |
   | Newbie List:  http://groups.yahoo.com/group/circle-newbies/   |

This archive was generated by hypermail 2b30 : 06/25/03 PDT