Author Topic: Auto-aim  (Read 7087 times)

Offline Plech

  • I'm a loner.
Auto-aim
« on: February 26, 2013, 02:53:31 pm »
Hello everyone. Can anyone please help me with making of auto-aim? im lil lost :/
alias Pic Ho.

Offline wladimiiir

  • Rotator
  • Independent FOnline developer
Re: Auto-aim
« Reply #1 on: February 26, 2013, 03:18:37 pm »
You have to set aim variable to desired hit location in client_main.fos:
Code: [Select]
void hit_aim( uint8& aim )
{
if(GetAutoAim() == HIT_LOCATION_UNCALLED || GetAutoAim() == HIT_LOCATION_NONE)
return;

CritterCl@ chosen = GetChosen();
if(!valid(chosen))
return;

uint8 mode = 0;
ProtoItem@ proto = chosen.GetSlotProto(SLOT_HAND1, mode);
if(mode == 0 && proto.Weapon_Aim_0 && chosen.Trait[TRAIT_FAST_SHOT] == 0)
aim = GetAutoAim();
}

GetAutoAim() should return value you have set up via shortkeys or via GUI actions (one of the HIT_LOCATION_* values).

The following solution will change autoaim with clicking on bottom-right corner of weapon slot (where "target" icon appears).

File: auto_aim.fos (don't forget to add "@ client module auto_aim" to scripts.cfg)
Code: [Select]
#include "_client_defines.fos"
#include "client_gui_h.fos"
#include "_colors.fos"
#include "_macros.fos"

uint8 autoAim = HIT_LOCATION_UNCALLED;
IGUIElementTextOpt@ AutoAimText;

//import void InitAutoAim() from "auto_aim";
void InitAutoAim()
{
@AutoAimText = GUI_AddText(CLIENT_MAIN_SCREEN_GAME, "", 575, 95)
.TextOptions(FONT_FAT, COLOR_SAND, FT_CENTERR)
.TextBoxSize(30, 20)
;
GUI_AddButton(CLIENT_MAIN_SCREEN_GAME, 585, 95)
.ClickableZone(20, 20)
.CallbackMouseClick(ChangeAutoAimAction())
.CallbackDraw(AutoAimDrawer())
;
}

//import uint8 GetAutoAim() from "auto_aim";
uint8 GetAutoAim()
{
return autoAim;
}

class ChangeAutoAimAction : IGUIElementCallbackMouseClick
{
void OnMouseClick(int id, int click) override
{
if(click == MOUSE_CLICK_LEFT)
autoAim = (autoAim + 1) % (HIT_LOCATION_GROIN + 1);
else if(click == MOUSE_CLICK_RIGHT)
if(autoAim == 0)
autoAim = HIT_LOCATION_GROIN;
else
autoAim--;
}

}

class AutoAimDrawer : IGUIElementCallbackDraw
{
void OnDraw(int) override
{
if(!valid(AutoAimText))
InitAutoAim();

RefreshAutoAimText();
}

void RefreshAutoAimText()
{
CritterCl@ chosen = GetChosen();
if(!valid(chosen))
return;

ItemCl@ item = chosen.GetItem(0, SLOT_HAND1);
if(valid(item))
{
int use = _WeaponModeUse(item.Mode);
int aim = _WeaponModeAim(item.Mode);
if(use != 0 || (aim != HIT_LOCATION_NONE && aim != HIT_LOCATION_UNCALLED))
{
AutoAimText.setText("");
return;
}
}


string text = "";
switch(autoAim)
{
case HIT_LOCATION_EYES:
text = "E";
break;
case HIT_LOCATION_HEAD:
text = "H";
break;
case HIT_LOCATION_TORSO:
text = "T";
break;
case HIT_LOCATION_LEFT_ARM:
text = "LA";
break;
case HIT_LOCATION_RIGHT_ARM:
text = "RA";
break;
case HIT_LOCATION_LEFT_LEG:
text = "LL";
break;
case HIT_LOCATION_RIGHT_LEG:
text = "RL";
break;
case HIT_LOCATION_GROIN:
text = "G";
break;
}

AutoAimText.setText(text);
}
}

In client_main.fos add imports from auto_aim.fos and add InitAutoAim(); to start() method.

Hope it helps. ;)


Offline Plech

  • I'm a loner.
