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


Author Topic: NPC MOD 0.1!!!  (Read 9974 times)

0 Members and 1 Guest are viewing this topic.

Offline DaBOSS54320

  • Hero Member
  • ****
  • Posts: 3,398
  • Gender: Female
    • View Profile
NPC MOD 0.1!!!
« on: September 23, 2015, 08:44:10 PM »
Well I haven't released anything in a while... so I thought I'd release this, I call it NPC Mod. Not a very creative name but... well it lets you be an NPC. I made it a little while ago however I never released it. Basically the idea started as me wanting to make it so you could move like you do in GTA IV/GTA V: normally you walk, hold sprint to jog, and tap sprint to sprint. Then I also added a little more to it... here's a list of features:

- Be any model you want
- Control movement speed in a way similar to GTA IV/GTA V (read above)
- Select strafe/walking style
- Set max trouble points
- Set the respect of each faction towards you (and sync it with the current model if you choose)

Download: Mediafire

Source (intended to be a replacement of STimeCycle.lur):
Code: [Select]
function main()
  Wait(500)
  sensitivity = 0.1
  SetupModelsTable()
  styles = {
    -- NAME     STYLE     STAT
    {"Player","Player","STAT_PLAYER"},
    {"B_Striker_A","B_Striker_A","STAT_B_STRIKER_A"},
    {"CV_Male_A","CV_Male_A","STAT_CV_MALE_A"},
    {"CV_Old","CV_OLD","STAT_CV_MALE_OLD"},
    {"DO_Striker_A","DO_Striker_A","STAT_DO_STRIKER_A"},
    {"DO_Grappler_A","DO_Grappler_A","STAT_DO_GRAPPLER_A"},
    {"GS_Male_A","GS_Male_A","STAT_GS_MALE_A"},
    {"GS_Fat_A","GS_Fat_A","STAT_GS_MALE_A"},
    {"G_Striker_A","G_Striker_A","STAT_G_STRIKER_A"},
    {"G_Grappler_A","G_Grappler_A","STAT_G_GRAPPLER_A"},
    {"G_Melee_A","G_Melee_A","STAT_G_MELEE_A"},
    {"J_Striker_A","J_Striker_A","STAT_J_STRIKER_A"},
    {"J_Grappler_A","J_Grappler_A","STAT_J_GRAPPLER_A"},
    {"J_Melee_A","J_Melee_A","STAT_J_MELEE_A"},
    {"P_Striker_A","P_Striker_A","STAT_P_STRIKER_A"},
    {"P_Striker_B","P_Striker_B","STAT_P_STRIKER_B"},
    {"P_Grappler_A","P_Grappler_A","STAT_P_GRAPPLER_A"},
    {"N_Striker_A","N_Striker_A","STAT_N_STRIKER_A"},
    {"N_Striker_B","N_Striker_B","STAT_N_STRIKER_B"},
    {"N_Ranged_A","N_Ranged_A","STAT_N_RANGED_A"},
    {"Authority","Authority","STAT_PF_BASIC_S"},
    {"LE_Orderly_A","LE_Orderly_A","STAT_LE_ORDERLY_A"},
    {"G_Johnny","G_Johnny","STAT_G_JOHNNY"},
    {"BOSS_Darby","BOSS_Darby","STAT_P_BOXING"},
    {"BOSS_Russell","BOSS_Russell","STAT_B_RUSSELL_A"},
    {"CV_Female_A","CV_Female_A","STAT_CV_FEMALE_A"},
    {"GS_Female_A","GS_Female_A","STAT_GS_FEMALE_A"},
    {"TE_Female_A","TE_Female_A","STAT_TE_FEMALE_A"}
  }
  style = math.random(2,24)
  blip = BlipAddXYZ(-490.6,313.8,31.4,0,0,8)
  moving = false
  strafing = false
  timesSprintPressed = 0
  lastTimeSprintPressed = GetTimer()
  lastTimeRunning = GetTimer()
  lastTimeDoneShit = GetTimer()
  usingStats = false
  maxTrouble = 300
  playerStats = {}
  for i = 0,63 do
    playerStats[i+1] = GameGetPedStat(gPlayer,i)
  end
  -- Start as random ped with random movement
  local health = PlayerGetHealth()
  local weapon = PedGetWeapon(gPlayer)
  PedSetStatsType(gPlayer,styles[style][3])
  if styles[style][3] ~= nil and styles[style][3] ~= "STAT_PLAYER" then
    for i,v in ipairs(playerStats) do
      GameSetPedStat(gPlayer,i-1,v)
    end
    PedSetWeapon(gPlayer,weapon)
    PlayerSetHealth(health)
  end
  PlayerSwapModel(models[math.random(2,47)][1])
  PedSetActionTree(gPlayer,"/Global/Player","Act/Player.act")
  PedSetAITree(gPlayer,"/Global/PlayerAI","Act/PlayerAI.act")
  local model = PedGetModel(gPlayer)
  if model == 0 then model = 1 end
  for f = 0,11 do
    local attitude = PedGetTypeToTypeAttitude(f,models[model][2])
    PedSetTypeToTypeAttitude(f,13,attitude)
    SetFactionRespect(f,attitude*25)
  end
  if models[model][2] == 0 or models[model][2] == 7 or models[model][2] == 8 then
    maxTrouble = 0
  end
  if PedIsFemale(gPlayer) then
    style = math.random(26,28)
  end
  while true do
    -- Load animations
    LoadAnimations()
    -- Menu blip
    if AreaGetVisible() == 14 and PedIsInAreaXYZ(gPlayer,-490.6,313.8,31.4,0.7) then
      TextPrintString("Press \b",0,2)
      if IsButtonBeingPressed(9,0) then
        PlayerSetControl(0)
        PlayerSetPosXYZ(-490.6,313.8,31.4)
        PedFaceXYZ(gPlayer,-492.8,311.6,32)
        local options = {
          {"Model",models[PedGetModel(gPlayer)][1],PedGetModel(gPlayer)},
          {"Movement",styles[style][1],style},
          {"Max Trouble",maxTrouble},
          {"Set Respect"}
        }
        local s = 1
        local model = PedGetModel(gPlayer)
        local h,x,y,z = PedGetHeading(gPlayer),PlayerGetPosXYZ()
        local hx,hy,hz = PedGetHeadPos(gPlayer)
        CameraSetXYZ(-492.8,311.6,32.8,hx,hy,hz)
        repeat
          if IsButtonBeingPressed(2,0) then
            s = s - 1
            if s < 1 then s = 4 end
          elseif IsButtonBeingPressed(3,0) then
            s = s + 1
            if s > 4 then s = 1 end
          end
          if s == 2 then
            if IsButtonBeingPressed(0,0) or (IsButtonPressed(12,0) and IsButtonPressed(0,0)) then
              style = style - 1
              if style < 1 then style = table.getn(styles) end
            elseif IsButtonBeingPressed(1,0) or (IsButtonPressed(12,0) and IsButtonPressed(1,0)) then
              style = style + 1
              if style > table.getn(styles) then style = 1 end
            end
            options[2][2] = styles[style][1]
            options[2][3] = style
          elseif s == 1 then
            if IsButtonBeingPressed(0,0) or (IsButtonPressed(12,0) and IsButtonPressed(0,0)) then
              model = model - 1
              if model < 1 then model = table.getn(models) end
            elseif IsButtonBeingPressed(1,0) or (IsButtonPressed(12,0) and IsButtonPressed(1,0)) then
              model = model + 1
              if model > table.getn(models) then model = 1 end
            end
            if IsButtonBeingPressed(0,0) or IsButtonBeingPressed(1,0) or (IsButtonPressed(12,0) and IsButtonPressed(0,0)) or (IsButtonPressed(12,0) and IsButtonPressed(1,0)) then
              PlayerSwapModel(models[model][1])
              PedSetActionTree(gPlayer,"/Global/Player","Act/Player.act")
              PedSetAITree(gPlayer,"/Global/PlayerAI","Act/PlayerAI.act")
            end
            options[1][2] = models[model][1]
            options[1][3] = model
          elseif s == 3 then
            if (IsButtonBeingPressed(0,0) or (IsButtonPressed(12,0) and IsButtonPressed(0,0))) and maxTrouble > 0 then
              maxTrouble = maxTrouble - 10
            elseif (IsButtonBeingPressed(1,0) or (IsButtonPressed(12,0) and IsButtonPressed(1,0))) and maxTrouble < 300 then
              maxTrouble = maxTrouble + 10
            end
            options[3][2] = maxTrouble
          elseif s == 4 then
            if IsButtonBeingPressed(7,0) then
              local s = 1
              local factions = {
                "Prefect","Nerd","Jock","Dropout","Greaser","Prep","Student","Cop","Teacher","Adult","Shop","Bully"}
              repeat
                if IsButtonBeingPressed(2,0) or (IsButtonPressed(12,0) and IsButtonPressed(2,0)) then
                  s = s - 1
                  if s < 1 then s = table.getn(factions) end
                elseif IsButtonBeingPressed(3,0) or (IsButtonPressed(12,0) and IsButtonPressed(3,0)) then
                  s = s + 1
                  if s > table.getn(factions) then s = 1 end
                elseif (IsButtonBeingPressed(0,0) or (IsButtonPressed(12,0) and IsButtonPressed(0,0))) and GetFactionRespect(s-1) > 0 then
                  SetFactionRespect(s-1,GetFactionRespect(s-1)-10)
                  if GetFactionRespect(s-1) < 0 then
                    SetFactionRespect(s-1,0)
                  end
                  PedSetTypeToTypeAttitude(s-1,13,tonumber(string.format("%.0f",GetFactionRespect(s-1)/25)))
                elseif (IsButtonBeingPressed(1,0) or (IsButtonPressed(12,0) and IsButtonPressed(1,0))) and GetFactionRespect(s-1) < 100 then
                  SetFactionRespect(s-1,GetFactionRespect(s-1)+10)
                  if GetFactionRespect(s-1) > 100 then
                    SetFactionRespect(s-1,100)
                  end
                  PedSetTypeToTypeAttitude(s-1,13,tonumber(string.format("%.0f",GetFactionRespect(s-1)/25)))
                elseif IsButtonBeingPressed(9,0) then
                  local model = PedGetModel(gPlayer)
                  if model == 0 then model = 1 end
                  for f = 0,11 do
                    local attitude = PedGetTypeToTypeAttitude(f,models[model][2])
                    PedSetTypeToTypeAttitude(f,13,attitude)
                    SetFactionRespect(f,attitude*25)
                  end
                end
                local text = ""
                for i,v in ipairs(factions) do
                  if i == s then
                    text = text..">"..v..":"..GetFactionRespect(i-1).."\n"
                  else
                    text = text..v..":"..GetFactionRespect(i-1).."\n"
                  end
                end
                TextPrintString(text,0,1)
                TextPrintString("Press \b to sync with model\nPress \t to exit",0,2)
                Wait(0)
              until IsButtonBeingPressed(8,0) or PedIsDead(gPlayer)
            end
          end
          if styles[style][2] ~= "Player" then
            if not PedIsPlaying(gPlayer,"/Global/"..styles[style][2].."/Default_KEY/ExecuteNodes/Free/WalkBasic",true) then
              PedSetActionNode(gPlayer,"/Global/"..styles[style][2].."/Default_KEY/ExecuteNodes/Free/WalkBasic","Act/Anim/"..styles[style][2]..".act")
            end
          else
            PlayerSetActionNode(gPlayer,"/Global/Player","Act/Player.act")
          end
          h = h + GetStickValue(18,0)*0.1
          PlayerFaceHeading(h)
          PlayerSetPosXYZ(x,y,z)
          local text = ""
          for i,v in ipairs(options) do
            if i == s then
              text = text..">"
            end
            if v[2] ~= nil then
              text = text..v[1]..": "..v[2].."\n"
            else
              text = text..v[1].."\n"
            end
          end
          if options[s][3] ~= nil then
            text = text.."("..options[s][3]..")"
          end
          TextPrintString(text,0,1)
          TextPrintString("Press \t to exit",0,2)
          Wait(0)
        until IsButtonBeingPressed(8,0) or PedIsDead(gPlayer)
        CameraReturnToPlayer()
        if styles[style][2] ~= "Player" then
          PedSetActionNode(gPlayer,"/Global/"..styles[style][2].."/Default_KEY","Act/Anim/"..styles[style][2]..".act")
        else
          PedSetActionNode(gPlayer,"/Global/Player","Act/Player.act")
        end
        PedFaceXYZ(gPlayer,-492.8,311.6,32)
        PlayerSetControl(1)
        -- Set stats type for strafe
        local health = PlayerGetHealth()
        local weapon = PedGetWeapon(gPlayer)
        PedSetStatsType(gPlayer,styles[style][3])
        if styles[style][3] ~= nil and styles[style][3] ~= "STAT_PLAYER" then
          for i,v in ipairs(playerStats) do
            GameSetPedStat(gPlayer,i-1,v)
          end
          PedSetWeapon(gPlayer,weapon)
          PlayerSetHealth(health)
        end
        -- Punishment system
        DisablePunishmentSystem(maxTrouble <= 0)
      end
    end
    -- NPC Movement
    if styles[style][2] ~= "Player" then
      -- Sprint detection
      if IsButtonBeingPressed(7,0) then
        timesSprintPressed = timesSprintPressed + 1
        lastTimeSprintPressed = GetTimer()
      elseif GetTimer() >= lastTimeSprintPressed + 400 then
        timesSprintPressed = 0
      end
      if IsButtonBeingReleased(7,0) then
        lastTimeRunning = GetTimer()
      end
      -- Strafe
      local target = PedGetTargetPed(gPlayer)
      if PedIsValid(target) and (PlayerIsFree() or PlayerIsStrafing()) then
        strafing = true
        if sensitivity <= math.abs(GetStickValue(16,0)) + math.abs(GetStickValue(17,0)) then
          PlayerSetActionNode("/Global/"..styles[style][2].."/Default_KEY/ExecuteNodes/LocomotionOverride/Combat/CombatBasic","Act/Anim/"..styles[style][2]..".act")
        else
          PlayerSetActionNode("/Global/"..styles[style][2].."/Default_KEY/ExecuteNodes/LocomotionOverride/Combat/StrafeIdle","Act/Anim/"..styles[style][2]..".act")
        end
        local x,y,z = PedGetPosXYZ(target)
        PedFaceXYZ(gPlayer,x,y,z)
      elseif strafing and PlayerIsStrafing() then
        strafing = false
        PedSetActionNode(gPlayer,"/Global/Player","Act/Player.act")
      end
      -- Set action node
      if PlayerIsFree() then
        if sensitivity <= math.abs(GetStickValue(16,0)) + math.abs(GetStickValue(17,0)) then
          moving = true
          if timesSprintPressed > 1 then
            PlayerSetActionNode("/Global/"..styles[style][2].."/Default_KEY/ExecuteNodes/Free/SprintBasic","Act/Anim/"..styles[style][2]..".act")
          elseif IsButtonPressed(7,0) or GetTimer() < lastTimeRunning + 200 then
            PlayerSetActionNode("/Global/"..styles[style][2].."/Default_KEY/ExecuteNodes/Free/RunBasic","Act/Anim/"..styles[style][2]..".act")
          else
            PlayerSetActionNode("/Global/"..styles[style][2].."/Default_KEY/ExecuteNodes/Free/WalkBasic","Act/Anim/"..styles[style][2]..".act")
          end
        elseif moving then
          moving = false
          PedSetActionNode(gPlayer,"/Global/Player","Act/Player.act")
        end
      end
      -- Do player stuff
      if (IsButtonBeingPressed(6,0) or IsButtonBeingPressed(8,0) or IsButtonBeingPressed(9,0) or (IsButtonBeingPressed(7,0) and PedIsValid(PedGetTargetPed(gPlayer)))) and (PlayerIsFreeStyle() or PlayerIsStrafing()) and not PedIsValid(PedGetGrappleTargetPed(gPlayer)) then
        if IsButtonBeingPressed(6,0) and (IsButtonPressed(7,0) or timesSprintPressed > 1) then
          PedSetActionNode(gPlayer,"/Global/Player/Attacks/Strikes/RunningAttacks/HeavyAttacks/RunShoulder","Act/Player.act")
        else
          PedSetActionNode(gPlayer,"/Global/Player","Act/Player.act")
        end
      end
    end
    -- Max trouble
    if PlayerGetPunishmentPoints() > maxTrouble then
      PlayerSetPunishmentPoints(maxTrouble)
    end
    if maxTrouble <= 0 then
      DisablePunishmentSystem(true)
    end
    -- Switch to Jimmy for cutscenes
    if not PedIsModel(gPlayer,0) and GetCutsceneRunning() ~= 0 then
      local model = PedGetModel(gPlayer)
      PlayerSwapModel("player")
      repeat
        Wait(0)
      until GetCutsceneRunning() == 0
      repeat
        while SoundSpeechPlaying(gPlayer,"NARRATION") do
          Wait(0)
        end
        TextPrintString("Press \14 to restore model\nPress \15 to remain player",0,2)
        Wait(0)
      until IsButtonBeingPressed(3,0) or IsButtonBeingPressed(2,0)
      if IsButtonBeingPressed(2,0) then
        PlayerSwapModel(models[model][1])
        PedSetActionTree(gPlayer,"/Global/Player","Act/Player.act")
        PedSetAITree(gPlayer,"/Global/PlayerAI","Act/PlayerAI.act")
      end
    end
    -- Clothing manager
    if not PedIsModel(gPlayer,0) and shared.PlayerInClothingManager then
      PlayerSwapModel("player")
    end
    Wait(0)
  end
