SphereCommunity
a Regent bag with value? - Printable Version

+- SphereCommunity (https://forum.spherecommunity.net)
+-- Forum: Sphere 0.56d (/Forum-Sphere-0-56d)
+--- Forum: Script Requests (/Forum-Script-Requests)
+--- Thread: a Regent bag with value? (/Thread-a-Regent-bag-with-value)



a Regent bag with value? - Lazarus - 08-19-2012 08:17 PM

Just that, a bag that have a value (like 2500) and have's in 100 reagent of every reg [normal regs]

I had create a template [with the regs in] and works... but try to add a value and doesn't works... Sad The vendor still sells the bag at the price of the real bag [like 21 gps]

haha ^_^

I want to add it in the sphere_template_vend
and create a new one for plate armors complete Shock
Thanks ! Smile


RE: a Regent bag with value? - Shaklaban - 08-21-2012 03:34 PM

you can try two methods;

[itemdef i_bag_reg]
id=i_bag
value=2500

[template reg_bag_100]
container=i_bag_reg
item=i_reag_black_pearl,100

then in vendor template

sell=reg_bag_100

if not works

[itemdef i_bag_reg]
id=i_bag
value=2500

on=@create
serv.newitem i_reag_black_pearl
new.amount=100
new.cont=<uid>

then in vendor template
sell=i_bag_reg


RE: a Regent bag with value? - Lazarus - 08-21-2012 03:55 PM

(08-21-2012 03:34 PM)Shaklaban Wrote:  you can try two methods;

[itemdef i_bag_reg]
id=i_bag
value=2500

[template reg_bag_100]
container=i_bag_reg
item=i_reag_black_pearl,100

then in vendor template

sell=reg_bag_100

if not works

[itemdef i_bag_reg]
id=i_bag
value=2500

on=@create
serv.newitem i_reag_black_pearl
new.amount=100
new.cont=<uid>

then in vendor template
sell=i_bag_reg


I'll try it Smile
Thanks!


RE: a Regent bag with value? - Rayvolution - 08-22-2012 12:39 PM

If you allow the vendor to buy the bag back, they will offer quite a lot of money for it though.

..and alternatively, if you just remove it from the sell list (I'm sure that was your plan anyway) then your server might be litered with 2 types of bags, ones you can sell and ones you can't. That would make my OCD run wild knowing players are having to deal with "unsellable" and "sellable" bags and having no real way of telling them apart. Shock

Here's a script I wrote back in 55i for doing what you want, the only difference is it's not *actually* a container. Dclicking it will "unpack the bag", giving you a legitimate/real i_bag and the reagents. I also made a "60 each" version but I don't see a point in posting both Big Grin

Don't ask me why I used Base IDs instead of their DEFNAMEs, I wrote this like 5 years ago.

You could probably modify it to bounce the items back into a "real" bag container instead of dumping them in your pack, that might be cleaner. I'm not sure why I didn't do that when I wrote this, but as I said, 5 years ago. Big Grin

Code:
[ITEMDEF i_Bag_of_Reagents_30]
NAME=Bag of Reagents (30 of Each)
ID=i_BAG
TYPE=134
WEIGHT=15
VALUE=800

ON=@CREATE
COLOR=07b7

ON=@DCLICK
REMOVE
SRC.SOUND=0048
SRC.MESSAGE You remove the reagents from the bag.
SRC.NEWITEM=0f7a
SRC.ACT.AMOUNT=30
SRC.ACT.BOUNCE
SRC.NEWITEM=0f7b
SRC.ACT.AMOUNT=30
SRC.ACT.BOUNCE
SRC.NEWITEM=0f84
SRC.ACT.AMOUNT=30
SRC.ACT.BOUNCE
SRC.NEWITEM=0f85
SRC.ACT.AMOUNT=30
SRC.ACT.BOUNCE
SRC.NEWITEM=0f86
SRC.ACT.AMOUNT=30
SRC.ACT.BOUNCE
SRC.NEWITEM=0f88
SRC.ACT.AMOUNT=30
SRC.ACT.BOUNCE
SRC.NEWITEM=0f8c
SRC.ACT.AMOUNT=30
SRC.ACT.BOUNCE
SRC.NEWITEM=0f8d
SRC.ACT.AMOUNT=30
SRC.ACT.BOUNCE
SRC.NEWITEM=i_bag
SRC.ACT.COLOR=07b7
SRC.ACT.BOUNCE

CATEGORY=Abanellia Items
SUBSECTION=Misc
DESCRIPTION=Bag of Regs (30)