Jump to content
  • 0

Remove equip garment Costume


Nero

Question


  • Group:  Members
  • Topic Count:  74
  • Topics Per Day:  0.02
  • Content Count:  194
  • Reputation:   2
  • Joined:  12/18/11
  • Last Seen:  

Hello how can i properly remove a costume equipment via sql? example i want to properly remove the costume archangel wing ( 20500)

Ive used

DELETE FROM `inventory ` WHERE nameid='20500' AND equip='8192;

But when i login i can see that the archangel wing(20500) is gone in the equip but the sprite view is still there.

Is there anyway to remove also the sprite view upon deleting the item in sql?

or is there any scripts that can be done via onlogin to automatically check and remove the player's costume garment sprite view before entering the game?

Thanks in advance!

Link to comment
Share on other sites

2 answers to this question

Recommended Posts

  • 0

  • Group:  Members
  • Topic Count:  78
  • Topics Per Day:  0.03
  • Content Count:  431
  • Reputation:   164
  • Joined:  12/12/17
  • Last Seen:  

2 hours ago, Nero said:

Is there anyway to remove also the sprite view upon deleting the item in sql?

Yes, check this part:

table : `char`
columns : `head_top` , `head_mid` , `head_bottom`
Quote

or is there any scripts that can be done via onlogin to automatically check and remove the player's costume garment sprite view before entering the game?

I don't think it is possible.. Never tried it tho

Edited by pajodex
Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  4
  • Topics Per Day:  0.00
  • Content Count:  303
  • Reputation:   117
  • Joined:  12/10/16
  • Last Seen:  

Script:

	// Here goes your view id to remove.
	.@view_id = 999;
	setarray .@look[0],LOOK_HEAD_BOTTOM,LOOK_HEAD_TOP,LOOK_HEAD_MID;
	for(.@i = EQI_HEAD_LOW;.@i <= EQI_HEAD_TOP;.@i++) {
		.@view = getiteminfo(getequipid(.@i),11);
		if(getlook(.@look[.@i - 4]) == .@view_id)
			setlook .@look[.@i - 4],.@view;
	}

Or querys:

	UPDATE `char` SET `head_top` = '0' WHERE `head_top` = '999'
	UPDATE `char` SET `head_mid` = '0' WHERE `head_mid` = '999'
	UPDATE `char` SET `head_bottom` = '0' WHERE `head_bottom` = '999'

I don't know how these might work, they may reset the view ids and players might have to relog (they could have no view id even if they have a poring hat, for example).

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

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