Builder XCRs Bitch Contributions

From Sinfar


Hello, this page is for ADMINS, DMS, and fellow builders.


Currently, the only contribution I have is for the following ERF: https://nwn.sinfar.net/res_list.php?erf_id=988 - or, the Casino.


The Casino is meant to be a dual purpose gambling/arena, with opportunities for players to host events and stage auctions, and whatnot- by discussing with the owner and master of the area, Mebriewiel Relimion.

The Palace of Coins:

Each token roughly costs 1000gp.

Tickets can be redeemed for 250gp

The primary purpose of the casino isn't to reward money to the victors, but tickets, which they can cash in for valuable prizes. This is not a money farm, but a money sink, where people can go out and farm monsters and spend their money in the casino, hopefully socializing with others in the process.

The area is located in the Waterfront District of Sinfar City.

I will organize the assets by their purpose:

The Token Pouch

Main Script: cas_examineevent; cas_addtickettok cas_setticketvar; cas_settokenvar

Conversation: cas_tokentick

item: cas_slipholder

The script here triggers an examine_event on the item and updates the player on their current token/ticket totals. It also explains how the tickets are used and stuff. The token pouch is required for all games below to be played.

cas_addtickettok is an event_use script that when targeting the player, brings up thecas_tokentick conversation, where the player can create a "Note" that the player can use the token pouch on to 'redeem' the value of the note. The conversation uses cas_setticketvar and cas_settokenvar to assign the value of the note.

Entering the area

Main Script: cas_areaonenter, cas_areaonexit --

The script is no longer used, but I am keeping the explanation in case legacy shit comes up.

This script controls the various functions PCs have applied to them when they enter the casino.

Thus far it does one thing: Assigns the variable NITAKETOKENS int 1, to the entering PC. This has it so players who enter the arena will always have only one token taken from them by the slot machines - in case they forgot they did something silly and set themselves to 100 tokens and forgot to change it before they leave. Notably, the Slot Machines will not take ANY tokens from the player if this variable isn't assigned to the player, so it is to avoid an exploit.


Currently sends a welcome message and logs the starting tickets/tokens, and logs the leaving number of tickets/tokens.

Secondary Scripts: cas_entercasino, cas_exitcasino

These two scripts control access to the actual gambling portion of the casino. You are required to make a deposit of 100,000gp to play the games. It is returned with cas_onexitarena. It will not let the player enter the area if they do not have sufficient coins. This was a mostly in character decision rather than an OOC necessary one and can be removed and the area modified (blame arockravensbeak).


Deprecated. Entry fee was removed.

Buying Tokens

Players purchase tokens from the help desk NPC. The choices are set via dialog.

Scripts required: cas_createtoken1, cas_createtoken5, cas_createtoke10, cas_createtoke25, cas_creattoken50, cas_creattok100, cas_creatok1000

These scripts assign the number of tokens the player has on the cas_casinohandle item in their inventory (tagged I_CAS_CASINOHANDLER- Named TOKEN POUCH).

Dialog: cas_helpdesk

Handles generic variables and token purchasing.

NPC: cas_helpdeskguy

REWARDS: (TO BE DISCUSSED FURTHER WITH ADMIN TEAM, numbers are NOT finalized)

Rewards are handled by the following scripts:

SCRIPTS: cas_rewardtiers; cas_reagentbags; cas_potofgreed; cas_spinthebottl; cas_grapple; cas_doll

2da Table: cas_reagents

  1. cas_rewardtiers- used in the copying and replicating of items from tier 1, 3, 4, and potentially tier 5 chests. Set on the ondisturb event.

1a. The variables are iCopyMe int 1 to tell the script the item is copyable. iCostTickets int <VALUE> tells the script how much to deduct from the Casino Handler in terms of tickets.

1b. cas_reagentbags, same as cas_rewardstiers, but uses a 2da table called cas_reagents to know what item to spawn, and how many.

2. cas_potofgreed; script that randomly decides on a 1d20 if a player 'won' or not, then picks a list of rewards hardcoded into the script.

3. cas_spinthebottl, grabs the nearby players, stores them in an array, picks one at random. Can be dropped/picked up using the Transportable Placeables System.

4. cas_grapple, shouldn't work in jumper-forbidden areas now. Grabs a player who has the tagged item "I_AM_PREY" equipped, and grabs/drags them to player.

5. cas_doll, using the sStringMessage variable, when used, causes it to speak what was used.

Tier 1: (20-1000tickets)

Plushie Dolls

Examples:

Loraza Doll, Natalya Doll, Circe Doll, etc... (thinking about 25 of these, easily added as well).

