If it's not too much, a script that subtracts rupees from you when you buy certain items. I need this to circumvent the 999 rupee price limit.
Shop Script
This is VERY basic, I did nothing to fancy it up (this is basically to skelton of my upcomeing 'Custom Shop Script'😉 but its seems you are in need of something simpler, so..
ffc script shop_item {
void run(int item_is, int cost_is, int hands) {
item nu_item;
while(true) {
Waitframe();
if(this->Data != 0 && Link->X >= this->X-8 && Link->X <= this->X +24 && Link->Y >= this->Y-8 && Link-Y <= this->Y+24 && Game->Counter[1] >= cost_is) {
{
this->Data = 0;
Game->Counter[1] -= cost_is;
nu_item = Screen->CreateItem(item_is);
nu_item->X = Link->X;
nu_item->Y = Link->Y;
if (hands == 2) {Link->Action = 5;}
if (hands == 1) {Link->Action = 4;}
Link->HeldItem = item_is;
}
}
}
}
Its missing a couple of elements
1. it won't display the price automatically
Remedy: You can either A: make tiles with the prices you want, or B: have a message string come up when player hits a certian button near the item (bassicaly the signpost script)
2: There is no sound (this is an easy fix, I just do not know what the proper SFX number is right now)
How to use this script:
each FFC you use will be one item in your shop
set the following arguments,
D0: the item ID
D1: the Cost
D2: 1 = Link holds item with one hand, 2 = two hands. (any other value and Link does not hold up item)
You can have as many items in your shop as you want with this.
I will be doing a more advanced version of this script soon. I am sort of randomly working on different elements of my quest right now so it gets done when the muses inspire me... :tongue:
btw: this is 100% untested and off the top of my head, so let me know if it works...
You may not need this. It's just a limit break, not a full-blown feature. It takes 10 bits to get to 1023, may as well put the shop items to an even 3 bytes each. (1 for the item, 2 for the price)
It would take the devs 10 minutes at the most implementing it-- about the same amount of time it would take to fix a bug.