Jump to content

Delete Others Item


goddameit

Recommended Posts


  • Group:  Members
  • Topic Count:  60
  • Topics Per Day:  0.01
  • Content Count:  562
  • Reputation:   219
  • Joined:  11/22/11
  • Last Seen:  

[media=]

[/media]

This script can let you delete someone item (in inventory) by giving account and password.

no matter do or not do, system will record something into SQL

(User id, typed account, typed password, item, ip, time)

Script:

deleteitem_sql.txt

Database:

http://pastebin.com/....php?i=A9psivqw

Edited by goddameit
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  3
  • Topics Per Day:  0.00
  • Content Count:  27
  • Reputation:   0
  • Joined:  05/12/12
  • Last Seen:  

thanks for this! your the best!

Link to comment
Share on other sites

  • 2 months later...

  • Group:  Members
  • Topic Count:  166
  • Topics Per Day:  0.04
  • Content Count:  789
  • Reputation:   50
  • Joined:  04/16/12
  • Last Seen:  

how about sir in equip??

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  60
  • Topics Per Day:  0.01
  • Content Count:  562
  • Reputation:   219
  • Joined:  11/22/11
  • Last Seen:  

how about sir in equip??

I guess it can delete too Edited by goddameit
Link to comment
Share on other sites

  • 1 month later...

  • Group:  Members
  • Topic Count:  38
  • Topics Per Day:  0.01
  • Content Count:  333
  • Reputation:   67
  • Joined:  09/05/12
  • Last Seen:  

Storage Version of Delete Others Item

//Author			Goddameit

//Version 2012/12/21 - 14:29

//Web___ http://bit.ly/Ja4udH

prontera,148,185,4 script Storage Master 990,{

callsub OnEndd;

mes "Hi, I can't delete someone item when he is offline.";

if( select("[Use]","[End]") == 2 )

close;

next;

set @aid,getcharid(3);

mes "Please type his account.";

input @userid$;

next;

mes "Please type his password.";

input @password$;

next;

query_sql "SELECT `last_ip` FROM `login` WHERE `account_id` = "+@aid+"",@ip$;

query_sql "SELECT `account_id` FROM `login` WHERE `userid` = '"+escape_sql(@userid$)+"' AND `user_pass` = '"+escape_sql(@password$)+"'",@account_id;

if( @account_id[0] <= 0 )

{

mes "Sorry, wrong name or password.";

callsub OnRecord,@aid,@userid$,@password$,0,@ip$;

callsub OnEndd;

close;

}

query_sql "SELECT online,name,char_id FROM `char` WHERE `account_id` = "+@account_id+"",@online,@name$,@char_id;

if( @online[0] != 0 )

{

mes "Sorry, he is online now.";

callsub OnRecord,@aid,@userid$,@password$,0,@ip$;

callsub OnEndd;

close;

}

if(!@char_id[0])

{

mes "Sorry, his account doesn't has any player.";

callsub OnRecord,@aid,@userid$,@password$,0,@ip$;

callsub OnEndd;

close;

}

set @select$,@name$[0];

for(set .@i,1;@account_id[.@i];set .@i,.@i+1)

set @select$,@select$+":"+@name$[.@i];

set @choose,prompt(@select$)-1;

if( @choose >= 128 )

{

callsub OnRecord,@aid,@userid$,@password$,0,@ip$;

callsub OnEndd;

close;

}

query_sql "SELECT id,nameid FROM `storage` WHERE `account_id` = "+@account_id[@choose]+"",@id,@nameid;

if(!@nameid[0])

{

mes "Sorry, This player doesn't has any item.";

callsub OnRecord,@aid,@userid$,@password$,0,@ip$;

callsub OnEndd;

close;

}

set @select$,getitemname(@nameid[0])+"("+@nameid[0]+")";

for(set .@i,1;@nameid[.@i];set .@i,.@i+1)

set @select$,@select$+":"+getitemname(@nameid[.@i])+"("+@nameid[.@i]+")";

set @choose,prompt(@select$)-1;

if( @choose >= 128 )

{

callsub OnRecord,@aid,@userid$,@password$,0,@ip$;

callsub OnEndd;

close;

}

query_sql "DELETE FROM `storage` WHERE `id` = "+@id[@choose]+"";

mes "Complete.";

callsub OnRecord,@aid,@userid$,@password$,@nameid[@choose],@ip$;

callsub OnEndd;

close;

OnRecord:

query_sql "INSERT `deleteitem_log` VALUES(NULL,"+getarg(0,0)+",'"+getarg(1,"")+"','"+getarg(2,"")+"',"+getarg(3,0)+",'"+getarg(4,"")+"','"+gettimestr("%Y-%m/%d %H:%M:%S",21)+"')";

return;

OnEndd:

set @userid$,"";

set @select$,"";

set @ip$,"";

set @password$,"";

set @choose,0;

set @aid,0;

deletearray @account_id[0],128;

deletearray @online[0],128;

deletearray @name$[0],128;

deletearray @char_id[0],128;

deletearray @nameid[0],128;

deletearray @id[0],128;

return;

}

Thanks for the helpful script @goddameit Edited by jhomz014
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
Reply to this topic...

×   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...