Author Topic: City rpg drugs/items  (Read 2697 times)

Hello! I have been trying to add more drugs and more items to Ty's city rpg. Problem is, I have no clue on how to do that. Any help or feedback is much appreciated.
Thanks
                                                                                                    -WEE WOO (bl_id 151148)

look at the addon and figure out how it's adding content, then copy and paste and edit it to fit your needs

look at the addon and figure out how it's adding content, then copy and paste and edit it to fit your needs
I tried that to multiple folders ie. common, drugsell, and bricks. I also copied another drug (opium) changed the name, sell price.

I tried that to multiple folders ie. common, drugsell, and bricks. I also copied another drug (opium) changed the name, sell price.
Post the code you've come up with. Perhaps you're missing something.

Ok...
//============================================================
// Project            :   CityRPG
// Author            :   Iban & Jookia & Ty(ID997) (Edited by Gadgethm)
// Description         :   Civilian Code file
// ============================================================
// Table of Contents
// 1. Handling Script Start
// 2. Lots
// 2.2 Sale Lots
// 3. Data Bricks
// 4. Spawns
// 5. Resources
// 6. Other
// 7. Decals
// 8. Drugs
// ============================================================

// ============================================================
// Section 1 : Handling Script Start
// ============================================================
$CityRPG::temp::brickError = forceRequiredAddOn("player_no_jet");

if($CityRPG::temp::brickError)
{
   if($CityRPG::temp::brickError == $error::addOn_disabled)
      playerNoJet.uiName = "";
   
   if($CityRPG::temp::brickError == $error::addOn_notFound)
      return;
}

$CityRPG::loadedDatablocks = true;

if(!$CityRPG::loadedDatablocks)
{
   return;
}

datablock triggerData(CityRPGLotTriggerData)
{
   tickPeriodMS = 500;
   parent = 0;
};

datablock triggerData(CityRPGInputTriggerData)
{
   tickPeriodMS = 500;
   parent = 0;
};


// ============================================================
// Section 2 : Lots
// ============================================================
datablock fxDTSBrickData(CityRPGSmallLotBrickData : brick16x16FData)
{
   iconName = "Add-Ons/Gamemode_TysCityRPG/shapes/BrickIcons/16x16LotIcon";
   
   category = "CityRPG";
   subCategory = "CityRPG Lots";
   
   uiName = "Small Lot";
   
   CityRPGBrickType = 1;
   CityRPGBrickAdmin = false;
   
   triggerDatablock = CityRPGLotTriggerData;
   triggerSize = "16 16 4800";
   trigger = 0;
   
   initialPrice = 500;
   taxAmount = 10;
};

datablock fxDTSBrickData(CityRPGHalfSmallLotBrickData : brick16x32FData)
{
   iconName = "Add-Ons/Gamemode_TysCityRPG/shapes/BrickIcons/16x32LotIcon";
   
   category = "CityRPG";
   subCategory = "CityRPG Lots";
   
   uiName = "Half-Small Lot";
   
   CityRPGBrickType = 1;
   CityRPGBrickAdmin = false;
   
   triggerDatablock = CityRPGLotTriggerData;
   triggerSize = "16 32 4800";
   trigger = 0;
   
   initialPrice = 750;
   taxAmount = 15;
};

datablock fxDTSBrickData(CityRPGMediumLotBrickData : brick32x32FData)
{
   iconName = "Add-Ons/Gamemode_TysCityRPG/shapes/BrickIcons/32x32LotIcon";
   
   category = "CityRPG";
   subCategory = "CityRPG Lots";
   
   uiName = "Medium Lot";
   
   CityRPGBrickType = 1;
   CityRPGBrickAdmin = false;
   
   triggerDatablock = CityRPGLotTriggerData;
   triggerSize = "32 32 6400";
   trigger = 0;
   
   initialPrice = 1500;
   taxAmount = 25;
};

