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


Author Topic: Shopkeepers dont kick you out  (Read 7828 times)

0 Members and 1 Guest are viewing this topic.

Offline Prosecute

  • Full Member
  • ***
  • Posts: 244
  • Gender: Male
    • View Profile
    • NewDayStudios
Re: Shopkeepers dont kick you out
« Reply #15 on: March 14, 2012, 01:47:51 PM »
Excellent work their mad, man i can't wait untill both of the v2's are done!, I'm really looking forward to them

Offline Kainsmoney

  • Jr. Member
  • **
  • Posts: 4
    • View Profile
    • Kainsmoney
Re: Shopkeepers dont kick you out
« Reply #16 on: January 16, 2014, 01:25:48 AM »
Bump, could anyone please do this mod?

Offline c00ld0c26

  • The D0c
  • Can't Get Enough
  • *****
  • Posts: 5,137
  • Gender: Male
  • Just a dood doing dood things.
    • View Profile
    • My channel.
Re: Shopkeepers dont kick you out
« Reply #17 on: January 16, 2014, 06:30:29 AM »
I have the script, even tho Im 100% sure its not fully fixed so I wonder if it'll compile after I edit it.

Offline Kainsmoney

  • Jr. Member
  • **
  • Posts: 4
    • View Profile
    • Kainsmoney
Re: Shopkeepers dont kick you out
« Reply #18 on: January 16, 2014, 11:41:31 AM »
Cool, just doing a little edit for disable punishment from false to true will do the trick, i guess, give it a try and let us know if it did compile and work :)

Offline c00ld0c26

  • The D0c
  • Can't Get Enough
  • *****
  • Posts: 5,137
  • Gender: Male
  • Just a dood doing dood things.
    • View Profile
    • My channel.
Re: Shopkeepers dont kick you out
« Reply #19 on: January 16, 2014, 11:59:14 AM »
The script is too damaged, I know it wont work even without trying.
Here are all the errors in the script (which only Mad knows how to fix as those errors can be fixed if u know how to read assembly and have the assembly source of the script).
Here are the errors as it didn't get all the local's right :

-- Confused at declaration of local variable. (Assignments::declareLocals)
-- Confused about usage of registers for local variables. (Assignments::releaseLocals)
-- Overwrote pending register. (Assignments::assign)
-- Overwrote pending register. (Assignments::assign)
   -- Overwrote pending register. (Assignments::assign)
   -- Overwrote pending register. (Assignments::assign)
   -- Overwrote pending register. (Assignments::assign)
   -- Overwrote pending register. (Assignments::assign)
-- Overwrote pending register. (Assignments::assign)
-- Overwrote pending register. (Assignments::assign)
   -- Overwrote pending register. (Assignments::assign)
   -- Overwrote pending register. (Assignments::assign)
   -- Overwrote pending register. (Assignments::assign)
   -- Overwrote pending register. (Assignments::assign)
   -- Overwrote pending register. (Assignments::assign)
   -- Overwrote pending register. (Assignments::assign)
   -- Overwrote pending register. (Assignments::assign)
   -- Overwrote pending register. (Assignments::assign)
   -- Overwrote pending register. (Assignments::assign)
   -- Overwrote pending register. (Assignments::assign)
   -- Overwrote pending register. (Assignments::assign)
     -- Overwrote pending register. (Assignments::assign)
     -- Overwrote pending register. (Assignments::assign)
     -- Overwrote pending register. (Assignments::assign)
     -- Overwrote pending register. (Assignments::assign)
     -- Overwrote pending register. (Assignments::assign)
     -- Overwrote pending register. (Assignments::assign)
   -- Overwrote pending register. (Assignments::assign)
-- Attempted to generate an assignment, but got confused about usage of registers. (Assignments::flushPending)
-- Overwrote pending register. (Assignments::assign)

I took all the errors from all parts of the script.
It wont work sorry, unless mad is back this wont go anywhere.

Offline Kainsmoney

  • Jr. Member
  • **
  • Posts: 4
    • View Profile
    • Kainsmoney
Re: Shopkeepers dont kick you out
« Reply #20 on: January 16, 2014, 12:01:05 PM »
Thanks, someday will happen :)

Offline GaryHarrington

  • A Guy Who Likes Open World and FPS Games
  • Sr. Member
  • ***
  • Posts: 515
  • Gender: Male
  • Just Love Bully and GTA ...Nothing Interested
    • View Profile
Re: Shopkeepers dont kick you out
« Reply #21 on: January 18, 2014, 06:40:49 PM »
Bullying doesn't make jimmy kicked out..Zack just laughed

Can peds getting kicked out too?

Offline Phap

  • Full Member
  • ***
  • Posts: 216
  • Gender: Male
    • View Profile
Re: Shopkeepers dont kick you out
« Reply #22 on: January 18, 2014, 07:56:48 PM »
Can someone make a mod where shopkeepers ignore you if you hit someone in the shop? I start fights in the Comic store but i cant join or I get kicked out
DisablePunishmentSystem(true)

Offline MadmaN

  • Bully-Board Admin Team
  • Newbie
  • *
  • Posts: 0
  • Gender: Male
  • Biblio-Techa Mods (retired)
    • View Profile
Re: Shopkeepers dont kick you out
« Reply #23 on: January 18, 2014, 10:36:36 PM »
You will still get kicked out even with the punishments disabled.

Getting kicked out deals with a specific section of code located in the sstores.lua script which as c00ld0c said above...is too damaged to even be used and I never got the chance to finish rewriting this script before things went bad for me.

there IS a chance though that you could override this with a mod by including the section of code that induces being kicked out if you attack or insult anyone inside a shop but I can't guarantee this will work as expected.

I know I am retired but I will post the relevant code here so you all can experiment with it.

