This is what I have so far. I'm missing something, I know, Sami. Could you please supply a defines.txt that names all the variables you're using. It would be a big help. I'm going to try something similar, but simpler in a game I plan on working on next, so I have an active interest in seeing this code worked out.
#include "defines.txt"
if(isset(f99)){ // Double click with one click-disabler
v66+=1;
if(v66==2){
reset(f99);
}
}
if(isset(f60)){ // If movement flag is on
get.posn(o0,v40,v41);
if ((new_ego_x>v40 ||
new_ego_x<v40 ||
new_ego_y>v41 ||
new_ego_y<v41)){
v191-=1;
}
}
if(mouse_y < 147) {
// Walk-AP-Cost-Show-Code
if(mouse_button == 0 && isset(f50) && isset(f41) && !isset(f60)) {
v29 -= 8;
reposition.to.v(o10,v28,v29);
distance(o0,o10,v193);
reposition.to(o10,1,1);
set.text.attribute(0,0);
display(19,37," ");
if(v191 >= v193){
set.text.attribute(15,0);
display(19,37,"%v193");
}
else{
set.text.attribute(15,0);
display(19,37,"-");
}
}
// Movement
if(mouse_button == 1 && isset(f50) && isset(f41) && !isset(f60) && !isset(f99)) {
v29 -= 8;
reposition.to.v(o10,v28,v29);
distance(o0,o10,v193);
reposition.to(o10,1,1);
set.text.attribute(0,0);
display(19,37," ");
if(v191 >= v193){
v62=v193;
set(f99);
set(f60);
v63=v28;
v64=v29;
set.text.attribute(15,0);
display(19,37,"%v193");
move.obj.v(o0, v28, v29, 2, f255);
}
else{
set.text.attribute(15,0);
display(19,37,"-");
}
}
}
return();