Re: Auto-aim
« Reply #2 on: February 26, 2013, 04:07:32 pm »
a few errors scared me :D
Code: [Select]
[01:19:165] Script message: auto_aim : Error : Identifier 'IGUIElementTextOpt' is not a data type : 91, 1.
[01:19:165] Script message: auto_aim : Error : Missing implementation of 'void IGUIElementCallbackMouseClick::OnMouseClick(int)' : 111, 7.
[01:19:165] Script message: auto_aim : Error : Method 'void ChangeAutoAimAction::OnMouseClick(int, int)' marked as override but does not replace any base class or interface method : 111, 7.
[01:19:165] Script message: auto_aim : Error : Missing implementation of 'void IGUIElementCallbackDraw::OnDraw()' : 126, 7.
[01:19:165] Script message: auto_aim : Error : Method 'void AutoAimDrawer::OnDraw(int)' marked as override but does not replace any base class or interface method : 126, 7.
[01:19:166] Script message: auto_aim : Info : Compiling void AutoAimDrawer::OnDraw(int) : 128, 2.
[01:19:166] Script message: auto_aim : Error : Object handle is not supported for this type : 130, 8.
[01:19:166] Script message: auto_aim : Error : Expression must be of boolean type : 130, 6.
[01:19:167] Script message: auto_aim : Info : Compiling void AutoAimDrawer::RefreshAutoAimText() : 136, 2.
[01:19:167] Script message: auto_aim : Error : Illegal operation on 'int&' : 149, 16.
[01:19:167] Script message: auto_aim : Error : Illegal operation on 'int&' : 183, 14.
[01:19:168] Script message: auto_aim : Info : Compiling void InitAutoAim() : 93, 1.
[01:19:168] Script message: auto_aim : Error : No matching signatures to 'GUI_AddText(const uint, string@&, const uint, const uint)' : 95, 15.
[01:19:168] Script message: auto_aim : Error : Illegal operation on 'const int' : 96, 2.
[01:19:168] Script message: auto_aim : Error : Object handle is not supported for this type : 95, 2.
[01:19:168] Script message: auto_aim : Error : No matching signatures to 'GUI_AddButton(const uint, const uint, const uint)' : 99, 2.
[01:19:168] Script message: auto_aim : Error : Illegal operation on 'const int' : 100, 2.
[01:19:169] Script::LoadScript - Unable to Build module<auto_aim>, result<-1>.
[01:19:169] FOServer::ReloadClientScripts - Unable to load client script<auto_aim>.
[01:19:170] Script::BindImportedFunctions - Fail to bind imported functions, module<client_main>, error<-19>.
alias Pic Ho.

Offline Plech

  • I'm a loner.
Re: Auto-aim
« Reply #3 on: February 26, 2013, 07:43:39 pm »
now its without errors but still dont works.
Code: [Select]
#include "_client_defines.fos"
#include "client_gui_h.fos"
#include "_colors.fos"
#include "_macros.fos"

uint8 autoAim = HIT_LOCATION_UNCALLED;
IGUIElementOpt@ AutoAimText;

//import void InitAutoAim() from "auto_aim";
void InitAutoAim()
{
@AutoAimText = GUI_AddScreenElement(CLIENT_MAIN_SCREEN_GAME, "", 575, 95)
.Text("N",FONT_FALLOUT, COLOR_SAND, COLOR_RED, FT_CENTERR)
//.TextBoxSize(30, 20)
;
GUI_AddScreenElement(CLIENT_MAIN_SCREEN_GAME, "", 585, 95)
//.ClickableZone(20, 20)
.CallbackMouseClick(ChangeAutoAimAction())
.CallbackDraw(AutoAimDrawer())
;
}

//import uint8 GetAutoAim() from "auto_aim";
uint8 GetAutoAim()
{
return autoAim;
}

class ChangeAutoAimAction : IGUIElementCallbackMouseClick
{
void OnMouseClick(int click) //override
{
if(click == MOUSE_CLICK_LEFT)
autoAim = (autoAim + 1) % (HIT_LOCATION_GROIN + 1);
else if(click == MOUSE_CLICK_RIGHT)
if(autoAim == 0)
autoAim = HIT_LOCATION_GROIN;
else
autoAim--;
}

}