Here is the code:

Code: [Select]
F_Aggression = function(l_9_0)
  if not shared.g3_R09_N and not gPlayerBrokeStuff and (PAnimNumDestroyed(gAreaTrigger) > 0 or PedHasAggressed(gPlayer)) then
    PlayerSetControl(0)
    shared.playerAggressedInStore = true
    AreaCancelStoredTransition()
    SoundStopCurrentSpeechEvent(l_9_0)
    PedIgnoreStimuli(l_9_0, true)
    PedFaceObject(l_9_0, gPlayer, 3, 1)
    CameraSetWidescreen(true)
    Wait(500)
    SoundSetAudioFocusCamera()
    F_PedSetCameraOffsetXYZ(l_9_0, 0.076659999787807, 2.1552770137787, 1.798231959343, 0.028457999229431, 1.1699600219727, 1.6412600278854)
    CameraAllowChange(false)
    PedSetActionNode(l_9_0, "/Global/Welcome/ShakeFist", "Act/Conv/Store.act")
    F_PlaySpeechAndWait(l_9_0, "STORE_VIOLENCE_RESPONSE", 0, "supersize")
    CameraFade(500, 0)
    Wait(500)
    CameraAllowChange(true)
    SoundSetAudioFocusPlayer()
    CameraReturnToPlayer()
    CameraReset()
    CameraSetWidescreen(false)
    LaunchScript("AreaScripts/StoreTransition.lua")
    Wait(100)
    gPlayerBrokeStuff = true
    PedClearHasAggressed(gPlayer)
  end
end


Code: [Select]
PedClearHasAggressed(gPlayer) resets the agression/thrown out of the store code

While I know I said I refuse to release a damaged lua script I will however release the SStores.lua script so people can mess with this and maybe even finish rewriting it.

This is the only damaged lua script I WILL release to teh public or allow to be released. The rest of them are in the hands of my modding team and it will stay that way since releasing the rest as they are will cause too many problems for the community as it is. The community just is not ready to tackle something this complicated yet.

-
Code: [Select]
- File name: SStores.lur

ImportScript("Library/LibClothing.lua")
rich_firework = nil
DT_general = nil
DT_bike = nil
DT_comics = nil
local l_0_0 = false
local l_0_1, l_0_2, l_0_3, l_0_4, l_0_5, l_0_6 = nil, nil, nil, nil, nil, nil
local l_0_7 = false
local l_0_8 = nil
local l_0_9 = true
local l_0_10 = false
local l_0_11, l_0_12, l_0_13, l_0_14, l_0_15 = nil, nil, nil, nil, nil
local l_0_16 = false
local l_0_17, l_0_18, l_0_19 = nil, nil, nil
local l_0_20 = false
 
