Archived copy of warcraft-source.com, the Warcraft: Source (WCS) forum (2007–2011), rebuilt from the Internet Archive by wc3mods.net. This page was captured on 2011-09-18 (original capture). Home · Forum · All archived topics · Downloads

Author Topic: [Tutorial] How to create Shop Items  (Read 1195 times)

Offline Verixon-San

  • Level 1 Trained Beginner
  • *
  • Posts: 30
  • Country:
  • I'm not young enough to know everything
[Tutorial] How to create Shop Items
« on: March 14, 2011, 10:13:43 AM »
Hey everybody this is a tutorial on "How to Create Shop Items":
Found in: cstrike/addons/eventscripts/wcs/INI/items.ini

1. Item Concept:

   First of all think about what your item is supposed to do when its finished!
   Creating Items and then think about their job is pretty much the wrong way!

2.Choosing category:

   We have 6 categorys:
        
               ~ Permanent, offensive
               ~ Permanent, defensive
               ~ Permanent, enchantments
               ~ Permanent, health/XP items
               ~ One time, enchantments
               ~ One time, tomes, limited

   You now have to choose in which of those categorys your item will fit.

3.Creating your own Item:

   Now that you have the idea and you have the category you can start to write your own Item using this layout:

   
Code: [Select]
[[itemname]]
name        = ""
desc        = ""
cost        =
level       =
dab         =
duration    = 
max         =
cfg         = ""
cmdbuy      = ""
cmdactivate = ""

      a) Name, Description, Cost,
         
         ~ Name will be the name Displayed Ingame
         ~ Description will be the information about the item
         ~ Cost will be the cost of the item in Ingame Money

      b) Level, dab, duration, max
         
         ~ Level is just like the "level_needed" key in races. This will adjust the level you need to buy the item
         ~ dab will set who is allowed to buy the item. Here we have #0=death, 1=alive, 2=both as possibilities
         ~ duration will set for how long the item stays on the player. Here we have #0=this round, 1=untill death as possibilities
         ~ max will set how many times you can buy that item

      c) Cfg, Cmdbuy, Cmdactivate

         ~ cfg is just the same as cfg in races. Here we have things like player_attacker, player_spawn, player_victim etc
         ~ cmdbuy is what will happen to the user when he buys the item (like setting a group for him etc)
         ~ cmdactivate is what happens when the item triggers (like extra damage or flash up).


4.Example

   As an example we will create an Item that will freeze the enemy:

   
Code: [Select]
[[freezeorb]]
name        = "Freezing Orb"
desc        = "Freeze your enemies"
cost        = 10000
level       = 30
dab         = 1
duration    =  1
max         = 1
cfg         = "player_attacker"  //this means our skill will work if we attack someone
cmdbuy      = "" //we dont need to set anything here as the skill doesnt do anything on buy
cmdactivate = "if (server_var(wcs_dice) <= 10) then es playerset freeze event_var(userid) 1;es_delayed 2 playerset freeze event_var(userid) 0" //here we have a chance of 10% to freeze the enemy we attacked


5.Questions

   If you have any question related to Item creation or editing just post them here and I will try to answer them.
« Last Edit: August 12, 2011, 03:57:10 AM by La Muerte »
The day Microsoft starts making vacuums is the day they make something that doesn't suck!
----------------------------------------------------------------------------
"Government is not the solution to our problems, Government IS the problem."
-Ronald Reagan
----------------------------------------------------------------------------
"Be who you are and say what you mean because those who matter don't mind and those who mind don't matter."
...-Dr. Seuss
----------------------------------------------------------------------------


Offline Kamiqawa

  • Moderator
  • Level 7 Expert
  • Posts: 415
  • Country:
Re: [Tutorial] How to create Shop Items
« Reply #1 on: March 14, 2011, 10:21:00 AM »
Very good, short and clear tutorial. Great job!
Quote from: $Diablo$
You are banana dabass... Kami tried to proof point here and you ruin it >.>



Click here for wcs content made by me.


Offline Kami

  • Moderator
  • Level 7 Expert
  • Posts: 582
  • Country: de
  • Pokemon Master!
Re: [Tutorial] How to create Shop Items
« Reply #2 on: March 14, 2011, 10:34:26 AM »
Pretty nice looking and good structure.

-> approved + sticky
Quote
12:17 - its dead#: You're like "Oh look mine is that long"
12:17 - Tha Pwned: ... lol.
12:17 - Tha Pwned: I need a new one
12:18 - Tha Pwned: Thinking about throwing it out of the window
Quote
21:42 - Kami: I sold races.
21:42 - Kami: U mad?
21:42 - Kami was blocked by Tha Pwned. Please contact Support for further information.
21:44 - Tha Pwned: Was brushing my teeth
21:45 - Tha Pwned: Cya tommorow

Offline NatoHunter

  • Level 7 Expert
  • *****
  • Posts: 151
  • Country: de
  • geht nicht ...gibt es nicht
    • Shadow-Fighter
Re: [Tutorial] How to create Shop Items
« Reply #3 on: March 14, 2011, 03:29:03 PM »
Hi
 class described super work
 thank you

Offline Verixon-San

  • Level 1 Trained Beginner
  • *
  • Posts: 30
  • Country:
  • I'm not young enough to know everything
Re: [Tutorial] How to create Shop Items
« Reply #4 on: March 17, 2011, 06:13:02 PM »
Thanks u all ;)
The day Microsoft starts making vacuums is the day they make something that doesn't suck!
----------------------------------------------------------------------------
"Government is not the solution to our problems, Government IS the problem."
-Ronald Reagan
----------------------------------------------------------------------------
"Be who you are and say what you mean because those who matter don't mind and those who mind don't matter."
...-Dr. Seuss
----------------------------------------------------------------------------

Offline Vipper

  • Level 3 Trained Apprentice
  • ***
  • Posts: 64
  • Country:
  • Hot Brazilian Surfer
Re: [Tutorial] How to create Shop Items
« Reply #5 on: March 24, 2011, 04:41:53 PM »
Congrats, veri.

My partner on wcs :P

really nice job.
shitting races forever (:

Online La Muerte

  • Administrator
  • Level 7 Expert
  • *****
  • Posts: 1527
  • Country: be
  • Nuclear Dawn?!
    • Counterstrike Combat Crew
Re: [Tutorial] How to create Shop Items
« Reply #6 on: March 27, 2011, 08:50:22 AM »
This topic link has been added to the "How to install wcs and its components" main guide.
I've seen the ways of god, I'll take the devil any day.

Offline Hydria

  • Level 0 Beginner
  • Posts: 13
  • <3 WCS :)
Re: [Tutorial] How to create Shop Items
« Reply #7 on: August 12, 2011, 03:17:48 AM »
Great tut, but still unclear as where to paste this?
cstrike>addons>eventscripts>?

Online La Muerte

  • Administrator
  • Level 7 Expert
  • *****
  • Posts: 1527
  • Country: be
  • Nuclear Dawn?!
    • Counterstrike Combat Crew
Re: [Tutorial] How to create Shop Items
« Reply #8 on: August 12, 2011, 03:56:28 AM »
cstrike/addons/eventscripts/wcs/INI/items.ini
I've seen the ways of god, I'll take the devil any day.


 


Powered by EzPortal