- - script kick_if_have_item -1,{
- OnInit:
- setarray .item_id[0], 55555;
- // check non-character places
- for (set .@i,0; .@i<getarraysize(.item_id); set .@i,.@i+1) {
- set .@count, query_sql("SELECT nameid FROM `auction` WHERE nameid="+.item_id[.@i], .@nameid);
- if (.@count > 0) debugmes "item_id "+.item_id[.@i]+" found in `auction` table. Count: " + .@count;
- set .@count, query_sql("SELECT nameid FROM `guild_storage` WHERE nameid="+.item_id[.@i], .@nameid);
- if (.@count > 0) debugmes "item_id "+.item_id[.@i]+" found in `guild_storage` table. Count: " + .@count;
- set .@count, query_sql("SELECT nameid FROM `mail` WHERE nameid="+.item_id[.@i], .@nameid);
- if (.@count > 0) debugmes "item_id "+.item_id[.@i]+" found in `mail` table. Count: " + .@count;
- }
- end;
- OnPCLoginEvent:
- for (set .@i,0; .@i<getarraysize(.item_id); set .@i,.@i+1) {
- if (countitem(.item_id[.@i]) > 0) {
- set .@where$, "inventory"; goto S_KickChar;
- } else if (query_sql("SELECT nameid FROM `cart_inventory` WHERE nameid="+.item_id[.@i], .@nameid) > 0) {
- set .@where$, "cart_inventory"; goto S_KickChar;
- } else if (query_sql("SELECT nameid FROM `storage` WHERE nameid="+.item_id[.@i], .@nameid) > 0) {
- set .@where$, "storage"; goto S_KickChar;
- }
- }
- end;
- S_KickChar:
- debugmes "item_id "+.item_id[.@i]+" found in "+strcharinfo(0)+"'s "+.@where$+". Kicking...";
- sleep2 100;
- atcommand "@kick "+strcharinfo(0);
- end;
- }
Untitled
Posted by Anonymous on Wed 20th Feb 2013 00:39
raw | new post
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.
rathena.kpaste.net RSS