main = function()
  if shared.playerAggressedInStore then
    shared.playerAggressedInStore = nil
  end
  AreaDisableCameraControlForTransition(true)
  F_RequestWeapons()
  DATLoad("Store.DAT", 0)
  flagState = PedGetFlag(gPlayer, 108)
  PedSetFlag(gPlayer, 108, true)
  local l_1_0 = AreaTransitionDestination()
  if l_1_0 == 50 then
    DATLoad("SP_Souvenir.DAT", 0)
    DATLoad("CarnStore.DAT", 0)
  elseif l_1_0 == 30 then
    DATLoad("SaveLocs.dat", 0)
    DATLoad("SP_Comic_Shop_Rich.dat", 0)
    if IsMissionCompleated("3_R09_N") then
      if IsMissionCompleated("3_B") then
        DATLoad("BDorm_Spud.DAT", 0)
      end
      if IsMissionCompleated("3_R09_N") then
        DATLoad("BDorm_RLauncher.DAT", 0)
      end
      if IsMissionCompleated("2_03") then
        DATLoad("BDorm_Eggs.DAT", 0)
      end
      l_0_16 = true
    else
      l_0_16 = false
      AreaSetNodesSwitchedOffInTrigger(TRIGGER._COMICPOPTRIG, true)
      POISetDisablePedProduction(POI._CNERD1, true)
      POISetDisablePedProduction(POI._CNERD2, true)
      POISetDisablePedProduction(POI._CNERD3, true)
    end
  end
  l_0_15 =
  l_0_14 =
  l_0_13 =
  l_0_12 =
  l_0_11 = AreaGetPlayerPositionBeforeStore()
  F_PreStoreSetup(l_1_0)
  F_PreDATInit()
  DATInit()
  local l_1_1 = AreaGetVisible()
  if l_1_1 == 30 and IsMissionCompleated("3_R09_N") then
    PAnimOpenDoor(TRIGGER._FMDOORN01)
    PAnimOpenDoor(TRIGGER._FMDOORN)
    PAnimOpenDoor(TRIGGER._ICOMSHP_BASEMENT)
    PAnimDoorStayOpen(TRIGGER._FMDOORN01)
    PAnimDoorStayOpen(TRIGGER._FMDOORN)
    PAnimDoorStayOpen(TRIGGER._ICOMSHP_BASEMENT)
    AreaSetNodesSwitchedOffInTrigger(TRIGGER._COMICPOPTRIG, false)
  end
  if l_1_1 == 50 then
    ShopStart(1)
  else
    ShopStart()
  end
  if MissionActiveSpecific("2_07") and l_1_1 == 29 and shared.gCutsceneRunning then
  else
    AreaDisableCameraControlForTransition(false)
    CameraFade(500, 1)
    Wait(501)
  end
  local l_1_2 = false
  local l_1_3, l_1_4, l_1_5 = GetPointList(l_0_1)
  l_0_5 = ShopGetClerkID()
  Wait(500)
  shared.vendettaClerk = l_0_5
  PedLockTarget(l_0_5, gPlayer)
  CreateThread("T_StopSpineTracking")
  PedMakeTargetable(l_0_5, false)
  ConversationMovePeds(false)
  if l_1_1 == 50 then
    SoundPlayScriptedSpeechEvent(l_0_5, "GREET", 0, "jumbo")
  else
    SoundPlayScriptedSpeechEvent(l_0_5, "STORE_WELCOME", 0, "jumbo")
  end
  F_ToggleArcadeScreens()
  local l_1_6 = 0
  local l_1_7 = 0
  local l_1_8 = MissionActiveSpecific("2_G2")
  repeat
    if l_1_8 then
      if l_0_9 then
        if PlayerHasWeapon(363) then
          l_0_9 = false
        end
      elseif not PlayerHasWeapon(363) then
        l_0_9 = true
      end
    end
    if l_0_9 and F_CheckClock() and not PedInConversation(gPlayer) and PlayerIsInAreaXYZ(l_1_3, l_1_4, l_1_5, 0.5, 9) then
      if gWaitAfterQuit then
        MissionTimerPause(false)
        if l_1_1 == 50 then
          if l_1_7 <= ItemGetCurrentNum(495) then
            SoundPlayScriptedSpeechEvent(l_0_5, "BYE", 0, "jumbo")
          else
            SoundPlayScriptedSpeechEvent(l_0_5, "CARNIE_TICKETS_TRADE", 0, "jumbo")
          end
        elseif l_1_6 <= PlayerGetMoney() then
          SoundPlayScriptedSpeechEvent(l_0_5, "STORE_BYE_NOBUY", 0, "jumbo")
        else
          SoundPlayScriptedSpeechEvent(l_0_5, "STORE_BYE_BUY", 0, "jumbo")
        end
        F_MakePlayerSafeForNIS(false, true)
        Wait(500)
        gWaitAfterQuit = false
        if gPlayerBoughtBear then
          PedSetWeapon(gPlayer, 363, 1)
          gPlayerBoughtBear = nil
        end
        if gCreateMoped then
          TutorialShowMessage("TUT_VESPA", 5000)
        end
      end
      if not l_0_10 then
        TextPrint("BUT_STORE", 1, 3)
        if IsButtonBeingPressed(9, 0) then
          F_MakePlayerSafeForNIS(true, true)
          MissionTimerPause(true)
          l_1_6 = PlayerGetMoney()
          shared.playerShopping = true
          PedSetFlag(gPlayer, 2, false)
          l_0_10 = true
          HUDSaveVisibility()
          HUDClearAllElements()
          ToggleHUDComponentLocked(40, true)
          ToggleHUDComponentVisibility(42, true)
          l_1_6 = PlayerGetMoney()
          l_1_7 = ItemGetCurrentNum(495)
          ConversationMovePeds(false)
          PedStartConversation(l_0_4, l_0_3, gPlayer, l_0_5)
          ConversationMovePeds(false)
          TextPrintString("", 1, 2)
        end
      end
    end
    if l_1_1 == 30 then
      if l_0_9 then
        local l_1_9 = IsMissionAvailable("3_R09_N")
        if not l_1_9 then
          l_1_9 = MissionActiveSpecific
          l_1_9 = l_1_9("3_R09_N")
          l_1_9 = -l_1_9
        else
          l_1_9 = false
          l_1_9 = true
        end
        l_0_9 = l_1_9
         -- Confused at declaration of local variable. (Assignments::declareLocals)
      elseif not gSkipAggression and IsButtonPressed(9, 0) and PlayerIsInAreaXYZ(l_0_17, l_0_18, l_0_19, 1, 0) then
        F_MakePlayerSafeForNIS(true)
        gSkipAggression = true
      elseif gSkipAggression then
        if not PlayerIsInAreaXYZ(l_0_17, l_0_18, l_0_19, 1, 0) then
          F_MakePlayerSafeForNIS(false)
        end
        gSkipAggression = false
      end
    end
    if not gSkipAggression then
      F_Aggression(l_0_5)
    end
    if gFinishedShopping then
      PlayerFaceHeadingNow(0)
      CameraReturnToPlayer()
      CameraReset()
      Wait(500)
      AreaTransitionPoint(0, POINTLIST._CARNSTOREEXIT)
      Wait(1000)
      CameraFade(500, 1)
    end
    if (gClothingUnlocked or shared.unlockedClothing) and not shared.lockClothingManager then
      if not cx then
        cz =
        cy =
        cx = GetPointList(POINTLIST._CM_CORONA)
      end
      if not gClothing and F_CheckPedNotInGrapple(gPlayer) and PlayerIsInAreaXYZ(cx, cy, cz, 1, 6) then
        TextPrint("BUT_CLOTH", 1, 3)
        if IsButtonBeingPressed(9, 0) then
          L_ClothingSetup(gClothingHeading, CbFinishClothing)
          gClothing = true
        end
      end
    end
    if l_1_1 == 30 then
      if not gPunishmentOff and (PlayerIsInTrigger(TRIGGER._NERDSMALLROOM) or PlayerIsInTrigger(TRIGGER._NERDMAINROOM) or PlayerIsInTrigger(TRIGGER._NERDCOMPUTERROOM)) then
        DisablePunishmentSystem(true)
        gPunishmentOff = true
      elseif gPunishmentOff and PlayerIsInTrigger(TRIGGER._COMICSHOP) then
        DisablePunishmentSystem(false)
        gPunishmentOff = false
      end
      if l_0_16 == false and IsMissionCompleated("3_R09_N") then
        l_0_16 = true
        AreaSetNodesSwitchedOffInTrigger(TRIGGER._COMICPOPTRIG, false)
        POISetDisablePedProduction(POI._CNERD1, false)
        POISetDisablePedProduction(POI._CNERD2, false)
        POISetDisablePedProduction(POI._CNERD3, false)
        PAnimOpenDoor(TRIGGER._FMDOORN01)
        PAnimOpenDoor(TRIGGER._FMDOORN)
        PAnimOpenDoor(TRIGGER._ICOMSHP_BASEMENT)
        PAnimDoorStayOpen(TRIGGER._FMDOORN01)
        PAnimDoorStayOpen(TRIGGER._FMDOORN)
        PAnimDoorStayOpen(TRIGGER._ICOMSHP_BASEMENT)
      end
    end
    Wait(0)
  until AreaGetVisible() ~= l_1_1 or SystemShouldEndScript()
  DisablePunishmentSystem(false)
  F_MakePlayerSafeForNIS(false, true)
  AreaClearDockers()
  AreaClearSpawners()
  AreaSetPopulationSexGeneration(true, true)
  ShopEnd()
  shared.minigameRunning = nil
  shared.finishedLoadingShop = nil
  shared.unlockedClothing = nil
  PedStop(gPlayer)
  if gPlayerBrokeStuff then
    PlayerSetControl(1)
  end
  PedSetFlag(gPlayer, 108, flagState)
  DATUnload(0)
  collectgarbage()
   -- Confused about usage of registers for local variables. (Assignments::releaseLocals)
