Topic:   Simple Inventory Engine   (Read 12605 times)


0 Members and 1 Guest are viewing this topic.

Tireas Dragon


  • GMG Extraordinaire

  • ***


  • Posts: 1626

  • Trying to recover from my shattered screen.
Re: Simple Inventory Engine
« Reply #15 on: August 17, 2008, 08:52:57 PM »
You mean like equip it? That easy you just have it so if the item class declared by the items array is 6 then you can't use it
1 = 1 handed weapon
2 = 2 handed weapon
3 = helm
4 = shield
5 = armor
6 = not an item that can be equipped
See I can do that easy

I must be dreaming (wake up me wake up) How could this have happened. Tireas' cry when he found his computer fallen over in his chair with it's screen shattered.

Silverwind


  • ^ This guy is amazing.

  • ****


  • Posts: 2805

  • For the glory of my maker
Re: Simple Inventory Engine
« Reply #16 on: August 18, 2008, 02:24:34 AM »
Quote
You mean like equip it? That easy you just have it so if the item class declared by the items array is 6 then you can't use it
1 = 1 handed weapon
2 = 2 handed weapon
3 = helm
4 = shield
5 = armor
6 = not an item that can be equipped
See I can do that easy

Well, I didn't mention equiping at all, but yes, that's how I do it. Except instead of an "itemclass" variable, I use "itemused" "weaponused" and "armorused".
I survived the spammage of 2007

EqwanoX


  • Administrator

  • GMG Extraordinaire

  • *****


  • Posts: 1180
Re: Simple Inventory Engine
« Reply #17 on: August 18, 2008, 09:22:33 AM »
yea i noticed you have a seperate variable for each item class, if you used one "useditem" variable you wouldnt have to run the drop item code 4 times

Silverwind


  • ^ This guy is amazing.

  • ****


  • Posts: 2805

  • For the glory of my maker
Re: Simple Inventory Engine
« Reply #18 on: August 18, 2008, 09:29:05 AM »
Um, do I run the drop item routine 4 times? ??? I've just looked at the code now, and I don't think I do. There's no repeat or anything.
« Last Edit: August 18, 2008, 09:29:46 AM by Silverwind »
I survived the spammage of 2007

EqwanoX


  • Administrator

  • GMG Extraordinaire

  • *****


  • Posts: 1180
Re: Simple Inventory Engine
« Reply #19 on: August 18, 2008, 09:34:08 AM »
well you dont RUN it, but its there. its a good system im just saying you could cut out alot of code by just haveing it once, esspecially if you added more slots, that would really bulk it up

Tireas Dragon


  • GMG Extraordinaire

  • ***


  • Posts: 1626

  • Trying to recover from my shattered screen.
Re: Simple Inventory Engine
« Reply #20 on: August 18, 2008, 10:31:53 AM »
He is serious Silverwind you have the EXACT same lines of code on your system repeated 4 times. I was able to lower the lines of code in the equip button from 117 to 76 in just a minute by using a useditem variable.
I must be dreaming (wake up me wake up) How could this have happened. Tireas' cry when he found his computer fallen over in his chair with it's screen shattered.

Silverwind


  • ^ This guy is amazing.

  • ****


  • Posts: 2805

  • For the glory of my maker
Re: Simple Inventory Engine
« Reply #21 on: August 18, 2008, 11:52:54 AM »
That's cool. I've just done it without the useditem variable.

btw, you were referring to the equip item routine, not the drop item routine.
I survived the spammage of 2007

Tireas Dragon


  • GMG Extraordinaire

  • ***


  • Posts: 1626

  • Trying to recover from my shattered screen.
Re: Simple Inventory Engine
« Reply #22 on: August 18, 2008, 12:35:42 PM »
I did say in the equip button didn't I?
I must be dreaming (wake up me wake up) How could this have happened. Tireas' cry when he found his computer fallen over in his chair with it's screen shattered.

Silverwind


  • ^ This guy is amazing.

  • ****


  • Posts: 2805

  • For the glory of my maker
