Yonko Posted February 18, 2013 Posted February 18, 2013 hi there rathenians can i request a item kicker scriptHere's the mechanicsExample : Applewhen player stored in inventory even in storage automatically kick out the server (@kick + strcharinfo) thanks! Quote
Brian Posted February 20, 2013 Posted February 20, 2013 Set the item_id(s) in the array on line 3. http://rathena.kpaste.net/eb47?raw - 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; } 1 Quote
vhan48 Posted February 18, 2013 Posted February 18, 2013 Hi wiideliva, Do you mind if i ask for what purpose are you going to do with the script? and may i know what specific item do you want to have that @kick or something like restriction. I might be able to help you with that Quote
Yonko Posted February 21, 2013 Author Posted February 21, 2013 Set the item_id(s) in the array on line 3. http://rathena.kpaste.net/eb47?raw - 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; } Thank you sir Brian! Quote
Brian Posted February 28, 2013 Posted February 28, 2013 Set the item_id(s) in the array on line 3.For example: setarray .item_id[0], 2199, 1599; Quote
Question
Yonko
hi there rathenians can i request a item kicker script
Here's the mechanics
Example : Apple
when player stored in inventory even in storage automatically kick out the server (@kick + strcharinfo) thanks!
6 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.