Author Topic: shop addon  (Read 1296 times)

So i am looking for the shop addon that let you buy things once and then you don't have to pay for them to get them again.

You can do it with VCE with this set of events.

Might wanna copy this somewhere so you don't lose it.

>onactivate>self>VCEretrocheck>Player score> >= point value
>onvariabletrue>player>additem>item
and then use onvariabletrue for like messages to the client and sounds and stuff.

don't forget to use OnVariableFalse for a "can't afford!" message or sound.

>onactivate>self>VCEretrocheck>Player score> >= point value
>onvariabletrue>player>additem>item
and then use onvariabletrue for like messages to the client and sounds and stuff.

don't forget to use OnVariableFalse for a "can't afford!" message or sound.

No no no no!
You forgot a lot of things like saving which items they bought and decreasing their score

onActivate > Self > LoadVariable [client] [Sword]
onActivate > Client > IfVariable [Sword] != 1 [2 3]
onVariableTrue > Player > AddItem [Sword]
onVariableFalse > Self > IfValue [<var:client:score>] >= 100 [4 8]
onVariableFalse > Client > Centerprint ["You do not have enough money for this item"]
onVariableTrue > Client > AddScore [-100]
onVariableTrue > Player > AddItem [Sword]
onVariableTrue > Client > modVariable [Sword] set 1
onVariableTrue > Self > saveVariable [Client] [Sword]

Just keep them in this order or use delays

Code: [Select]
[0] [x] [0] [OnActivate] [Self] [VCE_LoadVariable] [Client] [Sword]
[1] [x] [0] [OnActivate] [Client] [VCE_IfVariable] [Sword] [==] [1] [2 4]
[2] [x] [0] [OnVariableTrue] [Player] [AddItem] [Sword]
[3] [x] [0] [OnVariableTrue] [Client] [Centerprint] [You have already bought this sword]
[4] [x] [0] [OnVariableFalse] [Self] [VCE_IfValue] [<var:cl:score>] [>=] [100] [5 9]
[5] [x] [0] [OnVariableFalse] [Client] [Centerprint] [You do not have enough money for this item]
[6] [x] [0] [OnVariableTrue] [Client] [IncScore] [-100]
[7] [x] [0] [OnVariableTrue] [Player] [AddItem] [Sword]
[8] [x] [0] [OnVariableTrue] [Client] [VCE_ModVariable] [Sword] [Set] [1]
[9] [x] [0] [OnVariableTrue] [Self] [VCE_SaveVariable] [Client] [Sword]


ftfy

No no no no!
You forgot a lot of things like saving which items they bought and decreasing their score

onActivate > Self > LoadVariable [client] [Sword]
onActivate > Client > IfVariable [Sword] != 1 [2 3]
onVariableTrue > Player > AddItem [Sword]
onVariableFalse > Self > IfValue [<var:client:score>] >= 100 [4 8]
onVariableFalse > Client > Centerprint ["You do not have enough money for this item"]
onVariableTrue > Client > AddScore [-100]
onVariableTrue > Player > AddItem [Sword]
onVariableTrue > Client > modVariable [Sword] set 1
onVariableTrue > Self > saveVariable [Client] [Sword]

Just keep them in this order or use delays

whoops, had my mind on what I do for mine.

Thanks for fixing that.


MARBLE MAN made a add-on event that lets you easily make a shop.

I don't have it anymore, but I guess someone can PM it to you. Also, all of MARBLE MAN's add-on threads were deleted because of his key getting revoked.
« Last Edit: April 12, 2014, 02:02:40 PM by Mr Queeba »

MARBLE MAN made a add-on fervent that lets you easily make a shop.

I don't have it anymore, but I guess someone can PM it to you. Also, all of MARBLE MAN's add-on threads were deleted because of his key getting revoked.
I know he had shop addons but it only went up to 300 points
here's the addon you are looking for:
http://forum.blockland.us/index.php?topic=188555.0
Thank you, that's what i was looking for.