datablock fxDTSBrickData(CityRPGLargeLotBrickData : brick64x64FData)
{
   iconName = "Add-Ons/Gamemode_TysCityRPG/shapes/BrickIcons/64x64LotIcon";
   
   category = "CityRPG";
   subCategory = "CityRPG Lots";
   
   uiName = "Large Lot";
   
   CityRPGBrickType = 1;
   CityRPGBrickAdmin = false;
   
   triggerDatablock = CityRPGLotTriggerData;
   triggerSize = "64 64 12800";
   trigger = 0;
   
   initialPrice = 4500;
   taxAmount = 60;
};

// Sale Lots
datablock fxDTSBrickData(CityRPGSmallZoneBrickData : brick16x16FData)
{
   iconName = "Add-Ons/Gamemode_TysCityRPG/shapes/BrickIcons/16x16ZoneIcon";
   
   category = "CityRPG";
   subCategory = "CityRPG Zones";
   
   uiName = "Small Zone";

   CityRPGBrickAdmin = true;
   CityRPGMatchingLot = CityRPGSmallLotBrickData;
};

datablock fxDTSBrickData(CityRPGHalfSmallZoneBrickData : brick16x32FData)
{
   iconName = "Add-Ons/Gamemode_TysCityRPG/shapes/BrickIcons/16x32ZoneIcon";
   
   category = "CityRPG";
   subCategory = "CityRPG Zones";
   
   uiName = "Half-Small Zone";
   
   CityRPGBrickAdmin = true;
   CityRPGMatchingLot = CityRPGHalfSmallLotBrickData;
};

datablock fxDTSBrickData(CityRPGMediumZoneBrickData : brick32x32FData)
{
   iconName = "Add-Ons/Gamemode_TysCityRPG/shapes/BrickIcons/32x32ZoneIcon";
   
   category = "CityRPG";
   subCategory = "CityRPG Zones";
   
   uiName = "Medium Zone";
   
   CityRPGBrickAdmin = true;
   CityRPGMatchingLot = CityRPGMediumLotBrickData;
};

datablock fxDTSBrickData(CityRPGLargeZoneBrickData : brick64x64FData)
{
   iconName = "Add-Ons/Gamemode_TysCityRPG/shapes/BrickIcons/64x64ZoneIcon";
   
   category = "CityRPG";
   subCategory = "CityRPG Zones";
   
   uiName = "Large Zone";
   
   CityRPGBrickAdmin = true;
   CityRPGMatchingLot = CityRPGLargeLotBrickData;
};
// ============================================================
// Section 3 : Data Bricks
// ============================================================
exec("./bricks/info/bank.cs");
exec("./bricks/info/police.cs");
exec("./bricks/info/bounty.cs");
exec("./bricks/info/labor.cs");
exec("./bricks/info/realestate.cs");
exec("./bricks/info/criminalbank.cs");
exec("./bricks/info/atm.cs");
exec("./bricks/info/playeratm.cs");
exec("./bricks/info/education.cs");
exec("./bricks/info/job.cs");
exec("./bricks/info/stats.cs");
exec("./bricks/info/drugsell.cs");
exec("./bricks/info/donate.cs");
exec("./bricks/info/family.cs");
exec("./bricks/info/vote.cs");
exec("./bricks/info/other.cs");
exec("./bricks/info/lottery.cs");
exec("./bricks/info/storage.cs");
exec("./bricks/info/business.cs");
exec("./bricks/info/gangs.cs");
exec("./bricks/info/LaborPlus.cs");

// ============================================================
// Section 4 : Spawns
// ============================================================
datablock fxDtsBrickData(CityRPGPersonalSpawnBrickData : brickSpawnPointData)
{
   category = "CityRPG";
   subCategory = "CityRPG Spawns";
   
   uiName = "Personal Spawn";
   
   specialBrickType = "";
   
   CityRPGBrickType = 3;
   CityRPGBrickAdmin = false;
   
   spawnData = "personalSpawn";
};

datablock fxDtsBrickData(CityRPGJailSpawnBrickData : brickSpawnPointData)
{
   category = "CityRPG";
   subCategory = "CityRPG Spawns";
   
   uiName = "Jail Spawn";
   
   specialBrickType = "";
   
   CityRPGBrickType = 3;
   CityRPGBrickAdmin = true;
   
   spawnData = "jailSpawn";
};

