Merchant module helps you with creating shops in RPGs, with buy and sell options and interface by using two number properties and GUI. I hope you will like it! :=
The download includes ReadMe file, GUI file and Module file.
This is just version 1.1.0, so dont be angry if you will find any bugs. ;)
[EDIT] Next version- now, there is no limit of displayed items.
Download: MerchantModule v1.1.0 (http://www.2dadventure.com/ags/MerchantModule2.zip) (29kB)
Knowing your technical forums history, my first thought when discovering this thread was:
"I bet there's some if (a=1) b=1; if (a=2) b=2; if (a=3) b=3; ... code in there."
And WHAM. There is. There actually is.
This is so funny, sorry :=
PS: Don't import functions in the header that aren't meant to be used by the game designer, or they will show in the auto-complete window.
PPS: Yeah, I'm an arrogant bastard, I know ;)
Quote from: KhrisMUC on Thu 03/07/2008 12:07:45
PS: Don't import functions in the header that aren't meant to be used by the game designer, or they will show in the auto-complete window.
Yes, I can solve this. But, maybe somebody could want to call just one from this functions.
Quote from: KhrisMUC on Thu 03/07/2008 12:07:45
... my first thought when discovering this thread was:
"I bet there's some if (a=1) b=1; if (a=2) b=2; if (a=3) b=3; ... code in there."
And WHAM. There is. There actually is.
Sorry, but this is just a small module, and it has to help people with making shops in RPGs. Many people did not know how to do that ( look at this (http://www.adventuregamestudio.co.uk/yabb/index.php?topic=13649.0)) and I used most simplest methode how to do it. I did not think that it is something special. It is converting inventory items from inventory window to listbox and declaring their value, so I do
not agree it is
if (a==1) b=1;.
Quote from: KhrisMUC on Thu 03/07/2008 12:07:45
Knowing your technical forums history, my first thought when discovering this thread was:...
Yes, I had stupid questions in past, but almost everybody did the same at the start. Now, I know more about AGS and that is also why I maked this module.
Quote from: KhrisMUC on Thu 03/07/2008 12:07:45
PPS: Yeah, I'm an arrogant bastard, I know ;)
How you can see, me too. ;D
Rather than mock people's scripting, isn't it better to show the better way?
function funcPI() {
lstSell.Clear();
int i=0;
while (i<50) {
if (invAllInv.ItemAtIndex[i] != null) lstSell.AddItem(invAllInv.ItemAtIndex[i].Name);
i++;
}
}
Mirek, what does "Omlouvam se, ale tohle prodavat nebudu." mean?
Oh, thanks
Quote from: SSH on Thu 03/07/2008 12:53:25
Rather than mock people's scripting, isn't it better to show the better way?
function funcPI() {
lstSell.Clear();
int i=0;
while (i<50) {
if (invAllInv.ItemAtIndex[i] != null) lstSell.AddItem(invAllInv.ItemAtIndex[i].Name);
i++;
}
}
Oh, thanks, this is great idea- I dont know why didnt I use it, becuse it is frequent in the rest of my sript.
Quote from: SSH on Thu 03/07/2008 12:53:25
Mirek, what does "Omlouvam se, ale tohle prodavat nebudu." mean?
Oh, sorry: it is "Sorry, but I dont want to sell this." in czech language. Solved.