Page 1 of 1

My method of write the script code.

PostPosted: Fri Apr 29, 2016 3:32 pm
by panic
1. material list.
- code convertor v1.56094-> v1.56095
download : http://cfile205.uf.daum.net/attach/2658 ... 00FE1579A7
- angry kirc noxedit version. 5 (enable script compiler..)
- dev c++(program)

2. write code...!
- run to 'dev c++'.
- and ctrl + N

3. write base function code...
/*map name(space bar)*/ <<-- you must write your map name
GLOBAL(){ //0
return;
}
GLOBAL(){ //1
int var_0; //getTrigger -2
int var_1; //getCaller -1
int var_2; //true 1
int var_3; //false 0
return;
}
MapInitialize(){ //2
return;
}

4. add your codes...

HelloWorld(){ //3
@PrintToAll("hello world !");
return;
}
//why not indent?!!
//but you must indent your codes...!!

Caution!
you should attach '@' mark to front of noxCode.

example code)
@create("urchinShaman",@wp("RotMeatWP"));
or
@create("UrchinShaman",@wp(2)); // 2 is waypoint number.

@enchant(Gvar_1,"ENCHANT_RUN",0f);
or
@enchant(-1,"ENCHANT_RUN",0f); //Gvar_1 is same to -1


5. save cpp file.

CAUTION
you must file name that 'map name_func' .

file name add '_func' .

and save at same local to 'code convertor' .

6. run to code convertor.

then input your map name.

7. click compile button in angrykic noxedit

click -> check your code error.
no code error then, map save.

Re: My method of write the script code.

PostPosted: Fri Apr 29, 2016 3:50 pm
by panic
using new syntax.

1.
@sin(number);
@cos(number);

2.
@for(variable=start;repeat;changed value);
codes
@end;

3.
@switch(var){
@case 1:
}

1. you use sin, cos function.

example code)

float var_0;
float var_1;
var_0 = @sin(30);
var_1 = @cos(30);


2. you use 'for' syntax.

@for(variable=start value;max_repeat;increase or decrease value);
codes...
@end;


example code)

@for(i1=0;10;1);
Gvar_4[i1] = @obj("ArrayGolemi1+1");
@enchant(Gvar_4[i1],"ENCHANT_HASTED",0f);
@end;

then result at below.

Gvar_4[0] = @obj("ArrayGolem1");
@enchant(Gvar_4[0],"ENCHANT_HASTED",0f);
Gvar_4[1] = @obj("ArrayGolem2");
@enchant(Gvar_4[1],"ENCHANT_HASTED",0f);
Gvar_4[2] = @obj("ArrayGolem3");
@enchant(Gvar_4[2],"ENCHANT_HASTED",0f);
Gvar_4[3] = @obj("ArrayGolem4");
@enchant(Gvar_4[3],"ENCHANT_HASTED",0f);
Gvar_4[4] = @obj("ArrayGolem5");
@enchant(Gvar_4[4],"ENCHANT_HASTED",0f);
Gvar_4[5] = @obj("ArrayGolem6");
@enchant(Gvar_4[5],"ENCHANT_HASTED",0f);
Gvar_4[6] = @obj("ArrayGolem7");
@enchant(Gvar_4[6],"ENCHANT_HASTED",0f);
Gvar_4[7] = @obj("ArrayGolem8");
@enchant(Gvar_4[7],"ENCHANT_HASTED",0f);
Gvar_4[8] = @obj("ArrayGolem9");
@enchant(Gvar_4[8],"ENCHANT_HASTED",0f);
Gvar_4[9] = @obj("ArrayGolem10");
@enchant(Gvar_4[9],"ENCHANT_HASTED",0f);

3. also you can syntax '@switch(var)'

@switch(variable){
@case 10:
@case 11:
@default:
}

example code)

int var_0;
@switch(var_0){
@case 0:
@PrintToAll("value at :" + @IntToString(var_0);
var_0 = 1;
@case 1:
@PrintToAll("value at :" + @IntToString(var_0);
var_0 = 2;
@case 2:
@PrintToAll("value at :" + @IntToString(var_0);
var_0 = 3;
@defalut:
var_0 = 0;
}
return;

run result:

touch switch>>
value at :0

touch switch>>
value at :1

touch switch>>
value at :2

touch switch>>
value at :0

....