Skip to content

Commit

Permalink
update V1.5
Browse files Browse the repository at this point in the history
  • Loading branch information
justSalkin authored Oct 6, 2024
1 parent 2b17030 commit c2f5efb
Show file tree
Hide file tree
Showing 4 changed files with 356 additions and 143 deletions.
57 changes: 41 additions & 16 deletions config.lua
Original file line number Diff line number Diff line change
@@ -1,14 +1,20 @@
Config = {}

Config.DiscordWebHook = ""
Config.DiscordBotName= "juSa NPC Rewards"
Config.Debug = true --enables input commands and some consol-prints | for details check out github or discord

Config.DiscordWebhook = "" --put your webhook here
Config.DiscordBotName = "juSa NPC Rewards"
Config.DiscordAvatar = "https://i.postimg.cc/TYm9DdHT/jusa-scripts.png"

Config.useRightNotify = false --if true use right notify, if false use notify on the left

Config.generalCooldown = false --turn on/off cooldown for every NPC | after one interaction with any NPC the player gets new cooldown for EVERY NPC
Config.Cooldown = 0 --in sec
Config.talkingTime = 7 --sec how long you can interact with one NPC until he is not longer responding to you and you have to "talk" to the NPC again
----------------------------- NPC Settings -------------------------------------
-- NPC Types: "give" = NPC gives player items and/or money
--NPC Types: "give" = NPC gives player items
-- "sell" = NPC takes items and pays amount of $ back
-- "exchange" = NPC takes item and/or money and gives money and/or items back
-- "exchange" = NPC takes item or money and gives money or another item back
-- "nointeraction" = just an NPC, you can't interact with them
--------------------------------------------------------------------------------

Expand All @@ -23,11 +29,14 @@ Config.NPCs = {
heading = 189.77,
radius = 4.0, --interaction radius
scenario = false, -- set to false to use no scenario | find some here: https://github.com/femga/rdr3_discoveries/blob/master/animations/scenarios/scenario_types_with_conditional_anims.lua
anim = { animDict = false, animName = "" }, -- set to false to not use animations | find more here: https://raw.githubusercontent.com/femga/rdr3_discoveries/master/animations/ingameanims/ingameanims_list.luas
anim = { animDict = false, animName = '' }, -- set to false to not use animations | find more here: https://raw.githubusercontent.com/femga/rdr3_discoveries/master/animations/ingameanims/ingameanims_list.lua
cooldown = 20, --set individual cooldown | in sec
joblocked = {{name = "SheriffV", grade = 2}, {name = "DoctorV", grade = 3}}, --set nil if you want every job to use this NPC
taskbar = 3000, --duration of the interaction
usewebhook = true, --set true, if you want to get discord notification when interact with npc
type = "give", -- see NPC Settings for more informations
giveitem = {{ item = "apple", label = "apple", amount = 2 } , { item = "peach", label = "peach", amount = 1 }}, -- when interact -> gives player 2 apple and 1 peach
giveweapon = {{weaponname = "WEAPON_MELEE_KNIFE", label = "knife"}, {weaponname = "WEAPON_REVOLVER_CATTLEMAN", label = "Cattleman Revolver"}},
givemoney = 5, -- also gives player 5$
},

Expand All @@ -36,10 +45,12 @@ Config.NPCs = {
npcmodel = "CS_MP_TRAVELLINGSALESWOMAN",
coords = vector3(2681.41, -1399.55, 45.38),
heading = -108.46,
radius = 4.0,
scenario = "WORLD_HUMAN_WRITE_NOTEBOOK",
anim = { animDict = false, animName = "" },
taskbar = 6000,
radius = 4.0,
scenario = false,
anim = { animDict = false, animName = '' },
cooldown = 20,
joblocked = nil,
taskbar = 3000,
usewebhook = true,
type = "sell",
takeitem = {{ item = "apple", label = "apple", amount = 2 } , { item = "peach", label = "peach", amount = 1 }}, -- takes items from player
Expand All @@ -48,29 +59,34 @@ Config.NPCs = {

{ npc_name = "Exchange-NPC",
blip = 214435071,
npcmodel = "CS_MP_TRAVELLINGSALESWOMAN",
npcmodel = "mp_u_m_m_nat_farmer_04",
coords = vector3(2698.74, -1407.68, 45.65),
heading = -108.46,
radius = 4.0,
scenario = false,
anim = { animDict = false, animName = "" },
radius = 4.0,
scenario = false,
anim = { animDict = false, animName = '' },
cooldown = 20,
joblocked = nil,
taskbar = 3000,
usewebhook = true,
type = "exchange",
giveitem = {{ item = "peach", label = "peach", amount = 1 }},
takeitem = {{ item = "apple", label = "apple", amount = 2 }},
giveweapon = nil,
givemoney = 0,
takemoney = 5,
},
}

----------------------------- TRANSLATE HERE -------------------------------------
Config.Language = {
--Prompts
--prompts
talk = "Talk to NPC",
press = "press ",
noLabel = "NO",
yesLabel = "YES",
onCooldown = "I'm busy. Come back later ...",
wrongJob = "I think you've come to the wrong place ...",
sellinfo = "Do you want to sell %s for %d$ ?",
seeUlater = "Ok, see you later then.",
exchangeinfo = "Do you want to exchange %s and %d$ against %s and %d$ ?",
Expand All @@ -88,14 +104,23 @@ Config.Language = {
title_exchanged = "You have exchanged: ",
payed = "You payed: ",
title_payed = "You payed: ",
lowgrade = "Your job grade is too low.",
wrongjob = "You don't have the right job for this.",
--discord
discord_title_give = "NPC GIVE",
discord_title_sell = "NPC SELL",
discord_title_exchange = "NPC EXCHANGE"
discord_title_exchange = "NPC EXCHANGE",
webhook_got = "Got ",
webhook_from = " from ",
webhook_sold = "Sold ",
webhook_to = " to ",
webhook_for = " for ",
webhook_exchanged = "Exchanged: ",
webhook_with = " with "
}
------------------- PROMPT -----------------
Config.keys = {
G = 0x760A9C6F, -- talk/interact
UP = 0x6319DB71, --yes
DOWN = 0x05CA7C52 , --no
}
}
5 changes: 3 additions & 2 deletions fxmanifest.lua
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ rdr3_warning 'I acknowledge that this is a prerelease build of RedM, and I am aw

author 'justSalkin'
description 'Script for rewards from NPCs'
version '1.4.0'
version '1.5.0'

client_script {
'main.lua',
Expand All @@ -18,10 +18,11 @@ shared_scripts {
'config.lua',
}

dependency 'vorp_core'
dependencies {
'vorp_core',
'vorp_inventory',
'vorp_progressbar'
}

-- for support and/or more scripts join: https://discord.gg/DUax6SsEt2
-- for more infos or if you found a bug join the juSa script discord: https://discord.com/invite/bxJ3d2j4dH
Loading

0 comments on commit c2f5efb

Please sign in to comment.