Jump to content
  • 0

help with script error


youtube

Question


  • Group:  Members
  • Topic Count:  74
  • Topics Per Day:  0.02
  • Content Count:  171
  • Reputation:   0
  • Joined:  06/19/13
  • Last Seen:  


- script restricted_manner -1,{

OnInit:

setarray .@bad_word$, "tangina", "t@ngin@", "t@ng1ng@", "tanga", "t@ng@" , "t@nga", "bobo" , "bob0";

.@size_b = getarraysize( .@bad_word$ );

for( ; .@i < .@size_b; .@i++ )

defpattern 1, "([^:]+):.*\\s"+ .@bad_word$[.@i] +".$", "warning";

activatepset 1;

end;

warning:

@warning++;

if ( @warning == 3 ) {

@warning = 0;

deltimer strnpcinfo(0) +"::OnDelay";

atcommand "@mute 5 "+ strcharinfo(0);

}

else {

deltimer strnpcinfo(0) +"::OnDelay";

addtimer 300000, strnpcinfo(0) +"::OnDelay";

message strcharinfo(0), "Be careful with your language... Warning "+ @warning +"/3";

}

end;

OnDelay:

@warning = 3;

end;

}

2n72m82.jpg

need help

Link to comment
Share on other sites

13 answers to this question

Recommended Posts


  • Group:  Members
  • Topic Count:  50
  • Topics Per Day:  0.01
  • Content Count:  1702
  • Reputation:   238
  • Joined:  09/05/12
  • Last Seen:  

Are you using rAthena?

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  74
  • Topics Per Day:  0.02
  • Content Count:  171
  • Reputation:   0
  • Joined:  06/19/13
  • Last Seen:  

EA

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  50
  • Topics Per Day:  0.01
  • Content Count:  1702
  • Reputation:   238
  • Joined:  09/05/12
  • Last Seen:  

try this :

- script restricted_manner -1,{
OnInit:
setarray .@bad_word$, "tangina", "t@ngin@", "t@ng1ng@", "tanga", "t@ng@" , "t@nga", "bobo" , "bob0";
set .@size_b, getarraysize( .@bad_word$ );
for( set .@i, 0; .@i < .@size_b; set .@i, .@i + 1 )
defpattern 1, "([^:]+):.*\\s"+ .@bad_word$[.@i] +".$", "warning";
activatepset 1;
end;
warning:
set @warning, @warning + 1;
if ( @warning == 3 ) {
set @warning, 0;
deltimer strnpcinfo(0) +"::OnDelay";
atcommand "@mute 5 "+ strcharinfo(0);
}
else {
deltimer strnpcinfo(0) +"::OnDelay";
addtimer 300000, strnpcinfo(0) +"::OnDelay";
message strcharinfo(0), "Be careful with your language... Warning "+ @warning +"/3";
}
end;
OnDelay:
set @warning, 3;
end;
}
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  74
  • Topics Per Day:  0.02
  • Content Count:  171
  • Reputation:   0
  • Joined:  06/19/13
  • Last Seen:  

when i say bobo there are no action about script.


if i say bobo automatic jail


Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  50
  • Topics Per Day:  0.01
  • Content Count:  1702
  • Reputation:   238
  • Joined:  09/05/12
  • Last Seen:  

Is there any error in the console? If so, post error. If none, then you might not have PCRE? :D

Link to comment
Share on other sites


  • Group:  Forum Moderator
  • Topic Count:  93
  • Topics Per Day:  0.02
  • Content Count:  10013
  • Reputation:   2348
  • Joined:  10/28/11
  • Last Seen:  

i dont think this kind of script can simply done using npc script .... 

suppose done through src mod ..

 

when you using defpattern in a npc ...

a player must be near to the NPC so that the defpattern can trigger the events given..

using a floating npc..it wont work..because it has no location...mean..the player cant be near to the npc ...

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  50
  • Topics Per Day:  0.01
  • Content Count:  1702
  • Reputation:   238
  • Joined:  09/05/12
  • Last Seen:  

Instead of creating either script or source why not put your array content in your data/manner.txt? :D

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  74
  • Topics Per Day:  0.02
  • Content Count:  171
  • Reputation:   0
  • Joined:  06/19/13
  • Last Seen:  

data/manner? client or SVN?

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  74
  • Topics Per Day:  0.02
  • Content Count:  171
  • Reputation:   0
  • Joined:  06/19/13
  • Last Seen:  

then?
 

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  39
  • Topics Per Day:  0.01
  • Content Count:  254
  • Reputation:   72
  • Joined:  07/10/13
  • Last Seen:  

then?

Please post a clear and complete question. I do not think people will understand what you actually mean with this.
  • Upvote 2
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  74
  • Topics Per Day:  0.02
  • Content Count:  171
  • Reputation:   0
  • Joined:  06/19/13
  • Last Seen:  

i mean the player say the bad words automatic mute for 15mins or 30mins


i use Eathena . this script not working to Ea i think . i need someone help me to fix that script master


Link to comment
Share on other sites


  • Group:  Forum Moderator
  • Topic Count:  93
  • Topics Per Day:  0.02
  • Content Count:  10013
  • Reputation:   2348
  • Joined:  10/28/11
  • Last Seen:  

i mean the player say the bad words automatic mute for 15mins or 30mins

i use Eathena . this script not working to Ea i think . i need someone help me to fix that script master

if you want to create a npc that work like this...you need OnPCChatEvent ....

whenever they chat...when compare the chat contents with your bad words list...and apply mute if matches....

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