News: Welcome back to Bullworth! If you haven't already, you will need to reset your password..


Author Topic: Triggering speech and setting Stats through Lua  (Read 6655 times)

0 Members and 1 Guest are viewing this topic.

Offline Reath

  • Jr. Member
  • **
  • Posts: 26
  • Gender: Male
    • View Profile
Triggering speech and setting Stats through Lua
« on: March 25, 2014, 10:33:12 PM »
Code: [Select]
PedSetStatsType(PED,"STAT_J_DAMON")
To make a ped use a certain pedstat.

GameSetPedStat(PED, 5, 300)
I would use override, to make sure it will work and override anything else.

PedOverrideStat(PED, 5, 700)
           PED, STAT, VALUE

0 Id of pickup def (c. Pickups.dat) - Item to drop when defeated - FRAFFYCAN - Weapons or other items - PedOverrideStat(PED, 0, "W_DeadRat")
1 Likelihood (n/100) of dropping an item when defeated
2 Vision Yaw (in degrees)  note this is total yaw and not angle from facing direction (which is this value / 2) Vision Rate
3 Vision Range (in meters)
4 Max Health
5 Health regeneration rate - percentage of maximum rate - Set to 101 or higher for regeneration.
6 Fear (n/100) How likely to run away from a fight or insult or weapon fired
7 Chicken (n/100) (chance of tattling/ yelling for help)
8 Attack Frequency - How often they attack
9 Bike Attack Frequency - How often they attack on a bike
10 Projectile Attack Accuracy (n/100) How accurate a ped is with a weapon
11 Projectile Attack Frequency - How often they attack with a weapon
12 Block Frequency - How often they block
13 Evade Frequency - How often they evade, preps dodge and dodge projectiles?
14 Aggression (n/100) How likely to start a fight, or continue a fight.
15 Criminality - How likely to bully or smash things
16 Sprint Meter - How much they can run before out of breath. 60 is normal
17 Character Class - Generic - Ranged - Striker - Melee - Grappler
18 Preferred Combat Zone (0/1/2 = short/medium/long) Short is grappling? Medium is striker? Long should be for Ranged
19 Preferred Orientation (Bit field: 0001 front, 0010 side, 0100 back. So front+side = 011 = 3, and 111 = 7) Not sure
20 Animation Speed factor (100 = 100% speed) 200 = Double speed - 50 is half speed
21 Zone Promote No idea
22 Special Meter  No idea
23 Special Points No idea
24 Bike Cruise Speed - Normal riding? Cruise control bike?
25 Bike Top Speed - Top possible speed
26 Bike Wait Speed - Waiting for you to catchup?
27 Bike Flee Distance - Fleeing distance from enemy
28 Bike Catchup Distance - Distance to catchup
29 Bike Wait Distance - How far away to wait.
30 Bike Projectile Usage (n/100) - How often to use weapons on bikes
31 Damage_Scale - How much damage per hit. 100 Should be normal. 500 will be very deadly with weapons
32 Dive probability No idea
33 Tenacity (n/100), How tough they are to knock down or off a bike
34 Evasion (n/100) - Bike evasion?
35 Bike Flee Speed - How fast to flee
36 Bike Follow Speed - How fast to follow
37 Bike Catchup Speed - How fast to catchup
38 Grap1Reversal (Strikes) - How likely to be able to hit/Knee drop - 100 max Impossible to hit
39 Grap2Reversal (Grapples) - How hard to grapple - 100 max Impossible to grapple
40 Night weapon - Weapon to use at night - W_Flashlight   PedOverrideStat(PED, 40, "W_Flashlight")
41 "Name of the bike model which the ped can ride (""""None"""" if the ped can't ride any bike)" - Bike - crapbmx - banbike - racer - aquabike - oladbike
42 "Name of the bike model which the ped can ride (""""None"""" if the ped can't ride any bike)"           scooter might work, I haven't checked
43 "Name of the bike model which the ped can ride (""""None"""" if the ped can't ride any bike)"
44 Likelihood (n/100) of having a weapon
45 Weapon slot 1: Type of melee/projectile ---  PedOverrideStat(PED, 45, "spudg")
46 Weapon slot 1: Amount of Ammo    -1 (Negative one) should be infinite. Otherwise will only have what number you set
47  Weapon slot 1: Selection weight for melee/projectile weapon - HIGHEST NUMBER WINS
48 "Weapon slot 1: Available after mission (use ""init"" to signify start of game)"    -    e.g - 1_03 or 4_01
49 Weapon slot 2: Type of melee/projectile         - brocketlauncher - spudg
50 Weapon slot 2: Amount of Ammo
51 Weapon slot 2: Selection weight for melee/projectile weapon
52 "Weapon slot 2: Available after mission (use ""init"" to signify start of game)"
53 Weapon slot 3: Type of melee/projectile
54 Weapon slot 3: Amount of Ammo
55 Weapon slot 3: Selection weight for melee/projectile weapon
56 "Weapon slot 3: Available after mission (use ""init"" to signify start of game)"
57 Weapon slot 4: Type of melee/projectile
58 Weapon slot 4: Amount of Ammo
59 Weapon slot 4: Selection weight for melee/projectile weapon
60 "Weapon slot 4: Available after mission (use ""init"" to signify start of game)"
61 Stun Resistance (n/100) how resistant a ped is to stunning - Like from uppercut
62 "Ped can be knocked down (0 = no, 1 = yes)"
63 Percent health at which the ped can be humiliated in combat. 0 - 100



I'll add anymore I get to work.
Code: [Select]
SoundPlayScriptedSpeechEvent(TargetPed, "JEER", 0, "large")
--Ped to speak - Speech type to play - Leave as 0 unless for mission audio - Ped size?

--Mission audio example
SoundPlayScriptedSpeechEvent(TargetPed, "M_2_R11", 10, "large", true)
--Put the ID for the mission, and the number is for which line to use.

