Jump to content
  • 0

item with amount of uses


Question

Posted (edited)

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

2 answers to this question

Recommended Posts

  • 0
Posted
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

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