Jump to content
  • 0

help with script error


Question

Posted


- 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

13 answers to this question

Recommended Posts

Posted

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;
}
Posted

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

Posted

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


Posted

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

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.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...