View Single Post
  #2  
Old 06-05-2010, 08:54 PM
sssssssssss sssssssssss is offline
Cyril Rain
sssssssssss's Avatar
Join Date: May 2003
Location: Texas, USA
Posts: 1,134
sssssssssss will become famous soon enough
Quote:
Originally Posted by adam View Post
Oh, I see a little better now. Your making an auction house dealy?

I follow the recommendation, use .'s instead of _'s
I don't like how you have the string stored, but if I were forced to, I might search the categories like this. Untested, but i've done things like this in the past.

PHP Code:
public function getCategoryListing(temp.category){
  
clearemptyvars();
  
temp.list = {};
  for (
temp.acntthis.item.(@temp.category).getdynamicvarnames() ){
    for (
temp.itemthis.item.(@temp.category).(@temp.acnt).getdynamicvarnames() ){
      
temp.this.item.(@temp.category).(@temp.acnt).(@temp.item);
      
temp.list.add({ temp.itemtemp.v[0], temp.acnttemp.v[3] });
    }
  }
  return 
temp.list;

could you explain this? I'd rather learn, so I dont have to post so many threads for help. Im really not sure what too many of this does, just by looking at it, and not too sure on how to use it. Im guessing its a function that goes in the dbnpc script, and I call it to show up the items for the category selected, but if an explanation line by line is possible with comments or something, that would be great.
__________________
Cyril Rain
Creator and leader of SLX
Admin of Elysium
Elysium's Facebook Page: http://facebook.com/GraalOnlineElysium
Graal Forum Thread: http://forums.graalonline.com...
Graalians Thread: http://www.graalians.com...


Reply With Quote