end
 
CbNoMoney = function()
  SoundPlayScriptedSpeechEvent(l_0_5, "CARNIE_TICKETS_NOT_ENOUGH", 0, "jumbo")
end
 
CbFinishClothing = function()
  gClothing = false
end
 
F_SetupDockers = function()
  local l_4_0 = AreaAddAmbientSpawner(1, 1, 2000, 5000)
  DTStoreDocker = AreaAddDocker(1, 1)
  AreaAddSpawnLocation(l_4_0, gDockingPoint, gDockingDoor)
  AreaAddDockLocation(DTStoreDocker, gDockingPoint, gDockingDoor)
  AreaAddAmbientSpawnPeriod(l_4_0, 7, 0, 720)
  AreaAddDockPeriod(DTStoreDocker, 7, 0, 720)
  DockerSetMinimumRange(DTStoreDocker, 1)
  DockerSetMaximumRange(DTStoreDocker, 10)
  DockerSetUseFacingCheck(DTStoreDocker, false)
end
 
DTGeneralStoreLoad = function()
  DATLoad("SP_GroceryStore.dat", 0)
  LoadAnimationGroup("NPC_Adult")
  LoadActionTree("Act/Conv/DTGeneral.act")
  LoadModels("Act/Conv/DTGeneral.act")
   -- Overwrote pending register. (Assignments::assign)
  tX = math.pow(l_0_11 - 494.02801513672, 502)
  tY = math.pow(l_0_12 + 278.86700439453, 2)
  tZ = math.pow(l_0_13 - 2.3448100090027, 2)
  tTotal = tX + tY + tZ
  if tTotal < 9 then
    ShopSetShopKeepInfo(156, POINTLIST._STORE_DT_GENERAL_CLERK)
    gInPoorArea = true
  else
    ShopSetShopKeepInfo(89, POINTLIST._STORE_DT_GENERAL_CLERK)
  end
   -- Overwrote pending register. (Assignments::assign)
   -- Overwrote pending register. (Assignments::assign)
   -- Overwrote pending register. (Assignments::assign)
   -- Overwrote pending register. (Assignments::assign)
   -- Overwrote pending register. (Assignments::assign)
  ShopAddItem(0, 478, 490._STORE_DT_GENERAL_ITEM1, 321, 316, 528, 312)
  ShopAddItem(0, 475, POINTLIST._STORE_DT_GENERAL_ITEM2, 100, 100, CbGroceryStore, 1)
  if MiniObjectiveGetIsComplete(1) then
    ShopAddItem(0, 502, POINTLIST._STORE_DT_GENERAL_ITEM3, 100, 0, CbGroceryStore, 1)
  else
    ShopAddItem(0, 502, POINTLIST._STORE_DT_GENERAL_ITEM3, 100, 100, CbGroceryStore, 1)
  end
  ShopAddItem(0, 312, POINTLIST._STORE_DT_GENERAL_ITEM4, 100, 150, CbGroceryStore, 12)
  if IsMissionCompleated("3_S10") or shared.bSprayUnlocked then
    ShopAddItem(0, 321, POINTLIST._STORE_DT_GENERAL_ITEM6, 100, 100, CbGroceryStore, 12)
  end
  if IsMissionCompleated("4_02") then
    ShopAddItem(0, 316, POINTLIST._STORE_DT_GENERAL_ITEM7, 100, 300, CbGroceryStore, 10)
  end
  ShopSetCameraPos(POINTLIST._STORE_DT_GENERAL_CAMERA)
  ShopSetCameraAngleOffset(8)
  ShopSetCameraZoomPercentage(0.5)
  ShopSetPlayerPos(POINTLIST._STORE_DT_GENERAL_CUSTOMER)
  ConversationMovePeds(false)
   -- Overwrote pending register. (Assignments::assign)
  ShopSetConversationTree("Act/Conv/DTGeneral.act", "DTGeneral", "Cancel", "Purchase", "Broke", "NoRoom", "Browse", 156)
  l_0_3 = "Act/Conv/DTGeneral.act"
  l_0_4 = "DTGeneral"
  l_0_1 = POINTLIST._STORE_DT_GENERAL_CORONA
  l_0_2 = POINTLIST._STORE_DT_GENERAL_CUSTOMER
  gDockingDoor = TRIGGER._DT_IGROCERY_DOOR
  gDockingPoint = POINTLIST._STORE_DT_GENERALDOORPOINT
  F_SetupDockers()
  exitY = 384.24398803711
  exitX = -572.07397460938
  gDoorTrigger = TRIGGER._DT_IGROCERY_DOOR
  gExitPoint = POINTLIST._STORE_DT_GENERALEXITPOINT
  gCameraPath = PATH._STORE_DT_GENERALEXITPATH
  gAreaTrigger = TRIGGER._STORE_DT_GENERALAREA
  PedClearHasAggressed(gPlayer)
  if gInPoorArea and shared.g4S12Perfume then
  end