// ============================================================
// Section 5 : Resources
// ============================================================
exec("./bricks/resources/tree.cs");
exec("./bricks/resources/ore.cs");
exec("./bricks/resources/smallore.cs");

// ============================================================
// Section 6 : Other
// ============================================================
datablock fxDTSBrickData(CityRPGPermaSpawnData : brick2x2FData)
{
   category = "CityRPG";
   subCategory = "CityRPG Infoblock";
   
   uiName = "Permaspawn Brick";

   CityRPGBrickAdmin = true;
   CityRPGPermaspawn = 1;
};

datablock fxDTSBrickData(CityRPGPoliceVehicleData : brickVehicleSpawnData)
{
   category = "CityRPG";
   subCategory = "CityRPG Spawns";
   uiName = "Police Vehicle Spawn";
   CityRPGBrickAdmin = true;
};

datablock fxDTSBrickData(CityRPGCrimeVehicleData : brickVehicleSpawnData)
{
   category = "CityRPG";
   subCategory = "CityRPG Spawns";
   uiName = "Crime Vehicle Spawn";
   CityRPGBrickAdmin = true;
};

datablock fxDTSBrickData(CityRPGParaVehicleData : brickVehicleSpawnData)
{
   category = "CityRPG";
   subCategory = "CityRPG Spawns";
   uiName = "Paramedic Vehicle Spawn";
   CityRPGBrickAdmin = true;
};

DoorSO.addDoorTypeFromFile("Add-Ons/Gamemode_TysCityRPG/bricks/doors/unbreakable.cs");
doorBrickUnbreakable.unbreaka ble = true;
doorBrickUnbreakable.CityRPGB rickAdmin = true;

// ============================================================
// Section 7 : Decals
// ============================================================
datablock decalData(CityRPGLogo)
{
   textureName = "Add-Ons/Gamemode_TysCityRPG/shapes/decals/CityRPGLogo.Gad's";
   preload = true;
};

datablock decalData(CityRPG_Lot_Icon_1)
{
   textureName = "Add-Ons/Gamemode_TysCityRPG/shapes/BrickIcons/16x16LotIcon";
   preload = true;
};

datablock decalData(CityRPG_Lot_Icon_2)
{
   textureName = "Add-Ons/Gamemode_TysCityRPG/shapes/BrickIcons/16x32LotIcon";
   preload = true;
};

datablock decalData(CityRPG_Lot_Icon_3)
{
   textureName = "Add-Ons/Gamemode_TysCityRPG/shapes/BrickIcons/32x32LotIcon";
   preload = true;
};

datablock decalData(CityRPG_Lot_Icon_4)
{
   textureName = "Add-Ons/Gamemode_TysCityRPG/shapes/BrickIcons/64x64LotIcon";
   preload = true;
};

datablock decalData(CityRPG_Zone_Icon_1)
{
   textureName = "Add-Ons/Gamemode_TysCityRPG/shapes/BrickIcons/16x16ZoneIcon";
   preload = true;
};

datablock decalData(CityRPG_Zone_Icon_2)
{
   textureName = "Add-Ons/Gamemode_TysCityRPG/shapes/BrickIcons/16x32ZoneIcon";
   preload = true;
};

datablock decalData(CityRPG_Zone_Icon_3)
{
   textureName = "Add-Ons/Gamemode_TysCityRPG/shapes/BrickIcons/32x32ZoneIcon";
   preload = true;
};

datablock decalData(CityRPG_Zone_Icon_4)
{
   textureName = "Add-Ons/Gamemode_TysCityRPG/shapes/BrickIcons/64x64ZoneIcon";
   preload = true;
};

datablock decalData(CityRPG_Ore_Icon)
{
   textureName = "Add-Ons/Gamemode_TysCityRPG/shapes/BrickIcons/4x Cube";
   preload = true;
};

