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

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
Sign in to follow this  

×
×
  • Create New...

Important Information

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