end
 
DTRichComicStoreLoad = function()
  l_0_19 =
  l_0_18 =
  l_0_17 = GetPointList(POINTLIST._3_R09_N)
  LoadAnimationGroup("NPC_Adult")
  LoadActionTree("Act/Conv/DTComics.act")
  LoadModels("Act/Conv/DTComics.act")
   -- Overwrote pending register. (Assignments::assign)
  ShopSetShopKeepInfo(84, 84._STORE_DT_COMIC_CLERK)
   -- Overwrote pending register. (Assignments::assign)
   -- Overwrote pending register. (Assignments::assign)
   -- Overwrote pending register. (Assignments::assign)
   -- Overwrote pending register. (Assignments::assign)
  ShopAddItem(0, 394, 394._STORE_DT_COMIC_ITEM1, MODELENUM._BIKERMAG, 474, 517, 5)
  ShopAddItem(0, 309, POINTLIST._STORE_DT_COMIC_ITEM3, 100, 400, CbComicRich, 5)
  ShopAddItem(0, 349, POINTLIST._STORE_DT_COMIC_ITEM7, 30, 300, CbComicRich, 5)
  ShopSetCameraPos(POINTLIST._STORE_DT_COMIC_CAMERA)
  ShopSetCameraAngleOffset(8)
  ShopSetCameraZoomPercentage(0.5)
  ShopSetPlayerPos(POINTLIST._STORE_DT_COMIC_CUSTOMER)
  ConversationMovePeds(false)
  ShopSetConversationTree("Act/Conv/DTComics.act", "DTComics", "Cancel", "Purchase", "Broke", "NoRoom", "Browse", "Stock")
  l_0_3 = "Act/Conv/DTComics.act"
  l_0_4 = "DTComics"
  l_0_1 = POINTLIST._STORE_DT_COMIC_CORONA
  l_0_2 = POINTLIST._STORE_DT_COMIC_CUSTOMER
  gDockingDoor = TRIGGER._DT_ICOMSHP_DOOR
  gDockingPoint = POINTLIST._STORE_DT_COMICENTRANCE
  F_SetupDockers()
  exitY = 387.51000976563
  exitX = -647.83197021484
  gDoorTrigger = TRIGGER._DT_ICOMSHP_DOOR
  gExitPoint = POINTLIST._STORE_DT_COMICEXITPOINT
  gCameraPath = PATH._STORE_DT_COMICEXITPATH
  gAreaTrigger = TRIGGER._STORE_DT_COMICAREA
  PedClearHasAggressed(gPlayer)
  shared.finishedLoadingShop = true
end
 
DTBikeStoreLoad = function()
  DATLoad("SP_Bike_Shop.DAT", 0)
  LoadActionTree("Act/Conv/DTComics.act")
  LoadAnimationGroup("NPC_Adult")
  LoadModels("NPC_Adult")
   -- Overwrote pending register. (Assignments::assign)
  tX = math.pow(l_0_11 - 480.71398925781, 86)
  tY = math.pow(l_0_12 + 78.259696960449, 2)
  tZ = math.pow(l_0_13 - 5.5848197937012, 2)
  tTotal = tX + tY + tZ
  if tTotal < 9 then
    gBikeSpawnElement = 1
  else
    gBikeSpawnElement = 2
  end
  gBikesPurchased = 0
  gBikesToSpawn = {}
  ShopSetShopKeepInfo(86, POINTLIST._STORE_DT_BIKE_CLERK)
   -- Overwrote pending register. (Assignments::assign)
   -- Overwrote pending register. (Assignments::assign)
   -- Overwrote pending register. (Assignments::assign)
   -- Overwrote pending register. (Assignments::assign)
   -- Overwrote pending register. (Assignments::assign)
  ShopAddItem(0, 280, 282._STORE_BIKE_ITEM1, 280, 273, 277, 272)
  ShopAddItem(0, 282, POINTLIST._STORE_BIKE_ITEM3, 1, 1500, CbBikeRich, 1)
  ShopAddItem(0, 283, POINTLIST._STORE_BIKE_ITEM5, 1, 2500, CbBikeRich, 1)
  ShopSetCameraPos(POINTLIST._STORE_BIKE_CAMERA)
  ShopSetCameraAngleOffset(15)
  ShopSetCameraZoomPercentage(0)
  ShopSetPlayerPos(POINTLIST._STORE_DT_BIKE_CUSTOMER)
  ConversationMovePeds(false)
   -- Overwrote pending register. (Assignments::assign)
  ShopSetConversationTree("Act/Conv/DTComics.act", "DTComics", "Cancel", "Purchase", "Broke", "NoRoom", "Browse", 278)
  l_0_3 = "Act/Conv/DTComics.act"
  l_0_4 = "DTComics"
  l_0_1 = POINTLIST._STORE_DT_BIKE_CUSTOMER
  l_0_2 = POINTLIST._STORE_DT_BIKE_CUSTOMER
  gDockingDoor = TRIGGER._DT_IBKSHOP_DOOR
  gDockingPoint = POINTLIST._STORE_DT_EXITBIKEPOINT
  F_SetupDockers()
  exitY = 374.9280090332
  exitX = -785.666015625
  gDoorTrigger = TRIGGER._DT_IBKSHOP_DOOR
  gExitPoint = POINTLIST._STORE_DT_EXITBIKEPOINT
  gCameraPath = PATH._STORE_DT_BIKEEXITPATH
  gAreaTrigger = TRIGGER._STORE_DT_BIKEAREA
  PedClearHasAggressed(gPlayer)
  shared.finishedLoadingShop = true