class AutoAimDrawer : IGUIElementCallbackDraw
{
void OnDraw() //override
{
if(!valid(AutoAimText))
InitAutoAim();

RefreshAutoAimText();
}

void RefreshAutoAimText()
{
CritterCl@ chosen = GetChosen();
if(!valid(chosen))
return;

ItemCl@ item = chosen.GetItem(0, SLOT_HAND1);
if(valid(item))
{
int use = _WeaponModeUse(item.Mode);
int aim = _WeaponModeAim(item.Mode);
if(use != 0 || (aim != HIT_LOCATION_NONE && aim != HIT_LOCATION_UNCALLED))
{
AutoAimText.Text("N",FONT_FALLOUT, COLOR_SAND, COLOR_RED, FT_CENTERR);
return;
}
}


string text = "N";
switch(autoAim)
{
case HIT_LOCATION_EYES:
text = "E";
break;
case HIT_LOCATION_HEAD:
text = "H";
break;
case HIT_LOCATION_TORSO:
text = "T";
break;
case HIT_LOCATION_LEFT_ARM:
text = "LA";
break;
case HIT_LOCATION_RIGHT_ARM:
text = "RA";
break;
case HIT_LOCATION_LEFT_LEG:
text = "LL";
break;
case HIT_LOCATION_RIGHT_LEG:
text = "RL";
break;
case HIT_LOCATION_GROIN:
text = "G";
break;
}

AutoAimText.Text(text,FONT_FALLOUT, COLOR_SAND, COLOR_RED, FT_CENTERR);
}
}

any ideas?
alias Pic Ho.

Offline wladimiiir

  • Rotator
  • Independent FOnline developer
Re: Auto-aim
« Reply #4 on: February 27, 2013, 12:53:43 pm »
now its without errors but still dont works.
It depends on how you have solved it. :)

Offline Plech

  • I'm a loner.
Re: Auto-aim
« Reply #5 on: February 27, 2013, 12:58:49 pm »
now i got this.

Code: [Select]
#include "_client_defines.fos"
#include "client_gui_h.fos"
#include "_colors.fos"
#include "_macros.fos"

uint8 autoAim = HIT_LOCATION_UNCALLED;
IGUIElementOpt@ AutoAimText;

void InitAutoAim()
{
    TestScreenButton2 buttonAction;
    @AutoAimText = GUI_AddScreenElement( CLIENT_MAIN_SCREEN_GAME, "ageoff.frm", 150, 50 )
    .CallbackMouseClick( buttonAction )
    .DownPic( "ageon.frm" )
    .Text( "Aim: N", FONT_FALLOUT, COLOR_DGREEN, COLOR_DRED, FT_CENTERX | FT_CENTERY | FT_NOBREAK );
}

class TestScreenButton2 : IGUIElementCallbackMouseClick
{
    void OnMouseClick(int click) override
{

autoAim = (autoAim + 1) % (HIT_LOCATION_GROIN + 1);

CritterCl@ chosen = GetChosen();
if(!valid(chosen))
return;

ItemCl@ item = chosen.GetItem(0, SLOT_HAND1);
if(valid(item))
{
int use = _WeaponModeUse(item.Mode);
int aim = _WeaponModeAim(item.Mode);
if(use != 0 || (aim != HIT_LOCATION_NONE && aim != HIT_LOCATION_UNCALLED))
{
AutoAimText.Text( "Aim:none", FONT_FALLOUT, COLOR_DGREEN, COLOR_DRED , FT_CENTERX | FT_CENTERY | FT_NOBREAK);
return;
}
}


string text = "";
switch(autoAim)
{
case HIT_LOCATION_EYES:
text = "Aim: E";
break;
case HIT_LOCATION_HEAD:
text = "Aim: H";
break;
case HIT_LOCATION_TORSO:
text = "Aim: T";
break;
case HIT_LOCATION_LEFT_ARM:
text = "Aim: LA";
break;
case HIT_LOCATION_RIGHT_ARM:
text = "Aim: RA";
break;
case HIT_LOCATION_LEFT_LEG:
text = "Aim: LL";
break;
case HIT_LOCATION_RIGHT_LEG:
text = "Aim: RL";
break;
case HIT_LOCATION_GROIN:
text = "Aim: G";
break;
}

AutoAimText.Text( text, FONT_FALLOUT, COLOR_DGREEN, COLOR_DRED, FT_CENTERX | FT_CENTERY | FT_NOBREAK);
}
}

uint8 GetAutoAim(){ return autoAim;}


it works, only not changing the text of button after clicking. it will change the text only after relog.
alias Pic Ho.

Offline wladimiiir

  • Rotator
  • Independent FOnline developer
Re: Auto-aim
« Reply #6 on: February 27, 2013, 03:38:48 pm »
I am sorry, I forgot to mention that I am using Client Gui Mod v0.4b.

Could not find zip file of this mod but here are my local files that you need:
Download link

After copying them to scripts folder, revert your changes to original auto_aim.fos.

Let me know, if you have any troubles with that. ;)

Offline Plech

  • I'm a loner.
Re: Auto-aim
« Reply #7 on: February 27, 2013, 03:58:45 pm »
its for revisin 252. im using 388.


