pastebin - collaborative debugging tool
rathena.kpaste.net RSS


Untitled
Posted by Anonymous on Wed 20th Feb 2013 00:39
raw | new post

  1. -       script  kick_if_have_item       -1,{
  2. OnInit:
  3.         setarray .item_id[0], 55555;
  4.         // check non-character places
  5.         for (set .@i,0; .@i<getarraysize(.item_id); set .@i,.@i+1) {
  6.                 set .@count, query_sql("SELECT nameid FROM `auction` WHERE nameid="+.item_id[.@i], .@nameid);
  7.                 if (.@count > 0) debugmes "item_id "+.item_id[.@i]+" found in `auction` table. Count: " + .@count;
  8.                 set .@count, query_sql("SELECT nameid FROM `guild_storage` WHERE nameid="+.item_id[.@i], .@nameid);
  9.                 if (.@count > 0) debugmes "item_id "+.item_id[.@i]+" found in `guild_storage` table. Count: " + .@count;
  10.                 set .@count, query_sql("SELECT nameid FROM `mail` WHERE nameid="+.item_id[.@i], .@nameid);
  11.                 if (.@count > 0) debugmes "item_id "+.item_id[.@i]+" found in `mail` table. Count: " + .@count;
  12.         }
  13.         end;
  14.        
  15. OnPCLoginEvent:
  16.         for (set .@i,0; .@i<getarraysize(.item_id); set .@i,.@i+1) {
  17.                 if (countitem(.item_id[.@i]) > 0) {
  18.                         set .@where$, "inventory";      goto S_KickChar;
  19.                 } else if (query_sql("SELECT nameid FROM `cart_inventory` WHERE nameid="+.item_id[.@i], .@nameid) > 0) {
  20.                         set .@where$, "cart_inventory"; goto S_KickChar;
  21.                 } else if (query_sql("SELECT nameid FROM `storage` WHERE nameid="+.item_id[.@i], .@nameid) > 0) {
  22.                         set .@where$, "storage";        goto S_KickChar;
  23.                 }
  24.         }
  25.         end;
  26. S_KickChar:
  27.         debugmes "item_id "+.item_id[.@i]+" found in "+strcharinfo(0)+"'s "+.@where$+". Kicking...";
  28.         sleep2 100;
  29.         atcommand "@kick "+strcharinfo(0);
  30.         end;
  31. }

Submit a correction or amendment below (click here to make a fresh posting)
After submitting an amendment, you'll be able to view the differences between the old and new posts easily.

Syntax highlighting:

To highlight particular lines, prefix each line with {%HIGHLIGHT}




All content is user-submitted.
The administrators of this site (kpaste.net) are not responsible for their content.
Abuse reports should be emailed to us at