Jump to content
  • 0
Sign in to follow this  
DeviantRaze

Kafra Functions

Question

3 answers to this question

Recommended Posts

  • 0

Default Kafra already does this. Here is a small sample of when trying to open storage.

// Accessing Normal Storage (Skipped if accessing Storage from Guild castle)	if (getarg(0) != 2) {		// Consume "Free Ticket for Kafra Storage" if available.		if (countitem(Cargo_Free_Ticket)) {			delitem Cargo_Free_Ticket, 1;		} else {			if (Zeny < getarg(1)) {				mes getarg(3);				// Niflheim Specific Message				if (getarg(2) == 1) {					percentheal -50,-50;					mes "^666666Zeeeeeny...";					mes "M-more z-zeny...!";					mes "N-neeed 150... zeny...";					mes "Ergh! T-taking bl-blood~!^000000";					return;				}				// Standard Message				mes "I'm sorry, but you don't";				mes "have enough zeny to use";				mes "the Storage Service. Our";				mes "Storage access fee is "+getarg(1)+" zeny.";				return;			}			Zeny -= getarg(1);			if (getarg(2) != 6)				RESRVPTS += getarg(1) / 5;		}	}

If you look closely you'll see this:

		// Consume "Free Ticket for Kafra Storage" if available.		if (countitem(Cargo_Free_Ticket)) {			delitem Cargo_Free_Ticket, 1;

That tells it to take a ticket instead of paying zeny, should they have 1 in their inventory.

Share this post


Link to post
Share on other sites
  • 0

Default Kafra already does this. Here is a small sample of when trying to open storage.

// Accessing Normal Storage (Skipped if accessing Storage from Guild castle)	if (getarg(0) != 2) {		// Consume "Free Ticket for Kafra Storage" if available.		if (countitem(Cargo_Free_Ticket)) {			delitem Cargo_Free_Ticket, 1;		} else {			if (Zeny < getarg(1)) {				mes getarg(3);				// Niflheim Specific Message				if (getarg(2) == 1) {					percentheal -50,-50;					mes "^666666Zeeeeeny...";					mes "M-more z-zeny...!";					mes "N-neeed 150... zeny...";					mes "Ergh! T-taking bl-blood~!^000000";					return;				}				// Standard Message				mes "I'm sorry, but you don't";				mes "have enough zeny to use";				mes "the Storage Service. Our";				mes "Storage access fee is "+getarg(1)+" zeny.";				return;			}			Zeny -= getarg(1);			if (getarg(2) != 6)				RESRVPTS += getarg(1) / 5;		}	}

If you look closely you'll see this:

		// Consume "Free Ticket for Kafra Storage" if available.		if (countitem(Cargo_Free_Ticket)) {			delitem Cargo_Free_Ticket, 1;

That tells it to take a ticket instead of paying zeny, should they have 1 in their inventory.

 

Thanks for the information =)

Share this post


Link to post
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.   Restore formatting

  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.

Loading...
Sign in to follow this  

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.