end

function PedGetModel(ped)
  if PedIsValid(ped) then
    for i = 0,258 do
      if PedIsModel(ped,i) then
        if i ~= 0 then
          return i
        else
          return 1
        end
      end
    end
  end
  return -1
end

function PlayerSetActionNode(node,file)
  if PedIsPlaying(gPlayer,node,true) then
    return false
  else
    PedSetActionNode(gPlayer,node,file)
    return true
  end
end

function PlayerIsFree()
  return PedIsPlaying(gPlayer,"/Global/Player/Default_KEY",true) or PlayerIsFreeStyle()
end

function PlayerIsFreeStyle()
  return PedIsPlaying(gPlayer,"/Global/"..styles[style][2].."/Default_KEY",true) or
    PedIsPlaying(gPlayer,"/Global/"..styles[style][2].."/Default_KEY/ExecuteNodes/Free/WalkBasic",true) or
    PedIsPlaying(gPlayer,"/Global/"..styles[style][2].."/Default_KEY/ExecuteNodes/Free/RunBasic",true) or
    PedIsPlaying(gPlayer,"/Global/"..styles[style][2].."/Default_KEY/ExecuteNodes/Free/SprintBasic",true)
end

function PlayerIsStrafing()
  return PedIsPlaying(gPlayer,"/Global/"..styles[style][2].."/Default_KEY/ExecuteNodes/LocomotionOverride/Combat/StrafeIdle",true) or
    PedIsPlaying(gPlayer,"/Global/"..styles[style][2].."/Default_KEY/ExecuteNodes/LocomotionOverride/Combat/CombatBasic",true)
