Jump to content
  • 0

check if the player is wearing any item.


Question

10 answers to this question

Recommended Posts

Posted (edited)


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
Posted
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!!

Posted (edited)


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
Posted (edited)
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
Posted (edited)
	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
Posted (edited)

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
Posted (edited)

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
Posted (edited)

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
Posted

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

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.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...