Code: [Select]
[02:52:319] Script message: client_gui : Info : Compiling void GUI_Init() : 2735, 1.
[02:52:319] Script message: client_gui : Error : 'DIK_NUMPADEQUALS' is not declared : 2841, 10.
[02:52:319] Script message: client_gui : Error : 'DIK_NUMPADCOMMA' is not declared : 2842, 10.
[02:52:351] Script::LoadScript - Unable to Build module<client_gui>, result<-1>.
[02:52:351] FOServer::ReloadClientScripts - Unable to load client script<client_gui>.
[02:52:624] Script message: client_screen_test : Error : Missing implementation of 'void IGUIElementCallbackMouseClick::OnMouseClick(int, int)' : 354, 7.
[02:52:624] Script message: client_screen_test : Error : Missing implementation of 'void IGUIElementCallbackMouseClick::OnMouseClick(int, int)' : 363, 7.
[02:52:624] Script message: client_screen_test : Error : Missing implementation of 'void IGUIElementCallbackMouseClick::OnMouseClick(int, int)' : 371, 7.
[02:52:624] Script message: client_screen_test : Error : Missing implementation of 'void IGUIElementCallbackInit::OnInit(int)' : 379, 7.
[02:52:624] Script message: client_screen_test : Error : Missing implementation of 'bool IGUIElementCallbackKeyPress::OnKeyPress(uint8, uint8)' : 379, 7.
[02:52:626] Script message: client_screen_test : Info : Compiling void TestScreen::OnMove(int, int) : 392, 2.
[02:52:626] Script message: client_screen_test : Error : No matching signatures to 'IGUIScreenOpt::GetPosX()' : 395, 37.
[02:52:626] Script message: client_screen_test : Error : No matching signatures to 'IGUIScreenOpt::GetPosY()' : 395, 66.
[02:52:629] Script message: client_screen_test : Info : Compiling void InitTestScreen() : 414, 1.
[02:52:629] Script message: client_screen_test : Error : No matching signatures to 'GUI_AddScreenElement(const uint, string@&, const uint, const uint)' : 417, 2.
[02:52:629] Script message: client_screen_test : Info : Candidates are: : 417, 2.
[02:52:629] Script message: client_screen_test : Info : IGUIElementOpt@ GUI_AddScreenElement(int) : 417, 2.
[02:52:629] Script message: client_screen_test : Info : IGUIElementOpt@ GUI_AddScreenElement(int, int, int, int, int) : 417, 2.
[02:52:629] Script message: client_screen_test : Error : Illegal operation on 'const int' : 418, 2.
[02:52:629] Script message: client_screen_test : Error : No matching signatures to 'GUI_AddScreenElement(const uint, string@&, const uint, const uint)' : 432, 2.
[02:52:629] Script message: client_screen_test : Info : Candidates are: : 432, 2.
[02:52:629] Script message: client_screen_test : Info : IGUIElementOpt@ GUI_AddScreenElement(int) : 432, 2.
[02:52:629] Script message: client_screen_test : Info : IGUIElementOpt@ GUI_AddScreenElement(int, int, int, int, int) : 432, 2.
[02:52:629] Script message: client_screen_test : Error : Illegal operation on 'const int' : 433, 2.
[02:52:629] Script message: client_screen_test : Error : No matching signatures to 'GUI_AddScreenElement(const uint, string@&, const uint, const uint)' : 437, 2.
[02:52:629] Script message: client_screen_test : Info : Candidates are: : 437, 2.
[02:52:629] Script message: client_screen_test : Info : IGUIElementOpt@ GUI_AddScreenElement(int) : 437, 2.
[02:52:629] Script message: client_screen_test : Info : IGUIElementOpt@ GUI_AddScreenElement(int, int, int, int, int) : 437, 2.
[02:52:629] Script message: client_screen_test : Error : Illegal operation on 'const int' : 438, 2.
[02:52:629] Script message: client_screen_test : Error : No matching signatures to 'GUI_AddScreenElement(const uint, string@&, const uint, const uint)' : 442, 2.
[02:52:629] Script message: client_screen_test : Info : Candidates are: : 442, 2.
[02:52:629] Script message: client_screen_test : Info : IGUIElementOpt@ GUI_AddScreenElement(int) : 442, 2.
[02:52:629] Script message: client_screen_test : Info : IGUIElementOpt@ GUI_AddScreenElement(int, int, int, int, int) : 442, 2.
[02:52:629] Script message: client_screen_test : Error : Illegal operation on 'const int' : 443, 2.
[02:52:630] Script::LoadScript - Unable to Build module<client_screen_test>, result<-1>.
[02:52:630] FOServer::ReloadClientScripts - Unable to load client script<client_screen_test>.
[02:54:916] Script message: radio : Error : Missing implementation of 'void IGUIElementCallbackInit::OnInit(int)' : 512, 7.
[02:54:916] Script message: radio : Error : Missing implementation of 'bool IGUIElementCallbackKeyPress::OnKeyPress(uint8, uint8)' : 512, 7.
[02:54:916] Script message: radio : Error : Missing implementation of 'void IGUIElementCallbackMouseClick::OnMouseClick(int, int)' : 561, 7.
[02:54:916] Script message: radio : Error : Missing implementation of 'void IGUIElementCallbackInit::OnInit(int)' : 579, 7.
[02:54:916] Script message: radio : Error : Missing implementation of 'void IGUIElementCallbackMouseClick::OnMouseClick(int, int)' : 579, 7.
[02:54:916] Script message: radio : Error : Missing implementation of 'void IGUIElementCallbackInit::OnInit(int)' : 612, 7.
[02:54:916] Script message: radio : Error : Missing implementation of 'void IGUIElementCallbackMouseClick::OnMouseClick(int, int)' : 612, 7.
[02:54:922] Script message: radio : Info : Compiling void TextboxChannel::OnKeyPress(uint8, uint8) : 529, 2.
[02:54:922] Script message: radio : Error : No matching signatures to 'IGUIElementOpt::GetText()' : 531, 23.
[02:54:922] Script message: radio : Error : Can't implicitly convert from 'const int' to 'string@&'. : 531, 15.
[02:54:923] Script message: radio : Info : Compiling void TextboxChannel::SetChannel(uint16) : 554, 2.
[02:54:923] Script message: radio : Error : No matching signatures to 'IGUIElementOpt::Text(string@&, const uint, const uint, const uint, uint)' : 557, 11.
[02:54:924] Script message: radio : Info : Compiling void ButtonSendRecv::SetState(bool) : 606, 2.
[02:54:924] Script message: radio : Error : No matching signatures to 'IGUIElementOpt::Switch(bool)' : 608, 11.
[02:54:924] Script message: radio : Info : Compiling void ButtonBroadcast::SetState(bool) : 641, 2.
[02:54:924] Script message: radio : Error : No matching signatures to 'IGUIElementOpt::Switch(bool)' : 643, 11.
[02:54:928] Script message: radio : Info : Compiling void InitRadioScreen() : 647, 1.
[02:54:928] Script message: radio : Error : No matching signatures to 'GUI_AddScreenElement(const uint, <null handle>, const uint, const uint)' : 656, 2.
[02:54:928] Script message: radio : Info : Candidates are: : 656, 2.
[02:54:928] Script message: radio : Info : IGUIElementOpt@ GUI_AddScreenElement(int) : 656, 2.
[02:54:928] Script message: radio : Info : IGUIElementOpt@ GUI_AddScreenElement(int, int, int, int, int) : 656, 2.
[02:54:928] Script message: radio : Error : Illegal operation on 'const int' : 657, 2.
[02:54:928] Script message: radio : Error : No matching signatures to 'GUI_AddScreenElement(const uint, <null handle>, const uint, const uint)' : 661, 2.
[02:54:928] Script message: radio : Info : Candidates are: : 661, 2.
[02:54:928] Script message: radio : Info : IGUIElementOpt@ GUI_AddScreenElement(int) : 661, 2.
[02:54:928] Script message: radio : Info : IGUIElementOpt@ GUI_AddScreenElement(int, int, int, int, int) : 661, 2.
[02:54:928] Script message: radio : Error : Illegal operation on 'const int' : 662, 2.
[02:54:928] Script message: radio : Error : No matching signatures to 'GUI_AddScreenElement(const uint, <null handle>, const uint, const uint)' : 667, 2.
[02:54:928] Script message: radio : Info : Candidates are: : 667, 2.
[02:54:928] Script message: radio : Info : IGUIElementOpt@ GUI_AddScreenElement(int) : 667, 2.
[02:54:928] Script message: radio : Info : IGUIElementOpt@ GUI_AddScreenElement(int, int, int, int, int) : 667, 2.
[02:54:928] Script message: radio : Error : Illegal operation on 'const int' : 668, 2.
[02:54:928] Script message: radio : Error : No matching signatures to 'GUI_AddScreenElement(const uint, <null handle>, const uint, const uint)' : 672, 2.
[02:54:928] Script message: radio : Info : Candidates are: : 672, 2.
[02:54:928] Script message: radio : Info : IGUIElementOpt@ GUI_AddScreenElement(int) : 672, 2.
[02:54:928] Script message: radio : Info : IGUIElementOpt@ GUI_AddScreenElement(int, int, int, int, int) : 672, 2.
[02:54:928] Script message: radio : Error : Illegal operation on 'const int' : 673, 2.
[02:54:928] Script message: radio : Error : No matching signatures to 'GUI_AddScreenElement(const uint, <null handle>, const uint, const uint)' : 677, 2.
[02:54:928] Script message: radio : Info : Candidates are: : 677, 2.
[02:54:928] Script message: radio : Info : IGUIElementOpt@ GUI_AddScreenElement(int) : 677, 2.
[02:54:928] Script message: radio : Info : IGUIElementOpt@ GUI_AddScreenElement(int, int, int, int, int) : 677, 2.
[02:54:928] Script message: radio : Error : Illegal operation on 'const int' : 678, 2.
[02:54:928] Script message: radio : Error : No matching signatures to 'GUI_AddScreenElement(const uint, <null handle>, const uint, const uint)' : 681, 2.
[02:54:928] Script message: radio : Info : Candidates are: : 681, 2.
[02:54:928] Script message: radio : Info : IGUIElementOpt@ GUI_AddScreenElement(int) : 681, 2.
[02:54:928] Script message: radio : Info : IGUIElementOpt@ GUI_AddScreenElement(int, int, int, int, int) : 681, 2.
[02:54:928] Script message: radio : Error : Illegal operation on 'const int' : 682, 2.
[02:54:929] Script message: radio : Error : No matching signatures to 'GUI_AddScreenElement(const uint, <null handle>, const uint, const uint)' : 684, 2.
[02:54:929] Script message: radio : Info : Candidates are: : 684, 2.
[02:54:929] Script message: radio : Info : IGUIElementOpt@ GUI_AddScreenElement(int) : 684, 2.
[02:54:929] Script message: radio : Info : IGUIElementOpt@ GUI_AddScreenElement(int, int, int, int, int) : 684, 2.
[02:54:929] Script message: radio : Error : Illegal operation on 'const int' : 685, 2.
[02:54:929] Script message: radio : Error : No matching signatures to 'GUI_AddScreenElement(const uint, <null handle>, const uint, const uint)' : 689, 2.
[02:54:929] Script message: radio : Info : Candidates are: : 689, 2.
[02:54:929] Script message: radio : Info : IGUIElementOpt@ GUI_AddScreenElement(int) : 689, 2.
[02:54:929] Script message: radio : Info : IGUIElementOpt@ GUI_AddScreenElement(int, int, int, int, int) : 689, 2.
[02:54:929] Script message: radio : Error : Illegal operation on 'const int' : 690, 2.
[02:54:929] Script message: radio : Error : No matching signatures to 'GUI_AddScreenElement(const uint, <null handle>, const uint, const uint)' : 696, 2.
[02:54:929] Script message: radio : Info : Candidates are: : 696, 2.
[02:54:929] Script message: radio : Info : IGUIElementOpt@ GUI_AddScreenElement(int) : 696, 2.
[02:54:929] Script message: radio : Info : IGUIElementOpt@ GUI_AddScreenElement(int, int, int, int, int) : 696, 2.
[02:54:929] Script message: radio : Error : Illegal operation on 'const int' : 697, 2.
[02:54:929] Script message: radio : Error : No matching signatures to 'GUI_AddScreenElement(const uint, <null handle>, const uint, const uint)' : 707, 3.
[02:54:929] Script message: radio : Info : Candidates are: : 707, 3.
[02:54:929] Script message: radio : Info : IGUIElementOpt@ GUI_AddScreenElement(int) : 707, 3.
[02:54:929] Script message: radio : Info : IGUIElementOpt@ GUI_AddScreenElement(int, int, int, int, int) : 707, 3.
[02:54:929] Script message: radio : Error : Illegal operation on 'const int' : 708, 3.
[02:54:929] Script message: radio : Error : No matching signatures to 'GUI_AddScreenElement(const uint, <null handle>, const uint, const uint)' : 714, 3.
[02:54:929] Script message: radio : Info : Candidates are: : 714, 3.
[02:54:929] Script message: radio : Info : IGUIElementOpt@ GUI_AddScreenElement(int) : 714, 3.
[02:54:929] Script message: radio : Info : IGUIElementOpt@ GUI_AddScreenElement(int, int, int, int, int) : 714, 3.
[02:54:929] Script message: radio : Error : Illegal operation on 'const int' : 715, 3.
[02:54:929] Script message: radio : Error : No matching signatures to 'GUI_AddScreenElement(const uint, <null handle>, const uint, const uint)' : 720, 3.
[02:54:929] Script message: radio : Info : Candidates are: : 720, 3.
[02:54:929] Script message: radio : Info : IGUIElementOpt@ GUI_AddScreenElement(int) : 720, 3.
[02:54:929] Script message: radio : Info : IGUIElementOpt@ GUI_AddScreenElement(int, int, int, int, int) : 720, 3.
[02:54:929] Script message: radio : Error : Illegal operation on 'const int' : 721, 3.
[02:54:930] Script::LoadScript - Unable to Build module<radio>, result<-1>.
[02:54:930] FOServer::ReloadClientScripts - Unable to load client script<radio>.
[02:58:247] Script::BindImportedFunctions - Fail to bind imported functions, module<client_main>, error<-19>.
[02:58:247] Script::BindImportedFunctions - Fail to bind imported functions, module<parameters>, error<-19>.
[02:58:247] Script::BindImportedFunctions - Fail to bind imported functions, module<chosen_tabs>, error<-19>.
[02:58:247] Script message: System function : Error : Identifier 'IGUIScreenOpt' is not a data type : 1, 1.
[02:58:247] Script message: System function : Error : Identifier 'IGUIElementOpt' is not a data type : 1, 1.
[02:58:247] Script message: System function : Error : Identifier 'IGUIElementButtonOpt' is not a data type : 1, 1.
[02:58:247] Script message: System function : Error : Identifier 'IGUIElementCheckBoxOpt' is not a data type : 1, 1.
[02:58:247] Script message: System function : Error : Identifier 'IGUIElementSliderControlOpt' is not a data type : 1, 1.
[02:58:247] Script message: System function : Error : Identifier 'IGUIElementImageOpt' is not a data type : 1, 1.
[02:58:247] Script message: System function : Error : Identifier 'IGUIElementTextOpt' is not a data type : 1, 1.
[02:58:247] Script message: System function : Error : Identifier 'IGUIElementEditBoxOpt' is not a data type : 1, 1.
[02:58:247] Script message: System function : Error : Identifier 'IGUIElementOpt' is not a data type : 1, 1.
[02:58:247] Script message: System function : Error : Identifier 'IGUIElementButtonOpt' is not a data type : 1, 1.
[02:58:247] Script message: System function : Error : Identifier 'IGUIElementCheckBoxOpt' is not a data type : 1, 1.
[02:58:248] Script message: System function : Error : Identifier 'IGUIElementSliderControlOpt' is not a data type : 1, 1.
[02:58:248] Script message: System function : Error : Identifier 'IGUIElementImageOpt' is not a data type : 1, 1.
[02:58:248] Script message: System function : Error : Identifier 'IGUIElementTextOpt' is not a data type : 1, 1.
[02:58:248] Script message: System function : Error : Identifier 'IGUIElementEditBoxOpt' is not a data type : 1, 1.
[02:58:248] Script message: System function : Error : Identifier 'IGUIElementTextOpt' is not a data type : 1, 1.
[02:58:248] Script message: System function : Error : Identifier 'IGUIElementOpt' is not a data type : 1, 28.
[02:58:248] Script message: System function : Error : Identifier 'IGUIScreenCallbackShow' is not a data type : 1, 28.
[02:58:248] Script message: System function : Error : Identifier 'IGUIScreenCallbackShow' is not a data type : 1, 26.
[02:58:248] Script message: System function : Error : Identifier 'IGUIScreenCallbackShow' is not a data type : 1, 28.
[02:58:248] Script message: System function : Error : Identifier 'IGUIScreenOpt' is not a data type : 1, 1.
[02:58:248] Script message: System function : Error : Identifier 'IGUIElementOpt' is not a data type : 1, 1.
[02:58:248] Script message: System function : Error : Identifier 'IGUIElementCheckBoxOpt' is not a data type : 1, 1.
[02:58:248] Script message: System function : Error : Identifier 'IGUIElementSliderControlOpt' is not a data type : 1, 1.
[02:58:248] Script message: System function : Error : Identifier 'IGUIElementEditBoxOpt' is not a data type : 1, 1.
[02:58:248] Script::BindImportedFunctions - Fail to bind imported functions, module<auto_aim>, error<-19>.
[02:58:699] Reload client scripts complete.
alias Pic Ho.