// ============================================================
// Section 8 : Drugs
// ============================================================
exec("./bricks/drugs/marijuana.cs");
exec("./bricks/drugs/opium.cs");
exec("./bricks/drugs/speed.cs");
exec("./bricks/drugs/steroid.cs");














I can't post common (bl forums won't let me). Any other ways to upload that?
 

// ============================================================
// Project            :   CityRPG
// Author            :   Moppy
// Description         :   Opium Brick Code File
// ============================================================
// Table of Contents
// 1. Brick Data
// 2. Events
// 3. Package Data
// ============================================================

// ============================================================
// Section 1 : Brick Data
// ============================================================
datablock fxDTSBrickData(CityRPGMemesData)
{
   brickFile = "Add-Ons/Gamemode_TysCityRPG/shapes/Bricks/brick_6x6.blb";
   iconName = "Add-Ons/Gamemode_TysCityRPG/shapes/BrickIcons/opium";
   
   category = "CityRPG";
   subCategory = "CityRPG Drugs";
   
   uiName = "Memes";
   drugType = "Memes";
   
   owner = 0;
   canchange = false;
   cansetemitter = false;
   emitter = "GrassEmitter";
   isDrug = true;
   hasDrug = false;
   isOpium = true;
   isGrowing = false;
   growtime = 0;
   canbecolored = false;
   health = 100;
   orighealth = 100;
   
   watered = 0;
   grew = 0;
   
   price = $CityRPG::drugs::Memes::placePrice;
   
   harvestAmt = $CityRPG::drugs:Memes:::harvestAmt;
   growthTime = $CityRPG::drugs:Memes::growthTime;
   
   CityRPGBrickType = 420;
   CityRPGBrickAdmin = false;
};

Just realized, it didn't save correctly so instead of "memes" it came out different...

I can't post common (bl forums won't let me). Any other ways to upload that?
what is "common"?

and in the future you can just attach files or use pastebin

and is the bottom bit the one you changed?
what file is it in?
you may also want to make sure those global variables are defined (ie $CityRPG::drugs::Memes::placePrice)

there's a ton of different conditional statements that you have to modify in the common, scriptobject, bricks, and package files--it's more trouble than it's worth

also be very careful posting files; ty had backdoors and reposting them in a script file or zip file could get you banned

Common is basically a list of basic city rpg functions, time, and units of measurement. It takes up quite a lot of space so I can't post it on bl forums.


what file is it in?
you may also want to make sure those global variables are defined (ie $CityRPG::drugs::Memes::placePrice)
[/quote]
The memes brick itself is in bricks/drugs/memes.cs

We wouldn't know what 'file' you are trying to find it in. Not many people have this add-on.

Honestly I wouldn't even touch any more iban crpgs, they are not worth your time hosting them, most of the time people host these usually create a bad reputation after a while. If you know what exactly you're doing you can keep messing with this mod and host it eventually, otherwise if a problem arises (which is very common), could be a hassle to fix or you might not know how to fix it properly, not really worth the time or effort.
« Last Edit: July 03, 2017, 03:39:43 PM by Kyuande »

The memes brick itself is in bricks/drugs/memes.cs
is that file ever executed?

Code: [Select]
// ============================================================
// Section 8 : Drugs
// ============================================================
exec("./bricks/drugs/marijuana.cs");
exec("./bricks/drugs/opium.cs");
exec("./bricks/drugs/speed.cs");
exec("./bricks/drugs/steroid.cs");

looks like all the others are executed there, but not the one you want

is that file ever executed?

Code: [Select]
// ============================================================
// Section 8 : Drugs
// ============================================================
exec("./bricks/drugs/marijuana.cs");
exec("./bricks/drugs/opium.cs");
exec("./bricks/drugs/speed.cs");
exec("./bricks/drugs/steroid.cs");

True, i will check the code. I though I added "memes" to the string of code, weird.
By the way, I have heard of backdoors in this gamemode. Is this true, and are there any examples of them?

looks like all the others are executed there, but not the one you want

There might be backdoors and exploits. I'm not sure because we don't have this cityrpg.