Builder XCRs Bitch Contributions

From Sinfar
Revision as of 12:59, 27 November 2023 by XCRs Bitch (talk | contribs) (Updated documentation)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

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.


Each token roughly costs 1000gp.

Tickets can be redeemed for 500gp

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

I will organize the assets by their purpose:

Entering the area:

Main Script: cas_areaonenter

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- incase 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.

Game and their Scripts:

SLOT MACHINES:

Main Script: cas_slotmachine

Handles the majority of the functions of the slot machines. Odds are currently 15% chance of winning any type of combo. Triple 111s are to set to 10%, 222 = 5%, 333 = 2.5%, 444 = 1.25%, 555 = 0.75%, and 666 = 0.1% chance of winning.

Betting more tokens on the game does not increase the jackpot accordingly. Playing 2 tokens at a time increases pay out by 25%. 3 tokens increases pay out by 50%. 4 = 75%, and 5= 100% more tickets. (So, playing 2 tokens and if you were to hit 555 = 125 tickets, versus 200.) This is to encourage spending.

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.

BLACKJACK:

Main Scripts: cas_dealer_spawn, cas_dealer_ud

These two scripts are critical to the game functioning. The cas_dealer_spawn handles the on_spawn 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.

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.