Hi, I'm having this script and I'm facing some errors and Debug would like to log in to delete all of the [setarray] items but he's only deleting one every time I log into the account, please someone can help me.
Errors debugs:
[Error]: buildin_countitem: fatal error ! player not attached!
[Debug]: Function: countitem (1 parameter):
[Debug]: Data: variable name='$proibidos' index=0
[Debug]: Source (NPC): AntiEdit (invisible/not on a map)
Npc Script:
- script AntiEdit -1,{
OnInit:
setarray $proibidos[0],1599,2199; // Colque os ID's dos itens proibidos
OnPCLoginEvent:
for(set .@i,0; .@i < getarraysize($proibidos); set .@i,.@i + 1){
query_sql "DELETE FROM `storage` WHERE `nameid` = '"+$proibidos[.@i]+"'";
query_sql "DELETE FROM `cart_inventory` WHERE `nameid` = '"+$proibidos[.@i]+"'";
query_sql "DELETE FROM `guild_storage` WHERE `nameid` = '"+$proibidos[.@i]+"'";
query_sql "DELETE FROM `auction` WHERE `nameid` = '"+$proibidos[.@i]+"'";
query_sql "DELETE FROM `mail` WHERE `send_id` = '"+$proibidos[.@i]+"'";
if(countitem($proibidos[.@i]) >= 1){
delitem $proibidos[.@i],1;
dispbottom "[Segurança] "+getitemname($proibidos[.@i])+" foi deletado do seu inventário por ser um item proibido.";
end;
}
}
}
- script AntiEditstatus -1,{
OnPCLoginEvent:
for( set .@i,13; .@i <=18; set .@i,.@i + 1 )
if( readparam(.@i) > 120 )
set .@OverStat,.@OverStat + 1;
if( .@OverStat ){
announce "O player "+strcharinfo(0)+" foi banido por motivos de tentar burlar pontos de atributos.",8;
sleep2 9000;
atcommand "@kick "+strcharinfo(0);
atcommand "@block " + strcharinfo(0);
}
end;
}
Question
christofereduardo
Hi, I'm having this script and I'm facing some errors and Debug would like to log in to delete all of the [setarray] items but he's only deleting one every time I log into the account, please someone can help me.
Errors debugs:
[Error]: buildin_countitem: fatal error ! player not attached! [Debug]: Function: countitem (1 parameter): [Debug]: Data: variable name='$proibidos' index=0 [Debug]: Source (NPC): AntiEdit (invisible/not on a map)
Npc Script:
- script AntiEdit -1,{ OnInit: setarray $proibidos[0],1599,2199; // Colque os ID's dos itens proibidos OnPCLoginEvent: for(set .@i,0; .@i < getarraysize($proibidos); set .@i,.@i + 1){ query_sql "DELETE FROM `storage` WHERE `nameid` = '"+$proibidos[.@i]+"'"; query_sql "DELETE FROM `cart_inventory` WHERE `nameid` = '"+$proibidos[.@i]+"'"; query_sql "DELETE FROM `guild_storage` WHERE `nameid` = '"+$proibidos[.@i]+"'"; query_sql "DELETE FROM `auction` WHERE `nameid` = '"+$proibidos[.@i]+"'"; query_sql "DELETE FROM `mail` WHERE `send_id` = '"+$proibidos[.@i]+"'"; if(countitem($proibidos[.@i]) >= 1){ delitem $proibidos[.@i],1; dispbottom "[Segurança] "+getitemname($proibidos[.@i])+" foi deletado do seu inventário por ser um item proibido."; end; } } } - script AntiEditstatus -1,{ OnPCLoginEvent: for( set .@i,13; .@i <=18; set .@i,.@i + 1 ) if( readparam(.@i) > 120 ) set .@OverStat,.@OverStat + 1; if( .@OverStat ){ announce "O player "+strcharinfo(0)+" foi banido por motivos de tentar burlar pontos de atributos.",8; sleep2 9000; atcommand "@kick "+strcharinfo(0); atcommand "@block " + strcharinfo(0); } end; }
Link to comment
Share on other sites
4 answers 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.