--Speech types
BUSTING
BUSTING_JIMMY
BYE
CALL_FOR_HELP
CHASE
CHASE_ESCAPE
CHASE_OUT_OF_BREATH
CHATTER
COMPLAIN
CONFUSED
CONGRATULATIONS
DEFEAT_TEAM
DISGUST
DONT_HIT
FIGHT
FIGHT_BEATEN
FIGHT_INITIATE
FIGHT_SACKED
FIGHT_WATCH
FIGHT_WTF
FLUSTERED
GIVE
GREET
GREET_PLAYER_HAIRCUT_LIKE
GREET_PLAYER_SHIRT_LIKE
JEER
LAUGH
PUKE
RAT_HIT
SCARED
SEE_ALLY_ATTACKED
SEE_SOMETHING_COOL
SEE_VANDALISM
SNOW_SHOVELLING
STINK_BOMB
STORE_BYE_BUY
STORE_BYE_NOBUY
STORE_VIOLENCE_RESPONSE
TAUNT
TAUNT_AGGRO
TAUNT_BACK_DOWN
TAUNT_HARASS
TAUNT_KICK
TAUNT_NEIGHBOURHOOD_DROPOUT
TAUNT_NEIGHBOURHOOD_GREASER
TAUNT_NEIGHBOURHOOD_PREP
TAUNT_NEW_KID
TAUNT_PLAYER_DISLIKE_CLOTHES
TAUNT_PLAYER_DISLIKE_HAIR
TAUNT_PLAYER_DISLIKE_HAT
TAUNT_PLAYER_DISLIKE_PANTS
TAUNT_PLAYER_DISLIKE_SHIRT
TAUNT_PLAYER_DISLIKE_SHOES
TAUNT_PLAYER_DISLIKE_TATTOO
TAUNT_PLAYER_EGGS
TAUNT_PLAYER_FALLEN
TAUNT_PLAYER_LIKES_CLOTHES
TAUNT_RESPONSE
TAUNT_RESPONSE_CRY
TAUNT_RESPONSE_DONT_CARE
TAUNT_RESPONSE_PLEAD
THANK_YOU
THANKS_JIMMY
THIS_WAY
TRASH_TALK_PERSONAL
TRASH_TALK_TEAM
VICTORY_INDIVIDUAL
VICTORY_TEAM
WAIT_FOR_ME
WARNING_CURFEW
WARNING_TRUANCY
WHINE

-----------------------------------------------
Player audio

SoundPlayScriptedSpeechEvent(gPlayer, "PLAYER_BIKE_STEALING", 0, "large")

PLAYER_BEATEN
PLAYER_BIKE_CRASH
PLAYER_BIKE_STEALING
PLAYER_BIKE_STOLEN
PLAYER_BOOT
PLAYER_CAMERA_BAD
PLAYER_CAMERA_GOOD
PLAYER_DEFEAT_INDIVIDUAL
PLAYER_DEFEAT_TEAM
PLAYER_DEJECTED
PLAYER_DRINK
PLAYER_EXCUSE
PLAYER_FLIRT_GOOD
PLAYER_GET_MONEY
PLAYER_GET_WEAPON
PLAYER_GREET_ASSIST
PLAYER_GREET_FRIENDLY_DOG
PLAYER_GREET_GENERIC
PLAYER_GREET_GENERIC_BOY
PLAYER_HIT_SWITCH
PLAYER_IDLE
PLAYER_IDLE_RAIN
PLAYER_IDLE_TIRED
PLAYER_IDLE_WINTER
PLAYER_INFIRMARY
PLAYER_JEER
PLAYER_LAUGH_CRUEL
PLAYER_MISSION_SUCCESS
PLAYER_OFFICE
PLAYER_STEALTH
PLAYER_SUCCESS
PLAYER_TAG_COMPLETE
PLAYER_TAUNT
PLAYER_TAUNT_AUTHORITY
PLAYER_TAUNT_BURN
PLAYER_TAUNT_COMBAT
PLAYER_TAUNT_COMBAT_SHOVE
PLAYER_TAUNT_CONTINUED
PLAYER_TAUNT_DOG
PLAYER_TAUNT_DROPOUT
PLAYER_TAUNT_FACTION
PLAYER_TAUNT_FLEE
PLAYER_TAUNT_FLIRT_INSULT
PLAYER_TAUNT_GIRL
PLAYER_TAUNT_GREASER
PLAYER_TAUNT_HARASS
PLAYER_TAUNT_HARASS_FEMALE
PLAYER_TAUNT_HARASS_MALE
PLAYER_TAUNT_HUMILIATE
PLAYER_TAUNT_HUMILIATE_HIT
PLAYER_TAUNT_JOCK
PLAYER_TAUNT_KO
PLAYER_TAUNT_NERD
PLAYER_TAUNT_PREP
PLAYER_TAUNT_VICTIM
PLAYER_TIRED
PLAYER_TOILET_DUNK
PLAYER_TRASH_TALK
PLAYER_VICTORY_INDIVIDUAL
PLAYER_VICTORY_TEAM
PLAYER_WHEE

Narration audio. Lemon found these.
Code: [Select]
SoundPlayScriptedSpeechEvent(gPlayer, "NARRATION", 101, "speech") <-- So here I am in probably the worst school in the country
SoundPlayScriptedSpeechEvent(gPlayer, "NARRATION", 102, "speech") <-- Whos alump nye are..
SoundPlayScriptedSpeechEvent(gPlayer, "NARRATION", 103, "speech") <-- and that old creep thinks he can tame me?
SoundPlayScriptedSpeechEvent(gPlayer, "NARRATION", 104, "speech") <-- We shall see my friend... I only give people..
SoundPlayScriptedSpeechEvent(gPlayer, "NARRATION", 105, "speech") <-- with russell passified...
SoundPlayScriptedSpeechEvent(gPlayer, "NARRATION", 106, "speech") <-- This place is a Rotton Onion
SoundPlayScriptedSpeechEvent(gPlayer, "NARRATION", 107, "speech") <-- Peel off one stinkin layer.. and theres a...
SoundPlayScriptedSpeechEvent(gPlayer, "NARRATION", 108, "speech") <-- Now darby is stupid, melevalent, and rich.
SoundPlayScriptedSpeechEvent(gPlayer, "NARRATION", 109, "speech") <-- Which wouldn't surprise you in a furture life.. he will end up in congress
SoundPlayScriptedSpeechEvent(gPlayer, "NARRATION", 110, "speech") <-- But this is my story.. not his
SoundPlayScriptedSpeechEvent(gPlayer, "NARRATION", 111, "speech") <-- With the rich kids under control its time to turn my attention to there sworn enemies...
SoundPlayScriptedSpeechEvent(gPlayer, "NARRATION", 112, "speech") <-- Im starting to feel pretty good about myself
SoundPlayScriptedSpeechEvent(gPlayer, "NARRATION", 113, "speech") <--Ive taken control of two of the schools worst cliques.. but I know there are other..
SoundPlayScriptedSpeechEvent(gPlayer, "NARRATION", 114, "speech") <-- Problems with over developed tutuory glens... and brains the size of peas
SoundPlayScriptedSpeechEvent(gPlayer, "NARRATION", 115, "speech") <-- So... here I am suddenly king of the School
SoundPlayScriptedSpeechEvent(gPlayer, "NARRATION", 116, "speech") <-- I never wanted things to turn out this way.. just wanted to control couple of..
« Last Edit: March 15, 2015, 12:37:12 PM by Reath »

