Archived copy of war3source.com, the War3Source forum (2009–2020), rebuilt from the Internet Archive by wc3mods.net. This page was captured on 2012-10-25 (original capture). Forum · All archived topics · Wiki · Bug tracker · Blog
Chat

War3:Source
October 24, 2012, 08:58:04 PM *
Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
News: Download: http://war3source.com/index.php?board=9.0
What is War3Source?: http://war3source.com/index.php?topic=200.0
Sample Stats: http://war3source.com/war3stats
Steam Community Group: http://steamcommunity.com/groups/war3source
War3Source SVN Checkout: http://ownageclan.com/svn/war3source/
War3Source servers: http://www.game-monitor.com/search.php?vars=war3_version=
 
   Home   Help Search Login Register  
Pages: [1]
  Print  
Author Topic: Shopitem categorys  (Read 217 times)
Glider⠠⠵
Global Moderator
Sr. Member
*****
Posts: 413


⠠⠵


View Profile
« on: August 28, 2011, 09:26:18 AM »

I just added a very simple shopitem category system to the svn. So if you want to test it, grab the newest version from there Wink.

To use it you need to do the following:

Set the cvar war3_buyitems_category to 1. This will enable the category system.
Next categorize all your items in your war3source or server.cfg. Here's a quick example (I don't run any default items on my server so don't blame me if they're not in the right categorys)

war3 ankh_itemcategory "Health"
war3 boot_itemcategory "Buff"
war3 claw_itemcategory "DMG"
war3 cloak_itemcategory "Buff"
war3 mask_itemcategory "Health"
war3 lace_itemcategory "Buff"
war3 orb_itemcategory "Buff"
war3 ring_itemcategory "Health"
war3 Health_itemcategory "Health"
war3 tome_itemcategory "XP"
war3 scroll_itemcategory "Health"
war3 glove_itemcategory "Buff"
war3 mole_itemcategory "Fun"

Now when someone types shopmenu on the server he should get the categorys first and then the items Wink.

The current system is of course still lacking, for example you can't have any translations, but it's good enough for me so if somebody needs something more complex - be my guest. I'm guessing if you wanted proper translatable categorys you would need to add a native to add them like shopitems, change the CreateShopItem native to add the category and so on...

Edit: Something also not possible yet is putting items into multiple categorys. I might add that as soon as I need it Tongue
« Last Edit: August 28, 2011, 10:49:23 AM by Glider⠠⠵ » Logged

Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.11 | SMF © 2006-2009, Simple Machines LLC Valid XHTML 1.0! Valid CSS!