end

function IsAnyButtonPressed(c)
  for b = 0,15 do
    if IsButtonPressed(b,0) then
      return true
    end
  end
  return false
end

function SetupModelsTable()
  models = {
    {"player",13},
    {"DOgirl_Zoe_EG",6},
    {"NDGirl_Beatrice",1},
    {"NDH1a_Algernon",1},
    {"NDH1_Fatty",1},
    {"ND2nd_Melvin",1},
    {"NDH2_Thad",1},
    {"NDH3_Bucky",1},
    {"NDH2a_Cornelius",1},
    {"NDLead_Earnest",1},
    {"NDH3a_Donald",1},
    {"JKH1_Damon",2},
    {"JKH1a_Kirby",2},
    {"JKGirl_Mandy",2},
    {"JKH2_Dan",2},
    {"JKH2a_Luis",2},
    {"JKH3_Casey",2},
    {"JKH3a_Bo",2},
    {"JKlead_Ted",2},
    {"JK2nd_Juri",2},
    {"GR2nd_Peanut",4},
    {"GRH2A_Hal",4},
    {"GRlead_Johnny",4},
    {"GRH1_Lefty",4},
    {"GRGirl_Lola",4},
    {"GRH3_Lucky",4},
    {"GRH1a_Vance",4},
    {"GRH3a_Ricky",4},
    {"GRH2_Norton",4},
    {"PRH1_Gord",5},
    {"PRH1a_Tad",5},
    {"PRH2a_Chad",5},
    {"PR2nd_Bif",5},
    {"PRH3_Justin",5},
    {"PRH2_Bryce",5},
    {"PRH2_Bryce_OBOX",5},
    {"PRlead_Darby",5},
    {"PRGirl_Pinky",5},
    {"GN_Asiangirl",6},
    {"PRH3a_Parker",5},
    {"DOH2_Jerry",3},
    {"DOH1a_Otto",3},
    {"DOH2a_Leon",3},
    {"DOH1_Duncan",3},
    {"DOH3_Henry",3},
    {"DOH3a_Gurney",3},
    {"DO2nd_Omar",3},
    {"DOGirl_Zoe",3},
    {"PF2nd_Max",0},
    {"PFH1_Seth",0},
    {"PFH2_Edward",0},
    {"PFlead_Karl",0},
    {"TO_Orderly",0},
    {"TE_HallMonitor",8},
    {"TE_GymTeacher",8},
    {"TE_Janitor",9},
    {"TE_English",8},
    {"TE_Cafeteria",8},
    {"TE_Secretary",8},
    {"TE_Nurse",8},
    {"TE_MathTeacher",8},
    {"TE_Librarian",8},
    {"TE_Art",8},
    {"TE_Biology",8},
    {"TE_Principal",8},
    {"GN_Littleblkboy",6},
    {"GN_SexyGirl",6},
    {"GN_Littleblkgirl",6},
    {"GN_Hispanicboy",6},
    {"GN_Greekboy",6},
    {"GN_Fatboy",6},
    {"GN_Boy01",6},
    {"GN_Boy02",6},
    {"GN_Fatgirl",6},
    {"DOlead_Russell",11},
    {"TO_Business1",9},
    {"TO_Business2",9},
    {"TO_BusinessW1",9},
    {"TO_BusinessW2",9},
    {"TO_RichW1",9},
    {"TO_RichW2",9},
    {"TO_Fireman",9},
    {"TO_Cop",7},
    {"TO_Comic",9},
    {"GN_Bully03",11},
    {"TO_Bikeowner",9},
    {"TO_Hobo",10},
    {"Player_Mascot",2},
    {"TO_GroceryOwner",9},
    {"GN_Sexygirl_UW",6},
    {"DOLead_Edgar",3},
    {"JK_LuisWrestle",2},
    {"JKGirl_MandyUW",2},
    {"PRGirl_PinkyUW",5},
    {"NDGirl_BeatriceUW",1},
    {"GRGirl_LolaUW",4},
    {"TO_Cop2",7},
    {"Player_OWres",6},
    {"GN_Bully02",11},
    {"TO_RichM1",9},
    {"TO_RichM2",9},
    {"GN_Bully01",11},
    {"TO_FireOwner",9},
    {"TO_CSOwner_2",9},
    {"TO_CSOwner_3",9},
    {"TE_Chemistry",8},
    {"TO_Poorwoman",10},
    {"TO_MotelOwner",10},
    {"JKKirby_FB",2},
    {"JKTed_FB",2},
    {"JKDan_FB",2},
    {"JKDamon_FB",2},
    {"TO_Carny02",9},
    {"TO_Carny01",9},
    {"TO_CarnyMidget",9},
    {"TO_Poorman2",10},
    {"PRH2A_Chad_OBOX",5},
    {"PRH3_Justin_OBOX",5},
    {"PRH3a_Parker_OBOX",5},
    {"TO_BarberRich",9},
    {"GenericWrestler",11},
    {"ND_FattyWrestle",1},
    {"TO_Industrial",10},
    {"TO_Associate",10},
    {"TO_Asylumpatient",9},
    {"TE_Autoshop",8},
    {"TO_Mailman",9},
    {"TO_Tattooist",10},
    {"TE_Assylum",8},
    {"Nemesis_Gary",6},
    {"TO_Oldman2",10},
    {"TO_BarberPoor",10},
    {"PR2nd_Bif_OBOX",5},
    {"Peter",6},
    {"TO_RichM3",9},
    {"Rat_Ped",6},
    {"GN_LittleGirl_2",6},
    {"GN_LittleGirl_3",6},
    {"GN_WhiteBoy",6},
    {"TO_FMidget",9},
    {"Dog_Pitbull",9},
    {"GN_SkinnyBboy",6},
    {"TO_Carnie_female",9},
    {"TO_Business3",9},
    {"GN_Bully04",11},
    {"GN_Bully05",11},
    {"GN_Bully06",11},
    {"TO_Business4",9},
    {"TO_Business5",9},
    {"DO_Otto_asylum",3},
    {"TE_History",8},
    {"TO_Record",9},
    {"DO_Leon_Assylum",3},
    {"DO_Henry_Assylum",3},
    {"NDH1_FattyChocolate",1},
    {"TO_GroceryClerk",9},
    {"TO_Handy",10},
    {"TO_Orderly2",0},
    {"GN_Hboy_Ween",6},
    {"Nemesis_Ween",6},
    {"GRH3_Lucky_Ween",4},
    {"NDH3a_Donald_ween",1},
    {"PRH3a_Parker_Ween",5},
    {"JKH3_Casey_Ween",2},
    {"Peter_Ween",6},
    {"GN_AsianGirl_Ween",6},
    {"PRGirl_Pinky_Ween",5},
    {"JKH1_Damon_ween",2},
    {"GN_WhiteBoy_Ween",6},
    {"GN_Bully01_Ween",11},
    {"GN_Boy02_Ween",6},
    {"PR2nd_Bif_OBOX_D1",5},
    {"GRH1a_Vance_Ween",6},
    {"NDH2_Thad_Ween",1},
    {"PRGirl_Pinky_BW",5},
    {"DOlead_Russell_BU",11},
    {"PRH1a_Tad_BW",5},
    {"PRH2_Bryce_BW",5},
    {"PRH3_Justin_BW",5},
    {"GN_Asiangirl_CH",6},
    {"GN_Sexygirl_CH",6},
    {"PRGirl_Pinky_CH",5},
    {"TO_NH_Res_01",9},
    {"TO_NH_Res_02",9},
    {"TO_NH_Res_03",9},
    {"NDH1_Fatty_DM",1},
    {"TO_PunkBarber",10},
    {"FightingMidget_01",6},
    {"FightingMidget_02",6},
    {"TO_Skeletonman",9},
    {"TO_Beardedwoman",9},
    {"TO_CarnieMermaid",9},
    {"TO_Siamesetwin2",9},
    {"TO_Paintedman",9},
    {"TO_GN_Workman",9},
    {"DOLead_Edgar_GS",3},
    {"DOH3a_Gurney_GS",3},
    {"DOH2_Jerry_GS",3},
    {"DOH2a_Leon_GS",3},
    {"GRH2a_Hal_GS",4},
    {"GRH2_Norton_GS",4},
    {"GR2nd_Peanut_GS",4},
    {"GRH1a_Vance_GS",4},
    {"JKH3a_Bo_GS",2},
    {"JKH1_Damon_GS",2},
    {"JK2nd_Juri_GS",2},
    {"JKH1a_Kirby_GS",2},
    {"NDH1a_Algernon_GS",1},
    {"NDH3_Bucky_GS",1},
    {"NDH2_Thad_GS",1},
    {"PRH3a_Parker_GS",5},
    {"PRH3_Justin_GS",5},
    {"PRH1a_Tad_GS",5},
    {"PRH1_Gord_GS",5},
    {"NDLead_Earnest_EG",1},
    {"JKlead_Ted_EG",2},
    {"GRlead_Johnny_EG",4},
    {"PRlead_Darby_EG",5},
    {"Dog_Pitbull2",9},
    {"Dog_Pitbull3",9},
    {"TE_CafeMU_W",8},
    {"TO_Millworker",9},
    {"TO_Dockworker",9},
    {"NDH2_Thad_PJ",1},
    {"GN_Lblkboy_PJ",6},
    {"GN_Hboy_PJ",6},
    {"GN_Boy01_PJ",6},
    {"GN_Boy02_PJ",6},
    {"TE_Gym_Incog",8},
    {"JK_Mandy_Towel",2},
    {"JK_Bo_FB",2},
    {"JK_Casey_FB",2},
    {"PunchBag",11},
    {"TO_Cop3",7},
    {"GN_GreekboyUW",6},
    {"TO_Construct01",9},
    {"TO_Construct02",9},
    {"TO_Cop4",7},
    {"PRH2_Bryce_OBOX_D1",5},
    {"PRH2_Bryce_OBOX_D2",5},
    {"PRH2A_Chad_OBOX_D1",5},
    {"PRH2A_Chad_OBOX_D2",5},
    {"PR2nd_Bif_OBOX_D2",5},
    {"PRH3_Justin_OBOX_D1",5},
    {"PRH3_Justin_OBOX_D2",5},
    {"PRH3a_Prkr_OBOX_D1",5},
    {"PRH3a_Prkr_OBOX_D2",5},
    {"TE_Geography",8},
    {"TE_Music",8},
    {"TO_ElfF",6},
    {"TO_ElfM",6},
    {"TO_HoboSanta",9},
    {"TO_Santa",9},
    {"TO_Santa_NB",9},
    {"Peter_Nutcrack",6},
    {"GN_Fatgirl_Fairy",6},
    {"GN_Lgirl_2_Flower",6},
    {"GN_Hboy_Flower",6}
  }