end
 
CarnStoreLoad = function()
  LoadActionTree("Act/Conv/DTCarnie.act")
  LoadModels("Act/Conv/DTCarnie.act")
  LoadAnimationGroup("NPC_Adult")
  if MissionActiveSpecific("2_G2") then
     -- Overwrote pending register. (Assignments::assign)
     -- Overwrote pending register. (Assignments::assign)
     -- Overwrote pending register. (Assignments::assign)
     -- Overwrote pending register. (Assignments::assign)
     -- Overwrote pending register. (Assignments::assign)
     -- Overwrote pending register. (Assignments::assign)
    ShopAddItem(0, 124, 469._STORECARN_ITEM01, 468, 512, 472, 465)
  end
  if not ClothingPlayerOwns("C_DevilHorns", 0) then
    if MissionActiveSpecific("2_G2") then
      ShopAddItem(0, 470, POINTLIST._STORECARN_ITEM04, 0, 15, CbCarnieStore, 1)
    else
      ShopAddItem(0, 470, POINTLIST._STORECARN_ITEM04, 1, 15, CbCarnieStore, 1)
    end
  end
  if PlayerGetScriptSavedData(11) == 0 then
    if MissionActiveSpecific("2_G2") then
      ShopAddItem(0, 513, POINTLIST._STORECARN_ITEM11, 0, 10, CbCarnieStore, 1)
    else
      ShopAddItem(0, 513, POINTLIST._STORECARN_ITEM11, 1, 10, CbCarnieStore, 1)
    end
  end
  if not ClothingPlayerOwns("C_StrangeHat", 0) then
    if MissionActiveSpecific("2_G2") then
      ShopAddItem(0, 471, POINTLIST._STORECARN_ITEM03, 0, 40, CbCarnieStore, 1)
    else
      ShopAddItem(0, 471, POINTLIST._STORECARN_ITEM03, 1, 40, CbCarnieStore, 1)
    end
  end
  if not ClothingPlayerOwns("C_ClownPants", 4) then
    if MissionActiveSpecific("2_G2") then
      ShopAddItem(0, 464, POINTLIST._STORECARN_ITEM09, 0, 40, CbCarnieStore, 1)
    else
      ShopAddItem(0, 464, POINTLIST._STORECARN_ITEM09, 1, 40, CbCarnieStore, 1)
    end
  end
  if PlayerGetScriptSavedData(13) == 0 then
    vespaPrice = 75
  else
    vespaPrice = 0
  end
  if MissionActiveSpecific("2_G2") then
    ShopAddItem(0, 276, POINTLIST._STORECARN_ITEM14, 0, vespaPrice, CbCarnieStore, 1)
  else
    ShopAddItem(0, 276, POINTLIST._STORECARN_ITEM14, 1, vespaPrice, CbCarnieStore, 1)
  end
  if not ClothingPlayerOwns("C_ClownShoes", 5) then
    if MissionActiveSpecific("2_G2") then
      ShopAddItem(0, 465, POINTLIST._STORECARN_ITEM10, 0, 40, CbCarnieStore, 1)
    else
      ShopAddItem(0, 465, POINTLIST._STORECARN_ITEM10, 1, 40, CbCarnieStore, 1)
    end
  end
  if not ClothingPlayerOwns("C_StpdShrt", 1) then
    if MissionActiveSpecific("2_G2") then
      ShopAddItem(0, 466, POINTLIST._STORECARN_ITEM08, 0, 20, CbCarnieStore, 1)
    else
      ShopAddItem(0, 466, POINTLIST._STORECARN_ITEM08, 1, 20, CbCarnieStore, 1)
    end
  end
  if not ClothingPlayerOwns("C_PinkWatch", 2) then
    if MissionActiveSpecific("2_G2") then
      ShopAddItem(0, 473, POINTLIST._STORECARN_ITEM05, 0, 10, CbCarnieStore, 1)
    else
      ShopAddItem(0, 473, POINTLIST._STORECARN_ITEM05, 1, 10, CbCarnieStore, 1)
    end
  end
  if not ClothingPlayerOwns("C_ClownWig", 0) then
    if MissionActiveSpecific("2_G2") then
      ShopAddItem(0, 472, POINTLIST._STORECARN_ITEM02, 0, 40, CbCarnieStore, 1)
    else
      ShopAddItem(0, 472, POINTLIST._STORECARN_ITEM02, 1, 40, CbCarnieStore, 1)
    end
  end
  if PlayerGetScriptSavedData(12) == 0 then
    if MissionActiveSpecific("2_G2") then
      ShopAddItem(0, 512, POINTLIST._STORECARN_ITEM06, 0, 10, CbCarnieStore, 1)
    else
      ShopAddItem(0, 512, POINTLIST._STORECARN_ITEM06, 1, 10, CbCarnieStore, 1)
    end
  end
  if not ClothingPlayerOwns("C_BBracelets", 3) then
    if MissionActiveSpecific("2_G2") then
      ShopAddItem(0, 468, POINTLIST._STORECARN_ITEM07, 0, 15, CbCarnieStore, 1)
    else
      ShopAddItem(0, 468, POINTLIST._STORECARN_ITEM07, 1, 15, CbCarnieStore, 1)
    end
  end
  if not ClothingPlayerOwns("C_CanadaHat", 0) then
    if MissionActiveSpecific("2_G2") then
      ShopAddItem(0, 467, POINTLIST._STORECARN_ITEM13, 0, 20, CbCarnieStore, 1)
    else
      ShopAddItem(0, 467, POINTLIST._STORECARN_ITEM13, 1, 20, CbCarnieStore, 1)
    end
  end
  if not ClothingPlayerOwns("C_AngelHalo", 0) then
    if MissionActiveSpecific("2_G2") then
      ShopAddItem(0, 469, POINTLIST._STORECARN_ITEM12, 0, 15, CbCarnieStore, 1)
    else
      ShopAddItem(0, 469, POINTLIST._STORECARN_ITEM12, 1, 15, CbCarnieStore, 1)
    end
  end
  ShopSetShopKeepInfo(114, POINTLIST._STORECARN_CLERK)
  ShopSetCameraPos(POINTLIST._STORECARN_CAMERA)
  ShopSetCameraAngleOffset(11)
  ShopSetCameraZoomPercentage(0.40000000596046)
  ShopSetPlayerPos(POINTLIST._STORECARN_PLAYERPOSITION)
   -- Overwrote pending register. (Assignments::assign)
  ShopSetConversationTree("Act/Conv/DTCarnie.act", "DTCarnie", "Cancel", "Purchase", "Broke", "NoRoom", "Browse", 473)
  l_0_3 = "Act/Conv/DTCarnie.act"
  l_0_4 = "DTCarnie"
  l_0_2 = POINTLIST._STORECARN_PLAYERPOSITION
  l_0_1 = POINTLIST._STORECARN_CORONA
  gAreaTrigger = TRIGGER._STORECARN_AREA
  PedClearHasAggressed(gPlayer)
