Jump to content
  • 0

Zeny per identified item


eboni001

Question


  • Group:  Members
  • Topic Count:  79
  • Topics Per Day:  0.02
  • Content Count:  327
  • Reputation:   4
  • Joined:  06/22/13
  • Last Seen:  

Can somebody please help me editing this npc to charge 1,000 zeny for each identified item and if you dont have enough zeny only identifies the items you have enough zeny to pay for?

it identifies every item even if you dont have enough zeny but when you dont, you get stuck and have to close the window.

case 1:

	if(Zeny < 1000) {

	mes .@n$;
	mes "Sorry,but you don't have enough Zeny!";
	close;

	}

	mes .@n$;
	mes "Okay, let me have a look at your inventory.";
	next;
	getinventorylist;
		while( .@idn < @inventorylist_count ){
		if ( [email protected]<script data-cfhash='f9e31' type="text/javascript">/*  */</script>_identify[.@idn] ){
			delitem2 @inventorylist_id[.@idn],1,0,0,0,0,0,0,0;
			getitem @inventorylist_id[.@idn],1;
			set Zeny,Zeny - 1000;
			}
                .@idn++;
            }
	mes .@n$;
	mes "Everything has already been identified.";
	next;
	goto Ide_Done;
	close;
Link to comment
Share on other sites

5 answers to this question

Recommended Posts

  • 0

  • Group:  Forum Moderator
  • Topic Count:  93
  • Topics Per Day:  0.02
  • Content Count:  10013
  • Reputation:   2345
  • Joined:  10/28/11
  • Last Seen:  

change

while( .@idn < @inventorylist_count ){

to

while( .@idn < @inventorylist_count && Zeny >= 1000 ){
  • Upvote 2
Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  25
  • Topics Per Day:  0.01
  • Content Count:  924
  • Reputation:   166
  • Joined:  04/05/13
  • Last Seen:  

  • 0

  • Group:  Members
  • Topic Count:  120
  • Topics Per Day:  0.03
  • Content Count:  295
  • Reputation:   6
  • Joined:  12/02/11
  • Last Seen:  

identify item.txt

 

try this one bro

 

Edited by hakuren
Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  25
  • Topics Per Day:  0.01
  • Content Count:  924
  • Reputation:   166
  • Joined:  04/05/13
  • Last Seen:  

Whoa I've miss a zeny checking haha.

Edited by TARTs
Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  79
  • Topics Per Day:  0.02
  • Content Count:  327
  • Reputation:   4
  • Joined:  06/22/13
  • Last Seen:  

 

change

while( .@idn < @inventorylist_count ){

to

while( .@idn < @inventorylist_count && Zeny >= 1000 ){

It's working like a charm now, Thank you very much.

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