Jump to content
  • 0

item with amount of uses


Zutcer

Question


  • Group:  Members
  • Topic Count:  31
  • Topics Per Day:  0.01
  • Content Count:  114
  • Reputation:   5
  • Joined:  07/19/15
  • Last Seen:  

Hello, I am trying to make an item with callfunc, this should have 5 or more uses and when completing them the item should be deleted. Try that, but it has not worked for me, any help?

 

function    script    Count   {
    for( .@i = 1; #c == 5; #c-- ){
        for( #c = 1; .@i + 1; #c- ){
    dispbottom "You can use it again "+ #c +" times more.";
    sc_start SC_INCREASEAGI,240000,10;
    end;
    }
    }
        if (#c == 5){
    dispbottom "bla bla bla.";
    delitem xxx,1;
    end;
    }
}

 

I mean, the item is never erased independently the amounts of times you use.

Edited by Zutcer
Link to comment
Share on other sites

2 answers to this question

Recommended Posts

  • 0

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

function    script    Count   {
	if (#c > 0) {
		#c--;
		dispbottom "You can use it again "+ #c +" times more.";
		sc_start SC_INCREASEAGI,240000,10;
		delitem xxx,1;
    }
	return;
}

 

  • Upvote 1
Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  31
  • Topics Per Day:  0.01
  • Content Count:  114
  • Reputation:   5
  • Joined:  07/19/15
  • Last Seen:  

Thanksss

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