Glitter Bomb: Spawns a placeable that has a temp duration for pixie dust of about 5minutes. If used on a player, also applies the pixie dust vfx to them for about ten minutes. (cannot spawn in areas where hostile mobs can appear). Could also use the mass blindness vfx.

Paint bombs: Throw them in a crowd to apply random vfx_dur_aura vfx in various colors. Last about 18 seconds.

Target Rings for the cas_grapple. (basically gives it permission to fire at the player when equipped on the ring slot).

Evil Muffins- gives the player devil wings for about 5minutes.

Angelic Muffins- Gives the player angel wings for about 5minutes.

Tier 2: (300-1000 tickets)

Crafting Reagents. From Beetle Bellies to Dragon Blood to Soul Gems Lesser bags of holding.

Tier 3:(1000 - 10000 tickets)

Various scripted items, such as Spin the Bottle. The Slutsnatcher Grappling Hook, other misc items.

Bags of Holding.

cas_spinthebottl (handles the spin the bottle functions). Item that can spawn it on the ground and pick it back up.

cas_grapple (handles how the slutsnatcher grappling hook works). NOTE: Have it check if areas are permitted.

Tier 4: (10000- 20000)

Jumpers. Various flashy vfx, and stuff.

Adventure Land 'Tickets' - TO BE MADE- but it would create a transition to an island that they can go explore and fight monsters on that can only accessed via the tickets.

Tier 5: (20000 + tickets) / AUCTION ONLY

Flashy VFX weapons and properties.

Battle Axe of Tempests:

+6 enhancement, +1d6 piercing, +1d4 electric.

- Various vfx effects on hit, increase, and decrease, various elemental immunities. Reset when the axe is unequipped.

Whip of Blood

+6 enhancement, +1d10 negative damage/+1d4 slashing, Keen, 2d12 Mass Critical

Onhit Wounding: DC 40 (coded). Onhit blood splatter vfx when striking targets.

Longbow of the Gale:

+6 mighty. Unlimited Ammo 1d6 electricity. +6 enhancement. 2d12 mass crit.

Unique Item Power that targets the ground and applies a 'gust of wind' effect and applies a DC 36 knockdown effect to nearby creatures for one round.

Rapier of Nightmares

+6 Enhancement, +1d6 cold, Keen.

Applies the PDK Fear vfx to targets struck by it. Applies a 'sleep' effect to targets, DC 32 will save. Small chance to make the wielder fall asleep- this will bypass immunity to mind spells.

Axes of the Thunder God

Item that spawns a bundle of Throwing axes once per rest (50x).

Axes: +6 enhancement. Keen. 2d12 mass crit. 1d12 electricity.

Onhit Call Lightning (1).

The Whirling Dance:

Twin Scimitars- one cannot be equipped without the other.

+6 enhancement, +1d8 fire (on one), 1d8 Cold (on the other), Keen, 2d12 mass crit.

Applies random vfx to the wielder, alternating between a fiery shield that does (2d8) fire dmg, or a (2d8) cold dmg shield. Possible chance to (freeze DC 36) target, possible chance to (combust) target- 1% chance of either.

Mace of Crushing Hands

+6 enhancement, +1d12 bludgeon damage, +2d12 mass critical hit. Keen

Small chance for a bigby's crushing hand to grasp the target and paralyze them for 2 rounds.

The Rat Flail:

+6 enhancement, +1d10 bludgeon, Keen, +2d12 mass critical, Keen

Unique Power- Summon A Swarm of Powerful Rats to aid you in battle

Rats: 5 level 30 rogue ninja rats with low ac and low hp.

Dagger of Manslaying:

+7 enhancement versus humans. +2d12 negative damage versus humans, Keen, 2d12 Mass Crit.

When striking humans, it will transfer 10 hp of dmg from each strike to the wielder.

Spear of the Champion

+6 enhancement, +1d8 piercing, +1d4 fire, +1d4 divine versus evil. Keen.

OUB: Good.

Special: If equipped by evil PC, take 50 divine damage per round till unequipped.

Others...

Games At The Casino

SLOT MACHINES

Main Script: cas_slotmachine

Odds are set to roughly 1/10000 to hit 666.

Secondary Scripts: cas_slottoken1, cas_slottoken10, cas_slottoken25, cas_slottoken50, cas_slottoken100

These scripts are set by the Help Desk NPC found on either side of the casino. They control how many tokens a player uses per pull at the slot machine.

Placeables: cas_yellow, cas_red, cas_purple, cas_orange, cas_green, cas_blue

