Jump to content
  • 0

H> npc took item equiped


Quesooo

Question


  • Group:  Members
  • Topic Count:  197
  • Topics Per Day:  0.07
  • Content Count:  883
  • Reputation:   28
  • Joined:  02/13/17
  • Last Seen:  

hi good day can any one help with this script

 

lhz_dun_n,135,264,4	script	Memory of Tears	10092,{

mes "I can Convert some items to energy debris in random from 1 to 5 what do you want";
next;
menu "Exchange Items to Energy Debris",Z_EE,"Create Costume",Z_EEE,"Leave",Z_EXIT;

Z_EE:
	mes "Done Thank you";
	if(countitem(1284) > 0) goto one;
	 if(countitem(1285) > 0) goto two;
	 if(countitem(1290) > 0) goto three;
	 if(countitem(18109) > 0) goto four;
	 if(countitem(18110) > 0) goto five;
	 if(countitem(18111) > 0) goto six;
	 if(countitem(1745) > 0) goto seven;
	 if(countitem(18103) > 0) goto eight;
	 if(countitem(1647) > 0) goto nine;
	 if(countitem(1659) > 0) goto ten;
	 if(countitem(1654) > 0) goto eleven;
	 if(countitem(2004) > 0) goto twelve;
	 if(countitem(2005) > 0) goto thirteen;
	 if(countitem(13431) > 0) goto fourteen;
	 if(countitem(1196) > 0) goto fifteen;
	 if(countitem(13421) > 0) goto sixteen;
	 if(countitem(1584) > 0) goto seventeen;
	 if(countitem(13061) > 0) goto eightteen;
	 if(countitem(13062) > 0) goto nineteen;
	 if(countitem(13070) > 0) goto twenty;
	 if(countitem(13046) > 0) goto twentyone;
	 if(countitem(13047) > 0) goto twentytwo;
	 if(countitem(16017) > 0) goto twentythree;
	 if(countitem(16010) > 0) goto twentyfour;
	 if(countitem(16000) > 0) goto twentyfive;
	 if(countitem(16001) > 0) goto twentysix;
	 if(countitem(1433) > 0) goto twentyseven;
	 if(countitem(1435) > 0) goto twentyeight;
	 if(countitem(1490) > 0) goto twentynine;
	 if(countitem(1930) > 0) goto thirty;
	 if(countitem(1963) > 0) goto thirtyone;
	 if(countitem(1830) > 0) goto thirtytwo;
	 if(countitem(1393) > 0) goto thirtythree;
	 if(countitem(1392) > 0) goto thirtyfour;
	 {
		goto Z_NOITEM;
	}

one:
	delitem 1284,1;
	getitem 6820,rand(1,5);
	end;
two:
	delitem 1285,1;
	getitem 6820,rand(1,5);
	end;
three:
	delitem 1290,1;
	getitem 6820,rand(1,5);
	end;
four:
	delitem 18109,1;
	getitem 6820,rand(1,5);
	end;
five:
	delitem 18110,1;
	getitem 6820,rand(1,5);
	end;
six:
	delitem 18111,1;
	getitem 6820,rand(1,5);
	end;
zeven:
	delitem 1745,1;
	getitem 6820,rand(1,5);
	end;
eight:
	delitem 18103,1;
	getitem 6820,rand(1,5);
	end;
nine:
	delitem 1647,1;
	getitem 6820,rand(1,5);
	end;
ten:
	delitem 1659,1;
	getitem 6820,rand(1,5);
	end;
eleven:
	delitem 1654,1;
	getitem 6820,rand(1,5);
	end;
twelve:
	delitem 2004,1;
	getitem 6820,rand(1,5);
	end;
thirteen:
	delitem 2005,1;
	getitem 6820,rand(1,5);
	end;
fourteen:
	delitem 13431,1;
	getitem 6820,rand(1,5);
	end;
fifteen:
	delitem 1196,1;
	getitem 6820,rand(1,5);
	end;
sixteen:
	delitem 13421,1;
	getitem 6820,rand(1,5);
	end;
seventeen:
	delitem 1584,1;
	getitem 6820,rand(1,5);
	end;
eightteen:
	delitem 13061,1;
	getitem 6820,rand(1,5);
nineteen:
	delitem 13062,1;
	getitem 6820,rand(1,5);
	end;
twenty:
	delitem 13070,1;
	getitem 6820,rand(1,5);
	end;
twentyone:
	delitem 13046,1;
	getitem 6820,rand(1,5);
	end;
twentytwo:
	delitem 13047,1;
	getitem 6820,rand(1,5);
	end;
twentythree:
	delitem 16017,1;
	getitem 6820,rand(1,5);
	end;
twentyfour:
	delitem 16010,1;
	getitem 6820,rand(1,5);
	end;
twentyfive:
	delitem 16000,1;
	getitem 6820,rand(1,5);
	end;
twentysix:
	delitem 16001,1;
	getitem 6820,rand(1,5);
	end;
twentyseven:
	delitem 1433,1;
	getitem 6820,rand(1,5);
	end;
twentyeight:
	delitem 1435,1;
	getitem 6820,rand(1,5);
	end;
twentynine:
	delitem 1490,1;
	getitem 6820,rand(1,5);
	end;
thirty:
	delitem 1930,1;
	getitem 6820,rand(1,5);
	end;
thirtyone:
	delitem 1963,1;
	getitem 6820,rand(1,5);
	end;
thirtytwo:
	delitem 1830,1;
	getitem 6820,rand(1,5);
	end;
thirtythree:
	delitem 1393,1;
	getitem 6820,rand(1,5);
	end;
thirtyfour:
	delitem 1392,1;
	getitem 6820,rand(1,5);
	end;
	
Z_EEE:
	mes "I can also Exchange 50pcs energy debris and 1 3rd job head gear to 1 costume 3rd job items";
	next;
	menu "Costume Rune Circlet",Z_EEEE,"Costume Mitra",Z_EEEEE,"Costume Driver Band",Z_EEEEEE,"Costume Driver Band (Yellow)",Z_EEEEEEE,"Costume Shadow Crown",Z_EEEEEEEE,"Costume Minstrel Song",Z_EEEEEEEEE,"Costume Midas Whisper",Z_EEEEEEEEEE,"Costume Magic Stone Hat",Z_EEEEEEEEEEE,"Costume Burning Spirit",Z_EEEEEEEEEEEE,"Costume Wispers of Wind",Z_EEEEEEEEEEEEE,"Costume Circlet of Bone",Z_EEEEEEEEEEEEEE,"Costume Guardian Crown",Z_EEEEEEEEEEEEEEE,"Costume Camouflage of Rabbit Hood",Z_EEEEEEEEEEEEEEEE,"Leave",Z_EXIT;

Z_EEEE:
	if(countitem(6820) < 50 || countitem(18971) < 1) GOTO Z_NOITEM;
	delitem 6820,50;//Items: Sombrero,
	delitem 18971,1;//Items: Feather_of_Birds,
	getitem 19961,1;//Items: Bird_Nest,
	mes "Thank you very very much!";
	end;
Z_EEEEE:
	if(countitem(6820) < 50 || countitem(18972) < 1) GOTO Z_NOITEM;
	delitem 6820,50;//Items: Sombrero,
	delitem 18972,1;//Items: Feather_of_Birds,
	getitem 19962,1;//Items: Bird_Nest,
	mes "Thank you very very much!";
	end;
Z_EEEEEE:
	if(countitem(6820) < 50 || countitem(18973) < 1) GOTO Z_NOITEM;
	delitem 6820,50;//Items: Sombrero,
	delitem 18973,1;//Items: Feather_of_Birds,
	getitem 19963,1;//Items: Bird_Nest,
	mes "Thank you very very much!";
	end;
Z_EEEEEEE:
	if(countitem(6820) < 50 || countitem(18974) < 1) GOTO Z_NOITEM;
	delitem 6820,50;//Items: Sombrero,
	delitem 18974,1;//Items: Feather_of_Birds,
	getitem 19964,1;//Items: Bird_Nest,
	mes "Thank you very very much!";
	end;
Z_EEEEEEEE:
	if(countitem(6820) < 50 || countitem(18974) < 1) GOTO Z_NOITEM;
	delitem 6820,50;//Items: Sombrero,
	delitem 18983,1;//Items: Feather_of_Birds,
	getitem 19965,1;//Items: Bird_Nest,
	mes "Thank you very very much!";
	end;
Z_EEEEEEEEE:
	if(countitem(6820) < 50 || countitem(18974) < 1) GOTO Z_NOITEM;
	delitem 6820,50;//Items: Sombrero,
	delitem 18976,1;//Items: Feather_of_Birds,
	getitem 19966,1;//Items: Bird_Nest,
	mes "Thank you very very much!";
	end;
Z_EEEEEEEEEE:
	if(countitem(6820) < 50 || countitem(18974) < 1) GOTO Z_NOITEM;
	delitem 6820,50;//Items: Sombrero,
	delitem 18977,1;//Items: Feather_of_Birds,
	getitem 19967,1;//Items: Bird_Nest,
	mes "Thank you very very much!";
	end;
Z_EEEEEEEEEEE:
	if(countitem(6820) < 50 || countitem(18974) < 1) GOTO Z_NOITEM;
	delitem 6820,50;//Items: Sombrero,
	delitem 18978,1;//Items: Feather_of_Birds,
	getitem 19968,1;//Items: Bird_Nest,
	mes "Thank you very very much!";
	end;
Z_EEEEEEEEEEEE:
	if(countitem(6820) < 50 || countitem(18974) < 1) GOTO Z_NOITEM;
	delitem 6820,50;//Items: Sombrero,
	delitem 18979,1;//Items: Feather_of_Birds,
	getitem 19969,1;//Items: Bird_Nest,
	mes "Thank you very very much!";
	end;
Z_EEEEEEEEEEEEE:
	if(countitem(6820) < 50 || countitem(18974) < 1) GOTO Z_NOITEM;
	delitem 6820,50;//Items: Sombrero,
	delitem 18980,1;//Items: Feather_of_Birds,
	getitem 19970,1;//Items: Bird_Nest,
	mes "Thank you very very much!";
	end;
Z_EEEEEEEEEEEEEE:
	if(countitem(6820) < 50 || countitem(18974) < 1) GOTO Z_NOITEM;
	delitem 6820,50;//Items: Sombrero,
	delitem 18982,1;//Items: Feather_of_Birds,
	getitem 19971,1;//Items: Bird_Nest,
	mes "Thank you very very much!";
	end;
Z_EEEEEEEEEEEEEEE:
	if(countitem(6820) < 50 || countitem(18974) < 1) GOTO Z_NOITEM;
	delitem 6820,50;//Items: Sombrero,
	delitem 18983,1;//Items: Feather_of_Birds,
	getitem 19972,1;//Items: Bird_Nest,
	mes "Thank you very very much!";
	end;
Z_EEEEEEEEEEEEEEEE:
	if(countitem(6820) < 50 || countitem(18974) < 1) GOTO Z_NOITEM;
	delitem 6820,50;//Items: Sombrero,
	delitem 18984,1;//Items: Feather_of_Birds,
	getitem 19974,1;//Items: Bird_Nest,
	mes "Thank you very very much!";
	end;

Z_NOITEM:
	mes "You dont have enought items i need";
	mes "Good bye.";
	close;

Z_EXIT:
	mes "[Reaper]";
	mes callfunc("F_Bye");
	close;
}

