Jump to content
  • 0

Anti item


christofereduardo

Question


  • Group:  Members
  • Topic Count:  13
  • Topics Per Day:  0.00
  • Content Count:  36
  • Reputation:   2
  • Joined:  06/06/13
  • Last Seen:  

Please help the script no check no dell items.

-    script    AntiEdit    -1,{
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 `nameid` = '"+$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;
        }
    }

Tanks:

Link to comment
Share on other sites

3 answers to this question

Recommended Posts

  • 0

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

  • The array should be initialized using the OnInit event label.
  • Delete query are supposedly to execute when the server are offline, your method would not work in this case.
Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  13
  • Topics Per Day:  0.00
  • Content Count:  36
  • Reputation:   2
  • Joined:  06/06/13
  • Last Seen:  

3 hours ago, Emistry said:
  • The array should be initialized using the OnInit event label.
  • Delete query are supposedly to execute when the server are offline, your method would not work in this case.

 

Thank you it worked out one more thing right now. If the player has more than 1 item he does not delete all at once only one at a time how do I delete more than 1 item, or all at once?

Tanks:

Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  18
  • Topics Per Day:  0.01
  • Content Count:  98
  • Reputation:   74
  • Joined:  12/04/14
  • Last Seen:  

On 9/14/2017 at 6:53 PM, christofereduardo said:

 

Thank you it worked out one more thing right now. If the player has more than 1 item he does not delete all at once only one at a time how do I delete more than 1 item, or all at once?

Tanks:

 

You can also use auto delete non-existing items from trunk/conf/battle/items.conf

 

// On map change it will check for items not tagged as "available" and
// auto-delete them from inventory/cart/storage.
// NOTE: An item is not available if it was not loaded from the item_db or
// specified as unavailable in db/item_avail.txt
// 0x1: Inventory
// 0x2: Cart
// 0x4: Storage
item_check: 0x0

 

Change the item_check: 0x0   to   item_check: 0x7

  • Like 1
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...