Jump to content
  • 0

[Help] Compile ai.obj and erro class IsEventServer


Question

Posted

what is wrong with this line?

 

Warning: function [gg::IsEventServer()] has invalid ID: 000000000

 

line decompile:

class 1 citizen : default_npc

{

parameter:

string fnTradeSkill0 = "";

string fnTradeSkill1 = "";

string fnTradeSkill2 = "";

string fnHi = "chi.htm";

string fnFeudInfo = "defaultfeudinfo.htm";

string fnNoFeudInfo = "nofeudinfo.htm";

string fnYouAreChaotic = "wyac.htm";

string fnBracketL = "[";

string fnBracketR = "]";

int MoveAroundSocial = 0;

int MoveAroundSocial1 = 0;

int MoveAroundSocial2 = 0;

int HavePet = 0;

int silhouette = 1000130;

int FriendShip1 = 0;

int FriendShip2 = 0;

int FriendShip3 = 0;

int FriendShip4 = 0;

int FriendShip5 = 0;

string fnNoFriend = "";

int NoFnHi = 0;

 

handler:

EventHandler TALKED(talker)

{

if( talker.karma > 0 )

{

myself::ShowPage(talker,fnYouAreChaotic);

return;

}

if( NoFnHi == 1 )

{

return;

}

if( FriendShip1 == 0 )

{

myself::ShowPage(talker,fnHi);

}

else

{

if( myself::OwnItemCount(talker,FriendShip1) > 0 || myself::OwnItemCount(talker,FriendShip2) > 0 || myself::OwnItemCount(talker,FriendShip3) > 0 || myself::OwnItemCount(talker,FriendShip4) > 0 || myself::OwnItemCount(talker,FriendShip5) > 0 )

{

myself::ShowPage(talker,fnHi);

}

else

{

myself::ShowPage(talker,fnNoFriend);

}

}

}

 

EventHandler CREATED()

{

if( MoveAroundSocial > 0 || MoveAroundSocial1 > 0 )

{

myself::AddTimerEx(1671,10000);

}

if( HavePet == 1 )

{

myself::CreateOnePrivateEx(silhouette,"pet_around_pet_manager",0,0,myself::FloatToInt(( myself.sm.x + 10 )),myself::FloatToInt(( myself.sm.y + 10 )),myself::FloatToInt(myself.sm.z),0,0,0,0);

}

super;

}

 

EventHandler TIMER_FIRED_EX(timer_id)

{

if( timer_id == 1671 )

{

if( myself.sm.hp > ( myself.sm.max_hp * 0.400000 ) && myself.sm.alive != 0 && myself.p_state != 3 )

{

if( MoveAroundSocial > 0 || MoveAroundSocial1 > 0 )

{

if( MoveAroundSocial > 0 && gg::Rand(100) < 40 )

{

myself::AddEffectActionDesire(myself.sm,3,( ( MoveAroundSocial * 1000 ) / 30 ),50);

}

else

{

if( MoveAroundSocial1 > 0 && gg::Rand(100) < 40 )

{

myself::AddEffectActionDesire(myself.sm,2,( ( MoveAroundSocial1 * 1000 ) / 30 ),50);

}

}

}

}

myself::AddTimerEx(1671,10000);

}

super;

}

 

EventHandler MENU_SELECTED(talker,ask,reply,fhtml0)

{

if( ask == -1000 )

{

switch(reply)

{

case 0:

{

myself::ShowPage(talker,fnHi);

break;

}

case 1:

{

if( myself.sm.residence_id > 0 )

{

if( myself::Castle_GetPledgeId() )

{

myself::FHTML_SetFileName(fhtml0,fnFeudInfo);

myself::FHTML_SetStr(fhtml0,"my_pledge_name",myself::Castle_GetPledgeName());

myself::FHTML_SetStr(fhtml0,"my_owner_name",myself::Castle_GetOwnerName());

myself::FHTML_SetInt(fhtml0,"current_tax_rate",myself::Residence_GetTaxRateCurrent());

}

else

{

myself::FHTML_SetFileName(fhtml0,fnNoFeudInfo);

}

if( myself.sm.residence_id < 7 )

{

myself::FHTML_SetStr(fhtml0,"kingdom_name",myself::MakeFString(1001000,"","","","",""));

}

else

{

myself::FHTML_SetStr(fhtml0,"kingdom_name",myself::MakeFString(1001100,"","","","",""));

}

myself::FHTML_SetStr(fhtml0,"feud_name",myself::MakeFString(( 1001000 + myself.sm.residence_id ),"","","","",""));

myself::ShowFHTML(talker,fhtml0);

}

break;

}

}

}

if( ask == -303 )

{

if( reply == 203 )

{

if( myself::GetSSQStatus() == 3 )

{

if( myself::GetSSQPart(talker) != 0 )

{

myself::ShowMultisell(reply,talker);

}

}

}

else

{

if( reply == 532 || reply == 549 )

{

if( gg::IsEventServer() == 1 )

{

myself::ShowMultisell(reply,talker);

}

}

else

{

myself::ShowMultisell(reply,talker);

}

}

}

}

 

}

1 answer to this question

Recommended Posts

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.



×
×
  • Create New...