end
 
F_Aggression = function(l_9_0)
  if not shared.g3_R09_N and not gPlayerBrokeStuff and (PAnimNumDestroyed(gAreaTrigger) > 0 or PedHasAggressed(gPlayer)) then
    PlayerSetControl(0)
    shared.playerAggressedInStore = true
    AreaCancelStoredTransition()
    SoundStopCurrentSpeechEvent(l_9_0)
    PedIgnoreStimuli(l_9_0, true)
    PedFaceObject(l_9_0, gPlayer, 3, 1)
    CameraSetWidescreen(true)
    Wait(500)
    SoundSetAudioFocusCamera()
    F_PedSetCameraOffsetXYZ(l_9_0, 0.076659999787807, 2.1552770137787, 1.798231959343, 0.028457999229431, 1.1699600219727, 1.6412600278854)
    CameraAllowChange(false)
    PedSetActionNode(l_9_0, "/Global/Welcome/ShakeFist", "Act/Conv/Store.act")
    F_PlaySpeechAndWait(l_9_0, "STORE_VIOLENCE_RESPONSE", 0, "supersize")
    CameraFade(500, 0)
    Wait(500)
    CameraAllowChange(true)
    SoundSetAudioFocusPlayer()
    CameraReturnToPlayer()
    CameraReset()
    CameraSetWidescreen(false)
    LaunchScript("AreaScripts/StoreTransition.lua")
    Wait(100)
    gPlayerBrokeStuff = true
    PedClearHasAggressed(gPlayer)
  end
end
 
CbGroceryStore = function(l_10_0)
  if l_10_0 == 502 then
    GiveItemToPlayer(502, 1)
    ItemSetCurrentNum(502, 0)
    local l_10_2 = PlayerGetHealth()
    local l_10_1 = PedGetMaxHealth(gPlayer)
    if l_10_1 <= l_10_2 then
       -- Attempted to generate an assignment, but got confused about usage of registers. (Assignments::flushPending)
      PlayerSetHealth(l_10_1)
    else
      PlayerSetHealth(l_10_2)
    end
  elseif l_10_0 == 312 then
    GiveAmmoToPlayer(312, 12)
  elseif l_10_0 == 321 then
    GiveWeaponToPlayer(321)
    GiveAmmoToPlayer(321, 12)
  elseif l_10_0 == 316 then
    GiveAmmoToPlayer(316, 10)
  elseif l_10_0 == 528 then
    GiveItemToPlayer(528)
  elseif l_10_0 == 475 then
    GiveItemToPlayer(475)
  elseif l_10_0 == 478 then
    GiveItemToPlayer(478)
  end
end
 
CbBikeRich = function(l_11_0)
  GarageSetStoredVehicle(1, l_11_0)
  if not IsMissionCompleated("BIKEPARK4X") and not MissionActiveSpecific("BIKEPARK4X") then
    TutorialStart("BIKEPARK4X")
  end
end
 
CbComicRich = function(l_12_0)
  if l_12_0 == 394 then
    PlayerSetWeapon(394, 5)
  elseif l_12_0 == 349 then
    PlayerSetWeapon(349, 5)
  elseif l_12_0 == 309 then
    PlayerSetWeapon(309, 5)
  end
end
 
CbCarnieStore = function(l_13_0)
  if l_13_0 == 512 then
    PlayerSetScriptSavedData(12, 1)
  elseif l_13_0 == 513 then
    PlayerSetScriptSavedData(11, 1)
  elseif l_13_0 == 472 then
    ClothingGivePlayer("C_ClownWig", 0)
    StatAddToInt(66)
  elseif l_13_0 == 470 then
    ClothingGivePlayer("C_DevilHorns", 0)
    StatAddToInt(66)
  elseif l_13_0 == 464 then
    ClothingGivePlayer("C_ClownPants", 4)
    StatAddToInt(66)
  elseif l_13_0 == 465 then
    ClothingGivePlayer("C_ClownShoes", 5)
    StatAddToInt(66)
  elseif l_13_0 == 469 then
    ClothingGivePlayer("C_AngelHalo", 0)
    StatAddToInt(66)
  elseif l_13_0 == 471 then
    ClothingGivePlayer("C_StrangeHat", 0)
    StatAddToInt(66)
  elseif l_13_0 == 473 then
    ClothingGivePlayer("C_PinkWatch", 2)
    StatAddToInt(66)
  elseif l_13_0 == 468 then
    ClothingGivePlayer("C_BBracelets", 3)
    StatAddToInt(66)
  elseif l_13_0 == 466 then
    ClothingGivePlayer("C_StpdShrt", 1)
    StatAddToInt(66)
  elseif l_13_0 == 467 then
    ClothingGivePlayer("C_CanadaHat", 0)
    StatAddToInt(66)
  elseif l_13_0 == 276 then
    PlayerSetScriptSavedData(13, 1)
    GarageSetStoredVehicle(1, 276)
    if not IsMissionCompleated("TRESPASSX") and not MissionActiveSpecific("TRESPASSX") then
      TutorialStart("TRESPASSX")
    end
  elseif l_13_0 == 363 then
    gPlayerBoughtBear = true
  end