Offline Ky

  • Full Member
  • ***
  • Posts: 329
  • Gender: Male
  • <3
    • View Profile
Re: Triggering speech and setting Stats through Lua
« Reply #1 on: March 13, 2015, 04:20:57 PM »
You can add offense to my code ??

Code: [Select]
-- Removed unnecessary imported scripts, you do not need them.

-- Removed l_0_0 = 60 because you never use it in the script

MissionSetup = function()
  -- Changed names of variables to something that makes more sense. X makes more sense than l_1_0
  local X = 270
  local Y = -110
  local Z = 6.4
  AreaTransitionXYZ(0, X, Y, Z)

  PedSetTypeToTypeAttitude(1, 13, 2)
  PedSetTypeToTypeAttitude(2, 13, 2)
  PedSetTypeToTypeAttitude(3, 13, 1)
  PedSetTypeToTypeAttitude(4, 13, 4)
  PedSetTypeToTypeAttitude(5, 13, 1)
  PedSetTypeToTypeAttitude(6, 13, 2)
  PedSetTypeToTypeAttitude(11, 13, 2)
 
 
 
end


PlayerSwapModel("Player_Mascot")
PedSetStatsType(gPlayer, "STAT_B_STRIKER_A")
PedSetFaction(gPlayer, 2)