the npc also took the item equip base on npc list

must be 

- npc dont took item equiped only on inventory

 

thats the problem only please help thank you

Link to comment
Share on other sites

Recommended Posts

  • 0

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

well that change every thing XD

you need to write a check for it the item equiped is the same item the npc want it

something like this

if(getequipid(EQI_HAND_R) == 16001){
	if(countitem(16001) > 1)  goto twentysix;
}else{
	if(countitem(16001) > 0)  goto twentysix;
}

or you need to make a sub or function and optimize the script to write this only once not one every id

and make sure you use the right getequipid

*getequipid({<equipment slot>,<char_id>})

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

 

  • MVP 1
Link to comment
Share on other sites

  • 0

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

there is no case for

	 {
		goto Z_NOITEM;
	}

so just type it without bracket

and do disable_items; at the script start

  • Upvote 1
Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  197
  • Topics Per Day:  0.07
  • Content Count:  883
  • Reputation:   28
  • Joined:  02/13/17
  • Last Seen:  

4 minutes ago, sader1992 said:

there is no case for


	 {
		goto Z_NOITEM;
	}

so just type it without bracket

and do disable_items; at the script start

alright thank you ^_^

Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  55
  • Topics Per Day:  0.01
  • Content Count:  1188
  • Reputation:   161
  • Joined:  06/12/12
  • Last Seen:  

1 hour ago, sader1992 said:

there is no case for


	 {
		goto Z_NOITEM;
	}

so just type it without bracket

and do disable_items; at the script start

you mean like this

lhz_dun_n,135,264,4	script	Memory of Tears	10092,{

mes "I can Convert some items to energy debris in random from 1 to 5 what do you want";
next;
menu "Exchange Items to Energy Debris",Z_EE,"Create Costume",Z_EEE,"Leave",Z_EXIT;

Z_EE:
	mes "Done Thank you";
	if(countitem(1284) > 0) goto one;
	 if(countitem(1285) > 0) goto two;
	 if(countitem(1290) > 0) goto three;
	 if(countitem(18109) > 0) goto four;
	 if(countitem(18110) > 0) goto five;
	 if(countitem(18111) > 0) goto six;
	 if(countitem(1745) > 0) goto seven;
	 if(countitem(18103) > 0) goto eight;
	 if(countitem(1647) > 0) goto nine;
	 if(countitem(1659) > 0) goto ten;
	 if(countitem(1654) > 0) goto eleven;
	 if(countitem(2004) > 0) goto twelve;
	 if(countitem(2005) > 0) goto thirteen;
	 if(countitem(13431) > 0) goto fourteen;
	 if(countitem(1196) > 0) goto fifteen;
	 if(countitem(13421) > 0) goto sixteen;
	 if(countitem(1584) > 0) goto seventeen;
	 if(countitem(13061) > 0) goto eightteen;
	 if(countitem(13062) > 0) goto nineteen;
	 if(countitem(13070) > 0) goto twenty;
	 if(countitem(13046) > 0) goto twentyone;
	 if(countitem(13047) > 0) goto twentytwo;
	 if(countitem(16017) > 0) goto twentythree;
	 if(countitem(16010) > 0) goto twentyfour;
	 if(countitem(16000) > 0) goto twentyfive;
	 if(countitem(16001) > 0) goto twentysix;
	 if(countitem(1433) > 0) goto twentyseven;
	 if(countitem(1435) > 0) goto twentyeight;
	 if(countitem(1490) > 0) goto twentynine;
	 if(countitem(1930) > 0) goto thirty;
	 if(countitem(1963) > 0) goto thirtyone;
	 if(countitem(1830) > 0) goto thirtytwo;
	 if(countitem(1393) > 0) goto thirtythree;
	 if(countitem(1392) > 0) goto thirtyfour;
	 goto Z_NOITEM;

one:
	delitem 1284,1;
	getitem 6820,rand(1,5);
	end;
two:
	delitem 1285,1;
	getitem 6820,rand(1,5);
	end;
three:
	delitem 1290,1;
	getitem 6820,rand(1,5);
	end;
four:
	delitem 18109,1;
	getitem 6820,rand(1,5);
	end;
five:
	delitem 18110,1;
	getitem 6820,rand(1,5);
	end;
six:
	delitem 18111,1;
	getitem 6820,rand(1,5);
	end;
zeven:
	delitem 1745,1;
	getitem 6820,rand(1,5);
	end;
eight:
	delitem 18103,1;
	getitem 6820,rand(1,5);
	end;
nine:
	delitem 1647,1;
	getitem 6820,rand(1,5);
	end;
ten:
	delitem 1659,1;
	getitem 6820,rand(1,5);
	end;
eleven:
	delitem 1654,1;
	getitem 6820,rand(1,5);
	end;
twelve:
	delitem 2004,1;
	getitem 6820,rand(1,5);
	end;
thirteen:
	delitem 2005,1;
	getitem 6820,rand(1,5);
	end;
fourteen:
	delitem 13431,1;
	getitem 6820,rand(1,5);
	end;
fifteen:
	delitem 1196,1;
	getitem 6820,rand(1,5);
	end;
sixteen:
	delitem 13421,1;
	getitem 6820,rand(1,5);
	end;
seventeen:
	delitem 1584,1;
	getitem 6820,rand(1,5);
	end;
eightteen:
	delitem 13061,1;
	getitem 6820,rand(1,5);
nineteen:
	delitem 13062,1;
	getitem 6820,rand(1,5);
	end;
twenty:
	delitem 13070,1;
	getitem 6820,rand(1,5);
	end;
twentyone:
	delitem 13046,1;
	getitem 6820,rand(1,5);
	end;
twentytwo:
	delitem 13047,1;
	getitem 6820,rand(1,5);
	end;
twentythree:
	delitem 16017,1;
	getitem 6820,rand(1,5);
	end;
twentyfour:
	delitem 16010,1;
	getitem 6820,rand(1,5);
	end;
twentyfive:
	delitem 16000,1;
	getitem 6820,rand(1,5);
	end;
twentysix:
	delitem 16001,1;
	getitem 6820,rand(1,5);
	end;
twentyseven:
	delitem 1433,1;
	getitem 6820,rand(1,5);
	end;
twentyeight:
	delitem 1435,1;
	getitem 6820,rand(1,5);
	end;
twentynine:
	delitem 1490,1;
	getitem 6820,rand(1,5);
	end;
thirty:
	delitem 1930,1;
	getitem 6820,rand(1,5);
	end;
thirtyone:
	delitem 1963,1;
	getitem 6820,rand(1,5);
	end;
thirtytwo:
	delitem 1830,1;
	getitem 6820,rand(1,5);
	end;
thirtythree:
	delitem 1393,1;
	getitem 6820,rand(1,5);
	end;
thirtyfour:
	delitem 1392,1;
	getitem 6820,rand(1,5);
	end;
	
Z_EEE:
	mes "I can also Exchange 50pcs energy debris and 1 3rd job head gear to 1 costume 3rd job items";
	next;
	menu "Costume Rune Circlet",Z_EEEE,"Costume Mitra",Z_EEEEE,"Costume Driver Band",Z_EEEEEE,"Costume Driver Band (Yellow)",Z_EEEEEEE,"Costume Shadow Crown",Z_EEEEEEEE,"Costume Minstrel Song",Z_EEEEEEEEE,"Costume Midas Whisper",Z_EEEEEEEEEE,"Costume Magic Stone Hat",Z_EEEEEEEEEEE,"Costume Burning Spirit",Z_EEEEEEEEEEEE,"Costume Wispers of Wind",Z_EEEEEEEEEEEEE,"Costume Circlet of Bone",Z_EEEEEEEEEEEEEE,"Costume Guardian Crown",Z_EEEEEEEEEEEEEEE,"Costume Camouflage of Rabbit Hood",Z_EEEEEEEEEEEEEEEE,"Leave",Z_EXIT;

Z_EEEE:
	if(countitem(6820) < 50 || countitem(18971) < 1) GOTO Z_NOITEM;
	delitem 6820,50;//Items: Sombrero,
	delitem 18971,1;//Items: Feather_of_Birds,
	getitem 19961,1;//Items: Bird_Nest,
	mes "Thank you very very much!";
	end;
Z_EEEEE:
	if(countitem(6820) < 50 || countitem(18972) < 1) GOTO Z_NOITEM;
	delitem 6820,50;//Items: Sombrero,
	delitem 18972,1;//Items: Feather_of_Birds,
	getitem 19962,1;//Items: Bird_Nest,
	mes "Thank you very very much!";
	end;
Z_EEEEEE:
	if(countitem(6820) < 50 || countitem(18973) < 1) GOTO Z_NOITEM;
	delitem 6820,50;//Items: Sombrero,
	delitem 18973,1;//Items: Feather_of_Birds,
	getitem 19963,1;//Items: Bird_Nest,
	mes "Thank you very very much!";
	end;
Z_EEEEEEE:
	if(countitem(6820) < 50 || countitem(18974) < 1) GOTO Z_NOITEM;
	delitem 6820,50;//Items: Sombrero,
	delitem 18974,1;//Items: Feather_of_Birds,
	getitem 19964,1;//Items: Bird_Nest,
	mes "Thank you very very much!";
	end;
Z_EEEEEEEE:
	if(countitem(6820) < 50 || countitem(18974) < 1) GOTO Z_NOITEM;
	delitem 6820,50;//Items: Sombrero,
	delitem 18983,1;//Items: Feather_of_Birds,
	getitem 19965,1;//Items: Bird_Nest,
	mes "Thank you very very much!";
	end;
Z_EEEEEEEEE:
	if(countitem(6820) < 50 || countitem(18974) < 1) GOTO Z_NOITEM;
	delitem 6820,50;//Items: Sombrero,
	delitem 18976,1;//Items: Feather_of_Birds,
	getitem 19966,1;//Items: Bird_Nest,
	mes "Thank you very very much!";
	end;
Z_EEEEEEEEEE:
	if(countitem(6820) < 50 || countitem(18974) < 1) GOTO Z_NOITEM;
	delitem 6820,50;//Items: Sombrero,
	delitem 18977,1;//Items: Feather_of_Birds,
	getitem 19967,1;//Items: Bird_Nest,
	mes "Thank you very very much!";
	end;
Z_EEEEEEEEEEE:
	if(countitem(6820) < 50 || countitem(18974) < 1) GOTO Z_NOITEM;
	delitem 6820,50;//Items: Sombrero,
	delitem 18978,1;//Items: Feather_of_Birds,
	getitem 19968,1;//Items: Bird_Nest,
	mes "Thank you very very much!";
	end;
Z_EEEEEEEEEEEE:
	if(countitem(6820) < 50 || countitem(18974) < 1) GOTO Z_NOITEM;
	delitem 6820,50;//Items: Sombrero,
	delitem 18979,1;//Items: Feather_of_Birds,
	getitem 19969,1;//Items: Bird_Nest,
	mes "Thank you very very much!";
	end;
Z_EEEEEEEEEEEEE:
	if(countitem(6820) < 50 || countitem(18974) < 1) GOTO Z_NOITEM;
	delitem 6820,50;//Items: Sombrero,
	delitem 18980,1;//Items: Feather_of_Birds,
	getitem 19970,1;//Items: Bird_Nest,
	mes "Thank you very very much!";
	end;
Z_EEEEEEEEEEEEEE:
	if(countitem(6820) < 50 || countitem(18974) < 1) GOTO Z_NOITEM;
	delitem 6820,50;//Items: Sombrero,
	delitem 18982,1;//Items: Feather_of_Birds,
	getitem 19971,1;//Items: Bird_Nest,
	mes "Thank you very very much!";
	end;
Z_EEEEEEEEEEEEEEE:
	if(countitem(6820) < 50 || countitem(18974) < 1) GOTO Z_NOITEM;
	delitem 6820,50;//Items: Sombrero,
	delitem 18983,1;//Items: Feather_of_Birds,
	getitem 19972,1;//Items: Bird_Nest,
	mes "Thank you very very much!";
	end;
Z_EEEEEEEEEEEEEEEE:
	if(countitem(6820) < 50 || countitem(18974) < 1) GOTO Z_NOITEM;
	delitem 6820,50;//Items: Sombrero,
	delitem 18984,1;//Items: Feather_of_Birds,
	getitem 19974,1;//Items: Bird_Nest,
	mes "Thank you very very much!";
	end;

Z_NOITEM:
	mes "You dont have enought items i need";
	mes "Good bye.";
	close;

Z_EXIT:
	mes "[Reaper]";
	mes callfunc("F_Bye");
	close;
}

 

  • Upvote 1