end
 
CbCarnieStopShopping = function()
  gFinishedShopping = true
  CameraFade(500, 0)
end
 
Cb201StopShopping = function()
  if l_0_0 and PlayerHasItem(528) then
    shared.g2_01 = false
    l_0_0 = false
  end
end
 
F_StopTimeWhilePurchasing = function()
  if IsMissionCompleated("1_02C") and not MissionActive() and not ClockIsPaused() then
    PauseGameClock()
    l_0_20 = true
  end
end
 
F_StartUpTime = function()
  HUDRestoreVisibility()
  ToggleHUDComponentLocked(40, false)
  if IsMissionCompleated("1_02C") and not MissionActive() and l_0_20 then
    UnpauseGameClock()
  end
  l_0_10 = false
  shared.playerShopping = false
  gWaitAfterQuit = true
end
 
F_RequestWeapons = function()
  WeaponRequestModel(309)
  WeaponRequestModel(308)
  WeaponRequestModel(397)
  WeaponRequestModel(312)
  WeaponRequestModel(316)
  WeaponRequestModel(321)
  WeaponRequestModel(394)
  WeaponRequestModel(393)
  WeaponRequestModel(528)
  WeaponRequestModel(517)
  WeaponRequestModel(349)
end
 
F_PreStoreSetup = function(l_19_0)
  LoadActionTree("Act/Conv/Store.act")
  if l_19_0 == 26 then
    if l_0_14 == -1 then
      l_0_13 =
      l_0_12 =
      l_0_11 = GetPointList(POINTLIST._DT_IGROCERY_DOOR)
      l_0_15 = 0
      l_0_14 = 0
    end
    if shared.g2_01 then
      l_0_0 = true
    end
    DTGeneralStoreLoad()
    if shared.g2_03 then
    end
  elseif l_19_0 == 30 then
    l_0_13 =
    l_0_12 =
    l_0_11 = GetPointList(POINTLIST._DT_ICOMSHP_DOOR)
    l_0_15 = 0
    l_0_14 = 0
    if IsMissionCompleated("3_R09_N") or shared.unlockedClothing then
      gClothingUnlocked = true
    end
    if not IsMissionAvailable("3_R09_N") then
      local l_19_1 = -MissionActiveSpecific("3_R09_N")
    else
      local l_19_2 = false
       -- Overwrote pending register. (Assignments::assign)
    end
    l_0_9 = l_19_2
    local l_19_3 = 130
    gClothingHeading = l_19_3
    l_19_3 = DTRichComicStoreLoad
    l_19_3()
  elseif l_19_0 == 29 then
    if l_0_14 == -1 then
      l_0_13 =
      l_0_12 =
      l_0_11 = GetPointList(POINTLIST._DT_IBKSHOP_DOOR)
      l_0_15 = 0
      l_0_14 = 0
    end
    DTBikeStoreLoad()
  elseif l_19_0 == 50 then
    l_0_13 = 5.5586538314819
    l_0_12 = 436.80380249023
    l_0_11 = 183.51754760742
    l_0_15 = 0
    l_0_14 = 0
    CarnStoreLoad()
  end
end
 
F_CheckClock = function()
  minute =
  hour = ClockGet()
  if hour == 1 and minute > 55 or hour == 2 or PlayerFellAsleep() or AreaIsLoading() then
    return false
  end
  return true
end
 
T_StopSpineTracking = function()
  Wait(5000)
  PedLockTarget(l_0_5, -1)
end
 

As you can see from the posted script...there is a LOT of missing and damaged code rendering this script TOTALLY unusable in it's current state.

Hopefully this is of some use to everyone.

The rest of the damaged scripts have even more code missing and all of this is due to the compiler my friend Fred Tetra used to gain the sources of the lua scripts not being able to understand some parts of the bully scripting ....this is due to rockstar using a custom and shoddy version of lua which the standard decompiler can't even make sense of. His decompiler is a custom one which I do NOT have nor will I ask so please don't ask me if I have it or can share it....I just simply can't.

Offline Kainsmoney

  • Jr. Member
  • **
  • Posts: 4
    • View Profile
    • Kainsmoney
Re: Shopkeepers dont kick you out
« Reply #24 on: January 18, 2014, 11:50:01 PM »
Thanks madman, i could play around a little if i actually had the time to learn how to properloy use Luac. Only way yo get kick out is to attack, grapple or use weapons on someone, insulting and even doing humiliation will not get you kick out.

Offline MadmaN

  • Bully-Board Admin Team
  • Newbie
  • *
  • Posts: 0
  • Gender: Male
  • Biblio-Techa Mods (retired)
    • View Profile
Re: Shopkeepers dont kick you out
« Reply #25 on: January 19, 2014, 12:01:05 AM »
actually certain insults will...or such as anything that requires physical contact ie: shoving.