F_MissionSetup = function()

  LoadAnimationGroup("1_02BYourSchool")
  LoadAnimationGroup("1_02_MeetWithGary")
  LoadAnimationGroup("1_03The Setup")
  LoadAnimationGroup("1_04TheSlingshot")
  LoadAnimationGroup("1_06ALittleHelp")
  LoadAnimationGroup("1_07_SaveBucky")
  LoadAnimationGroup("1_07_Sk8Board")
  LoadAnimationGroup("1_08ThatBitch")
  LoadAnimationGroup("1_08_MandPuke")
  LoadAnimationGroup("1_09_Candidate")
  LoadAnimationGroup("1_10Betrayal")
  LoadAnimationGroup("1_11B_HeBigPrank")
  LoadAnimationGroup("1_G1_TheDiary")
  LoadAnimationGroup("1_S01HatVsGall")
  LoadAnimationGroup("2_01LastMinuteShop")
  LoadAnimationGroup("2_02ComicKlepto")
  LoadAnimationGroup("2_05TadsHouse")
  LoadAnimationGroup("2_06MovieTickets")
  LoadAnimationGroup("2_07BeachRumble")
  LoadAnimationGroup("2_08WeedKiller")
  LoadAnimationGroup("2_4RichAreaRace")
  LoadAnimationGroup("2_G2CarnivalDate")
  LoadAnimationGroup("2_G2_GiftExchange")
  LoadAnimationGroup("2_R03PaperRoute")
  LoadAnimationGroup("2_S02CharSheets")
  LoadAnimationGroup("2_S04CharSheets")
  LoadAnimationGroup("2_S05_CooksCrush")
  LoadAnimationGroup("2_S06PantyRaid")
  LoadAnimationGroup("3_01JealousJohnny")
  LoadAnimationGroup("3_04WrongPtTown")
  LoadAnimationGroup("3_05TheTenements")
  LoadAnimationGroup("3_BFightJohnnyV")
  LoadAnimationGroup("3_G3")
  LoadAnimationGroup("3_R05ChemicalDeliv")
  LoadAnimationGroup("3_R08RaceLeague")
  LoadAnimationGroup("3_S03CheatinTime")
  LoadAnimationGroup("4_01Paparazzi")
  LoadAnimationGroup("4_04_FunhouseFun")
  LoadAnimationGroup("4_06BigGame")
  LoadAnimationGroup("4_B2_JockBossBattle")
  LoadAnimationGroup("5_01Grp")
  LoadAnimationGroup("5_01Rats")
  LoadAnimationGroup("5_02PrVandalized")
  LoadAnimationGroup("5_05Zoe")
  LoadAnimationGroup("5_09MakingAMark")
  LoadAnimationGroup("6B_PARA")
  LoadAnimationGroup("AGymLght")
  LoadAnimationGroup("Ambient")
  LoadAnimationGroup("Ambient2")
  LoadAnimationGroup("Ambient3")
  LoadAnimationGroup("ANIBBALL")
  LoadAnimationGroup("AniBroom")
  LoadAnimationGroup("AniDice")
  LoadAnimationGroup("AniFooty")
  LoadAnimationGroup("AniGlobe")
  LoadAnimationGroup("AnimSave")
  LoadAnimationGroup("AniPillo")
  LoadAnimationGroup("ARC3D")
  LoadAnimationGroup("Area_Asylum")
  LoadAnimationGroup("Area_Funhouse")
  LoadAnimationGroup("Area_GirlsDorm")
  LoadAnimationGroup("Area_Infirmary")
  LoadAnimationGroup("Area_School")
  LoadAnimationGroup("Area_Tenements")
  LoadAnimationGroup("Armor")
  LoadAnimationGroup("AsyBars")
  LoadAnimationGroup("AsyDoorB")
  LoadAnimationGroup("AsyDoors")
  LoadAnimationGroup("AsyGate")
  LoadAnimationGroup("AsyLever")
  LoadAnimationGroup("AsySwtch")
  LoadAnimationGroup("AtcPlank")
  LoadAnimationGroup("Authority")
  LoadAnimationGroup("BANANA")
  LoadAnimationGroup("barelLad")
  LoadAnimationGroup("BarrGate")
  LoadAnimationGroup("BATON")
  LoadAnimationGroup("BBALL_21")
  LoadAnimationGroup("bbgun")
  LoadAnimationGroup("BCatcher")
  LoadAnimationGroup("BdrDoorL")
  LoadAnimationGroup("BeardLady")
  LoadAnimationGroup("Bike")
  LoadAnimationGroup("BikeGar")
  LoadAnimationGroup("BoldRoll")
  LoadAnimationGroup("BoltCutt")
  LoadAnimationGroup("Boxing")
  LoadAnimationGroup("BoxRopes")
  LoadAnimationGroup("BRDoor")
  LoadAnimationGroup("BrkSwtch")
  LoadAnimationGroup("BROCKETL")
  LoadAnimationGroup("BRSwitch")
  LoadAnimationGroup("BusDoors")
  LoadAnimationGroup("Butcher")
  LoadAnimationGroup("BXPBag")
  LoadAnimationGroup("B_Striker")
  LoadAnimationGroup("CarnCurt")
  LoadAnimationGroup("CARNI01")
  LoadAnimationGroup("carnies")
  LoadAnimationGroup("Car_Ham")
  LoadAnimationGroup("Cavalier")
  LoadAnimationGroup("Cheer_Cool1")
  LoadAnimationGroup("Cheer_Cool2")
  LoadAnimationGroup("Cheer_Cool3")
  LoadAnimationGroup("Cheer_Gen1")
  LoadAnimationGroup("Cheer_Gen2")
  LoadAnimationGroup("Cheer_Gen3")
  LoadAnimationGroup("Cheer_Girl1")
  LoadAnimationGroup("Cheer_Girl2")
  LoadAnimationGroup("Cheer_Girl3")
  LoadAnimationGroup("Cheer_Girl4")
  LoadAnimationGroup("Cheer_Nerd1")
  LoadAnimationGroup("Cheer_Nerd2")
  LoadAnimationGroup("Cheer_Nerd3")
  LoadAnimationGroup("Cheer_Posh1")
  LoadAnimationGroup("Cheer_Posh2")
  LoadAnimationGroup("Cheer_Posh3")
  LoadAnimationGroup("Chem_Set")
  LoadAnimationGroup("ChLead_Idle")
  LoadAnimationGroup("CLadderA")
  LoadAnimationGroup("CnGate")
  LoadAnimationGroup("Coaster")
  LoadAnimationGroup("COPBIKE")
  LoadAnimationGroup("Cop_Frisk")
  LoadAnimationGroup("CV_Female")
  LoadAnimationGroup("CV_Male")
  LoadAnimationGroup("C_Wrestling")
  LoadAnimationGroup("DartBrd")
  LoadAnimationGroup("DartCab")
  LoadAnimationGroup("DodgeBall")
  LoadAnimationGroup("DodgeBall2")
  LoadAnimationGroup("DoorStr1")
  LoadAnimationGroup("DO_Edgar")
  LoadAnimationGroup("DO_Grap")
  LoadAnimationGroup("DO_StrikeCombo")
  LoadAnimationGroup("DO_Striker")
  LoadAnimationGroup("DRBrace")
  LoadAnimationGroup("Drumming")
  LoadAnimationGroup("DuffBag")
  LoadAnimationGroup("DunkBttn")
  LoadAnimationGroup("DunkSeat")
  LoadAnimationGroup("Earnest")
  LoadAnimationGroup("EnglishClass")
  LoadAnimationGroup("ErrandCrab")
  LoadAnimationGroup("Errand_BUS")
  LoadAnimationGroup("Errand_IND")
  LoadAnimationGroup("Errand_RIC")
  LoadAnimationGroup("Errand_SCH")
  LoadAnimationGroup("ESCDoorL")
  LoadAnimationGroup("ESCDoorR")
  LoadAnimationGroup("ExtWind")
  LoadAnimationGroup("FDoor")
  LoadAnimationGroup("FDoorB")
  LoadAnimationGroup("FDoorC")
  LoadAnimationGroup("Ferris")
  LoadAnimationGroup("FGhost")
  LoadAnimationGroup("FGoblin")
  LoadAnimationGroup("FlagA")
  LoadAnimationGroup("FLbBook")
  LoadAnimationGroup("FlbLader")
  LoadAnimationGroup("FLbPaint")
  LoadAnimationGroup("FLbTable")
  LoadAnimationGroup("FMCntrl")
  LoadAnimationGroup("FMDoor")
  LoadAnimationGroup("FMTrapDr")
  LoadAnimationGroup("FMTrapSw")
  LoadAnimationGroup("FortTell")
  LoadAnimationGroup("funCart")
  LoadAnimationGroup("funCurtn")
  LoadAnimationGroup("funMiner")
  LoadAnimationGroup("funRocks")
  LoadAnimationGroup("FunTeeth")
  LoadAnimationGroup("FXTestG")
  LoadAnimationGroup("F_Adult")
  LoadAnimationGroup("F_BULLY")
  LoadAnimationGroup("F_Crazy")
  LoadAnimationGroup("F_Douts")
  LoadAnimationGroup("F_Girls")
  LoadAnimationGroup("F_Greas")
  LoadAnimationGroup("F_Jocks")
  LoadAnimationGroup("F_Nerds")
  LoadAnimationGroup("F_OldPeds")
  LoadAnimationGroup("F_Pref")
  LoadAnimationGroup("F_Preps")
  LoadAnimationGroup("GarbCanA")
  LoadAnimationGroup("GatCool")
  LoadAnimationGroup("GEN_SOCIAL")
  LoadAnimationGroup("Gfight")
  LoadAnimationGroup("GhostDrs")
  LoadAnimationGroup("Gift")
  LoadAnimationGroup("Go_Cart")
  LoadAnimationGroup("Grap")
  LoadAnimationGroup("GymHoop")
  LoadAnimationGroup("GymWLad")
  LoadAnimationGroup("G_Grappler")
  LoadAnimationGroup("G_Johnny")
  LoadAnimationGroup("G_Striker")
  LoadAnimationGroup("Halloween")
  LoadAnimationGroup("HallWind")
  LoadAnimationGroup("Hang_Jock")
  LoadAnimationGroup("Hang_Moshing")
  LoadAnimationGroup("Hang_Talking")
  LoadAnimationGroup("Hang_Workout")
  LoadAnimationGroup("Hobos")
  LoadAnimationGroup("Hobo_Cheer")
  LoadAnimationGroup("HSdinger")
  LoadAnimationGroup("HUMIL_4-10_B")
  LoadAnimationGroup("HUMIL_4-10_C")
  LoadAnimationGroup("HUMIL_5-8F_A")
  LoadAnimationGroup("HUMIL_5-8F_B")
  LoadAnimationGroup("HUMIL_5-8V4-10")
  LoadAnimationGroup("HUMIL_5-8V6-1")
  LoadAnimationGroup("HUMIL_5-8VPLY")
  LoadAnimationGroup("HUMIL_5-8_A")
  LoadAnimationGroup("HUMIL_5-8_B")
  LoadAnimationGroup("HUMIL_5-8_C")
  LoadAnimationGroup("HUMIL_6-1V4-10")
  LoadAnimationGroup("HUMIL_6-1V6-1")
  LoadAnimationGroup("HUMIL_6-1VPLY")
  LoadAnimationGroup("HUMIL_6-1_A")
  LoadAnimationGroup("HUMIL_6-1_B")
  LoadAnimationGroup("HUMIL_6-1_C")
  LoadAnimationGroup("HUMIL_6-5V4-10")
  LoadAnimationGroup("HUMIL_6-5V6-1")
  LoadAnimationGroup("HUMIL_6-5VPLY")
  LoadAnimationGroup("HUMIL_6-5_A")
  LoadAnimationGroup("HUMIL_6-5_B")
  LoadAnimationGroup("HUMIL_6-5_C")
  LoadAnimationGroup("IDLE_AUTH_A")
  LoadAnimationGroup("IDLE_AUTH_B")
  LoadAnimationGroup("IDLE_AUTH_C")
  LoadAnimationGroup("IDLE_AUTH_D")
  LoadAnimationGroup("IDLE_BULLY_A")
  LoadAnimationGroup("IDLE_BULLY_B")
  LoadAnimationGroup("IDLE_BULLY_C")
  LoadAnimationGroup("IDLE_BULLY_D")
  LoadAnimationGroup("IDLE_CIVF_A")
  LoadAnimationGroup("IDLE_CIVF_B")
  LoadAnimationGroup("IDLE_CIVF_C")
  LoadAnimationGroup("IDLE_CIVM_A")
  LoadAnimationGroup("IDLE_CIVM_B")
  LoadAnimationGroup("IDLE_CIVM_C")
  LoadAnimationGroup("IDLE_DOUT_A")
  LoadAnimationGroup("IDLE_DOUT_B")
  LoadAnimationGroup("IDLE_DOUT_C")
  LoadAnimationGroup("IDLE_DOUT_D")
  LoadAnimationGroup("IDLE_FATG_A")
  LoadAnimationGroup("IDLE_FATG_B")
  LoadAnimationGroup("IDLE_FATG_C")
  LoadAnimationGroup("IDLE_FAT_A")
  LoadAnimationGroup("IDLE_FAT_B")
  LoadAnimationGroup("IDLE_FAT_C")
  LoadAnimationGroup("IDLE_GREAS_A")
  LoadAnimationGroup("IDLE_GREAS_B")
  LoadAnimationGroup("IDLE_GREAS_C")
  LoadAnimationGroup("IDLE_GREAS_D")
  LoadAnimationGroup("IDLE_GSF_A")
  LoadAnimationGroup("IDLE_GSF_B")
  LoadAnimationGroup("IDLE_GSF_C")
  LoadAnimationGroup("IDLE_GSM_A")
  LoadAnimationGroup("IDLE_GSM_B")
  LoadAnimationGroup("IDLE_GSM_C")
  LoadAnimationGroup("IDLE_JOCK_A")
  LoadAnimationGroup("IDLE_JOCK_B")
  LoadAnimationGroup("IDLE_JOCK_C")
  LoadAnimationGroup("IDLE_JOCK_D")
  LoadAnimationGroup("IDLE_NERD_A")
  LoadAnimationGroup("IDLE_NERD_B")
  LoadAnimationGroup("IDLE_NERD_C")
  LoadAnimationGroup("IDLE_NERD_D")
  LoadAnimationGroup("IDLE_NGIRL")
  LoadAnimationGroup("IDLE_PREP_A")
  LoadAnimationGroup("IDLE_PREP_B")
  LoadAnimationGroup("IDLE_PREP_C")
  LoadAnimationGroup("IDLE_PREP_D")
  LoadAnimationGroup("IDLE_SEXY_A")
  LoadAnimationGroup("IDLE_SEXY_B")
  LoadAnimationGroup("IDLE_SEXY_C")
  LoadAnimationGroup("INDgateC")
  LoadAnimationGroup("JPhoto")
  LoadAnimationGroup("JunkCarA")
  LoadAnimationGroup("JV_Asylum")
  LoadAnimationGroup("J_Damon")
  LoadAnimationGroup("J_Grappler")
  LoadAnimationGroup("J_Melee")
  LoadAnimationGroup("J_Ranged")
  LoadAnimationGroup("J_Striker")
  LoadAnimationGroup("KISS1")
  LoadAnimationGroup("KISS2")
  LoadAnimationGroup("KISS3")
  LoadAnimationGroup("KISS4")
  LoadAnimationGroup("KissAdult")
  LoadAnimationGroup("KISSB")
  LoadAnimationGroup("KISSF")
  LoadAnimationGroup("LckrGymA")
  LoadAnimationGroup("LE_Officer")
  LoadAnimationGroup("LE_Orderly")
  LoadAnimationGroup("Mermaid")
  LoadAnimationGroup("MG_Craps")
  LoadAnimationGroup("MINIBIKE")
  LoadAnimationGroup("MINICHEM")
  LoadAnimationGroup("MINIDARTS")
  LoadAnimationGroup("MINIDunk")
  LoadAnimationGroup("MINIGraf")
  LoadAnimationGroup("MINIHACKY")
  LoadAnimationGroup("MINI_Arm")
  LoadAnimationGroup("MINI_BallToss")
  LoadAnimationGroup("MINI_Lock")
  LoadAnimationGroup("MINI_React")
  LoadAnimationGroup("Miracle")
  LoadAnimationGroup("MOWER")
  LoadAnimationGroup("MPostA")
  LoadAnimationGroup("N2B Dishonerable")
  LoadAnimationGroup("Nemesis")
  LoadAnimationGroup("nerdBar1")
  LoadAnimationGroup("NIS_0_00A")
  LoadAnimationGroup("NIS_1_02")
  LoadAnimationGroup("NIS_1_02B")
  LoadAnimationGroup("NIS_1_03")
  LoadAnimationGroup("NIS_1_04")
  LoadAnimationGroup("NIS_1_05")
  LoadAnimationGroup("NIS_1_07")
  LoadAnimationGroup("NIS_1_08_1")
  LoadAnimationGroup("NIS_1_09")
  LoadAnimationGroup("NIS_1_11")
  LoadAnimationGroup("NIS_2_01")
  LoadAnimationGroup("NIS_2_03")
  LoadAnimationGroup("NIS_2_04")
  LoadAnimationGroup("NIS_2_06_1")
  LoadAnimationGroup("NIS_2_B")
  LoadAnimationGroup("NIS_2_S04")
  LoadAnimationGroup("NIS_3_01")
  LoadAnimationGroup("NIS_3_02")
  LoadAnimationGroup("NIS_3_04")
  LoadAnimationGroup("NIS_3_05")
  LoadAnimationGroup("NIS_3_06")
  LoadAnimationGroup("NIS_3_08")
  LoadAnimationGroup("NIS_3_11")
  LoadAnimationGroup("NIS_3_B")
  LoadAnimationGroup("NIS_3_G3")
  LoadAnimationGroup("NIS_3_R09_D")
  LoadAnimationGroup("NIS_3_R09_G")
  LoadAnimationGroup("NIS_3_R09_J")
  LoadAnimationGroup("NIS_3_R09_N")
  LoadAnimationGroup("NIS_3_R09_P")
  LoadAnimationGroup("NIS_3_S03")
  LoadAnimationGroup("NIS_3_S03_B")
  LoadAnimationGroup("NIS_3_S11")
  LoadAnimationGroup("NIS_4_01")
  LoadAnimationGroup("NIS_4_05")
  LoadAnimationGroup("NIS_4_06")
  LoadAnimationGroup("NIS_4_B2")
  LoadAnimationGroup("NIS_5_01")
  LoadAnimationGroup("NIS_5_02")
  LoadAnimationGroup("NIS_5_03")
  LoadAnimationGroup("NIS_5_04")
  LoadAnimationGroup("NIS_5_05")
  LoadAnimationGroup("NIS_5_07")
  LoadAnimationGroup("NIS_5_G5")
  LoadAnimationGroup("NIS_6_02")
  LoadAnimationGroup("NIS_6_03")
  LoadAnimationGroup("NLock01A")
  LoadAnimationGroup("NPC_Adult")
  LoadAnimationGroup("NPC_AggroTaunt")
  LoadAnimationGroup("NPC_Chat_1")
  LoadAnimationGroup("NPC_Chat_2")
  LoadAnimationGroup("NPC_Chat_F")
  LoadAnimationGroup("NPC_Cheering")
  LoadAnimationGroup("NPC_Love")
  LoadAnimationGroup("NPC_Mascot")
  LoadAnimationGroup("NPC_NeedsResolving")
  LoadAnimationGroup("NPC_Principal")
  LoadAnimationGroup("NPC_Shopping")
  LoadAnimationGroup("NPC_Spectator")
  LoadAnimationGroup("N_Ranged")
  LoadAnimationGroup("N_Striker")
  LoadAnimationGroup("N_Striker_A")
  LoadAnimationGroup("N_Striker_B")
  LoadAnimationGroup("ObsDoor")
  LoadAnimationGroup("OBSMotor")
  LoadAnimationGroup("ObsPtf_1")
  LoadAnimationGroup("ObsPtf_2")
  LoadAnimationGroup("Pageant")
  LoadAnimationGroup("PedCoaster")
  LoadAnimationGroup("Player_Tired")
  LoadAnimationGroup("Player_VTired")
  LoadAnimationGroup("POI_Booktease")
  LoadAnimationGroup("POI_Cafeteria")
  LoadAnimationGroup("POI_ChLead")
  LoadAnimationGroup("POI_Gen")
  LoadAnimationGroup("POI_Smoking")
  LoadAnimationGroup("POI_Telloff")
  LoadAnimationGroup("POI_WarmHands")
  LoadAnimationGroup("POI_Worker")
  LoadAnimationGroup("PortaPoo")
  LoadAnimationGroup("PrepDoor")
  LoadAnimationGroup("PunchBag")
  LoadAnimationGroup("pxHoop")
  LoadAnimationGroup("pxLad10M")
  LoadAnimationGroup("Px_Arcade")
  LoadAnimationGroup("Px_Bed")
  LoadAnimationGroup("Px_Fountain")
  LoadAnimationGroup("Px_Garb")
  LoadAnimationGroup("Px_Gen")
  LoadAnimationGroup("Px_Ladr")
  LoadAnimationGroup("Px_Rail")
  LoadAnimationGroup("Px_RedButton")
  LoadAnimationGroup("Px_Sink")
  LoadAnimationGroup("Px_Tlet")
  LoadAnimationGroup("Px_Tree")
  LoadAnimationGroup("P_Grappler")
  LoadAnimationGroup("P_Striker")
  LoadAnimationGroup("QPed")
  LoadAnimationGroup("RAT_PED")
  LoadAnimationGroup("Reeper")
  LoadAnimationGroup("RMailbox")
  LoadAnimationGroup("Russell")
  LoadAnimationGroup("Russell_PBomb")
  LoadAnimationGroup("Santa_Lap")
  LoadAnimationGroup("SAUTH_A")
  LoadAnimationGroup("SAUTH_F")
  LoadAnimationGroup("SAUTH_U")
  LoadAnimationGroup("SAUTH_X")
  LoadAnimationGroup("SBarels1")
  LoadAnimationGroup("SBULL_A")
  LoadAnimationGroup("SBULL_F")
  LoadAnimationGroup("SBULL_S")
  LoadAnimationGroup("SBULL_U")
  LoadAnimationGroup("SBULL_X")
  LoadAnimationGroup("Scaffold")
  LoadAnimationGroup("SCbanpil")
  LoadAnimationGroup("SCBell")
  LoadAnimationGroup("SCDoor")
  LoadAnimationGroup("ScGate")
  LoadAnimationGroup("SCgrdoor")
  LoadAnimationGroup("scObsDr")
  LoadAnimationGroup("ScoolBus")
  LoadAnimationGroup("SCOOTER")
  LoadAnimationGroup("SecDoorL")
  LoadAnimationGroup("SecDoorR")
  LoadAnimationGroup("Sedan")
  LoadAnimationGroup("SFAT_A")
  LoadAnimationGroup("SFAT_F")
  LoadAnimationGroup("SFAT_I")
  LoadAnimationGroup("SFAT_S")
  LoadAnimationGroup("SGEN_A")
  LoadAnimationGroup("SGEN_F")
  LoadAnimationGroup("SGEN_I")
  LoadAnimationGroup("SGEN_S")
  LoadAnimationGroup("SGIRLS")
  LoadAnimationGroup("SGIRL_A")
  LoadAnimationGroup("SGIRL_D")
  LoadAnimationGroup("SGIRL_F")
  LoadAnimationGroup("SGIRL_S")
  LoadAnimationGroup("SGTargB")
  LoadAnimationGroup("ShopBike")
  LoadAnimationGroup("SHUMIL_01")
  LoadAnimationGroup("SHWR")
  LoadAnimationGroup("SIAMESE")
  LoadAnimationGroup("Siamese2")
  LoadAnimationGroup("Sitting_Boys")
  LoadAnimationGroup("SK8Board")
  LoadAnimationGroup("Skateboard")
  LoadAnimationGroup("SkeltonMan")
  LoadAnimationGroup("Slingsh")
  LoadAnimationGroup("SNERD_A")
  LoadAnimationGroup("SNERD_F")
  LoadAnimationGroup("SNERD_I")
  LoadAnimationGroup("SNERD_S")
  LoadAnimationGroup("SNGIRLS")
  LoadAnimationGroup("SNGIRL_D")
  LoadAnimationGroup("SNGIRL_F")
  LoadAnimationGroup("SnowBlob")
  LoadAnimationGroup("SnowMND")
  LoadAnimationGroup("SnowWall")
  LoadAnimationGroup("SOLD_A")
  LoadAnimationGroup("SOLD_F")
  LoadAnimationGroup("SOLD_I")
  LoadAnimationGroup("SOLD_S")
  LoadAnimationGroup("SPLAY_A")
  LoadAnimationGroup("SPLAY_B")
  LoadAnimationGroup("SprayCan")
  LoadAnimationGroup("SpudG")
  LoadAnimationGroup("Squid")
  LoadAnimationGroup("StalDoor")
  LoadAnimationGroup("Straf_Dout")
  LoadAnimationGroup("Straf_Fat")
  LoadAnimationGroup("Straf_Female")
  LoadAnimationGroup("Straf_Male")
  LoadAnimationGroup("Straf_Nerd")
  LoadAnimationGroup("Straf_Prep")
  LoadAnimationGroup("Straf_Savage")
  LoadAnimationGroup("Straf_Wrest")
  LoadAnimationGroup("SUV")
  LoadAnimationGroup("TadGates")
  LoadAnimationGroup("TadShud")
  LoadAnimationGroup("TE_Female")
  LoadAnimationGroup("TGKFlag")
  LoadAnimationGroup("ToolBox")
  LoadAnimationGroup("TrackSW")
  LoadAnimationGroup("TreeFall")
  LoadAnimationGroup("Truck")
  LoadAnimationGroup("Try_Clothes")
  LoadAnimationGroup("TSGate")
  LoadAnimationGroup("UBO")
  LoadAnimationGroup("Umbrella")
  LoadAnimationGroup("VDMilo")
  LoadAnimationGroup("VFlytrap")
  LoadAnimationGroup("V_Bike")
  LoadAnimationGroup("V_Bike_Races")
  LoadAnimationGroup("V_COPBIKE")
  LoadAnimationGroup("V_SCOOTER")
  LoadAnimationGroup("WBalloon")
  LoadAnimationGroup("WeaponUnlock")
  LoadAnimationGroup("Ween_Fem")
  LoadAnimationGroup("WHCrane")
  LoadAnimationGroup("WheelBrl")
  LoadAnimationGroup("WPCannon")
  LoadAnimationGroup("WPSheldB")
  LoadAnimationGroup("WPShield")
  LoadAnimationGroup("WPTurret")
  LoadAnimationGroup("W_BBall")
  LoadAnimationGroup("W_BBallBat")
  LoadAnimationGroup("W_BRocket")
  LoadAnimationGroup("W_Camera")
  LoadAnimationGroup("W_CherryBomb")
  LoadAnimationGroup("W_CHShield")
  LoadAnimationGroup("W_FlashLight")
  LoadAnimationGroup("W_Fountain")
  LoadAnimationGroup("W_Itchpowder")
  LoadAnimationGroup("W_JBroom")
  LoadAnimationGroup("W_Lid")
  LoadAnimationGroup("W_PooBag")
  LoadAnimationGroup("W_PRANK")
  LoadAnimationGroup("W_Slingshot")
  LoadAnimationGroup("W_Snowball")
  LoadAnimationGroup("W_snowshwl")
  LoadAnimationGroup("W_SprayCan")
  LoadAnimationGroup("W_SpudGun")
  LoadAnimationGroup("W_Stick")
  LoadAnimationGroup("W_Thrown")
  LoadAnimationGroup("W_wtrpipe")
  LoadAnimationGroup("x_cas1")
  LoadAnimationGroup("x_cas2")
  LoadAnimationGroup("x_cas3")
  LoadAnimationGroup("x_ccane")
  LoadAnimationGroup("X_Chair")
  LoadAnimationGroup("x_cndl")
  LoadAnimationGroup("x_sleigh")
  LoadAnimationGroup("x_tedy")
 
  PlayerSetControl(1)
 
  CameraFollowPed(gPlayer)
 
  ClockSet(8, 30)
 
  ClockSetTickRate(0.0060000000521541)
 
 
