Jump to content
  • 0

check if the player is wearing any item.


caspa

Question


  • Group:  Members
  • Topic Count:  194
  • Topics Per Day:  0.04
  • Content Count:  499
  • Reputation:   3
  • Joined:  03/11/12
  • Last Seen:  

hi, i need a script where it would check if the player is wearing any item at all (exclude costume item)

Link to comment
Share on other sites

10 answers to this question

Recommended Posts


  • Group:  Forum Moderator
  • Topic Count:  33
  • Topics Per Day:  0.01
  • Content Count:  1268
  • Reputation:   381
  • Joined:  02/03/12
  • Last Seen:  


prontera,100,100,5 script Nudist 100,{

while(.@i++%11)

if(getequipisequiped(.@i)) end;

emotion e_heh,0;

npctalk "You're naked!";

}

Edited by Skorm
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  194
  • Topics Per Day:  0.04
  • Content Count:  499
  • Reputation:   3
  • Joined:  03/11/12
  • Last Seen:  

prontera,100,100,5	script	Nudist	100,{
	while(.@i++%11)
		if(getequipisequiped(.@i)) end;
	emotion e_heh,0;
	npctalk "You're naked!";
}

Boss Skorm, i forgot to mention i'm using 3ceAm... can you please convert it to 3ceam? please!!

Link to comment
Share on other sites


  • Group:  Forum Moderator
  • Topic Count:  33
  • Topics Per Day:  0.01
  • Content Count:  1268
  • Reputation:   381
  • Joined:  02/03/12
  • Last Seen:  


prontera,100,100,5 script Nudist 100,{

while((set(.@i,.@i+1)%11))

if(getequipisequiped(.@i)) end;

emotion e_heh,0;

npctalk "You're naked!";

}

Edited by Skorm
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  194
  • Topics Per Day:  0.04
  • Content Count:  499
  • Reputation:   3
  • Joined:  03/11/12
  • Last Seen:  

prontera,100,100,5	script	Nudist	100,{
	while((set(.@i,.@i+1)%11))
		if(getequipisequiped(.@i)) end;
	emotion e_heh,0;
	npctalk "You're naked!";
}

the script is working but after i add it to another script it's not working anymore. can you help me boss skorm!

 

    mes "[ Kafra Employee ]";
    mes "This service cost 200,000 zeny.";
    mes "  ";
    mes "  ";
    mes "Proceed?";
    next;
    menu "Yes",Y_remove,"No",N_remove;
 
Y_remove:
    while((set(.@i,.@i+1)%11))
    if(getequipisequiped(.@i)){ 
    mes "[ Kafra Employee ]";
    mes "You're not wearing any item.";
    close;
    }
}else{
mes "[ Kafra Employee ]";
mes "Please select the item.";
next;
setarray .@position$[1], "Head","Body","Left hand","Right hand","Robe","Shoes","Accessory 1","Accessory 2","Head 2","Head 3";
            set .@menu$,"";
Edited by caspa
Link to comment
Share on other sites


  • Group:  Forum Moderator
  • Topic Count:  33
  • Topics Per Day:  0.01
  • Content Count:  1268
  • Reputation:   381
  • Joined:  02/03/12
  • Last Seen:  

	mes "[ Kafra Employee ]";
	mes "This service cost 200,000 zeny.";
	mes "  ";
	mes "  ";
	mes "Proceed?";
	next;
	menu "Yes",Y_remove,"No",N_remove;
 
Y_remove:
	while((set(.@i,.@i+1)%11))
		if(getequipisequiped(.@i)) {
			mes "It looks like you have some protective gear equipped!";
			close;
		}
	mes "[ Kafra Employee ]";
	mes "You're not wearing any item.";
	close;
} else {
	mes "[ Kafra Employee ]";
	mes "Please select the item.";
	next;
	setarray .@position$[1], "Head","Body","Left hand","Right hand","Robe","Shoes","Accessory 1","Accessory 2","Head 2","Head 3";
				set .@menu$,"";

 

It's hard for me to tell what you want.

Edited by Skorm
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  194
  • Topics Per Day:  0.04
  • Content Count:  499
  • Reputation:   3
  • Joined:  03/11/12
  • Last Seen:  

well i just want the npc to check if your wearing any item at all coz w/o the checker the npc show a blank menu without any item at all because your not wearing any..

post-3034-0-71035000-1373828740_thumb.jpg

Edited by caspa
Link to comment
Share on other sites


  • Group:  Forum Moderator
  • Topic Count:  33
  • Topics Per Day:  0.01
  • Content Count:  1268
  • Reputation:   381
  • Joined:  02/03/12
  • Last Seen:  

well i just want the npc to check if your wearing any item at all coz w/o the checker the npc show a blank menu without any item at all because your not wearing any..

 

Alright paste the whole script.

 

I see what you mean now.

 

	mes "[ Kafra Employee ]";
	mes "This service cost 200,000 zeny.";
	mes "  ";
	mes "  ";
	mes "Proceed?";
	next;
	menu "Yes",Y_remove,"No",N_remove;
 
Y_remove:
	while((set(.@i,.@i+1)%11)) {
		if(getequipisequiped(.@i)) break;
	if(!(.@i%10)) {
		mes "[ Kafra Employee ]";
		mes "You're not wearing any item.";
		close;
	}
	mes "[ Kafra Employee ]";
	mes "Please select the item.";
	next;
	setarray .@position$[1], "Head","Body","Left hand","Right hand","Robe","Shoes","Accessory 1","Accessory 2","Head 2","Head 3";
				set .@menu$,"";
Edited by Skorm
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  194
  • Topics Per Day:  0.04
  • Content Count:  499
  • Reputation:   3
  • Joined:  03/11/12
  • Last Seen:  

still not working boss..... the npc still tells me "please select the item" even though i'm not wearing any equipment.

Link to comment
Share on other sites


  • Group:  Forum Moderator
  • Topic Count:  33
  • Topics Per Day:  0.01
  • Content Count:  1268
  • Reputation:   381
  • Joined:  02/03/12
  • Last Seen:  

still not working boss..... the npc still tells me "please select the item" even though i'm not wearing any equipment.

 

It would probably be best to just check for a null menu anyways. So between the select and the loop that makes the menu add...

 

if(.@menu$=="") { mes "OMG put some clothes on!"; close; }

 

If you don't understand what I mean or think the the script works differently but don't want to paste it just send me a message with the script. I can't do much with the small snipit you gave me.

Edited by Skorm
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  194
  • Topics Per Day:  0.04
  • Content Count:  499
  • Reputation:   3
  • Joined:  03/11/12
  • Last Seen:  

still not working boss..... the npc still tells me "please select the item" even though i'm not wearing any equipment.

 

It would probably be best to just check for a null menu anyways. So between the select and the loop that makes the menu add...

 

if(.@menu$=="") { mes "OMG put some clothes on!"; close; }

 

If you don't understand what I mean or think the the script works differently but don't want to paste it just send me a message with the script. I can't do much with the small snipit you gave me.

I already figured it out... LOL!! i just came up with a more primitive solution...

( getequipid(1) == -1 && getequipid(2) == -1 && getequipid(3) == -1 && getequipid(4) == -1 && getequipid(5) == -1 && getequipid(6) 
 
== -1 && getequipid(7) == -1 && getequipid(8) == -1 && getequipid(9) == -1 && getequipid(10) == -1 )

hahahaha!! thx by the way sir skorm for giving your time...

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