These placeables are used in cas_slotmachine to make a placeable fire appear above the slot machine as a visual representation of the numbers.

Dialog: cas_helpdesk - the dialog here contains the method by which the secondary scripts are assigned to the player.

NPC: cas_helpdeskguy - NPC with the dialog on him.

BLACKJACK

Main Scripts: cas_dealer_spawn, cas_dealer_ud, cas_deal_liston

These two scripts are critical to the game functioning. The cas_dealer_spawn handles the OnSpawn functions of the game, assigning the ListenPatterns required for cas_dealer_ud to work. The latter script handles the bulk of the functions and how the game works.

cas_deal_liston initializes the game, and makes it so the NPC is ready to hear out players so he isn't constantly listening for PCs.

Players can assign how much they wish to bet. Generally, payout is 1.5x per token bet. So if a player bets 1 token, it's bumped up to 2, and if a player bets 5 tokens, they are rewarded 7. If they bet 10 tokens, they are rewarded 15 tickets.

The game uses listener functions so wonky behavior can occur.

Secondary Scripts: cas_bjnumplay1 (1-4), cas_bj_wager1 (1, 5, 10, 50), cas_bj_playtest (2, 3), cas_bj_giverules, cas_dealer_sit,

  1. cas_bjnumplay controls the number of players permitted to join the game. (max 4)
  2. cas_bj_wager1-100 controls how many tokens are bet on each round of blackjack.
  3. cas_bj_playtest handles various states of the game
  4. cas_bj_giverules hands the player how the game is played.
  5. cas_dealer_sit tells the dealer to sit in his god damn chair.

Conversation: cas_blackjack - handles setting player number, wager amounts, rulebook giving.

NPC: cas_blackjackdea - handles the game overall.

WHEEL OF FIRE

Main Scripts: cas_wheeloffire, cas_wheelreward

This script handles the overall function of the game. Essentially, it creates a VFX circle that is applied to the ground in a spherical shape along the diameter and rotates swiftly at first then slows down, landing on a number and applying a unique effect to handle the winning number. it then executes the script, cas_wheelreward. It then deletes the variables on the player so they can bet on new numbers and how much they wish to bet. There is a 30 second cool down before the wheel can spin again.

cas_wheelreward: handles the functions for rewarding the tickets. Basically it rewards 4x the number of tokens you bet, as the odds are 1/12 (about 8.4% odds of winning).

Secondary Scripts: cas_wheelbetamou, cas_wheelbet

These scripts handle assigning the variables onto the player, whether they have an existing bet (if relevant) and what number to bet on.

NPC: cas_rouletteguy

Recycled asset from when I tried to make roulette, he explains how the game is played.

Conversation: cas_wheeloffire

Explains how the game is played.

THE MONSTER ARENA

Main Scripts: cas_arenastart, cas_arenaper, cas_arenaospawn, cas_arenadeathr, cas_arenadeathb, cas_arenaonclick

  1. cas_arenastart spawns the monsters and controls the SetIsTemporaryEnemy() function, and tells them to attack each other have a delay. Additional functionality may be added to randomize appearance and weapons.
  2. cas_arenaper - deprecated, can be removed probably. Not removing because it isn't doing any harm, really.
  3. cas_arenadeathb, cas_arenadeathr - checks for the variable I_BET_ON_RED, I_BET_ON_BLACK, and handles reward functions, despawning the corpse, and deleting the surviving monster from the bout. Deletes variables on surrounding players if the BET functions are found.
  4. cas_arenaonclick - prevents bets during a monster bout. Assigns variable and deducts tokens from player who is placing bet. Controls how many tokens are being bet with BET_AMOUNT as a local variable. This is an OnClick Event.
  5. cas_ondamaged - Deletes all tokens on the PC and tickets. Kills them with flashy vfx lightning.

I intend for the reward to be 1:3x- one token = 3 tickets. You win tickets if the creature you bet on won the match.


Secondary Scripts: cas_arenadestroy, cas_arenadespawn, cas_arenadialogu, cas_onexitarena, cas_onenterarena, cas_shrineheal

  1. cas_arenadestroy - in case monsters persist in the arena, use this script to destroy the NPCs spawned by cas_arenastart. Called by the conversation: cas_arena
  2. cas_arenadespawn called on the OnCombatEnd - can probably just be removed.
  3. cas_arenadialogu called on the OnUsed event of the placeable called 'arena handler' in the area.
  4. cas_onenterarena/cas_onexitarena - These apply and remove the iAmInArena variable to prevent players from starting a monster bout if PCs are in the arena dueling.
  5. cas_shrineheal Shrine in the arena that heals combatants after a bout.