end



MissionCleanup = function()
  ClearTextQueue()
  EnablePOI()
  gMissionRunning = false
  shared.gMissionEventFunction = nil
  WeatherRelease()
  PlayerSetControl(1)
  PlayerSetPunishmentPoints(0)
end



function IsMoving()
  local s = 0.08 -- sensitivity
  return GetStickValue(16,c) > s or GetStickValue(16,c) < -s or GetStickValue(17,c) > s or GetStickValue(17,c) < -s
end

function Block()
   if IsButtonPressed(10,0) and IsButtonBeingPressed(12,0) and not PedIsValid(PedGetGrappleTargetPed(gPlayer)) then
      PedSetActionTree(gPlayer,"/Global/Player","Act/Player.act")
   elseif IsButtonBeingReleased (10,0)  and not PedIsValid(PedGetGrappleTargetPed(gPlayer)) then
      PedSetActionTree(gPlayer,"/Global/B_Striker_A", "Act/Anim/B_Striker_A.act")
end
end

main = function()
  F_MissionSetup()
  gMissionRunning = true
  while gMissionRunning do
  IsMoving()
  Block()
if IsButtonPressed(14,0) then
      PedSetActionTree(gPlayer, "/Global/B_Striker_A", "Act/Anim/B_Striker_A.act") 
