Jump to content
  • 0

Script for weapon


DaN1zera

Question


  • Group:  Members
  • Topic Count:  1
  • Topics Per Day:  0.00
  • Content Count:  3
  • Reputation:   0
  • Joined:  12/13/16
  • Last Seen:  

I made two weapons for sinx, but I did not want them to be able to equip 2 of these weapons together.
I wanted a script that when equipping a weapon, it unequipped another. exist?
Sorry for my english, I'm using the translator.

Link to comment
Share on other sites

4 answers to this question

Recommended Posts

  • 0

  • Group:  Forum Moderator
  • Topic Count:  25
  • Topics Per Day:  0.01
  • Content Count:  832
  • Reputation:   317
  • Joined:  02/11/19
  • Last Seen:  

On 3/23/2019 at 11:05 AM, zDaNizera said:

32107,Adaga_da_perdicao,Adaga_da_perdicao,4,2400,,600,43,,1,4,0x00001000,7,2,2,1,1,1,1,{},{},{}

My item_db is like this, how do I do?

32107,Adaga_da_perdicao,Adaga_da_perdicao,4,2400,,600,43,,1,4,0x00001000,7,2,2,1,1,1,1,{ if(getequipid(EQI_HAND_R) == 12345){ unequip(EQI_HAND_R); dispbottom "You can only equip one type of this weapon."; } else if(EQI_HAND_L == 12345){ unequip(EQI_HAND_L); dispbottom "You can only equip one type of this weapon."; } },{},{}

 

  • Upvote 1
Link to comment
Share on other sites

  • 1

  • Group:  Developer
  • Topic Count:  50
  • Topics Per Day:  0.02
  • Content Count:  763
  • Reputation:   227
  • Joined:  02/11/17
  • Last Seen:  

if(getequipid(EQI_HAND_R) == 12345){
	unequip(EQI_HAND_R);
	dispbottom "You can only equip one type of this weapon.";
} else if(EQI_HAND_L == 12345){
	unequip(EQI_HAND_L);
	dispbottom "You can only equip one type of this weapon.";
}

Something simple like this should solve your problem, add it on the equip part of the item script. and replace the 12345 ID that you want to check :))

Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  1
  • Topics Per Day:  0.00
  • Content Count:  3
  • Reputation:   0
  • Joined:  12/13/16
  • Last Seen:  

32107,Adaga_da_perdicao,Adaga_da_perdicao,4,2400,,600,43,,1,4,0x00001000,7,2,2,1,1,1,1,{},{},{}

My item_db is like this, how do I do?

Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  1
  • Topics Per Day:  0.00
  • Content Count:  3
  • Reputation:   0
  • Joined:  12/13/16
  • Last Seen:  

Thanks man, worked perfectly!!

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