Offline wladimiiir

  • Rotator
  • Independent FOnline developer
Re: Auto-aim
« Reply #8 on: February 27, 2013, 04:05:51 pm »
I am using it on the latest revision, so this should not be an issue. Try having a look on the "stuff" I sent you via personal message. :)

Offline Plech

  • I'm a loner.
Re: Auto-aim
« Reply #9 on: February 27, 2013, 05:30:13 pm »
i replaced all what i should and not it says this:
Code: [Select]
[01:335] Reload scripts...
[17:642] Script message: radio : Info : Compiling void EditRadioSettings(Critter&inout, Item&inout) : 3, 1.
[17:642] Script message: radio : Error : Expected expression value : 5, 2.
[17:642] Script message: radio : Info : Compiling void unsafe_ChangeChannel(Critter&inout, int, int, int, string@, int[]@) : 8, 1.
[17:642] Script message: radio : Error : Expected expression value : 10, 2.
[17:642] Script message: radio : Error : Expected expression value : 11, 2.
[17:642] Script message: radio : Error : Expected expression value : 13, 2.
[17:642] Script message: radio : Error : Expected expression value : 16, 2.
[17:642] Script message: radio : Error : Expected expression value : 17, 2.
[17:642] Script message: radio : Info : Compiling void unsafe_ChangeActivity(Critter&inout, int, int, int, string@, int[]@) : 20, 1.
[17:642] Script message: radio : Error : Expected expression value : 22, 2.
[17:642] Script message: radio : Error : Expected expression value : 23, 2.
[17:642] Script message: radio : Error : Expected expression value : 26, 2.
[17:642] Script message: radio : Error : Expected expression value : 34, 2.
[17:642] Script message: radio : Info : Compiling void unsafe_ChangeBroadcast(Critter&inout, int, int, int, string@, int[]@) : 44, 1.
[17:642] Script message: radio : Error : Expected expression value : 46, 2.
[17:642] Script message: radio : Error : Expected expression value : 47, 2.
[17:642] Script message: radio : Error : Expected expression value : 50, 2.
[17:643] Script message: radio : Error : Expected expression value : 62, 2.
[17:643] Script message: radio : Info : Compiling void SetInHand(Critter&inout, int, int, int) : 75, 1.
[17:643] Script message: radio : Error : Expected expression value : 77, 2.
[17:643] Script message: radio : Error : Expected expression value : 78, 2.
[17:643] Script message: radio : Error : Expected expression value : 81, 2.
[17:643] Script message: radio : Error : Expected expression value : 82, 2.
[17:643] Script message: radio : Error : Expected expression value : 83, 2.
[17:643] Script message: radio : Error : Expected expression value : 84, 2.
[17:643] Script message: radio : Error : Expected expression value : 85, 2.
[17:643] Script message: radio : Info : Compiling void UnsetInHand(Critter&inout, int, int, int) : 88, 1.
[17:643] Script message: radio : Error : Expected expression value : 90, 2.
[17:643] Script message: radio : Error : Expected expression value : 91, 2.
[17:643] Script message: radio : Error : Expected expression value : 94, 2.
[17:643] Script message: radio : Error : Expected expression value : 95, 2.
[17:643] Script::LoadScript - Unable to Build module<radio>, result<-1>.
alias Pic Ho.

