Yonko Posted February 18, 2013 Group: Members Topic Count: 166 Topics Per Day: 0.03 Content Count: 789 Reputation: 50 Joined: 04/16/12 Last Seen: July 8, 2022 Share 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 Link to comment Share on other sites More sharing options...
Brian Posted February 20, 2013 Group: Members Topic Count: 75 Topics Per Day: 0.02 Content Count: 2223 Reputation: 593 Joined: 10/26/11 Last Seen: June 2, 2018 Share 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 Link to comment Share on other sites More sharing options...
vhan48 Posted February 18, 2013 Group: Members Topic Count: 9 Topics Per Day: 0.00 Content Count: 51 Reputation: 7 Joined: 06/23/12 Last Seen: April 2 Share 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 Link to comment Share on other sites More sharing options...
Yonko Posted February 21, 2013 Group: Members Topic Count: 166 Topics Per Day: 0.03 Content Count: 789 Reputation: 50 Joined: 04/16/12 Last Seen: July 8, 2022 Author Share 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 Link to comment Share on other sites More sharing options...
Famous Posted February 28, 2013 Group: Members Topic Count: 145 Topics Per Day: 0.03 Content Count: 455 Reputation: 3 Joined: 06/19/12 Last Seen: February 26, 2018 Share Posted February 28, 2013 how to add more than one item? Quote Link to comment Share on other sites More sharing options...
Brian Posted February 28, 2013 Group: Members Topic Count: 75 Topics Per Day: 0.02 Content Count: 2223 Reputation: 593 Joined: 10/26/11 Last Seen: June 2, 2018 Share Posted February 28, 2013 Set the item_id(s) in the array on line 3.For example: setarray .item_id[0], 2199, 1599; Quote Link to comment Share on other sites More sharing options...
Famous Posted March 1, 2013 Group: Members Topic Count: 145 Topics Per Day: 0.03 Content Count: 455 Reputation: 3 Joined: 06/19/12 Last Seen: February 26, 2018 Share Posted March 1, 2013 thanks Brian Quote Link to comment Share on other sites More sharing options...
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!
Link to comment
Share on other sites
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.