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 7834 times)

0 Members and 1 Guest are viewing this topic.

Offline Hopking

  • Jr. Member
  • **
  • Posts: 67
  • Gender: Male
    • View Profile
Shopkeepers dont kick you out
« on: December 23, 2011, 07:29:43 AM »
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


Offline Evolution

  • Elitist
  • *********
  • Posts: 13,574
  • Gender: Male
    • View Profile
Re: Shopkeepers dont kick you out
« Reply #1 on: December 23, 2011, 07:31:36 AM »
Idk, there are videos showing footage of it but no tuts. Best wait till Madman or a good modder has time.

deadpoolXYZ

  • Guest
Re: Shopkeepers dont kick you out
« Reply #2 on: December 23, 2011, 09:02:27 AM »
I haven't seen videos about that.

Offline Prosecute

  • Full Member
  • ***
  • Posts: 244
  • Gender: Male
    • View Profile
    • NewDayStudios
Re: Shopkeepers dont kick you out
« Reply #3 on: December 23, 2011, 02:39:02 PM »
This will be a easy enought mod to do, i would recommend looking in scripts

Offline MadmaN

  • Bully-Board Admin Team
  • Newbie
  • *
  • Posts: 0
  • Gender: Male
  • Biblio-Techa Mods (retired)
    • View Profile
Re: Shopkeepers dont kick you out
« Reply #4 on: December 23, 2011, 04:46:18 PM »
I will look into it soon as I get time  8)

Pretty sure you are right Steman, Since I do seem to remember a reference in scripts to this.

Offline Evolution

  • Elitist
  • *********
  • Posts: 13,574
  • Gender: Male
    • View Profile
Re: Shopkeepers dont kick you out
« Reply #5 on: December 23, 2011, 04:53:35 PM »
Oh sorry, I read that question "Jimmy hopkins'nstuff" said. I meant there where videos of fights in the comic book store not fights and jimmy joining in.

 Soz xD

Offline Hopking

  • Jr. Member
  • **
  • Posts: 67
  • Gender: Male
    • View Profile
Re: Shopkeepers dont kick you out
« Reply #6 on: December 24, 2011, 01:50:24 AM »
I've actually edited scripts.img to make a kickme sign spawn in the dorm, but it replaces the eggs :/

Offline MadmaN

  • Bully-Board Admin Team
  • Newbie
  • *
  • Posts: 0
  • Gender: Male
  • Biblio-Techa Mods (retired)
    • View Profile
Re: Shopkeepers dont kick you out
« Reply #7 on: December 24, 2011, 05:27:02 PM »
I've actually edited scripts.img to make a kickme sign spawn in the dorm, but it replaces the eggs :/

There are easier ways to do custom item spawns and weapon spawns. I will give you a hint: extract trigger.img and explore every file....look at how the syntax is and another hint: the file you want to look at when learning how to do custom spawns is props.dat if I remember correctly. I will double check the file name and change this post accordingly if I am wrong on the filename since I am kinda in the middle of some last minute xmas cleaning here in my shop so it is hard to answer questions fully...lol

Offline Prosecute

  • Full Member
  • ***
  • Posts: 244
  • Gender: Male
    • View Profile
    • NewDayStudios
Re: Shopkeepers dont kick you out
« Reply #8 on: December 25, 2011, 04:46:49 AM »
yea and dont forget you can allways use the model ids to replace current weapons in missions or in the shops etc

Offline MadmaN

  • Bully-Board Admin Team
  • Newbie
  • *
  • Posts: 0
  • Gender: Male
  • Biblio-Techa Mods (retired)
    • View Profile
Re: Shopkeepers dont kick you out
« Reply #9 on: December 25, 2011, 01:23:05 PM »
Yup.

That is the beauty of bully modding as of the moment....unlike a vast majority of other games....there are many different ways to do the same thing.

Offline Prosecute

  • Full Member
  • ***
  • Posts: 244
  • Gender: Male
    • View Profile
    • NewDayStudios
Re: Shopkeepers dont kick you out
« Reply #10 on: December 25, 2011, 01:57:37 PM »
...yea true madonator, but unintentionally the topic has been derailed from the users qs, basicly the way to do this is open scripts and look for something which resembles the user being kicked out (its in their) the first untested method would be to null this script out, good luck :happy:

Offline Hopking

  • Jr. Member
  • **
  • Posts: 67
  • Gender: Male
    • View Profile
Re: Shopkeepers dont kick you out
« Reply #11 on: December 26, 2011, 05:14:20 AM »
I nulled him out, he's gone from the store but when I hit someone he still yells at me while he's floating in some wierd dimension

Offline MadmaN

  • Bully-Board Admin Team
  • Newbie
  • *
  • Posts: 0
  • Gender: Male
  • Biblio-Techa Mods (retired)
    • View Profile
Re: Shopkeepers dont kick you out
« Reply #12 on: December 26, 2011, 01:36:28 PM »
The shopkeep reactions are part of a reaction script somewhere in the scripts.img tho some things are also controlled via act.img so check there.  ;)

Offline Prosecute

  • Full Member
  • ***
  • Posts: 244
  • Gender: Male
    • View Profile
    • NewDayStudios
Re: Shopkeepers dont kick you out
« Reply #13 on: December 26, 2011, 02:10:21 PM »
their will be a unmistakeable command somewhere in the shop file or the interior file in scripts, just null it 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 #14 on: March 13, 2012, 09:36:54 PM »
This is the first part of what causes you to be kicked out of shops when fighting or even bullying other peds.

Code: [Select]
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)

Another part of the code
Code: [Select]
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

This part deals with punishments for being aggressive in a store say against a little kid...girl or adult
Code: [Select]
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

Another part of this
Code: [Select]
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

DisablePunishmentSystem(true) disables the punishment system totally.

Here are some items in the comic shop
Code: [Select]
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)

Here is the main code for getting kicked out
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

Hope some of this has shed light for a few people here...heh.

This is all in sstores.lur and I am rewriting that script. It is about 80% done and once fixed will pave the way for the v2 megastores mod.

I am currently doing the same for the v2 vehicle spawner which should allow driving of any vehicle. I am also currently nearly finished enabling driving any vehicle globally too.....sry to go offtopic there..