end

function LoadAnimations()
  if groups == nil then
    groups = {
      "Authority",
      "Boxing",
      "B_Striker",
      "CV_Female",
      "CV_Male",
      "DO_Edgar",
      "DO_Grap",
      "DO_StrikeCombo",
      "DO_Striker",
      "F_Adult",
      "F_BULLY",
      "F_Crazy",
      "F_Douts",
      "F_Girls",
      "F_Greas",
      "F_Jocks",
      "F_Nerds",
      "F_OldPeds",
      "F_Pref",
      "F_Preps",
      "G_Grappler",
      "G_Johnny",
      "G_Striker",
      "Grap",
      "J_Damon",
      "J_Grappler",
      "J_Melee",
      "J_Ranged",
      "J_Striker",
      "LE_Orderly",
      "Nemesis",
      "N_Ranged",
      "N_Striker",
      "N_Striker_A",
      "N_Striker_B",
      "P_Grappler",
      "P_Striker",
      "PunchBag",
      "Qped",
      "Rat_Ped",
      "Russell",
      "Russell_Pbomb",
      "Straf_Dout",
      "Straf_Fat",
      "Straf_Female",
      "Straf_Male",
      "Straf_Nerd",
      "Straf_Prep",
      "Straf_Savage",
      "Straf_Wrest",
      "TE_Female"
    }
  end
  for key,group in ipairs(groups) do
    if not HasAnimGroupLoaded(group) then
      LoadAnimationGroup(group)
    end
  end
