Jump to content
  • 0
Sign in to follow this  
Takumirai

R> Delete MvP Card When Login

Question

- i want to request if a player is login inventory will be check/cart/storage for MvP list item and  automatically delete the mvp cards if a player have 1 of those mvp card. also when player put it in a sloted equips the item will be deleted or if possible only card will be deleted. thanks in advance.

Edited by Takumirai

Share this post


Link to post
Share on other sites

3 answers to this question

Recommended Posts

  • 0

if you want to delete something, just run those queries in your phpmyadmin:

 

 

DELETE FROM `auction`,`cart_inventory`,`guild_storage`,`inventory`,`mail`,`storage` WHERE nameid = 4430;DELETE FROM `inventory` WHERE nameid = 4430; UPDATE `inventory` SET card0=0 WHERE card0 = 4430;UPDATE `inventory` SET card1=0 WHERE card1 = 4430;UPDATE `inventory` SET card2=0 WHERE card2 = 4430;UPDATE `inventory` SET card3=0 WHERE card3 = 4430; 

 

just change 4430 to the desired id

 

PS: do it with the server offline.

Edited by evilpuncker

Share this post


Link to post
Share on other sites
  • 0

Load this in once to delete cards from the .@card_id array from the server. Note that all players to be affected should be offline. Add card constants or IDs to the .@card_id array as needed. Be sure to unload this script once the task is completed.

 

-	script	del_cards	-1,{		OnInit:		setarray .@table_name$[0],			"inventory",			"cart_inventory",			"storage",			"guild_storage",			"mail",			"auction";					// Card constants or IDs to delete		setarray .@card_id[0],			Golden_Bug_Card,			Ifrit_Card,			Ghostring_Card,			Drake_Card;					// Loop through all tables to clear		for (.@i = 0; .@i < getarraysize(.@table_name$); .@i++) {				// Loop through all cards to delete			for (.@j = 0; .@j < getarraysize(.@card_id); .@j++) {				// Delete card from table				query_sql "DELETE FROM `"+ .@table_name$[.@i] +"` WHERE `nameid` = '"+ .@card_id[.@j] +"'";								// Remove compounded cards				query_sql "UPDATE `"+ .@table_name$[.@i] +"` SET `card0` = '0' WHERE `card0` = '"+ .@card_id[.@j] +"'";				query_sql "UPDATE `"+ .@table_name$[.@i] +"` SET `card1` = '0' WHERE `card1` = '"+ .@card_id[.@j] +"'";				query_sql "UPDATE `"+ .@table_name$[.@i] +"` SET `card2` = '0' WHERE `card2` = '"+ .@card_id[.@j] +"'";				query_sql "UPDATE `"+ .@table_name$[.@i] +"` SET `card3` = '0' WHERE `card3` = '"+ .@card_id[.@j] +"'";			}		}				// Confirm completion		announce "Restricted cards have been removed from the server.", bc_all;		end;}

Share this post


Link to post
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
Answer this question...

×   Pasted as rich text.   Restore formatting

  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.

Loading...
Sign in to follow this  

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.