Dialog: cas_arena - handles how the arena works, starts matches, sees if people are in bouts, etc...

Creatures (so far): cas_arenablack, cas_arenared

Two golems based on colors.

Items: cas_arenaredsmas, cas_arenablackpu

creature weapons to give golems appropriate weapons.

Miscellaneous Amenities

Suites

Main Scripts: cas_bedroomcharg, cas_finalspeaker, cas_mebsolporn, cas_deletevariab, cas_assignvariab, cas_destroyproje, cas_proj_cv_opti

  1. cas_bedroomcharg Charges customers for use of the suite. Each suite will have a projector panel to spawn a recorded sex show from a library of options available in the dialog cas_projectoropt. 5000 gold for each amenity. Placed on a chain's OnUsed event.
  2. cas_finalspeaker is the final version (for now) of the code that handles 'recorded projections'. It will spawn two or more NPCs based on their ResRef, and based on a variable on the creatures spawned, assign spoken text at a 45 second interval in incremental order based on variables based on the placeable the script is attached to. Basically, it generates the text logs of people's intimate roleplay, or stories for more benign reasons. 2a. Variables needed: P_SPEAKS_(Letter) int 1: The (LETTER) Is replaced with a char, so P_SPEAKS_A, P_SPEAKS_C etc, this tells the script who speaks the string. Generally speaking, it's the first letter of the character's name. This is assigned to the NPC 2b. P_TITLESTRING int 1- this is assigned to the NPC who speaks the title string on the placeable. 2c. P_1B66_SPAWN_NPC1 - spawns the first npc, P_1B66_SPAWN_NPC spawns the second NPC. Assign to placeable 2d. P_CHARSPEAK(LETTER) tells the script to check. So P_CHARSPEAKM tells the placeable to assign the string to P_SPEAKS_M. Assign to placeable. 2e. P_1B66_STITLE is a string variable. P_1B66_STITLE string "The title of this recording is: "A cookie triumph""- Spoken first by the system- assign to placeable. 2f. P_1b66_STEXT1-P_1b66_STEXTXXX: These variables determine the order the dialogue is spoken at 45 second intervals.
  3. cas_mebsolporn - earlier, prototype version of cas_finalspeaker, will soon be deprecated and removed. Merged into cas_finalspeaker
  4. cas_assignvariab/cas_deletevariab: assigns a variable that the cas_bedroomcharg checks for to prevent the door unlocking if people are currently inside. Assigned on a trigger. Also used in the baths and meeting room.
  5. cas_destroyprojec - deletes the projector and the creatures it spawned.

Conversations: cas_projectoropt - select which show you want to watch.

The suites room of the casino and its scripts function much the same as the bath/meeting roomscripts. It checks for 5k, if found, takes the gold, and unlocks the door. the cas_deletevariab/assignvariab handle if people are allowed inside or not based if someone is already inside. There is a lock/unlock door button inside to open the areas door.


Inside is a placeable with the script cas_proj_cv_opti that calls the conversation cas_projectoropt that lets them select which show to spawn and watch.

Baths

Main Scripts: cas_spawnfloor1(1-6), cas_bathscharge, cas_deletevariab, cas_assignvariab, cas_flr_optcv, cas_onenterfire, cas_onexitfire

  1. Cas_spawnfloor(1-6) - changes floor type, water to lava to liquid gold.
  2. cas_bathscharge, same as cas_bedroomcharg
  3. cas_delete/cas_assignvariab- same as above.
  4. cas_flr_optcy - OnUsed placeable script that generates the cas_flooroptions dialog
  5. cas_onenterfire/cas_onexitfire - handles assigning the 'this bath is stupidly hot' function, applies 10 dmg per round the player is inside. Applied to goldfloor and lava floor.

Dialog: cas_flooroptions, handles choosing what sort of bath the player wants to pay for and spawn/remove the previous one.

Placeables: cas_floorwine, cas_floorwater, cas_floormud, cas_floorlava, cas_floorgold, cas_floorchocola

Handled by the cas_spawnfloor scripts and the cas_floooptions dialog.

Meeting Rooms:

Main Scripts: cas_meetingroom, cas_deletevariab, cas_assignvariab

The meeting room of the casino and its scripts function much the same as the bath/suite scripts. It checks for 5k, if found, takes the gold, and unlocks the door. the cas_deletevariab/assignvariab handle if people are allowed inside or not based if someone is already inside. There is a lock/unlock door button inside to open the areas door.