end

F_AttendedClass = function()
  if IsMissionCompleated("3_08") and not IsMissionCompleated("3_08_PostDummy") then
    return
  end
  SetSkippedClass(false)
  PlayerSetPunishmentPoints(0)
end
 
F_MissedClass = function()
  if IsMissionCompleated("3_08") and not IsMissionCompleated("3_08_PostDummy") then
    return
  end
  SetSkippedClass(true)
  StatAddToInt(166)
end
 
F_AttendedCurfew = function()
  if not PedInConversation(gPlayer) and not MissionActive() then
    --TextPrintString("You got home in time for curfew",4)
  end
end
 
F_MissedCurfew = function()
  if not PedInConversation(gPlayer) and not MissionActive() then
    TextPrint("TM_TIRED5",4,2)
  end
end
 
F_StartClass = function()
  if IsMissionCompleated("3_08") and not IsMissionCompleated("3_08_PostDummy") then
    return
  end
  F_RingSchoolBell()
  local l_6_0 = PlayerGetPunishmentPoints() + GetSkippingPunishment()
end
 
F_EndClass = function()
  if IsMissionCompleated("3_08") and not IsMissionCompleated("3_08_PostDummy") then
    return
  end
  F_RingSchoolBell()
end
 
F_StartMorning = function()
  F_UpdateTimeCycle()
