Shop script, no rupees but somethin else
#1
Posted 03 August 2011 - 10:13 AM
Who would do this? Is this easy enough for someone to make?
#2
Posted 03 August 2011 - 10:55 AM
#3
Posted 03 August 2011 - 11:38 AM
Also, I don't know wich shop script I should use. I can't find one where you don't need to press a button to buy.
Edited by Avataro, 03 August 2011 - 11:38 AM.
#4
Posted 03 August 2011 - 12:33 PM
#5
Posted 03 August 2011 - 12:39 PM
I want the counter number to be an argument, but I won't know how to do that?
Also, I don't know wich shop script I should use. I can't find one where you don't need to press a button to buy.
It won't be possible with the built in shops, because they always use rupees as far as I know. But It would be possible to create a ffc script that does everything a shop would. I'll see if I can work one up.
#6
Posted 03 August 2011 - 01:10 PM
#7
Posted 03 August 2011 - 01:11 PM
Edit (didn't see Avataro's post): The shop script is used as an FFC, so you can put as many or few items in as you want. Also, it comes in infinite stock and single stock variants.
Edited by MoscowModder, 03 August 2011 - 01:12 PM.
#8
Posted 03 August 2011 - 01:15 PM
Joe123 already made am FFC/Global shop script (the one I'm using) that allows you to place an item anywhere. It would seem kinda redundant to make a new one from scratch.
Where is this script, I can't find it in the database. Then again I only looked for like a minute if even. XD
#10
Posted 03 August 2011 - 02:00 PM
#11
Posted 03 August 2011 - 02:32 PM
Feels great to modify a script.
Thank you
#12
Posted 03 August 2011 - 02:43 PM
#13
Posted 03 August 2011 - 02:57 PM
I though the variables are next to the void run. Here is the shop part of my scriptfile.
ffc script Shop{
void run(int itm, int price, int input, int currency){
while(true){
if(CanBuy(this,input)){
SetInput(input,false);
if(Game->Counter[currency] >= price){
ShopItemThanks(itm);
DeductRupees(price);
}else Screen->Message(S_NORUPEES);
}
Waitframe();
}
}
}
//------------------Shop Script END------------------
It doesn't compile though,
EDIT: oh! I didn't understand I had to use the third code too. Can someone finish this for me? The currency should be D3 in the ffc editor.
Edited by Avataro, 03 August 2011 - 03:07 PM.
#14
Posted 03 August 2011 - 05:03 PM
I think this is the only function needing change:
FreezeScreen();
for(int i=0;i<amount;i++){
Game->PlaySound(SFX_MSG);
Game->Counter[currency]--;
Waitframe();
}
UnFreeze();
}
You'll also need to change this:
ffc script Shop{
void run(int itm, int price, int input, int currency){
while(true){
if(CanBuy(this,input)){
SetInput(input,false);
if(Game->Counter[currency] >= price){
ShopItemThanks(itm);
DeductRupees(price,currency);
}else Screen->Message(S_NORUPEES);
}
Waitframe();
}
}
}
//------------------Shop Script END------------------
Haven't tested it, so tell me if it works!
Edited by MoscowModder, 03 August 2011 - 05:04 PM.
#15
Posted 03 August 2011 - 08:29 PM
Tested out 3 different currencies. 1, 7 and 8.
1 user(s) are reading this topic
0 members, 1 guests, 0 anonymous users