elseif IsButtonPressed(6,0) then
  PedSetActionNode(gPlayer, "/Global/B_Striker_A/Offense/Short/Strikes/HeavyAttacks/GutKick/GutKick_R", "act/anim/B_Striker_A.act")
elseif IsButtonPressed(15,0) then
  PedSetActionNode(gPlayer, "/Global/J_Mascot/Offense/Special/Mascot/Mascot/SpecialChoose/Headbutt/Invincible/Headbutt", "act/anim/J_Mascot.act")
elseif IsButtonPressed(2,0) then
  PedSetActionNode(gPlayer, "/Global/Ambient/SocialAnims/SocialInsult1/SocialInsult1","Act/Anim/Ambient.act")
elseif IsButtonPressed(3,0) then
  PedSetActionNode(gPlayer, "/Global/Ambient/Reactions/HumiliationReact/Laughing/Guy_Laugh/Laugh02","Act/Anim/Ambient.act")
elseif IsButtonPressed(10,0) and IsMoving() and not isStrafing and not PedIsValid(PedGetGrappleTargetPed(gPlayer)) then
     ExecuteActionNode(gPlayer,"/Global/B_Striker_A/Default_KEY/ExecuteNodes/LocomotionOverride/Combat","Act/Anim/B_Striker_A")
 isStrafing = true
  elseif (not IsButtonPressed(10,0) or not IsMoving()) and isStrafing and not PedIsValid(PedGetGrappleTargetPed(gPlayer)) then
     PedSetActionTree(gPlayer,"/Global/B_Striker_A", "Act/Anim/B_Striker_A")
     isStrafing = false
  elseif PedIsValid(PedGetTargetPed()) and not PedIsValid(PedGetGrappleTargetPed(gPlayer)) then
     local x,y,z = PedGetPosXYZ(PedGetTargetPed())
     PedFaceXYZ(gPlayer,x,y,z)
  end
  UpdateTextQueue()
    Wait(0)
  end
