Author Topic: Coin Mod - Simple Coin Shop System!  (Read 10308 times)

Basically this is a super simple coin mod that allows players to collect and lose coins through the use of admin only events and also you may use events to request coins for certain items, allowing the creation of a shop.

There are 7 simple events, 5 output and 2 input.

[Output] AddCoins (Int) - Adds coins to the client. This only works on admin bricks.
[Output] RemoveCoins (Int) - Removes coins to the client. This only works on admin bricks.
[Output] RequestCoins (Str) (Int) - This will request coins for a certain offer, the (str) is where youd write what the offer is.
[Output] SpawnCoins [Int] - Spawns a coin that is worth [Int] amount of Coins.
[Output] SpawnRandomCoins [Int1] [Int2]- Spawns a random amount of coins between the numbers [Int1] and [Int2].

[Input] TransferAccept - Used when a player accepts the offer on a brick.
[Input] TransferDecline - Used when a player declines the offer on a brick.

Download -
Download Here - DropBox

Credits -
Xenos109[3766] - Coding
Mr.Noßody[6480] - Model
« Last Edit: February 18, 2016, 12:48:07 PM by Xenos109 »

This is kinda just a less advanced version of Emo Boy's simple cash mod, I feel that it kind of writes off your mod.

This is kinda just a less advanced version of Emo Boy's simple cash mod, I feel that it kind of writes off your mod.

I understand that, but I also plan on adding some coin-pickup objects, and compatibility with slayer

You can use this if you want.


PM me with a download and ill get to it sometime soon possibly, working on some other stuff also atm.

for the coin pickup you can do something along the lines of this:


package HEGrenadePackage //where i stole this code skeleton from :^)
{
   function Armor::onCollision(%this, %obj, %col, %a, %b, %c, %d, %e, %f)
   {
      if(%col.dataBlock $= "CoinItem" && %col.canPickup)
      {
         //add coin value here
      }
      //add an else here if you dont want the player to actually pick up the item
      Parent::onCollision(%this, %obj, %col, %a, %b, %c, %d, %e, %f);
   }
};
activatePackage(HEGrenadePackage);


and then have a dummy item.

I believe you can also do CoinItem::onPickUp(%obj, %col) without packaging

I was just gunna use something along the line of this

%coin = new Item()
{
    datablock = coinItem;
    canPickup = false;
    value = %val;
};

and drop that down wherever it shall spawn, then make a collision function to pickup and remove the item


Are the coins physical?

Well the model posted above is going to be used to be spawned around a map possibly, i don't know how ill exactly work it in, but the actually coins are just a value you have, sort of like point, just adds a simple bottom print interface and events for making requests that could be used for a shop.

you should make the coin rotate

you should make the coin rotate
u should make ur face rotate

then get another model, only instead it's a ring



mario & sonic mods

you should make the coin rotate
This.

I can imagine something where if you killed, it sprays a bunch of coins everywhere, which bounce a little bit when they hit the ground.

To make it rotate add rotate = 1; to the item object