end
 
F_EndMorning = function()
  F_UpdateTimeCycle()
end
 
F_StartLunch = function()
  if IsMissionCompleated("3_08") and not IsMissionCompleated("3_08_PostDummy") then
    F_UpdateTimeCycle()
    return
  end
  F_UpdateTimeCycle()
end
 
F_EndLunch = function()
  F_UpdateTimeCycle()
end
 
F_StartAfternoon = function()
  F_UpdateTimeCycle()
end
 
F_EndAfternoon = function()
  F_UpdateTimeCycle()
end
 
F_StartEvening = function()
  F_UpdateTimeCycle()
end
 
F_EndEvening = function()
  F_UpdateTimeCycle()
end
 
F_StartCurfew_SlightlyTired = function()
  F_UpdateTimeCycle()
end
 
F_StartCurfew_Tired = function()
  F_UpdateTimeCycle()
end
 
F_StartCurfew_MoreTired = function()
  F_UpdateTimeCycle()
end
 
F_StartCurfew_TooTired = function()
  F_UpdateTimeCycle()
end
 
F_EndCurfew_TooTired = function()
  F_UpdateTimeCycle()
end
 
F_EndTired = function()
  F_UpdateTimeCycle()
end
 
F_Nothing = function()
end
 
F_ClassWarning = function()
  if IsMissionCompleated("3_08") and not IsMissionCompleated("3_08_PostDummy") then
    return
  end
  local l_23_0 = math.random(1,2)
