Jump to content
  • 0

help delequip


powkda

Question


  • Group:  Members
  • Topic Count:  30
  • Topics Per Day:  0.01
  • Content Count:  89
  • Reputation:   1
  • Joined:  11/11/17
  • Last Seen:  

prontera,132,189,7	script	ConfigA	-1,{
OnNPCKillEvent:

	set .@iEquip,20327;		
	set .@iMob,3041;		

	
	if(killedrid == .@iMob)
	{
		if(getequipid(EQI_HAND_L) == .@iEquip || getequipid(EQI_HAND_R) == .@iEquip)
		{
			
			if(rand(1,100) <= 40)
			{
				
				if(getequipid(2) == .@iEquip) delequip(2); message strcharinfo(0),"your "+getitemname(.@iEquip)+" break!!";
				if(getequipid(4) == .@iEquip) delequip(4); message strcharinfo(0),"your "+getitemname(.@iEquip)+" break!!";
			}
		}
	}
			if(getequipid(EQI_HAND_L) == .@iEquip || getequipid(EQI_HAND_R) == .@iEquip)

	
	if(killedrid == 3041)
	{
		
		if(rand(1,100) <= 5){ getitem 20326,1; }
		if(rand(1,100) <= 20){ getitem 20325,1; }
	}
	}

Equipped weapon not being deleted, message but not delete

Link to comment
Share on other sites

1 answer to this question

Recommended Posts

  • 0

  • Group:  Content Moderator
  • Topic Count:  55
  • Topics Per Day:  0.02
  • Content Count:  1676
  • Reputation:   703
  • Joined:  12/21/14
  • Last Seen:  

EQI_SHOES (2)             - Footgear (shoes, boots)
EQI_COMPOUND_ON (-1)      - Item slot that calls this script (In context of item script)
EQI_ACC_L (0)             - Accessory 1
EQI_ACC_R (1)             - Accessory 2
EQI_SHOES (2)             - Footgear (shoes, boots)
EQI_GARMENT (3)           - Garment (mufflers, hoods, manteaux)
EQI_HEAD_LOW (4)          - Lower Headgear (beards, some masks)
EQI_HEAD_MID (5)          - Middle Headgear (masks, glasses)
EQI_HEAD_TOP (6)          - Upper Headgear
EQI_ARMOR (7)             - Armor (jackets, robes)
EQI_HAND_L (8)            - Left hand (weapons, shields)
EQI_HAND_R (9)            - Right hand (weapons)
EQI_COSTUME_HEAD_TOP (10) - Upper Costume Headgear
EQI_COSTUME_HEAD_MID (11) - Middle Costume Headgear
EQI_COSTUME_HEAD_LOW (12) - Lower Costume Headgear
EQI_COSTUME_GARMENT (13)  - Costume Garment
EQI_AMMO (14)    		  - Arrow/Ammunition
EQI_SHADOW_ARMOR (15)     - Shadow Armor
EQI_SHADOW_WEAPON (16)    - Shadow Weapon
EQI_SHADOW_SHIELD (17)    - Shadow Shield
EQI_SHADOW_SHOES (18)     - Shadow Shoes
EQI_SHADOW_ACC_R (19)     - Shadow Accessory 2
EQI_SHADOW_ACC_L (20)     - Shadow Accessory 1

i don't see where you are deleting the weapon

2 = shoes

4 = low headgear

if(getequipid(2) == .@iEquip) delequip(2); message strcharinfo(0),"your "+getitemname(.@iEquip)+" break!!";
if(getequipid(4) == .@iEquip) delequip(4); message strcharinfo(0),"your "+getitemname(.@iEquip)+" break!!";

you can use the const variable with the command so you don't get lost

like delequip(EQI_HAND_R);

(also your if statement will ignore the message , the message will play anyway cut there is no {} )

  • Upvote 1
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...