Re: Auto-aim
« Reply #10 on: February 27, 2013, 06:58:49 pm »
After installing Client Gui Mod v0.4b you need to use new radio script.
You can take it with gui mod here: http://netload.in/dateiNNgzS2SShq/client_gui_mod_v04c_368.zip.htm

Offline Plech

  • I'm a loner.
Re: Auto-aim
« Reply #11 on: February 27, 2013, 07:18:44 pm »
oh thanx. gonna try it
alias Pic Ho.

Offline Plech

  • I'm a loner.
Re: Auto-aim
« Reply #12 on: February 27, 2013, 07:40:45 pm »
done, and again...

Code: [Select]
[01:09:173] Reload client scripts...
[01:13:631] Script message: auto_aim : Info : Compiling void AutoAimDrawer::RefreshAutoAimText() : 406, 2.
[01:13:631] Script message: auto_aim : Error : No matching signatures to 'IGUIElementTextOpt::setText(string@&)' : 419, 17.
[01:13:631] Script message: auto_aim : Error : No matching signatures to 'IGUIElementTextOpt::setText(string&)' : 453, 15.
[01:13:634] Script::LoadScript - Unable to Build module<auto_aim>, result<-1>.
[01:13:634] FOServer::ReloadClientScripts - Unable to load client script<auto_aim>.
[01:13:635] Script::BindImportedFunctions - Fail to bind imported functions, module<client_main>, error<-19>

« Last Edit: February 27, 2013, 07:52:24 pm by Plech »
alias Pic Ho.

Offline Plech

  • I'm a loner.
Re: Auto-aim
« Reply #13 on: February 27, 2013, 08:03:45 pm »
hm. now no errors, but it dont show that damned button :D im thinking about suicide :D

edit: please lock this damned topic. i got it working. thanx to everyone for help and thanx to my heart for no heart attack while i was doing this....

« Last Edit: February 27, 2013, 08:21:59 pm by Plech »
alias Pic Ho.