end
 
F_UpdateTimeCycle = function()
  if not IsMissionCompleated("1_B") then
    local l_24_0 = GetCurrentDay(false)
    if l_24_0 < 0 or l_24_0 > 2 then
      SetCurrentDay(0)
    end
  end
  F_UpdateCurfew()
end

F_UpdateCurfew = function()
  local l_25_0 = shared.gCurfewRules
  if not l_25_0 then
    l_25_0 = F_CurfewDefaultRules
  end
  l_25_0()
end
 
F_CurfewDefaultRules = function()
  local l_26_0 = ClockGet()
  if l_26_0 >= 23 or l_26_0 < 7 then
    shared.gCurfew = true
  else
    shared.gCurfew = false
  end
end



Why is it 0.1?
Because the mod probably has room for improvement... however it is pretty stable and playable, and I haven't released anything in a while, so here ya go!

Can I add stuff to the mod?
Sure, it's open-source and I give anyone who wants to full permission to use the code how they want.

Offline Shrimp

  • Sr. Member
  • ***
  • Posts: 514
  • Gender: Male
  • your official b-b's chav. wag wan.
    • View Profile
Re: NPC MOD 0.1!!!
« Reply #1 on: September 23, 2015, 09:14:29 PM »
isnt this pretty much the same npc selector? only the faction respect and thats it?