Link to comment
Share on other sites

  • 0

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

2 minutes ago, hendra814 said:

you mean like this

yes with the 

disable_items

at the start after 

lhz_dun_n,135,264,4	script	Memory of Tears	10092,{

 

 

Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  55
  • Topics Per Day:  0.01
  • Content Count:  1188
  • Reputation:   161
  • Joined:  06/12/12
  • Last Seen:  

12 minutes ago, sader1992 said:

yes with the 


disable_items

at the start after 


lhz_dun_n,135,264,4	script	Memory of Tears	10092,{

 

 

i don't understand about disable_items.

could you help me put in the script.

Link to comment
Share on other sites

  • 0

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

lhz_dun_n,135,264,4	script	Memory of Tears	10092,{
	disable_items;
mes "I can Convert some items to energy debris in random from 1 to 5 what do you want";
next;
menu "Exchange Items to Energy Debris",Z_EE,"Create Costume",Z_EEE,"Leave",Z_EXIT;

Z_EE:
	mes "Done Thank you";
	if(countitem(1284) > 0) goto one;
	 if(countitem(1285) > 0) goto two;
	 if(countitem(1290) > 0) goto three;
	 if(countitem(18109) > 0) goto four;
	 if(countitem(18110) > 0) goto five;
	 if(countitem(18111) > 0) goto six;
	 if(countitem(1745) > 0) goto seven;
	 if(countitem(18103) > 0) goto eight;
	 if(countitem(1647) > 0) goto nine;
	 if(countitem(1659) > 0) goto ten;
	 if(countitem(1654) > 0) goto eleven;
	 if(countitem(2004) > 0) goto twelve;
	 if(countitem(2005) > 0) goto thirteen;
	 if(countitem(13431) > 0) goto fourteen;
	 if(countitem(1196) > 0) goto fifteen;
	 if(countitem(13421) > 0) goto sixteen;
	 if(countitem(1584) > 0) goto seventeen;
	 if(countitem(13061) > 0) goto eightteen;
	 if(countitem(13062) > 0) goto nineteen;
	 if(countitem(13070) > 0) goto twenty;
	 if(countitem(13046) > 0) goto twentyone;
	 if(countitem(13047) > 0) goto twentytwo;
	 if(countitem(16017) > 0) goto twentythree;
	 if(countitem(16010) > 0) goto twentyfour;
	 if(countitem(16000) > 0) goto twentyfive;
	 if(countitem(16001) > 0) goto twentysix;
	 if(countitem(1433) > 0) goto twentyseven;
	 if(countitem(1435) > 0) goto twentyeight;
	 if(countitem(1490) > 0) goto twentynine;
	 if(countitem(1930) > 0) goto thirty;
	 if(countitem(1963) > 0) goto thirtyone;
	 if(countitem(1830) > 0) goto thirtytwo;
	 if(countitem(1393) > 0) goto thirtythree;
	 if(countitem(1392) > 0) goto thirtyfour;
	 goto Z_NOITEM;

one:
	delitem 1284,1;
	getitem 6820,rand(1,5);
	end;
two:
	delitem 1285,1;
	getitem 6820,rand(1,5);
	end;
three:
	delitem 1290,1;
	getitem 6820,rand(1,5);
	end;
four:
	delitem 18109,1;
	getitem 6820,rand(1,5);
	end;
five:
	delitem 18110,1;
	getitem 6820,rand(1,5);
	end;
six:
	delitem 18111,1;
	getitem 6820,rand(1,5);
	end;
zeven:
	delitem 1745,1;
	getitem 6820,rand(1,5);
	end;
eight:
	delitem 18103,1;
	getitem 6820,rand(1,5);
	end;
nine:
	delitem 1647,1;
	getitem 6820,rand(1,5);
	end;
ten:
	delitem 1659,1;
	getitem 6820,rand(1,5);
	end;
eleven:
	delitem 1654,1;
	getitem 6820,rand(1,5);
	end;
twelve:
	delitem 2004,1;
	getitem 6820,rand(1,5);
	end;
thirteen:
	delitem 2005,1;
	getitem 6820,rand(1,5);
	end;
fourteen:
	delitem 13431,1;
	getitem 6820,rand(1,5);
	end;
fifteen:
	delitem 1196,1;
	getitem 6820,rand(1,5);
	end;
sixteen:
	delitem 13421,1;
	getitem 6820,rand(1,5);
	end;
seventeen:
	delitem 1584,1;
	getitem 6820,rand(1,5);
	end;
eightteen:
	delitem 13061,1;
	getitem 6820,rand(1,5);
nineteen:
	delitem 13062,1;
	getitem 6820,rand(1,5);
	end;
twenty:
	delitem 13070,1;
	getitem 6820,rand(1,5);
	end;
twentyone:
	delitem 13046,1;
	getitem 6820,rand(1,5);
	end;
twentytwo:
	delitem 13047,1;
	getitem 6820,rand(1,5);
	end;
twentythree:
	delitem 16017,1;
	getitem 6820,rand(1,5);
	end;
twentyfour:
	delitem 16010,1;
	getitem 6820,rand(1,5);
	end;
twentyfive:
	delitem 16000,1;
	getitem 6820,rand(1,5);
	end;
twentysix:
	delitem 16001,1;
	getitem 6820,rand(1,5);
	end;
twentyseven:
	delitem 1433,1;
	getitem 6820,rand(1,5);
	end;
twentyeight:
	delitem 1435,1;
	getitem 6820,rand(1,5);
	end;
twentynine:
	delitem 1490,1;
	getitem 6820,rand(1,5);
	end;
thirty:
	delitem 1930,1;
	getitem 6820,rand(1,5);
	end;
thirtyone:
	delitem 1963,1;
	getitem 6820,rand(1,5);
	end;
thirtytwo:
	delitem 1830,1;
	getitem 6820,rand(1,5);
	end;
thirtythree:
	delitem 1393,1;
	getitem 6820,rand(1,5);
	end;
thirtyfour:
	delitem 1392,1;
	getitem 6820,rand(1,5);
	end;
	
Z_EEE:
	mes "I can also Exchange 50pcs energy debris and 1 3rd job head gear to 1 costume 3rd job items";
	next;
	menu "Costume Rune Circlet",Z_EEEE,"Costume Mitra",Z_EEEEE,"Costume Driver Band",Z_EEEEEE,"Costume Driver Band (Yellow)",Z_EEEEEEE,"Costume Shadow Crown",Z_EEEEEEEE,"Costume Minstrel Song",Z_EEEEEEEEE,"Costume Midas Whisper",Z_EEEEEEEEEE,"Costume Magic Stone Hat",Z_EEEEEEEEEEE,"Costume Burning Spirit",Z_EEEEEEEEEEEE,"Costume Wispers of Wind",Z_EEEEEEEEEEEEE,"Costume Circlet of Bone",Z_EEEEEEEEEEEEEE,"Costume Guardian Crown",Z_EEEEEEEEEEEEEEE,"Costume Camouflage of Rabbit Hood",Z_EEEEEEEEEEEEEEEE,"Leave",Z_EXIT;

Z_EEEE:
	if(countitem(6820) < 50 || countitem(18971) < 1) GOTO Z_NOITEM;
	delitem 6820,50;//Items: Sombrero,
	delitem 18971,1;//Items: Feather_of_Birds,
	getitem 19961,1;//Items: Bird_Nest,
	mes "Thank you very very much!";
	end;
Z_EEEEE:
	if(countitem(6820) < 50 || countitem(18972) < 1) GOTO Z_NOITEM;
	delitem 6820,50;//Items: Sombrero,
	delitem 18972,1;//Items: Feather_of_Birds,
	getitem 19962,1;//Items: Bird_Nest,
	mes "Thank you very very much!";
	end;
Z_EEEEEE:
	if(countitem(6820) < 50 || countitem(18973) < 1) GOTO Z_NOITEM;
	delitem 6820,50;//Items: Sombrero,
	delitem 18973,1;//Items: Feather_of_Birds,
	getitem 19963,1;//Items: Bird_Nest,
	mes "Thank you very very much!";
	end;
Z_EEEEEEE:
	if(countitem(6820) < 50 || countitem(18974) < 1) GOTO Z_NOITEM;
	delitem 6820,50;//Items: Sombrero,
	delitem 18974,1;//Items: Feather_of_Birds,
	getitem 19964,1;//Items: Bird_Nest,
	mes "Thank you very very much!";
	end;
Z_EEEEEEEE:
	if(countitem(6820) < 50 || countitem(18974) < 1) GOTO Z_NOITEM;
	delitem 6820,50;//Items: Sombrero,
	delitem 18983,1;//Items: Feather_of_Birds,
	getitem 19965,1;//Items: Bird_Nest,
	mes "Thank you very very much!";
	end;
Z_EEEEEEEEE:
	if(countitem(6820) < 50 || countitem(18974) < 1) GOTO Z_NOITEM;
	delitem 6820,50;//Items: Sombrero,
	delitem 18976,1;//Items: Feather_of_Birds,
	getitem 19966,1;//Items: Bird_Nest,
	mes "Thank you very very much!";
	end;
Z_EEEEEEEEEE:
	if(countitem(6820) < 50 || countitem(18974) < 1) GOTO Z_NOITEM;
	delitem 6820,50;//Items: Sombrero,
	delitem 18977,1;//Items: Feather_of_Birds,
	getitem 19967,1;//Items: Bird_Nest,
	mes "Thank you very very much!";
	end;
Z_EEEEEEEEEEE:
	if(countitem(6820) < 50 || countitem(18974) < 1) GOTO Z_NOITEM;
	delitem 6820,50;//Items: Sombrero,
	delitem 18978,1;//Items: Feather_of_Birds,
	getitem 19968,1;//Items: Bird_Nest,
	mes "Thank you very very much!";
	end;
Z_EEEEEEEEEEEE:
	if(countitem(6820) < 50 || countitem(18974) < 1) GOTO Z_NOITEM;
	delitem 6820,50;//Items: Sombrero,
	delitem 18979,1;//Items: Feather_of_Birds,
	getitem 19969,1;//Items: Bird_Nest,
	mes "Thank you very very much!";
	end;
Z_EEEEEEEEEEEEE:
	if(countitem(6820) < 50 || countitem(18974) < 1) GOTO Z_NOITEM;
	delitem 6820,50;//Items: Sombrero,
	delitem 18980,1;//Items: Feather_of_Birds,
	getitem 19970,1;//Items: Bird_Nest,
	mes "Thank you very very much!";
	end;
Z_EEEEEEEEEEEEEE:
	if(countitem(6820) < 50 || countitem(18974) < 1) GOTO Z_NOITEM;
	delitem 6820,50;//Items: Sombrero,
	delitem 18982,1;//Items: Feather_of_Birds,
	getitem 19971,1;//Items: Bird_Nest,
	mes "Thank you very very much!";
	end;
Z_EEEEEEEEEEEEEEE:
	if(countitem(6820) < 50 || countitem(18974) < 1) GOTO Z_NOITEM;
	delitem 6820,50;//Items: Sombrero,
	delitem 18983,1;//Items: Feather_of_Birds,
	getitem 19972,1;//Items: Bird_Nest,
	mes "Thank you very very much!";
	end;
Z_EEEEEEEEEEEEEEEE:
	if(countitem(6820) < 50 || countitem(18974) < 1) GOTO Z_NOITEM;
	delitem 6820,50;//Items: Sombrero,
	delitem 18984,1;//Items: Feather_of_Birds,
	getitem 19974,1;//Items: Bird_Nest,
	mes "Thank you very very much!";
	end;

Z_NOITEM:
	mes "You dont have enought items i need";
	mes "Good bye.";
	close;

Z_EXIT:
	mes "[Reaper]";
	mes callfunc("F_Bye");
	close;
}

disable item is used for every npc work with items that can be equip like refine npcs or enchant etc

*enable_items;
*disable_items;

These commands toggle the ability to change equipment while interacting with
an NPC. To avoid possible exploits, the commands affect the particular script
instance only. Note that if a different script also calls enable_items, it
will override the last call (so you may want to call this command at the start
of your script without assuming it is still in effect).

The default setting, 'item_enabled_npc', is defined in 'conf/battle/items.conf'.

 

  • Upvote 1
Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  197
  • Topics Per Day:  0.07
  • Content Count:  883
  • Reputation:   28
  • Joined:  02/13/17
  • Last Seen:  

8 minutes ago, sader1992 said:

yes with the 


disable_items

at the start after 


lhz_dun_n,135,264,4	script	Memory of Tears	10092,{

 

 

@sader1992 you mean like this?

disable_items;

lhz_dun_n,135,264,4 script Memory of Tears 10092,{

 

 

Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  197
  • Topics Per Day:  0.07
  • Content Count:  883
  • Reputation:   28
  • Joined:  02/13/17
  • Last Seen:  

2 minutes ago, sader1992 said:

lhz_dun_n,135,264,4	script	Memory of Tears	10092,{
	disable_items;
mes "I can Convert some items to energy debris in random from 1 to 5 what do you want";
next;
menu "Exchange Items to Energy Debris",Z_EE,"Create Costume",Z_EEE,"Leave",Z_EXIT;

Z_EE:
	mes "Done Thank you";
	if(countitem(1284) > 0) goto one;
	 if(countitem(1285) > 0) goto two;
	 if(countitem(1290) > 0) goto three;
	 if(countitem(18109) > 0) goto four;
	 if(countitem(18110) > 0) goto five;
	 if(countitem(18111) > 0) goto six;
	 if(countitem(1745) > 0) goto seven;
	 if(countitem(18103) > 0) goto eight;
	 if(countitem(1647) > 0) goto nine;
	 if(countitem(1659) > 0) goto ten;
	 if(countitem(1654) > 0) goto eleven;
	 if(countitem(2004) > 0) goto twelve;
	 if(countitem(2005) > 0) goto thirteen;
	 if(countitem(13431) > 0) goto fourteen;
	 if(countitem(1196) > 0) goto fifteen;
	 if(countitem(13421) > 0) goto sixteen;
	 if(countitem(1584) > 0) goto seventeen;
	 if(countitem(13061) > 0) goto eightteen;
	 if(countitem(13062) > 0) goto nineteen;
	 if(countitem(13070) > 0) goto twenty;
	 if(countitem(13046) > 0) goto twentyone;
	 if(countitem(13047) > 0) goto twentytwo;
	 if(countitem(16017) > 0) goto twentythree;
	 if(countitem(16010) > 0) goto twentyfour;
	 if(countitem(16000) > 0) goto twentyfive;
	 if(countitem(16001) > 0) goto twentysix;
	 if(countitem(1433) > 0) goto twentyseven;
	 if(countitem(1435) > 0) goto twentyeight;
	 if(countitem(1490) > 0) goto twentynine;
	 if(countitem(1930) > 0) goto thirty;
	 if(countitem(1963) > 0) goto thirtyone;
	 if(countitem(1830) > 0) goto thirtytwo;
	 if(countitem(1393) > 0) goto thirtythree;
	 if(countitem(1392) > 0) goto thirtyfour;
	 goto Z_NOITEM;

one:
	delitem 1284,1;
	getitem 6820,rand(1,5);
	end;
two:
	delitem 1285,1;
	getitem 6820,rand(1,5);
	end;
three:
	delitem 1290,1;
	getitem 6820,rand(1,5);
	end;
four:
	delitem 18109,1;
	getitem 6820,rand(1,5);
	end;
five:
	delitem 18110,1;
	getitem 6820,rand(1,5);
	end;
six:
	delitem 18111,1;
	getitem 6820,rand(1,5);
	end;
zeven:
	delitem 1745,1;
	getitem 6820,rand(1,5);
	end;
eight:
	delitem 18103,1;
	getitem 6820,rand(1,5);
	end;
nine:
	delitem 1647,1;
	getitem 6820,rand(1,5);
	end;
ten:
	delitem 1659,1;
	getitem 6820,rand(1,5);
	end;
eleven:
	delitem 1654,1;
	getitem 6820,rand(1,5);
	end;
twelve:
	delitem 2004,1;
	getitem 6820,rand(1,5);
	end;
thirteen:
	delitem 2005,1;
	getitem 6820,rand(1,5);
	end;
fourteen:
	delitem 13431,1;
	getitem 6820,rand(1,5);
	end;
fifteen:
	delitem 1196,1;
	getitem 6820,rand(1,5);
	end;
sixteen:
	delitem 13421,1;
	getitem 6820,rand(1,5);
	end;
seventeen:
	delitem 1584,1;
	getitem 6820,rand(1,5);
	end;
eightteen:
	delitem 13061,1;
	getitem 6820,rand(1,5);
nineteen:
	delitem 13062,1;
	getitem 6820,rand(1,5);
	end;
twenty:
	delitem 13070,1;
	getitem 6820,rand(1,5);
	end;
twentyone:
	delitem 13046,1;
	getitem 6820,rand(1,5);
	end;
twentytwo:
	delitem 13047,1;
	getitem 6820,rand(1,5);
	end;
twentythree:
	delitem 16017,1;
	getitem 6820,rand(1,5);
	end;
twentyfour:
	delitem 16010,1;
	getitem 6820,rand(1,5);
	end;
twentyfive:
	delitem 16000,1;
	getitem 6820,rand(1,5);
	end;
twentysix:
	delitem 16001,1;
	getitem 6820,rand(1,5);
	end;
twentyseven:
	delitem 1433,1;
	getitem 6820,rand(1,5);
	end;
twentyeight:
	delitem 1435,1;
	getitem 6820,rand(1,5);
	end;
twentynine:
	delitem 1490,1;
	getitem 6820,rand(1,5);
	end;
thirty:
	delitem 1930,1;
	getitem 6820,rand(1,5);
	end;
thirtyone:
	delitem 1963,1;
	getitem 6820,rand(1,5);
	end;
thirtytwo:
	delitem 1830,1;
	getitem 6820,rand(1,5);
	end;
thirtythree:
	delitem 1393,1;
	getitem 6820,rand(1,5);
	end;
thirtyfour:
	delitem 1392,1;
	getitem 6820,rand(1,5);
	end;
	
Z_EEE:
	mes "I can also Exchange 50pcs energy debris and 1 3rd job head gear to 1 costume 3rd job items";
	next;
	menu "Costume Rune Circlet",Z_EEEE,"Costume Mitra",Z_EEEEE,"Costume Driver Band",Z_EEEEEE,"Costume Driver Band (Yellow)",Z_EEEEEEE,"Costume Shadow Crown",Z_EEEEEEEE,"Costume Minstrel Song",Z_EEEEEEEEE,"Costume Midas Whisper",Z_EEEEEEEEEE,"Costume Magic Stone Hat",Z_EEEEEEEEEEE,"Costume Burning Spirit",Z_EEEEEEEEEEEE,"Costume Wispers of Wind",Z_EEEEEEEEEEEEE,"Costume Circlet of Bone",Z_EEEEEEEEEEEEEE,"Costume Guardian Crown",Z_EEEEEEEEEEEEEEE,"Costume Camouflage of Rabbit Hood",Z_EEEEEEEEEEEEEEEE,"Leave",Z_EXIT;

Z_EEEE:
	if(countitem(6820) < 50 || countitem(18971) < 1) GOTO Z_NOITEM;
	delitem 6820,50;//Items: Sombrero,
	delitem 18971,1;//Items: Feather_of_Birds,
	getitem 19961,1;//Items: Bird_Nest,
	mes "Thank you very very much!";
	end;
Z_EEEEE:
	if(countitem(6820) < 50 || countitem(18972) < 1) GOTO Z_NOITEM;
	delitem 6820,50;//Items: Sombrero,
	delitem 18972,1;//Items: Feather_of_Birds,
	getitem 19962,1;//Items: Bird_Nest,
	mes "Thank you very very much!";
	end;
Z_EEEEEE:
	if(countitem(6820) < 50 || countitem(18973) < 1) GOTO Z_NOITEM;
	delitem 6820,50;//Items: Sombrero,
	delitem 18973,1;//Items: Feather_of_Birds,
	getitem 19963,1;//Items: Bird_Nest,
	mes "Thank you very very much!";
	end;
Z_EEEEEEE:
	if(countitem(6820) < 50 || countitem(18974) < 1) GOTO Z_NOITEM;
	delitem 6820,50;//Items: Sombrero,
	delitem 18974,1;//Items: Feather_of_Birds,
	getitem 19964,1;//Items: Bird_Nest,
	mes "Thank you very very much!";
	end;
Z_EEEEEEEE:
	if(countitem(6820) < 50 || countitem(18974) < 1) GOTO Z_NOITEM;
	delitem 6820,50;//Items: Sombrero,
	delitem 18983,1;//Items: Feather_of_Birds,
	getitem 19965,1;//Items: Bird_Nest,
	mes "Thank you very very much!";
	end;
Z_EEEEEEEEE:
	if(countitem(6820) < 50 || countitem(18974) < 1) GOTO Z_NOITEM;
	delitem 6820,50;//Items: Sombrero,
	delitem 18976,1;//Items: Feather_of_Birds,
	getitem 19966,1;//Items: Bird_Nest,
	mes "Thank you very very much!";
	end;
Z_EEEEEEEEEE:
	if(countitem(6820) < 50 || countitem(18974) < 1) GOTO Z_NOITEM;
	delitem 6820,50;//Items: Sombrero,
	delitem 18977,1;//Items: Feather_of_Birds,
	getitem 19967,1;//Items: Bird_Nest,
	mes "Thank you very very much!";
	end;
Z_EEEEEEEEEEE:
	if(countitem(6820) < 50 || countitem(18974) < 1) GOTO Z_NOITEM;
	delitem 6820,50;//Items: Sombrero,
	delitem 18978,1;//Items: Feather_of_Birds,
	getitem 19968,1;//Items: Bird_Nest,
	mes "Thank you very very much!";
	end;
Z_EEEEEEEEEEEE:
	if(countitem(6820) < 50 || countitem(18974) < 1) GOTO Z_NOITEM;
	delitem 6820,50;//Items: Sombrero,
	delitem 18979,1;//Items: Feather_of_Birds,
	getitem 19969,1;//Items: Bird_Nest,
	mes "Thank you very very much!";
	end;
Z_EEEEEEEEEEEEE:
	if(countitem(6820) < 50 || countitem(18974) < 1) GOTO Z_NOITEM;
	delitem 6820,50;//Items: Sombrero,
	delitem 18980,1;//Items: Feather_of_Birds,
	getitem 19970,1;//Items: Bird_Nest,
	mes "Thank you very very much!";
	end;
Z_EEEEEEEEEEEEEE:
	if(countitem(6820) < 50 || countitem(18974) < 1) GOTO Z_NOITEM;
	delitem 6820,50;//Items: Sombrero,
	delitem 18982,1;//Items: Feather_of_Birds,
	getitem 19971,1;//Items: Bird_Nest,
	mes "Thank you very very much!";
	end;
Z_EEEEEEEEEEEEEEE:
	if(countitem(6820) < 50 || countitem(18974) < 1) GOTO Z_NOITEM;
	delitem 6820,50;//Items: Sombrero,
	delitem 18983,1;//Items: Feather_of_Birds,
	getitem 19972,1;//Items: Bird_Nest,
	mes "Thank you very very much!";
	end;
Z_EEEEEEEEEEEEEEEE:
	if(countitem(6820) < 50 || countitem(18974) < 1) GOTO Z_NOITEM;
	delitem 6820,50;//Items: Sombrero,
	delitem 18984,1;//Items: Feather_of_Birds,
	getitem 19974,1;//Items: Bird_Nest,
	mes "Thank you very very much!";
	end;

Z_NOITEM:
	mes "You dont have enought items i need";
	mes "Good bye.";
	close;

Z_EXIT:
	mes "[Reaper]";
	mes callfunc("F_Bye");
	close;
}

disable item is used for every npc work with items that can be equip like refine npcs or enchant etc


*enable_items;
*disable_items;

These commands toggle the ability to change equipment while interacting with
an NPC. To avoid possible exploits, the commands affect the particular script
instance only. Note that if a different script also calls enable_items, it
will override the last call (so you may want to call this command at the start
of your script without assuming it is still in effect).

The default setting, 'item_enabled_npc', is defined in 'conf/battle/items.conf'.

 

ah i dont see this sorry lets try ^_^ thank you so much

Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  197
  • Topics Per Day:  0.07
  • Content Count:  883
  • Reputation:   28
  • Joined:  02/13/17
  • Last Seen:  

@sader1992 btw i already test the script but the npc still eating the item when equipped

 

Link to comment
Share on other sites

  • 0

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

dose the player have the same item in the bag ?

Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  197
  • Topics Per Day:  0.07
  • Content Count:  883
  • Reputation:   28
  • Joined:  02/13/17
  • Last Seen:  

6 minutes ago, sader1992 said:

dose the player have the same item in the bag ?

yes i test it with 5pcs 16001 on inventory and 1 16001 on my equip

 

after converting all items on my bag i choose a convertion again then i check my equip red bag ( 16001 ) also gone

Edited by Quesooo
Link to comment
Share on other sites

  • 0

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

3 minutes ago, Quesooo said:

yes i test it with 5pcs 16001 on inventory and 1 16001 on my equip

i test it and it work

if i am wearing the item 16001 it take it from me and give me Energy Debris

  • Upvote 1
Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  197
  • Topics Per Day:  0.07
  • Content Count:  883
  • Reputation:   28
  • Joined:  02/13/17
  • Last Seen:  

1 minute ago, sader1992 said:

i test it and it work

if i am wearing the item 16001 it take it from me and give me Energy Debris

ahahah sorry thats what i mean the npc only consume item inside the bag not on players equipment

image.png.b1374f6950ef3c46a89860b569d60b2c.png

 

item on my right hand should not gone after i consume all item on my bag at the left side then the npc will tell me i dont have items on my inventory

Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  197
  • Topics Per Day:  0.07
  • Content Count:  883
  • Reputation:   28
  • Joined:  02/13/17
  • Last Seen:  

5 minutes ago, sader1992 said:

well that change every thing XD

you need to write a check for it the item equiped is the same item the npc want it

something like this


if(getequipid(EQI_HAND_R) == 16001){
	if(countitem(16001) > 1)  goto twentysix;
}else{
	if(countitem(16001) > 0)  goto twentysix;
}

or you need to make a sub or function and optimize the script to write this only once not one every id

and make sure you use the right getequipid


*getequipid({<equipment slot>,<char_id>})

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

 

need to reqrite the npc :( thank you sir

Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  55
  • Topics Per Day:  0.01
  • Content Count:  1188
  • Reputation:   161
  • Joined:  06/12/12
  • Last Seen:  

25 minutes ago, sader1992 said:

well that change every thing XD

you need to write a check for it the item equiped is the same item the npc want it

something like this


if(getequipid(EQI_HAND_R) == 16001){
	if(countitem(16001) > 1)  goto twentysix;
}else{
	if(countitem(16001) > 0)  goto twentysix;
}

or you need to make a sub or function and optimize the script to write this only once not one every id

and make sure you use the right getequipid


*getequipid({<equipment slot>,<char_id>})

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

 

how about like this

one:
	if(getequipid(EQI_HAND_R) == 1284){
	if(countitem(1284) == 1)  goto Z_NOITEM;
	}else{
	delitem 1284,1;
	getitem 6820,rand(1,5);
	end;
	}

 

Edited by hendra814
  • MVP 1
Link to comment
Share on other sites

  • 0

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

	if(getequipid(EQI_HAND_R) == 1284){
		if(countitem(1284) == 1)  goto Z_NOITEM;
	}else
		delitem 1284,1;
	getitem 6820,rand(1,5);
	end;
	
if this getequipid(EQI_HAND_R) == 1284 then the player have 1 item in his hand and maybe have another item so if you don't want the npc take the item from his hand you need to
check if the player is equiped the item then check for 2 items
if the player don't equip the item then you need to check for 1 item
the result would be the same that the npc will only take the item from the bag not if the player is equiped it

for else if else done have {} then it will only exeute the next command so if you want the next 2 command to work in else you need to put them in {}
so the result of this command with no change would be 

if the player not equip the item then the script will try to delete the item 
if he have it it will be deleted if not you will get error in the terminal
then the script will do this getitem 6820,rand(1,5); whatever happen in the script

 

Link to comment
Share on other sites

  • 0

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

i did optimize the first part in the script to make it work as you wanted

 

lhz_dun_n,135,264,4	script	Memory of Tears	10092,{
	disable_items;
mes "I can Convert some items to energy debris in random from 1 to 5 what do you want";
next;
menu "Exchange Items to Energy Debris",Z_EE,"Create Costume",Z_EEE,"Leave",Z_EXIT;

Z_EE:
	mes "Done Thank you";
setarray .@itemsid,1284,1285,1290,18109,18110,18111,1745,18103,1647,1659,1654,2004,2005,13431,1196,13421,1584,13061,13062,13070,13046,13047,16017,16010,16000,16001,1433,1435,1490,1930,1963,1830,1393,1392;
	for(.@i=0;.@i<getarraysize(.@itemsid);.@i++){
		callsub getitemsub,.@itemsid[.@i];
	}
	goto Z_NOITEM;
end;	
	
getitemsub:
	if(getequipid(EQI_HAND_R) == getarg(0) && countitem(getarg(0)) > 1){
		delitem getarg(0),1;
		getitem 6820,rand(1,5);
		end;
	}else if(getequipid(EQI_HAND_R) != getarg(0) && countitem(getarg(0)) > 0){
		delitem getarg(0),1;
		getitem 6820,rand(1,5);
		end;
	} 
return;



	//if(countitem(1284) > 0) goto one;
	// if(countitem(1285) > 0) goto two;
	// if(countitem(1290) > 0) goto three;
	// if(countitem(18109) > 0) goto four;
	// if(countitem(18110) > 0) goto five;
	// if(countitem(18111) > 0) goto six;
	// if(countitem(1745) > 0) goto seven;
	// if(countitem(18103) > 0) goto eight;
	// if(countitem(1647) > 0) goto nine;
	// if(countitem(1659) > 0) goto ten;
	// if(countitem(1654) > 0) goto eleven;
	// if(countitem(2004) > 0) goto twelve;
	// if(countitem(2005) > 0) goto thirteen;
	// if(countitem(13431) > 0) goto fourteen;
	// if(countitem(1196) > 0) goto fifteen;
	// if(countitem(13421) > 0) goto sixteen;
	// if(countitem(1584) > 0) goto seventeen;
	// if(countitem(13061) > 0) goto eightteen;
	// if(countitem(13062) > 0) goto nineteen;
	// if(countitem(13070) > 0) goto twenty;
	// if(countitem(13046) > 0) goto twentyone;
	// if(countitem(13047) > 0) goto twentytwo;
	// if(countitem(16017) > 0) goto twentythree;
	// if(countitem(16010) > 0) goto twentyfour;
	// if(countitem(16000) > 0) goto twentyfive;
	// if(countitem(16001) > 0) goto twentysix;
	// if(countitem(1433) > 0) goto twentyseven;
	// if(countitem(1435) > 0) goto twentyeight;
	// if(countitem(1490) > 0) goto twentynine;
	// if(countitem(1930) > 0) goto thirty;
	// if(countitem(1963) > 0) goto thirtyone;
	// if(countitem(1830) > 0) goto thirtytwo;
	// if(countitem(1393) > 0) goto thirtythree;
	// if(countitem(1392) > 0) goto thirtyfour;
	// goto Z_NOITEM;

//one:
//	delitem 1284,1;
//	getitem 6820,rand(1,5);
//	end;
//two:
//	delitem 1285,1;
//	getitem 6820,rand(1,5);
//	end;
//three:
//	delitem 1290,1;
//	getitem 6820,rand(1,5);
//	end;
//four:
//	delitem 18109,1;
//	getitem 6820,rand(1,5);
//	end;
//five:
//	delitem 18110,1;
//	getitem 6820,rand(1,5);
//	end;
//six:
//	delitem 18111,1;
//	getitem 6820,rand(1,5);
//	end;
//zeven:
//	delitem 1745,1;
//	getitem 6820,rand(1,5);
//	end;
//eight:
//	delitem 18103,1;
//	getitem 6820,rand(1,5);
//	end;
//nine:
//	delitem 1647,1;
//	getitem 6820,rand(1,5);
//	end;
//ten:
//	delitem 1659,1;
//	getitem 6820,rand(1,5);
//	end;
//eleven:
//	delitem 1654,1;
//	getitem 6820,rand(1,5);
//	end;
//twelve:
//	delitem 2004,1;
//	getitem 6820,rand(1,5);
//	end;
//thirteen:
//	delitem 2005,1;
//	getitem 6820,rand(1,5);
//	end;
//fourteen:
//	delitem 13431,1;
//	getitem 6820,rand(1,5);
//	end;
//fifteen:
//	delitem 1196,1;
//	getitem 6820,rand(1,5);
//	end;
//sixteen:
//	delitem 13421,1;
//	getitem 6820,rand(1,5);
//	end;
//seventeen:
//	delitem 1584,1;
//	getitem 6820,rand(1,5);
//	end;
//eightteen:
//	delitem 13061,1;
//	getitem 6820,rand(1,5);
//nineteen:
//	delitem 13062,1;
//	getitem 6820,rand(1,5);
//	end;
//twenty:
//	delitem 13070,1;
//	getitem 6820,rand(1,5);
//	end;
//twentyone:
//	delitem 13046,1;
//	getitem 6820,rand(1,5);
//	end;
//twentytwo:
//	delitem 13047,1;
//	getitem 6820,rand(1,5);
//	end;
//twentythree:
//	delitem 16017,1;
//	getitem 6820,rand(1,5);
//	end;
//twentyfour:
//	delitem 16010,1;
//	getitem 6820,rand(1,5);
//	end;
//twentyfive:
//	delitem 16000,1;
//	getitem 6820,rand(1,5);
//	end;
//twentysix:
//	delitem 16001,1;
//	getitem 6820,rand(1,5);
//	end;
//twentyseven:
//	delitem 1433,1;
//	getitem 6820,rand(1,5);
//	end;
//twentyeight:
//	delitem 1435,1;
//	getitem 6820,rand(1,5);
//	end;
//twentynine:
//	delitem 1490,1;
//	getitem 6820,rand(1,5);
//	end;
//thirty:
//	delitem 1930,1;
//	getitem 6820,rand(1,5);
//	end;
//thirtyone:
//	delitem 1963,1;
//	getitem 6820,rand(1,5);
//	end;
//thirtytwo:
//	delitem 1830,1;
//	getitem 6820,rand(1,5);
//	end;
//thirtythree:
//	delitem 1393,1;
//	getitem 6820,rand(1,5);
//	end;
//thirtyfour:
//	delitem 1392,1;
//	getitem 6820,rand(1,5);
//	end;
	

	
	



Z_EEE:
	mes "I can also Exchange 50pcs energy debris and 1 3rd job head gear to 1 costume 3rd job items";
	next;
	menu "Costume Rune Circlet",Z_EEEE,"Costume Mitra",Z_EEEEE,"Costume Driver Band",Z_EEEEEE,"Costume Driver Band (Yellow)",Z_EEEEEEE,"Costume Shadow Crown",Z_EEEEEEEE,"Costume Minstrel Song",Z_EEEEEEEEE,"Costume Midas Whisper",Z_EEEEEEEEEE,"Costume Magic Stone Hat",Z_EEEEEEEEEEE,"Costume Burning Spirit",Z_EEEEEEEEEEEE,"Costume Wispers of Wind",Z_EEEEEEEEEEEEE,"Costume Circlet of Bone",Z_EEEEEEEEEEEEEE,"Costume Guardian Crown",Z_EEEEEEEEEEEEEEE,"Costume Camouflage of Rabbit Hood",Z_EEEEEEEEEEEEEEEE,"Leave",Z_EXIT;

Z_EEEE:
	if(countitem(6820) < 50 || countitem(18971) < 1) GOTO Z_NOITEM;
	delitem 6820,50;//Items: Sombrero,
	delitem 18971,1;//Items: Feather_of_Birds,
	getitem 19961,1;//Items: Bird_Nest,
	mes "Thank you very very much!";
	end;
Z_EEEEE:
	if(countitem(6820) < 50 || countitem(18972) < 1) GOTO Z_NOITEM;
	delitem 6820,50;//Items: Sombrero,
	delitem 18972,1;//Items: Feather_of_Birds,
	getitem 19962,1;//Items: Bird_Nest,
	mes "Thank you very very much!";
	end;
Z_EEEEEE:
	if(countitem(6820) < 50 || countitem(18973) < 1) GOTO Z_NOITEM;
	delitem 6820,50;//Items: Sombrero,
	delitem 18973,1;//Items: Feather_of_Birds,
	getitem 19963,1;//Items: Bird_Nest,
	mes "Thank you very very much!";
	end;
Z_EEEEEEE:
	if(countitem(6820) < 50 || countitem(18974) < 1) GOTO Z_NOITEM;
	delitem 6820,50;//Items: Sombrero,
	delitem 18974,1;//Items: Feather_of_Birds,
	getitem 19964,1;//Items: Bird_Nest,
	mes "Thank you very very much!";
	end;
Z_EEEEEEEE:
	if(countitem(6820) < 50 || countitem(18974) < 1) GOTO Z_NOITEM;
	delitem 6820,50;//Items: Sombrero,
	delitem 18983,1;//Items: Feather_of_Birds,
	getitem 19965,1;//Items: Bird_Nest,
	mes "Thank you very very much!";
	end;
Z_EEEEEEEEE:
	if(countitem(6820) < 50 || countitem(18974) < 1) GOTO Z_NOITEM;
	delitem 6820,50;//Items: Sombrero,
	delitem 18976,1;//Items: Feather_of_Birds,
	getitem 19966,1;//Items: Bird_Nest,
	mes "Thank you very very much!";
	end;
Z_EEEEEEEEEE:
	if(countitem(6820) < 50 || countitem(18974) < 1) GOTO Z_NOITEM;
	delitem 6820,50;//Items: Sombrero,
	delitem 18977,1;//Items: Feather_of_Birds,
	getitem 19967,1;//Items: Bird_Nest,
	mes "Thank you very very much!";
	end;
Z_EEEEEEEEEEE:
	if(countitem(6820) < 50 || countitem(18974) < 1) GOTO Z_NOITEM;
	delitem 6820,50;//Items: Sombrero,
	delitem 18978,1;//Items: Feather_of_Birds,
	getitem 19968,1;//Items: Bird_Nest,
	mes "Thank you very very much!";
	end;
Z_EEEEEEEEEEEE:
	if(countitem(6820) < 50 || countitem(18974) < 1) GOTO Z_NOITEM;
	delitem 6820,50;//Items: Sombrero,
	delitem 18979,1;//Items: Feather_of_Birds,
	getitem 19969,1;//Items: Bird_Nest,
	mes "Thank you very very much!";
	end;
Z_EEEEEEEEEEEEE:
	if(countitem(6820) < 50 || countitem(18974) < 1) GOTO Z_NOITEM;
	delitem 6820,50;//Items: Sombrero,
	delitem 18980,1;//Items: Feather_of_Birds,
	getitem 19970,1;//Items: Bird_Nest,
	mes "Thank you very very much!";
	end;
Z_EEEEEEEEEEEEEE:
	if(countitem(6820) < 50 || countitem(18974) < 1) GOTO Z_NOITEM;
	delitem 6820,50;//Items: Sombrero,
	delitem 18982,1;//Items: Feather_of_Birds,
	getitem 19971,1;//Items: Bird_Nest,
	mes "Thank you very very much!";
	end;
Z_EEEEEEEEEEEEEEE:
	if(countitem(6820) < 50 || countitem(18974) < 1) GOTO Z_NOITEM;
	delitem 6820,50;//Items: Sombrero,
	delitem 18983,1;//Items: Feather_of_Birds,
	getitem 19972,1;//Items: Bird_Nest,
	mes "Thank you very very much!";
	end;
Z_EEEEEEEEEEEEEEEE:
	if(countitem(6820) < 50 || countitem(18974) < 1) GOTO Z_NOITEM;
	delitem 6820,50;//Items: Sombrero,
	delitem 18984,1;//Items: Feather_of_Birds,
	getitem 19974,1;//Items: Bird_Nest,
	mes "Thank you very very much!";
	end;

Z_NOITEM:
	mes "You dont have enought items i need";
	mes "Good bye.";
	close;

Z_EXIT:
	mes "[Reaper]";
	mes callfunc("F_Bye");
	close;
}

 

Edited by sader1992
  • MVP 1
Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  197
  • Topics Per Day:  0.07
  • Content Count:  883
  • Reputation:   28
  • Joined:  02/13/17
  • Last Seen:  

1 minute ago, sader1992 said:

i did optimize the first part in the script to make it work as you wanted

 


lhz_dun_n,135,264,4	script	Memory of Tears	10092,{
	disable_items;
mes "I can Convert some items to energy debris in random from 1 to 5 what do you want";
next;
menu "Exchange Items to Energy Debris",Z_EE,"Create Costume",Z_EEE,"Leave",Z_EXIT;

Z_EE:
	mes "Done Thank you";
setarray .@itemsid,1284,1285,1290,18109,18110,18111,1745,18103,1647,1659,1654,2004,2005,13431,1196,13421,1584,13061,13062,13070,13046,13047,16017,16010,16000,16001,1433,1435,1490,1930,1963,1830,1393,1392;
	for(.@i=0;.@i<getarraysize(.@itemsid);.@i++){
		callsub getitemsub,.@itemsid[.@i];
	}
	goto Z_NOITEM;
end;	
	
getitemsub:
	if(getequipid(EQI_HAND_R) == getarg(0) && countitem(getarg(0)) > 1){
		delitem getarg(0),1;
		getitem 6820,rand(1,5);
	}else if(getequipid(EQI_HAND_R) != getarg(0) && countitem(getarg(0)) > 0){
		delitem getarg(0),1;
		getitem 6820,rand(1,5);
	} 
return;



	//if(countitem(1284) > 0) goto one;
	// if(countitem(1285) > 0) goto two;
	// if(countitem(1290) > 0) goto three;
	// if(countitem(18109) > 0) goto four;
	// if(countitem(18110) > 0) goto five;
	// if(countitem(18111) > 0) goto six;
	// if(countitem(1745) > 0) goto seven;
	// if(countitem(18103) > 0) goto eight;
	// if(countitem(1647) > 0) goto nine;
	// if(countitem(1659) > 0) goto ten;
	// if(countitem(1654) > 0) goto eleven;
	// if(countitem(2004) > 0) goto twelve;
	// if(countitem(2005) > 0) goto thirteen;
	// if(countitem(13431) > 0) goto fourteen;
	// if(countitem(1196) > 0) goto fifteen;
	// if(countitem(13421) > 0) goto sixteen;
	// if(countitem(1584) > 0) goto seventeen;
	// if(countitem(13061) > 0) goto eightteen;
	// if(countitem(13062) > 0) goto nineteen;
	// if(countitem(13070) > 0) goto twenty;
	// if(countitem(13046) > 0) goto twentyone;
	// if(countitem(13047) > 0) goto twentytwo;
	// if(countitem(16017) > 0) goto twentythree;
	// if(countitem(16010) > 0) goto twentyfour;
	// if(countitem(16000) > 0) goto twentyfive;
	// if(countitem(16001) > 0) goto twentysix;
	// if(countitem(1433) > 0) goto twentyseven;
	// if(countitem(1435) > 0) goto twentyeight;
	// if(countitem(1490) > 0) goto twentynine;
	// if(countitem(1930) > 0) goto thirty;
	// if(countitem(1963) > 0) goto thirtyone;
	// if(countitem(1830) > 0) goto thirtytwo;
	// if(countitem(1393) > 0) goto thirtythree;
	// if(countitem(1392) > 0) goto thirtyfour;
	// goto Z_NOITEM;

//one:
//	delitem 1284,1;
//	getitem 6820,rand(1,5);
//	end;
//two:
//	delitem 1285,1;
//	getitem 6820,rand(1,5);
//	end;
//three:
//	delitem 1290,1;
//	getitem 6820,rand(1,5);
//	end;
//four:
//	delitem 18109,1;
//	getitem 6820,rand(1,5);
//	end;
//five:
//	delitem 18110,1;
//	getitem 6820,rand(1,5);
//	end;
//six:
//	delitem 18111,1;
//	getitem 6820,rand(1,5);
//	end;
//zeven:
//	delitem 1745,1;
//	getitem 6820,rand(1,5);
//	end;
//eight:
//	delitem 18103,1;
//	getitem 6820,rand(1,5);
//	end;
//nine:
//	delitem 1647,1;
//	getitem 6820,rand(1,5);
//	end;
//ten:
//	delitem 1659,1;
//	getitem 6820,rand(1,5);
//	end;
//eleven:
//	delitem 1654,1;
//	getitem 6820,rand(1,5);
//	end;
//twelve:
//	delitem 2004,1;
//	getitem 6820,rand(1,5);
//	end;
//thirteen:
//	delitem 2005,1;
//	getitem 6820,rand(1,5);
//	end;
//fourteen:
//	delitem 13431,1;
//	getitem 6820,rand(1,5);
//	end;
//fifteen:
//	delitem 1196,1;
//	getitem 6820,rand(1,5);
//	end;
//sixteen:
//	delitem 13421,1;
//	getitem 6820,rand(1,5);
//	end;
//seventeen:
//	delitem 1584,1;
//	getitem 6820,rand(1,5);
//	end;
//eightteen:
//	delitem 13061,1;
//	getitem 6820,rand(1,5);
//nineteen:
//	delitem 13062,1;
//	getitem 6820,rand(1,5);
//	end;
//twenty:
//	delitem 13070,1;
//	getitem 6820,rand(1,5);
//	end;
//twentyone:
//	delitem 13046,1;
//	getitem 6820,rand(1,5);
//	end;
//twentytwo:
//	delitem 13047,1;
//	getitem 6820,rand(1,5);
//	end;
//twentythree:
//	delitem 16017,1;
//	getitem 6820,rand(1,5);
//	end;
//twentyfour:
//	delitem 16010,1;
//	getitem 6820,rand(1,5);
//	end;
//twentyfive:
//	delitem 16000,1;
//	getitem 6820,rand(1,5);
//	end;
//twentysix:
//	delitem 16001,1;
//	getitem 6820,rand(1,5);
//	end;
//twentyseven:
//	delitem 1433,1;
//	getitem 6820,rand(1,5);
//	end;
//twentyeight:
//	delitem 1435,1;
//	getitem 6820,rand(1,5);
//	end;
//twentynine:
//	delitem 1490,1;
//	getitem 6820,rand(1,5);
//	end;
//thirty:
//	delitem 1930,1;
//	getitem 6820,rand(1,5);
//	end;
//thirtyone:
//	delitem 1963,1;
//	getitem 6820,rand(1,5);
//	end;
//thirtytwo:
//	delitem 1830,1;
//	getitem 6820,rand(1,5);
//	end;
//thirtythree:
//	delitem 1393,1;
//	getitem 6820,rand(1,5);
//	end;
//thirtyfour:
//	delitem 1392,1;
//	getitem 6820,rand(1,5);
//	end;
	

	
	



Z_EEE:
	mes "I can also Exchange 50pcs energy debris and 1 3rd job head gear to 1 costume 3rd job items";
	next;
	menu "Costume Rune Circlet",Z_EEEE,"Costume Mitra",Z_EEEEE,"Costume Driver Band",Z_EEEEEE,"Costume Driver Band (Yellow)",Z_EEEEEEE,"Costume Shadow Crown",Z_EEEEEEEE,"Costume Minstrel Song",Z_EEEEEEEEE,"Costume Midas Whisper",Z_EEEEEEEEEE,"Costume Magic Stone Hat",Z_EEEEEEEEEEE,"Costume Burning Spirit",Z_EEEEEEEEEEEE,"Costume Wispers of Wind",Z_EEEEEEEEEEEEE,"Costume Circlet of Bone",Z_EEEEEEEEEEEEEE,"Costume Guardian Crown",Z_EEEEEEEEEEEEEEE,"Costume Camouflage of Rabbit Hood",Z_EEEEEEEEEEEEEEEE,"Leave",Z_EXIT;

Z_EEEE:
	if(countitem(6820) < 50 || countitem(18971) < 1) GOTO Z_NOITEM;
	delitem 6820,50;//Items: Sombrero,
	delitem 18971,1;//Items: Feather_of_Birds,
	getitem 19961,1;//Items: Bird_Nest,
	mes "Thank you very very much!";
	end;
Z_EEEEE:
	if(countitem(6820) < 50 || countitem(18972) < 1) GOTO Z_NOITEM;
	delitem 6820,50;//Items: Sombrero,
	delitem 18972,1;//Items: Feather_of_Birds,
	getitem 19962,1;//Items: Bird_Nest,
	mes "Thank you very very much!";
	end;
Z_EEEEEE:
	if(countitem(6820) < 50 || countitem(18973) < 1) GOTO Z_NOITEM;
	delitem 6820,50;//Items: Sombrero,
	delitem 18973,1;//Items: Feather_of_Birds,
	getitem 19963,1;//Items: Bird_Nest,
	mes "Thank you very very much!";
	end;
Z_EEEEEEE:
	if(countitem(6820) < 50 || countitem(18974) < 1) GOTO Z_NOITEM;
	delitem 6820,50;//Items: Sombrero,
	delitem 18974,1;//Items: Feather_of_Birds,
	getitem 19964,1;//Items: Bird_Nest,
	mes "Thank you very very much!";
	end;
Z_EEEEEEEE:
	if(countitem(6820) < 50 || countitem(18974) < 1) GOTO Z_NOITEM;
	delitem 6820,50;//Items: Sombrero,
	delitem 18983,1;//Items: Feather_of_Birds,
	getitem 19965,1;//Items: Bird_Nest,
	mes "Thank you very very much!";
	end;
Z_EEEEEEEEE:
	if(countitem(6820) < 50 || countitem(18974) < 1) GOTO Z_NOITEM;
	delitem 6820,50;//Items: Sombrero,
	delitem 18976,1;//Items: Feather_of_Birds,
	getitem 19966,1;//Items: Bird_Nest,
	mes "Thank you very very much!";
	end;
Z_EEEEEEEEEE:
	if(countitem(6820) < 50 || countitem(18974) < 1) GOTO Z_NOITEM;
	delitem 6820,50;//Items: Sombrero,
	delitem 18977,1;//Items: Feather_of_Birds,
	getitem 19967,1;//Items: Bird_Nest,
	mes "Thank you very very much!";
	end;
Z_EEEEEEEEEEE:
	if(countitem(6820) < 50 || countitem(18974) < 1) GOTO Z_NOITEM;
	delitem 6820,50;//Items: Sombrero,
	delitem 18978,1;//Items: Feather_of_Birds,
	getitem 19968,1;//Items: Bird_Nest,
	mes "Thank you very very much!";
	end;
Z_EEEEEEEEEEEE:
	if(countitem(6820) < 50 || countitem(18974) < 1) GOTO Z_NOITEM;
	delitem 6820,50;//Items: Sombrero,
	delitem 18979,1;//Items: Feather_of_Birds,
	getitem 19969,1;//Items: Bird_Nest,
	mes "Thank you very very much!";
	end;
Z_EEEEEEEEEEEEE:
	if(countitem(6820) < 50 || countitem(18974) < 1) GOTO Z_NOITEM;
	delitem 6820,50;//Items: Sombrero,
	delitem 18980,1;//Items: Feather_of_Birds,
	getitem 19970,1;//Items: Bird_Nest,
	mes "Thank you very very much!";
	end;
Z_EEEEEEEEEEEEEE:
	if(countitem(6820) < 50 || countitem(18974) < 1) GOTO Z_NOITEM;
	delitem 6820,50;//Items: Sombrero,
	delitem 18982,1;//Items: Feather_of_Birds,
	getitem 19971,1;//Items: Bird_Nest,
	mes "Thank you very very much!";
	end;
Z_EEEEEEEEEEEEEEE:
	if(countitem(6820) < 50 || countitem(18974) < 1) GOTO Z_NOITEM;
	delitem 6820,50;//Items: Sombrero,
	delitem 18983,1;//Items: Feather_of_Birds,
	getitem 19972,1;//Items: Bird_Nest,
	mes "Thank you very very much!";
	end;
Z_EEEEEEEEEEEEEEEE:
	if(countitem(6820) < 50 || countitem(18974) < 1) GOTO Z_NOITEM;
	delitem 6820,50;//Items: Sombrero,
	delitem 18984,1;//Items: Feather_of_Birds,
	getitem 19974,1;//Items: Bird_Nest,
	mes "Thank you very very much!";
	end;

Z_NOITEM:
	mes "You dont have enought items i need";
	mes "Good bye.";
	close;

Z_EXIT:
	mes "[Reaper]";
	mes callfunc("F_Bye");
	close;
}

 

woah thank you @sader1992 also @hendra814 for keep on getting solutions !

Link to comment
Share on other sites

  • 0

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

refresh the page and recopy i did forgot the end; :P

  • MVP 1
Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  197
  • Topics Per Day:  0.07
  • Content Count:  883
  • Reputation:   28
  • Joined:  02/13/17
  • Last Seen:  

3 minutes ago, sader1992 said:

refresh the page and recopy i did forgot the end; :P

it works what i wanted now thank you so much

Link to comment
Share on other sites

  • 0

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

i have to say something in the script not right

like this part and before /after

Z_EEEEEEEE:
	if(countitem(6820) < 50 || countitem(18974) < 1) GOTO Z_NOITEM;
	delitem 6820,50;//Items: Sombrero,
	delitem 18983,1;//Items: Feather_of_Birds,
	getitem 19965,1;//Items: Bird_Nest,
	mes "Thank you very very much!";
	end


here you are checking fo 18974 but you are deleting 18983

 

Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  197
  • Topics Per Day:  0.07
  • Content Count:  883
  • Reputation:   28
  • Joined:  02/13/17
  • Last Seen:  

1 minute ago, sader1992 said:

i have to say something in the script not right

like this part and before /after


Z_EEEEEEEE:
	if(countitem(6820) < 50 || countitem(18974) < 1) GOTO Z_NOITEM;
	delitem 6820,50;//Items: Sombrero,
	delitem 18983,1;//Items: Feather_of_Birds,
	getitem 19965,1;//Items: Bird_Nest,
	mes "Thank you very very much!";
	end


here you are checking fo 18974 but you are deleting 18983

 

ouch yeah typo thank you ^_^

Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  55
  • Topics Per Day:  0.01
  • Content Count:  1188
  • Reputation:   161
  • Joined:  06/12/12
  • Last Seen:  

18 minutes ago, sader1992 said:

i have to say something in the script not right

like this part and before /after


Z_EEEEEEEE:
	if(countitem(6820) < 50 || countitem(18974) < 1) GOTO Z_NOITEM;
	delitem 6820,50;//Items: Sombrero,
	delitem 18983,1;//Items: Feather_of_Birds,
	getitem 19965,1;//Items: Bird_Nest,
	mes "Thank you very very much!";
	end


here you are checking fo 18974 but you are deleting 18983

 

:lol:

That's old script, the new one not used that.

Btw, @sader1992 Thanks for your helping

 

Edited by hendra814
Link to comment
Share on other sites

  • 0

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

this the full npc not only the first part

lhz_dun_n,135,264,4	script	Memory of Tears	10092,{
	disable_items;
mes "I can Convert some items to energy debris in random from 1 to 5 what do you want";
next;
menu "Exchange Items to Energy Debris",Z_EE,"Create Costume",Z_EEE,"Leave",Z_EXIT;

Z_EE:
	mes "Done Thank you";
setarray .@itemsid,1284,1285,1290,18109,18110,18111,1745,18103,1647,1659,1654,2004,2005,13431,1196,13421,1584,13061,13062,13070,13046,13047,16017,16010,16000,16001,1433,1435,1490,1930,1963,1830,1393,1392;
	for(.@i=0;.@i<getarraysize(.@itemsid);.@i++){
		callsub getitemsub,.@itemsid[.@i];
	}
	goto Z_NOITEM;
end;	
	
getitemsub:
	if(getequipid(EQI_HAND_R) == getarg(0) && countitem(getarg(0)) > 1){
		delitem getarg(0),1;
		getitem 6820,rand(1,5);
		end;
	}else if(getequipid(EQI_HAND_R) != getarg(0) && countitem(getarg(0)) > 0){
		delitem getarg(0),1;
		getitem 6820,rand(1,5);
		end;
	} 
return;

Z_EEE:
	mes "I can also Exchange 50pcs energy debris and 1 3rd job head gear to 1 costume 3rd job items";
	next;
	setarray .@options$,"Costume Rune Circlet:Costume Mitra:Costume Driver Band:Costume Driver Band (Yellow):Costume Shadow Crown:Costume Minstrel Song:Costume Midas Whisper:Costume Magic Stone Hat:Costume Burning Spirit:Costume Wispers of Wind:Costume Circlet of Bone:Costume Guardian Crown:Costume Camouflage of Rabbit Hood:Leave";
	set .@choose,select(.@options$) - 1;
	setarray .@itemid1,18971,18972,18973,18974,18983,18976,18977,18978,18979,18980,18982,18983,18984;//items require
	setarray .@itemid2,19961,19962,19963,19964,19965,19966,19967,19968,19969,19970,19971,19972,19974;//items get
	if(.@choose == 13){//here the last option it's number is 13 if you added more items you need to change this
		goto Z_EXIT;
	}
	if(getequipid(EQI_HEAD_TOP) == .@itemid1[.@choose] && countitem(.@itemid1[.@choose]) > 1){
		if(countitem(6820) < 50) goto Z_NOITEM;
		delitem 6820,50;
		delitem .@itemid1[.@choose],1;
		getitem .@itemid2[.@choose],1;
		mes "Thank you very very much!";
		end;
	}else if(getequipid(EQI_HEAD_TOP) != .@itemid1[.@choose] && countitem(.@itemid1[.@choose]) > 0){
		if(countitem(6820) < 50) goto Z_NOITEM;
		delitem 6820,50;
		delitem .@itemid1[.@choose],1;
		getitem .@itemid2[.@choose],1;
		mes "Thank you very very much!";
		end;
	}
Z_NOITEM:
	mes "You dont have enought items i need";
	mes "Good bye.";
	close;

Z_EXIT:
	mes "[Reaper]";
	mes callfunc("F_Bye");
	close;
}

 

  • MVP 2
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...