Docs

X3D Fortune

Free ESX fortune teller: daily horoscope, zodiac from your birthday, 28 siamsi sticks, 22-card tarot on 9 topics and a 10-card monthly spread.

Buy / Get freeConfig builder

Installation

  1. Put the x3d_fortune folder in resources/. Do not rename the folder.
  2. Add to server.cfg (no SQL needed):
ensure es_extended
ensure x3d_fortune

Requirements

Resource Required Used for
es_extended yes ESX Legacy (1.9+ when Config.BirthStorage = 'meta')

All settings: config/config.lua

Prices

Setting Default Meaning
Config.Account 'money' Account to charge: 'money' (cash) or 'bank'
Config.SiamsiPrice 200 One siamsi draw
Config.TarotPrice 500 One tarot card
Config.TarotMonthPrice 1500 10-card monthly spread
Config.TarotReversedChance 3 Reversed card chance, 1 in N

The daily horoscope and zodiac are always free.

General

Setting Default Meaning
Config.Locale 'th' Interface language, 'th' or 'en' (readings are in Thai)
Config.RateWindow / Config.RateMax 10000 / 10 At most N requests per window (ms)
Config.NearRadius 30.0 How far from the fortune teller the server still accepts a reading
Config.BirthStorage 'meta' Save the birthday with xPlayer.setMeta, or 'kvp' for older ESX

Fortune teller: Config.NPC

Setting Default Meaning
coords Rockford Hills Position and heading (vector4)
model 'a_f_o_ktown_01' Ped model
scenario 'PROP_HUMAN_SEAT_CHAIR' Idle animation (needs a chair, or use a standing one)
streamDistance 50.0 Distance at which the NPC appears
interactDistance 2.5 [E] distance
blip on sprite, color, scale, name = { th, en }
speech on Greeting lines when players come close

Fitting your server: addons/

File Functions Default
addons/notify/client.lua Notify(message, kind) esx_notify, then ox_lib, then ESX
addons/prompt/client.lua Prompt.Draw3D, Prompt.SetBlipName, Prompt.IsInteractPressed 3D text, [E]
addons/locale/shared.lua T(th, en) follows Config.Locale

For other scripts

-- client
exports['x3d_fortune']:Open()      -- open the fortune teller, e.g. from ox_target (the server still checks distance)
exports['x3d_fortune']:Close()
exports['x3d_fortune']:IsOpen()    --> boolean

The server console command fortune_selftest checks all reading data.

Troubleshooting

Symptom Cause / fix
"You must be at the fortune teller" The NPC was moved but the player is further than Config.NearRadius
The birthday is not remembered Older ESX has no setMeta; set Config.BirthStorage = 'kvp'
The NPC sits in mid-air The scenario is a sitting one; place it on a chair or use 'WORLD_HUMAN_STAND_IMPATIENT'
Thai on labels shows as boxes Another resource must stream the font4thai font
View product page