Offline DaBOSS54320

  • Hero Member
  • ****
  • Posts: 3,398
  • Gender: Female
    • View Profile
Re: NPC MOD 0.1!!!
« Reply #2 on: September 23, 2015, 09:38:25 PM »
It has different walking styles but still keeps the player's fighting style.

Offline Unknownsoldier

  • Hero Member
  • ****
  • Posts: 2,773
    • View Profile
Re: NPC MOD 0.1!!!
« Reply #3 on: September 23, 2015, 10:10:14 PM »
no.

Offline Mick3Mouse

  • Obam3mouse
  • Bullworth Junkie
  • ****
  • Posts: 4,343
  • Gender: Male
  • Major Mick3Mouse Algie Hunter
    • View Profile
    • My youtube
Re: NPC MOD 0.1!!!
« Reply #4 on: September 24, 2015, 06:30:42 AM »
this mod sucks, lol rekt.

( ͡° ͜ʖ ͡°)

Offline Allucination

  • Jr. Member
  • **
  • Posts: 5
    • View Profile
Re: NPC MOD 0.1!!!
« Reply #5 on: September 24, 2015, 08:49:27 AM »

Offline Unknownsoldier

  • Hero Member
  • ****
  • Posts: 2,773
    • View Profile
Re: NPC MOD 0.1!!!
« Reply #6 on: September 24, 2015, 04:34:45 PM »
who the fuck are u

Offline Dictatorce

  • Jr. Member
  • **
  • Posts: 3
    • View Profile
Re: NPC MOD 0.1!!!
« Reply #7 on: October 07, 2015, 07:15:27 AM »
I don't see a selection menu, it just loads up a random character

Offline DaBOSS54320

  • Hero Member
  • ****
  • Posts: 3,398
  • Gender: Female
    • View Profile
Re: NPC MOD 0.1!!!
« Reply #8 on: October 07, 2015, 08:57:00 AM »
Go to the blip added to the boy's dorm, there you can switch your character/movement style/etc

Offline Mick3Mouse

  • Obam3mouse
  • Bullworth Junkie
  • ****
  • Posts: 4,343
  • Gender: Male
  • Major Mick3Mouse Algie Hunter
    • View Profile
    • My youtube
Re: NPC MOD 0.1!!!
« Reply #9 on: October 07, 2015, 12:04:31 PM »
daboss stole my codes lol,  he is leech lol. reproted

Offline Shrimp

  • Sr. Member
  • ***
  • Posts: 514
  • Gender: Male
  • your official b-b's chav. wag wan.
    • View Profile
Re: NPC MOD 0.1!!!
« Reply #10 on: October 07, 2015, 12:58:03 PM »
daboss stole my codes lol,  he is leech lol. reproted

deported**

Offline Mick3Mouse

  • Obam3mouse
  • Bullworth Junkie
  • ****
  • Posts: 4,343
  • Gender: Male
  • Major Mick3Mouse Algie Hunter
    • View Profile
    • My youtube
Re: NPC MOD 0.1!!!
« Reply #11 on: October 07, 2015, 01:58:24 PM »
to africa

Offline Dictatorce

  • Jr. Member
  • **
  • Posts: 3
    • View Profile
Re: NPC MOD 0.1!!!
« Reply #12 on: October 09, 2015, 02:55:28 AM »
how do you modify the faction respect?

Offline DaBOSS54320

  • Hero Member
  • ****
  • Posts: 3,398
  • Gender: Female
    • View Profile
Re: NPC MOD 0.1!!!
« Reply #13 on: October 09, 2015, 01:31:25 PM »
Go to the blip in the boy's dorm and there will be a prompt to press a button, press it to access the menu, then use what's probably binded to the arrow keys or d-pad to navigate the menu. There is an option on there to set respect for each faction manually, or you can press a button on there to make it sync with the faction of your current model.