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


Author Topic: Lua Help  (Read 8159 times)

0 Members and 1 Guest are viewing this topic.

Offline boyser

  • Wazzzuuupppp
  • Full Member
  • ***
  • Posts: 176
  • Gender: Male
  • THE REAL G IS ME
    • View Profile
Re: Lua Help
« Reply #15 on: January 16, 2015, 12:24:18 PM »
How do i change the respect

Offline Mick3Mouse

  • Obam3mouse
  • Bullworth Junkie
  • ****
  • Posts: 4,343
  • Gender: Male
  • Major Mick3Mouse Algie Hunter
    • View Profile
    • My youtube
Re: Lua Help
« Reply #16 on: January 16, 2015, 06:04:34 PM »
Try use the search feature in the right top corner of the page!

Just search for "lua respect" then results will show up on how the respect works, and how you edit it. 

This one have i looked in when i learnt - http://www.bully-board.com/index.php?topic=18347

Offline boyser

  • Wazzzuuupppp
  • Full Member
  • ***
  • Posts: 176
  • Gender: Male
  • THE REAL G IS ME
    • View Profile
Re: Lua Help
« Reply #17 on: January 17, 2015, 03:31:59 PM »
How do i make like a menu that has fighting styles

Offline AfterLife

  • The Reaper
  • Sr. Member
  • ***
  • Posts: 830
  • Gender: Male
  • I'm from the AfterLife...
    • View Profile
Re: Lua Help
« Reply #18 on: January 17, 2015, 07:15:37 PM »
How do i make like a menu that has fighting styles
I can help  :) Get on Xfire

Offline boyser

  • Wazzzuuupppp
  • Full Member
  • ***
  • Posts: 176
  • Gender: Male
  • THE REAL G IS ME
    • View Profile
Re: Lua Help
« Reply #19 on: January 21, 2015, 03:45:20 AM »
How do i add text when the mod starts

Offline Mick3Mouse

  • Obam3mouse
  • Bullworth Junkie
  • ****
  • Posts: 4,343
  • Gender: Male
  • Major Mick3Mouse Algie Hunter
    • View Profile
    • My youtube
Re: Lua Help
« Reply #20 on: January 21, 2015, 07:25:04 AM »
I'm not going to tell you. 


You need to search for it yourself, if you keep asking all the time people will ignore you.  Have you even looked for tutorials? 

Here is a very detailed and good tutorial for you:
http://www.bully-board.com/index.php?topic=18725.0


But please, try to say "thanks" you don't appreciate that we are helping you.
And try to search for yourself.  :)

Offline boyser

  • Wazzzuuupppp
  • Full Member
  • ***
  • Posts: 176
  • Gender: Male
  • THE REAL G IS ME
    • View Profile
Re: Lua Help
« Reply #21 on: January 21, 2015, 02:03:42 PM »
sorry i didn't say thanks when you helped me and i will search for the text thing

Offline AfterLife

  • The Reaper
  • Sr. Member
  • ***
  • Posts: 830
  • Gender: Male
  • I'm from the AfterLife...
    • View Profile
Re: Lua Help
« Reply #22 on: January 23, 2015, 06:25:05 AM »
TextPrintString is the code

Offline DaBOSS54320

  • Hero Member
  • ****
  • Posts: 3,398
  • Gender: Female
    • View Profile
Re: Lua Help
« Reply #23 on: January 25, 2015, 12:45:22 AM »
and the arguments are "text",time,position.

Position is 1 for top of screen, 2 for bottom.

Example:
TextPrintString("Mod by DaBOSS\nThis message will display for 5 seconds",5,1)

the '\n' in there represents a line break.

Offline boyser

  • Wazzzuuupppp
  • Full Member
  • ***
  • Posts: 176
  • Gender: Male
  • THE REAL G IS ME
    • View Profile
Re: Lua Help
« Reply #24 on: January 25, 2015, 12:59:47 PM »
How Can i make a script mod?Not ArcRace1.lur
and thanks
« Last Edit: January 25, 2015, 01:02:54 PM by boyser »

Offline DaBOSS54320

  • Hero Member
  • ****
  • Posts: 3,398
  • Gender: Female
    • View Profile
Re: Lua Help
« Reply #25 on: January 25, 2015, 01:37:20 PM »
ArcRace is a script, and changing it, is a mod. Thus, it's a script mod.

If you don't like using the arcade machine, you can edit other scripts if you want.

Here's the source to STimeCycle.lur if you wanna mod it, just compile to STimeCycle.lur and replace STimeCycle.lur instead of ArcRace1.lur. You need to use the source that I gave below so that the regular stuff in the script isn't removed because that may mess the game up. Just add onto it.

Code: [Select]
function main()
  repeat
    Wait(0)
  until not Alive
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


In case you didn't know...
Instead of: "LuaC -o ArcRace1.lur Script.lua"
You'll do: "LuaC -o STimeCycle.lur Script.lua"
« Last Edit: January 25, 2015, 01:39:07 PM by DaBOSS54320 »

Offline boyser

  • Wazzzuuupppp
  • Full Member
  • ***
  • Posts: 176
  • Gender: Male
  • THE REAL G IS ME
    • View Profile
Re: Lua Help
« Reply #26 on: January 25, 2015, 01:43:07 PM »
Thanks So i put this at the begging

Offline Unknownsoldier

  • Hero Member
  • ****
  • Posts: 2,773
    • View Profile
Re: Lua Help
« Reply #27 on: January 29, 2015, 12:43:33 PM »
How do i add text when the mod starts
Well m8 it seems like you haven't even bothered to look at a tutorial. That is one of the things in basically every one. I will just say it:

TextPrintString(">mod name<\nCreated by: boyser",3,1)

Change the ">mod name<" to whatever the name of your mod is.