end
 
« Last Edit: March 13, 2015, 04:22:37 PM by kinnikuchu »

Offline Reath

  • Jr. Member
  • **
  • Posts: 26
  • Gender: Male
    • View Profile
Re: Triggering speech and setting Stats through Lua
« Reply #2 on: March 14, 2015, 07:34:21 PM »
What do you mean?

Offline Enderman

  • What i'm doing right now?
  • Full Member
  • ***
  • Posts: 293
  • Gender: Male
  • I'm no longer do mods for Bully ...
    • View Profile
    • bully-board.com
Re: Triggering speech and setting Stats through Lua
« Reply #3 on: March 14, 2015, 10:09:19 PM »
Realth what code to speech insult?  :neen:

Offline Reath

  • Jr. Member
  • **
  • Posts: 26
  • Gender: Male
    • View Profile
Re: Triggering speech and setting Stats through Lua
« Reply #4 on: March 14, 2015, 11:36:38 PM »
Realth what code to speech insult?  :neen:
I think you mean these?
I don't know the other ped taunts, though.


Code: [Select]
JEER
TAUNT
PLAYER_JEER
PLAYER_TAUNT
PLAYER_TAUNT_AUTHORITY
PLAYER_TAUNT_BURN
PLAYER_TAUNT_DROPOUT
PLAYER_TAUNT_FLEE
PLAYER_TAUNT_GIRL
PLAYER_TAUNT_GREASER
PLAYER_TAUNT_HUMILIATE
PLAYER_TAUNT_JOCK
PLAYER_TAUNT_KO
PLAYER_TAUNT_NERD
PLAYER_TAUNT_PREP
PLAYER_TAUNT_VICTIM

Offline Enderman

  • What i'm doing right now?
  • Full Member
  • ***
  • Posts: 293
  • Gender: Male
  • I'm no longer do mods for Bully ...
    • View Profile
    • bully-board.com
Re: Triggering speech and setting Stats through Lua
« Reply #5 on: March 15, 2015, 01:31:16 AM »
Thank you  :)