Jump to content
  • 0

Problem with the script


wOni

Question


  • Group:  Members
  • Topic Count:  10
  • Topics Per Day:  0.00
  • Content Count:  69
  • Reputation:   2
  • Joined:  04/20/13
  • Last Seen:  

Hello i just need help for 

AnnieRuru script

 

 

 

 

alter table guild add column woe_points int(11) default 0 after emblem_data, add index (woe_points);

 

 

prontera,155,181,5 script Woe Points 100,{
.@nb = query_sql( "select name, woe_points from guild order by woe_points desc limit 3", .@guild_name$, .@points );
for ( .@i = 0; .@i < .@nb; .@i++ ) {
if ( !.@points[.@i] ) break;
mes ( .@i +1 )+". "+ .@guild_name$[.@i] +" -> "+ .@points[.@i];
}
close;     <========
OnClock1930:
OnClock2000:
OnClock2030:
OnClock2100:
for ( .@i = 0; .@i < 30; .@i++ ) {
.@castle_guild_id = getcastledata( getvariableofnpc( .Castles$[.@i], "WOE_CONTROL" ), 1 );
if ( getvariableofnpc( .Active[0], "WOE_CONTROL" ) & 1 << .@i && .@castle_guild_id )
query_sql "update guild set woe_points = woe_points +1 where guild_id = "+ .@castle_guild_id;
}
end;
OnBreakEmp: // put doevent under OnAgitBreak ...
query_sql "update guild set woe_points = woe_points +1 where guild_id = "+ getcharid(2);
end;
}

 

When i click the npc mapserver say

(incorrect use of close command)

 

 

thank your for the help! :D

Link to comment
Share on other sites

4 answers to this question

Recommended Posts


  • Group:  Members
  • Topic Count:  23
  • Topics Per Day:  0.01
  • Content Count:  387
  • Reputation:   60
  • Joined:  10/08/13
  • Last Seen:  

Hello i just need help for 

AnnieRuru script

 

 

 

 

alter table guild add column woe_points int(11) default 0 after emblem_data, add index (woe_points);

 

 

prontera,155,181,5 script Woe Points 100,{

.@nb = query_sql( "select name, woe_points from guild order by woe_points desc limit 3", .@guild_name$, .@points );

for ( .@i = 0; .@i < .@nb; .@i++ ) {

if ( !.@points[.@i] ) break;

mes ( .@i +1 )+". "+ .@guild_name$[.@i] +" -> "+ .@points[.@i];

}

close;     <========

OnClock1930:

OnClock2000:

OnClock2030:

OnClock2100:

for ( .@i = 0; .@i < 30; .@i++ ) {

.@castle_guild_id = getcastledata( getvariableofnpc( .Castles$[.@i], "WOE_CONTROL" ), 1 );

if ( getvariableofnpc( .Active[0], "WOE_CONTROL" ) & 1 << .@i && .@castle_guild_id )

query_sql "update guild set woe_points = woe_points +1 where guild_id = "+ .@castle_guild_id;

}

end;

OnBreakEmp: // put doevent under OnAgitBreak ...

query_sql "update guild set woe_points = woe_points +1 where guild_id = "+ getcharid(2);

end;

}

 

When i click the npc mapserver say

(incorrect use of close command)

 

 

thank your for the help! :D

 

this lines

.@nb = query_sql( "select name, woe_points from guild order by woe_points desc limit 3", .@guild_name$, .@points );
for ( .@i = 0; .@i < .@nb; .@i++ ) {
if ( !.@points[.@i] ) break;
mes ( .@i +1 )+". "+ .@guild_name$[.@i] +" -> "+ .@points[.@i];
}
close;     <========

replace with

.@nb = query_sql( "select name, woe_points from guild order by woe_points desc limit 3", .@guild_name$, .@points );
for ( .@i = 0; .@i < .@nb; .@i++ ) {
if ( !.@points[.@i] ) break;
mes ( .@i +1 )+". "+ .@guild_name$[.@i] +" -> "+ .@points[.@i];
}
end;
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  10
  • Topics Per Day:  0.00
  • Content Count:  69
  • Reputation:   2
  • Joined:  04/20/13
  • Last Seen:  

change to that, but i dont know why it wont add +1 to woe points.

 

 

trigger:

npc/guild/agit_main.txt

 

OnAgitBreak:
doevent "Woe Points::OnBreakEmp"; <=====
set brokeemp,brokeemp+1;
set .@GID,getcharid(2);


i add this
doevent "Woe Points::OnBreakEmp";

but it wont add woe points

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  14
  • Topics Per Day:  0.00
  • Content Count:  265
  • Reputation:   95
  • Joined:  09/30/14
  • Last Seen:  

-

Edited by Nova
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  10
  • Topics Per Day:  0.00
  • Content Count:  69
  • Reputation:   2
  • Joined:  04/20/13
  • Last Seen:  

bump

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

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...