Re: Simple Inventory Engine
« Reply #23 on: August 18, 2008, 12:38:33 PM »
Yeah, I was referring to Eq. ;)
I survived the spammage of 2007

EqwanoX


  • Administrator

  • GMG Extraordinaire

  • *****


  • Posts: 1180
Re: Simple Inventory Engine
« Reply #24 on: August 18, 2008, 06:41:47 PM »
oooh right, i meant the code that clears it from the inventory when its used which kind of drops it, my mistake
« Last Edit: August 18, 2008, 06:42:12 PM by EqwanoX »

usihuci


  • GMG Newbie

  • *

  • no avatar

  • Posts: 1

  • Gan is so awesome.
    • A base, healing rotaviruses; work.
A base, healing rotaviruses; work.
« Reply #25 on: March 15, 2024, 08:42:03 AM »
So imply acetonide loaded bactrim canada cialis canada cialis soft buy flagyl on internet flagyl on internet prednisone no prescription prednisone mircette best price usa viagra without dr prescription usa purchase retin-a generic nexium at walmart online pharmacy nizagara on line nizagara cheapest cycrin cycrin phenamax overnight isotretinoin cost priligy dapoxetine dipyridamole online best price prednisone overnight poland prednisone prednisone no rx next day periumbilical light-headedness <a href="https://pureelegance-decor.com/cheap-bactrim-pills/">bactrim en ligne</a> <a href="https://columbiainnastoria.com/cialis-canada/">cialis lowest price</a> <a href="https://primerafootandankle.com/low-price-flagyl/">flagyl canada</a> <a href="https://frankfortamerican.com/prednisone-no-prescription/">no prescription prednisone</a> <a href="https://dallashealthybabies.org/mircette/">generic mircette tablets</a> <a href="https://pureelegance-decor.com/product/viagra-information/">viagra.com</a> <a href="https://pureelegance-decor.com/product/retin-a-for-sale/">walmart retin a price</a> <a href="https://yourdirectpt.com/where-to-buy-nexium/">best price nexium</a> <a href="https://columbiainnastoria.com/online-pharmacy/">tadalafil pharmacy online</a> <a href="https://sadlerland.com/product/nizagara/">cheap nizagara online</a> buy nizagara online canada <a href="https://1488familymedicinegroup.com/cycrin/">lowest price generic cycrin</a> <a href="https://fountainheadapartmentsma.com/product/phenamax/">generic phenamax in canada</a> <a href="https://youngdental.net/drugs/isotretinoin/">isotretinoin holland ohne rezept</a> <a href="https://johncavaletto.org/drug/priligy/">priligy dapoxetine</a> <a href="https://glenwoodwine.com/pill/dipyridamole/">pillole dipyridamole</a> pillole dipyridamole <a href="https://gasmaskedlestat.com/prednisone-without-a-prescription/">prednisone online</a> <a href="https://pureelegance-decor.com/product/prednisone/">purchase prednisone online</a> gland https://pureelegance-decor.com/cheap-bactrim-pills/ https://columbiainnastoria.com/cialis-canada/ https://primerafootandankle.com/low-price-flagyl/ https://frankfortamerican.com/prednisone-no-prescription/ https://dallashealthybabies.org/mircette/ https://pureelegance-decor.com/product/viagra-information/ https://pureelegance-decor.com/product/retin-a-for-sale/ https://yourdirectpt.com/where-to-buy-nexium/ https://columbiainnastoria.com/online-pharmacy/ https://sadlerland.com/product/nizagara/ https://1488familymedicinegroup.com/cycrin/ https://fountainheadapartmentsma.com/product/phenamax/ https://youngdental.net/drugs/isotretinoin/ https://johncavaletto.org/drug/priligy/ https://glenwoodwine.com/pill/dipyridamole/ https://gasmaskedlestat.com/prednisone-without-a-prescription/ https://pureelegance-decor.com/product/prednisone/ stealing, benefit examinations.