Página 1 de 2 • 1, 2 

- P_HMensagens Nível 1
- Mensagens : 12
Reputação : 0
Desde : 22/05/2017
Tópico criado para discussões sobre o desenvolvimento de scripts em Lua.
Moonloader - GTA Foruns
Moonloader - Development - GTA Foruns
DEV_WIKI Moonloader
Moonloader reference - opcodes
Manual de Referência de Lua 5.1
---
Lua 5.3 Reference Manual - English
Manual de Referência de Lua 5.2
Moonloader - GTA Foruns
Moonloader - Development - GTA Foruns
DEV_WIKI Moonloader
Moonloader reference - opcodes
Manual de Referência de Lua 5.1
---
Lua 5.3 Reference Manual - English
Manual de Referência de Lua 5.2
- P_HMensagens Nível 1
- Mensagens : 12
Reputação : 0
Desde : 22/05/2017
Alguém saberia me dizer porque este script não está funcionando como devido:
- Código:
script_name("testAnim")
script_moonloader(025)
require 'lib.moonloader'
local vk = require 'lib.vkeys'
local anim = {
pack = "DANCING",
--+-- JUMP animations
danceA = "DNCE_M_A",
danceB = "DAN_LOOP_A",
danceC = "DNCE_M_D",
}
function loadAnimation(string)
if not hasAnimationLoaded(string) then
requestAnimation(string)
loadAllModelsNow()
end
printString("Animation OK !", 500)
wait(500)
end
function main()
while true do
if isPlayerPlaying(PLAYER_HANDLE)
and not isPlayerDead(PLAYER_HANDLE)
and wasKeyPressed(vk.VK_L)
then
local isCharTargetingAnyPlayer, charTargeted = getCharPlayerIsTargeting(PLAYER_HANDLE)
if isCharTargetingAnyPlayer then
loadAnimation(anim.pack)
local taskDance = openSequenceTask()
taskPlayAnimNonInterruptable(-1, anim.danceA, anim.pack, 4.0, false, true, true, false, -1)
taskPlayAnimNonInterruptable(-1, anim.danceB, anim.pack, 4.0, false, true, true, false, -1)
taskPlayAnimNonInterruptable(-1, anim.danceC, anim.pack, 4.0, false, true, true, false, -1)
setSequenceToRepeat(taskDance, true)
closeSequenceTask(taskDance)
performSequenceTask(charTargeted, taskDance)
printString("dancing...", 1000)
wait(1500)
repeat
wait(0)
until wasKeyPressed(vk.VK_L)
printString("STOP dancing...", 1000)
clearSequenceTask(taskDance)
clearCharTasks(charTargeted)
printString("STOP...", 1000)
wait(1500)
end
end
wait(0)
end
end
Fecha o jogo, depois o abra novamente e vai no moonloader.log e abra, la diz exatamente a linha que esta impedindo de funcionar.
A função main() deve ser a primeira função do script, coloca as outras depois dela e chame assim.
Senti falta do removeAnimation()
A função main() deve ser a primeira função do script, coloca as outras depois dela e chame assim.
- Código:
function main()
loadAnimation(string) --<<
while true do
if isPlayerPlaying(PLAYER_HANDLE)
...
Senti falta do removeAnimation()
- P_HMensagens Nível 1
- Mensagens : 12
Reputação : 0
Desde : 22/05/2017
- Nesta chamada simples ocorre o mesmo erro:
- Código:
require 'lib.moonloader'
local vk = require 'lib.vkeys'
function main()
while true
do wait(0)
if isPlayerPlaying(PLAYER_HANDLE)
and not isPlayerDead(PLAYER_HANDLE)
and wasKeyPressed(vk.VK_L)
then
while not hasAnimationLoaded(SWEET)
do wait(0)
requestAnimation(SWEET)
loadAllModelsNow()
end
-- [...]
removeAnimation(SWEET)
end
end
end
no moonloader.log diz:
[18:44:43.996753] (error) opcode '04EE' call caused an unhandled exception
"chamada causou uma exceção não tratada"
Isso é erro no compilador? Pois eu apenas estou convertendo o codigo do meu script em GTA3Script para Lua e não consigo iniciar nenhuma animação.
- Ordep_Mensagens Nível 3
- Título : "O amor é apenas uma reação química"
Mensagens : 171
Reputação : 2
Desde : 21/01/2018
Idade : 17
Localização : Serra - ES
P_H, cuidado com o Double post (Nas duas primeiras mensagens).
https://brmodstudio.forumeiros.com/t1638-avisos-e-regras-do-forum <-- Primeira regra, de dureza 3.- RE:
- @P_H escreveu:
- Nesta chamada simples ocorre o mesmo erro:
- Código:
require 'lib.moonloader'
local vk = require 'lib.vkeys'
function main()
while true
do wait(0)
if isPlayerPlaying(PLAYER_HANDLE)
and not isPlayerDead(PLAYER_HANDLE)
and wasKeyPressed(vk.VK_L)
then
while not hasAnimationLoaded(SWEET)
do wait(0)
requestAnimation(SWEET)
loadAllModelsNow()
end
-- [...]
removeAnimation(SWEET)
end
end
end
no moonloader.log diz:
[18:44:43.996753] (error) opcode '04EE' call caused an unhandled exception
"chamada causou uma exceção não tratada"
Isso é erro no compilador? Pois eu apenas estou convertendo o codigo do meu script em GTA3Script para Lua e não consigo iniciar nenhuma animação. - Nesta chamada simples ocorre o mesmo erro:
Esta mesmo certo colocar -1 no primeiro argumento de taskPlayAnimNonInterruptable?
- Código:
taskPlayAnimNonInterruptable(-1, anim.danceA, anim.pack, 4.0, false, true, true, false, -1)
- P_HMensagens Nível 1
- Mensagens : 12
Reputação : 0
Desde : 22/05/2017
[RESOLVIDO]
O problema realmente eram as aspas faltantes no ifp, mania do GTA3sc.
Obrigado pela paciência Um Geek
- Código:
require 'lib.moonloader'
local vk = require 'lib.vkeys'
function main()
while true
do wait(0)
if isPlayerPlaying(PLAYER_HANDLE)
and not isPlayerDead(PLAYER_HANDLE)
and wasKeyPressed(vk.VK_L)
then
local isCharTargetingAnyPlayer, charTargeted = getCharPlayerIsTargeting(PLAYER_HANDLE)
if isCharTargetingAnyPlayer then
while not hasAnimationLoaded("SWEET")
do wait(0)
requestAnimation("SWEET")
loadAllModelsNow()
end
taskPlayAnim(charTargeted, "Sweet_Injuredloop", "SWEET", 4.0, true, false, false, false, -1)
printString("Animation OK !", 1000)
end
end
end
end
O problema realmente eram as aspas faltantes no ifp, mania do GTA3sc.
Obrigado pela paciência Um Geek

- CloudScripter CLEO - Avançado
- Nick anterior : Israel
Título : Baiano
Mensagens : 858
Reputação : 138
Desde : 22/09/2015
Você já está usando loadAllModelsNow(). Não há necessidade de esperar a animação ficar disponível, pior ainda, em um loop.@P_H escreveu:
- Código:
while not hasAnimationLoaded("SWEET") do
wait(0)
requestAnimation("SWEET")
loadAllModelsNow()
end
Não, não precisa ser a primeira@Um Geek escreveu:A função main() deve ser a primeira função do script, coloca as outras depois dela e chame assim.
- Código:
function main()
loadAnimation(string) --<<
while true do
if isPlayerPlaying(PLAYER_HANDLE)
...
Sim, se tratando de uma sequence task, usa-se -1 mesmo.@Um Geek escreveu:Esta mesmo certo colocar -1 no primeiro argumento de taskPlayAnimNonInterruptable?
- Código:
taskPlayAnimNonInterruptable(-1, anim.danceA, anim.pack, 4.0, false, true, true, false, -1)
______________________________
Everyone gonna remember my name !
@P_H escreveu:[RESOLVIDO]
O problema realmente eram as aspas faltantes no ifp, mania do GTA3sc.
Obrigado pela paciência Um Geek![]()
De nada, bom ter mais gente para discutir sobre lua já que poucos demonstraram interesse.
_______________
RE: @Israel
No comando taskPlayAnimNonInterruptable eu nunca usei ou não estou lembrado, por isto perguntei, quando puder vou ver como funciona melhor.
Sobre o main() eu acho melhor
Se não me engano, a pessoa estudar programação Lua e ler o meu tutorial de GTA3script, já estará praticamente totalmente preparada para criar mods em Lua, né?
- P_HMensagens Nível 1
- Mensagens : 12
Reputação : 0
Desde : 22/05/2017
Bom... realmente eu aprendi a programar em GTA3sc a partir dos seus tutos, e todos os mods que desenvolvi até hoje foram fruto desse aprendizado, mas parei a cerca de 1 ano (então eu não me surpreendo por ter esquecido algo). E semana passada fiquei sabendo do Moonloader e então decidi voltar a mexer com scripts para o GTASA e estou adorando a linguagem pelo fato de proporcionar um fluxo de programação mais ágil de prático. Porém os fóruns existem para isso, debater temas e também compartilhar conhecimento, e foi isso que fiz, pois fiquei algumas horas nesse erro bobo, e estava com pressa.
Assim que terminar meus scripts farei questão de uppa-los aqui, nada mais justo do que isso, afinal tudo que aprendi foi por aqui!
Assim que terminar meus scripts farei questão de uppa-los aqui, nada mais justo do que isso, afinal tudo que aprendi foi por aqui!
Desde a primeira vez que vi os mods feitos em Lua me pareceu uma mistura de GTA3script com Sanny Builder:
GTA3script
Sanny Builder
MoonLoader
(usei Sanny Builder com opcodes corrigidos para ficar igual aos outros)
Ainda bem que tudo é tão parecido, qualquer um pode ir de um pra outro, estudar o script do outro etc.
GTA3script
- Código:
WHILE NOT HAS_ANIMATION_LOADED SWEET
WAIT 0
REQUEST_ANIMATION SWEET
LOAD_ALL_MODELS_NOW
ENDWHILE
Sanny Builder
- Código:
while 84EE: not has_animation_loaded "SWEET"
wait 0
04ED: request_animation "SWEET"
038B: load_all_models_now
end
MoonLoader
- Código:
while not hasAnimationLoaded("SWEET") do
wait(0)
requestAnimation("SWEET")
loadAllModelsNow()
end
(usei Sanny Builder com opcodes corrigidos para ficar igual aos outros)
Ainda bem que tudo é tão parecido, qualquer um pode ir de um pra outro, estudar o script do outro etc.
@Junior_Djjr escreveu:Se não me engano, a pessoa estudar programação Lua e ler o meu tutorial de GTA3script, já estará praticamente totalmente preparada para criar mods em Lua, né?
Lua é até mais fácil eu arriscaria dizer, tendo uma noção básica das referencias e conhecendo como criar scripts em lua já poderia da para conseguir fazer um spawner por exemplo. Só o fato de poder ir editando o script e dando Ctrl+R para ir testando já facilita muito, no entanto como existem pouca coisa sobre lua incluindo mod acabam optando pelo sanny ou o gta3script.
O que não é coisa da Lua. Você pode fazer um mod que faça isso em CLEO também.@Um Geek escreveu:Só o fato de poder ir editando o script e dando Ctrl+R para ir testando já facilita muito
Você também poderia adaptar o seu próprio mod em específico só (já que quanto mais mod sendo recarregado mais chances de alguma merda).
- Código:
// mod.cs
SCRIPT_START
{
LVAR_INT started
IF started = 0
SCRIPT_NAME START
WHILE TRUE
STREAM_CUSTOM_SCRIPT "mod.cs" 1
WHILE NOT IS_KEY_PRESSED VK_LCONTROL
OR NOT IS_KEY_PRESSED VK_KEY_R
WAIT 0
ENDWHILE
WHILE IS_KEY_PRESSED VK_LCONTROL
AND IS_KEY_PRESSED VK_KEY_R
WAIT 0
ENDWHILE
TERMINATE_ALL_SCRIPTS_WITH_THIS_NAME MEUMOD
ENDWHILE
ENDIF
// código do mod
SCRIPT_NAME MEUMOD
PRINT_STRING_NOW RODEI 2000
}
SCRIPT_END
↑ Simples e eficaz. Eu tinha feito algo parecido, até deixei aqui → https://brmodstudio.forumeiros.com/t7046p250-project-jobworker
não sei se o dono da tc aproveitara para algo já que é só rascunho para ajudar em outras coisas, mas era um menu onde eu colocava os trabalhos que eu estava fazendo no momento em um arquivo ini, pelo menu eu encerava e iniciava a qualquer momento.
não sei se o dono da tc aproveitara para algo já que é só rascunho para ajudar em outras coisas, mas era um menu onde eu colocava os trabalhos que eu estava fazendo no momento em um arquivo ini, pelo menu eu encerava e iniciava a qualquer momento.
- P_HMensagens Nível 1
- Mensagens : 12
Reputação : 0
Desde : 22/05/2017
Com o seguinte script esperava alterar a cor de uma zona, simplesmente modificando a densidade de uma gangue na mesma. Assim que eu executo o mesmo, ele aplica a nova densidade mas a cor da área não é atualizada (se for o caso), apenas após eu salvar o game e recarrega-lo.
Busquei mas não encontrei uma forma de alterar a cor das gangues durante o jogo.
Até encontrei este mod para Android que modifica a gangue da zona atual instantaneamente (sem precisar salvar e recarregar) mas nada sobre mudar a cor da gangue.
Gang Zone Editor (in-game) Beta - Android
Mas confesso que não compreendi estas duas linhas (como ele conseguiu o endereço de memória daquela zone):
- Spoiler:
- Código:
require 'lib.moonloader'
local vk = require 'lib.vkeys'
--local memory = require 'memory'
function main()
while true
do wait(0)
if isPlayerPlaying(PLAYER_HANDLE)
and not isPlayerDead(PLAYER_HANDLE)
and (wasKeyPressed(vk.VK_J) or wasKeyPressed(vk.VK_K))
then
local x, y, z = getCharCoordinates(PLAYER_PED)
local zone = getNameOfInfoZone(getCharCoordinates(PLAYER_PED)) -- 0843
--local city = getCityPlayerIsIn(PLAYER_HANDLE) -- Only 0, 1, 2, 3
local city = getCityFromCoords(getCharCoordinates(PLAYER_PED)) -- 07EF
if wasKeyPressed(vk.VK_J)
then
local biggest_gang = 0
for i=0, 9
do wait(0)
if getZoneGangStrength(zone, i) > getZoneGangStrength(zone, biggest_gang)
then
biggest_gang = i
end
setZoneGangStrength(zone, i, 0)
end
setZoneDealerStrength(zone, 0)
setZoneGangStrength(zone, biggest_gang, 90)
printString(city .. " - " .. zone .. " - " .. biggest_gang, 1000)
else if wasKeyPressed(vk.VK_K)
then
printString(city .. " - " .. zone
.. " - 0:" .. getZoneGangStrength(zone, 0)
.. " - 1:" .. getZoneGangStrength(zone, 1)
.. " - 2:" .. getZoneGangStrength(zone, 2)
.. " - 3:" .. getZoneGangStrength(zone, 3)
.. " - 4:" .. getZoneGangStrength(zone, 4)
.. " - 5:" .. getZoneGangStrength(zone, 5)
.. " - 6:" .. getZoneGangStrength(zone, 6)
.. " - 7:" .. getZoneGangStrength(zone, 7)
.. " - 8:" .. getZoneGangStrength(zone, 8)
.. " - 9:" .. getZoneGangStrength(zone, 9)
.. " - D:" .. getZoneDealerStrength(zone)
, 1000)
end
end
while wasKeyPressed(vk.VK_J)
or wasKeyPressed(vk.VK_K)
do wait(0)
end
end
end
end
Busquei mas não encontrei uma forma de alterar a cor das gangues durante o jogo.
Até encontrei este mod para Android que modifica a gangue da zona atual instantaneamente (sem precisar salvar e recarregar) mas nada sobre mudar a cor da gangue.
Gang Zone Editor (in-game) Beta - Android
- Spoiler:
- Código:
{$CLEO .csi}
http://GZedit.txt
03A4: name_thread 'GZEDIT'
///// INIT
0001: wait 0 ms
00BC: show_text_highpriority GXT 'FELD_WR' time 1000 flag 1 // " loading data , please wait " txt
0001: wait 100 ms
0DD0: 0@ = get_label_addr @_ZN9CPopCycle15m_pCurrZoneInfoE
0DD1: 0@ = get_func_addr_by_cstr_name 0@ // current zone info
0001: wait 100 ms
0006: 1@ = 0x00 // local ( store current zone )
0006: 2@ = 0x00 // gang id & offsets
0006: 3@ = 0x00 // P&C rezone
0879: enable_gang_wars 1
0629: change_integer_stat 337 to 1
0001: wait 1500 ms
0002: jump @SGAtxt
///// " SELECT ... GANG AREA " TXT
:SGAtxt
0001: wait 0 ms
00BE: text_clear_all
00BA: show_text_styled GXT "FEI_SEL" time 1000 style 8 // " select " txt
00BA: show_text_styled GXT "FED_BL5" time 1000 style 7 // " gang area " txt
00BA: show_text_styled GXT "LG_01" time 1000 style 5 // " player position " txt
00BA: show_text_styled GXT "FEM_OK" time 1000 style 4 // " OK " txt
00BC: show_text_highpriority GXT 'PLA_21' time 1000 flag 1 // " exit " txt
00D6: if
00E1: key_pressed 3 touch_point 6 // center screen touch
004D: jump_if_false @ZoneID
0002: jump @EndS
///// READ & STORE CURRENT ZONE
:ZoneID
0001: wait 0 ms
00D6: if
00E1: key_pressed 3 touch_point 5 // center screen touch
004D: jump_if_false @SGAtxt
0DD8: 1@ = read_mem_addr 0@ size 4 add_ib 0 // read & store current zone
00BE: text_clear_all
00BA: show_text_styled GXT "FED_BL5" time 2000 style 5 // " gang area " txt
00BA: show_text_styled GXT "FESZ_LS" time 2000 style 6 // " load succesfull " txt
00BC: show_text_highpriority GXT 'FEM_PWT' time 2000 flag 1 // " please wait ... " txt
0001: wait 3000 ms
0002: jump @ClearZ
///// CLEAR ZONE GANG DENSITIES & ADD DEALERS
:ClearZ
0001: wait 0 ms
0DD9: write_mem_addr 1@ value 0x00 size 1 add_ib 0 protect 0 // clear ballas
000A: 1@ += 0x01
0DD9: write_mem_addr 1@ value 0x00 size 1 add_ib 0 protect 0 // clear groove
000A: 1@ += 0x01
0DD9: write_mem_addr 1@ value 0x00 size 1 add_ib 0 protect 0 // clear vagos
000A: 1@ += 0x01
0DD9: write_mem_addr 1@ value 0x00 size 1 add_ib 0 protect 0 // clear rifa
000A: 1@ += 0x01
0DD9: write_mem_addr 1@ value 0x00 size 1 add_ib 0 protect 0 // clear danang
000A: 1@ += 0x01
0DD9: write_mem_addr 1@ value 0x00 size 1 add_ib 0 protect 0 // clear mafia
000A: 1@ += 0x01
0DD9: write_mem_addr 1@ value 0x00 size 1 add_ib 0 protect 0 // clear triads
000A: 1@ += 0x01
0DD9: write_mem_addr 1@ value 0x00 size 1 add_ib 0 protect 0 // clear aztecas
000A: 1@ += 0x03
0DD9: write_mem_addr 1@ value 0x0A size 1 add_ib 0 protect 0 // add delears 0x0A
000A: 1@ += 0x05
0DD8: 3@ = read_mem_addr 1@ size 1 add_ib 0 // read P&C
0879: enable_gang_wars 0
0002: jump @CzoneA
///// REZONE CHECK A
:CzoneA
0001: wait 0 ms
00D6: if
0029: 3@ >= 0x0E // avoid = P&C 15+ settings
004D: jump_if_false @CzoneB
0209: 3@ = random_int_in_ranges 0 15 // random P&C
0002: jump @Rezone
///// REZONE CHECK B
:CzoneB
0001: wait 0 ms
00D6: if or
0039: 3@ == 0x01 // avoid = P&C 1 setting
0039: 3@ == 0x03 // avoid = P&C 3 setting
004D: jump_if_false @SGCtxt
0209: 3@ = random_int_in_ranges 0 15 // random P&C
0002: jump @Rezone
///// REZONE
:Rezone
0001: wait 0 ms
0DD9: write_mem_addr 1@ value 3@ size 1 add_ib 0 protect 0 // write " random " P&C
0002: jump @CzoneA
///// " SELECT ... GANG CONTROL " TXT
:SGCtxt
0001: wait 0 ms
000E: 1@ -= 0x0F
00BA: show_text_styled GXT "FEI_SEL" time 3000 style 5 // " select " txt
00BA: show_text_styled GXT "FEC_GAN" time 3000 style 6 // " gang control " txt
00BC: show_text_highpriority GXT 'FEM_PWT' time 3000 flag 1 // " please wait ... " txt
0001: wait 4000 ms
0002: jump @G0txt
///// BALLAS
:G0txt
0001: wait 0 ms
00D6: if
0039: 2@ == 0x00
004D: jump_if_false @G1txt
00BE: text_clear_all
00BA: show_text_styled GXT "FEI_SCR" time 1000 style 8 // " scroll " txt
00BA: show_text_styled GXT "FES_GAN" time 1000 style 7 // " gangs "
00BA: show_text_styled GXT "ST_GNG0" time 1000 style 5 // " ballas " txt
00BA: show_text_styled GXT "FEM_OK" time 1000 style 4 // " OK " txt
00BC: show_text_highpriority GXT 'FEC_GAM' time 1000 flag 1 // " gang active mode "
00D6: if
00E1: key_pressed 3 touch_point 4 // top center screen touch
004D: jump_if_false @G0set
0001: wait 500 ms
0006: 2@ = 0x01
0002: jump @G0txt
:G0set
0001: wait 0 ms
00D6: if
00E1: key_pressed 3 touch_point 5 // center screen touch
004D: jump_if_false @G0txt
0DD9: write_mem_addr 1@ value 0x32 size 1 add_ib 0 protect 0 // add ballas density 0x32
00BE: text_clear_all
00BA: show_text_styled GXT "FEC_GAN" time 1500 style 5 // " gang control " txt
00BA: show_text_styled GXT "FESZ_LS" time 1500 style 6 // " load succesfull " txt
00BC: show_text_highpriority GXT 'FEM_PWT' time 2000 flag 1 // " please wait ... " txt
0879: enable_gang_wars 1
0001: wait 2000 ms
0002: jump @SGAtxt
///// GROOVE
:G1txt
0001: wait 0 ms
00D6: if
0039: 2@ == 0x01
004D: jump_if_false @G2txt
00BE: text_clear_all
00BA: show_text_styled GXT "FEI_SCR" time 1000 style 8 // " scroll " txt
00BA: show_text_styled GXT "FES_GAN" time 1000 style 7 // " gangs " txt
00BA: show_text_styled GXT "ST_GNG1" time 1000 style 5 // " groove " txt
00BA: show_text_styled GXT "FEM_OK" time 1000 style 4 // " OK " txt
00BC: show_text_highpriority GXT 'FEC_GAM' time 1000 flag 1 // " gang active mode "
00D6: if
00E1: key_pressed 3 touch_point 4 // top center screen touch
004D: jump_if_false @G1set
0001: wait 500 ms
0006: 2@ = 0x02
0002: jump @G1txt
:G1set
0001: wait 0 ms
00D6: if
00E1: key_pressed 3 touch_point 5 // center screen touch
004D: jump_if_false @G1txt
005A: 1@ += 2@
0DD9: write_mem_addr 1@ value 0x32 size 1 add_ib 0 protect 0 // add groove density 0x32
0062: 1@ -= 2@
0006: 2@ = 0x00
00BE: text_clear_all
00BA: show_text_styled GXT "FEC_GAN" time 1500 style 5 // " gang control " txt
00BA: show_text_styled GXT "FESZ_LS" time 1500 style 6 // " load succesfull " txt
00BC: show_text_highpriority GXT 'FEM_PWT' time 2000 flag 1 // " please wait ... " txt
0879: enable_gang_wars 1
0001: wait 2000 ms
0002: jump @SGAtxt
///// VAGOS
:G2txt
0001: wait 0 ms
00D6: if
0039: 2@ == 0x02
004D: jump_if_false @G3txt
00BE: text_clear_all
00BA: show_text_styled GXT "FEI_SCR" time 1000 style 8 // " scroll " txt
00BA: show_text_styled GXT "FES_GAN" time 1000 style 7 // " gangs " txt
00BA: show_text_styled GXT "ST_GNG2" time 1000 style 5 // " vagos " txt
00BA: show_text_styled GXT "FEM_OK" time 1000 style 4 // " OK " txt
00BC: show_text_highpriority GXT 'FEC_GAM' time 1000 flag 1 // " gang active mode "
00D6: if
00E1: key_pressed 3 touch_point 4 // top center screen touch
004D: jump_if_false @G2set
0001: wait 500 ms
0006: 2@ = 0x03
0002: jump @G2txt
:G2set
0001: wait 0 ms
00D6: if
00E1: key_pressed 3 touch_point 5 // center screen touch
004D: jump_if_false @G2txt
005A: 1@ += 2@
0DD9: write_mem_addr 1@ value 0x32 size 1 add_ib 0 protect 0 // add vagos density 0x32
0062: 1@ -= 2@
0006: 2@ = 0x00
00BE: text_clear_all
00BA: show_text_styled GXT "FEC_GAN" time 1500 style 5 // " gang control " txt
00BA: show_text_styled GXT "FESZ_LS" time 1500 style 6 // " load succesfull " txt
00BC: show_text_highpriority GXT 'FEM_PWT' time 2000 flag 1 // " please wait ... " txt
0879: enable_gang_wars 1
0001: wait 2000 ms
0002: jump @SGAtxt
///// RIFA
:G3txt
0001: wait 0 ms
00D6: if
0039: 2@ == 0x03
004D: jump_if_false @G4txt
00BE: text_clear_all
00BA: show_text_styled GXT "FEI_SCR" time 1000 style 8 // " scroll " txt
00BA: show_text_styled GXT "FES_GAN" time 1000 style 7 // " gangs " txt
00BA: show_text_styled GXT "ST_GNG3" time 1000 style 5 // " rifa " txt
00BA: show_text_styled GXT "FEM_OK" time 1000 style 4 // " OK " txt
00BC: show_text_highpriority GXT 'FEC_GPM' time 1000 flag 1 // " gang passive mode "
00D6: if
00E1: key_pressed 3 touch_point 4 // top center screen touch
004D: jump_if_false @G3set
0001: wait 500 ms
0006: 2@ = 0x04
0002: jump @G3txt
:G3set
0001: wait 0 ms
00D6: if
00E1: key_pressed 3 touch_point 5 // center screen touch
004D: jump_if_false @G3txt
005A: 1@ += 2@
0DD9: write_mem_addr 1@ value 0x32 size 1 add_ib 0 protect 0 // add rifa density 0x32
0062: 1@ -= 2@
0006: 2@ = 0x00
00BE: text_clear_all
00BA: show_text_styled GXT "FEC_GAN" time 1500 style 5 // " gang control " txt
00BA: show_text_styled GXT "FESZ_LS" time 1500 style 6 // " load succesfull " txt
00BC: show_text_highpriority GXT 'FEM_PWT' time 2000 flag 1 // " please wait ... " txt
0879: enable_gang_wars 1
0001: wait 2000 ms
0002: jump @SGAtxt
///// DANANG
:G4txt
0001: wait 0 ms
00D6: if
0039: 2@ == 0x04
004D: jump_if_false @G5txt
00BE: text_clear_all
00BA: show_text_styled GXT "FEI_SCR" time 1000 style 8 // " scroll " txt
00BA: show_text_styled GXT "FES_GAN" time 1000 style 7 // " gangs " txt
00BA: show_text_styled GXT "ST_GNG4" time 1000 style 5 // " danang " txt
00BA: show_text_styled GXT "FEM_OK" time 1000 style 4 // " OK " txt
00BC: show_text_highpriority GXT 'FEC_GPM' time 1000 flag 1 // " gang passive mode "
00D6: if
00E1: key_pressed 3 touch_point 4 // top center screen touch
004D: jump_if_false @G4set
0001: wait 500 ms
0006: 2@ = 0x05
0002: jump @G4txt
:G4set
0001: wait 0 ms
00D6: if
00E1: key_pressed 3 touch_point 5 // center screen touch
004D: jump_if_false @G4txt
005A: 1@ += 2@
0DD9: write_mem_addr 1@ value 0x32 size 1 add_ib 0 protect 0 // add danang density 0x32
0062: 1@ -= 2@
0006: 2@ = 0x00
00BE: text_clear_all
00BA: show_text_styled GXT "FEC_GAN" time 1500 style 5 // " gang control " txt
00BA: show_text_styled GXT "FESZ_LS" time 1500 style 6 // " load succesfull " txt
00BC: show_text_highpriority GXT 'FEM_PWT' time 2000 flag 1 // " please wait ... " txt
0879: enable_gang_wars 1
0001: wait 2000 ms
0002: jump @SGAtxt
///// MAFIA
:G5txt
0001: wait 0 ms
00D6: if
0039: 2@ == 0x05
004D: jump_if_false @G6txt
00BE: text_clear_all
00BA: show_text_styled GXT "FEI_SCR" time 1000 style 8 // " scroll " txt
00BA: show_text_styled GXT "FES_GAN" time 1000 style 7 // " gangs " txt
00BA: show_text_styled GXT "ST_GNG5" time 1000 style 5 // " mafia " txt
00BA: show_text_styled GXT "FEM_OK" time 1000 style 4 // " OK " txt
00BC: show_text_highpriority GXT 'FEC_GPM' time 1000 flag 1 // " gang passive mode "
00D6: if
00E1: key_pressed 3 touch_point 4 // top center screen touch
004D: jump_if_false @G5set
0001: wait 500 ms
0006: 2@ = 0x06
0002: jump @G5txt
:G5set
0001: wait 0 ms
00D6: if
00E1: key_pressed 3 touch_point 5 // center screen touch
004D: jump_if_false @G5txt
005A: 1@ += 2@
0DD9: write_mem_addr 1@ value 0x32 size 1 add_ib 0 protect 0 // add mafia density 0x32
0062: 1@ -= 2@
0006: 2@ = 0x00
00BE: text_clear_all
00BA: show_text_styled GXT "FEC_GAN" time 1500 style 5 // " gang control " txt
00BA: show_text_styled GXT "FESZ_LS" time 1500 style 6 // " load succesfull " txt
00BC: show_text_highpriority GXT 'FEM_PWT' time 2000 flag 1 // " please wait ... " txt
0879: enable_gang_wars 1
0001: wait 2000 ms
0002: jump @SGAtxt
///// TRIADS
:G6txt
0001: wait 0 ms
00D6: if
0039: 2@ == 0x06
004D: jump_if_false @G7txt
00BE: text_clear_all
00BA: show_text_styled GXT "FEI_SCR" time 1000 style 8 // " scroll " txt
00BA: show_text_styled GXT "FES_GAN" time 1000 style 7 // " gangs " txt
00BA: show_text_styled GXT "ST_GNG6" time 1000 style 5 // " triad " txt
00BA: show_text_styled GXT "FEM_OK" time 1000 style 4 // " OK " txt
00BC: show_text_highpriority GXT 'FEC_GPM' time 1000 flag 1 // " gang passive mode "
00D6: if
00E1: key_pressed 3 touch_point 4 // top center screen touch
004D: jump_if_false @G6set
0001: wait 500 ms
0006: 2@ = 0x07
0002: jump @G6txt
:G6set
0001: wait 0 ms
00D6: if
00E1: key_pressed 3 touch_point 5 // center screen touch
004D: jump_if_false @G6txt
005A: 1@ += 2@
0DD9: write_mem_addr 1@ value 0x32 size 1 add_ib 0 protect 0 // add triad density 0x32
0062: 1@ -= 2@
0006: 2@ = 0x00
00BE: text_clear_all
00BA: show_text_styled GXT "FEC_GAN" time 1500 style 5 // " gang control " txt
00BA: show_text_styled GXT "FESZ_LS" time 1500 style 6 // " load succesfull " txt
00BC: show_text_highpriority GXT 'FEM_PWT' time 2000 flag 1 // " please wait ... " txt
0879: enable_gang_wars 1
0001: wait 2000 ms
0002: jump @SGAtxt
///// AZTECAS
:G7txt
0001: wait 0 ms
00D6: if
0039: 2@ == 0x07
004D: jump_if_false @G0txt
00BE: text_clear_all
00BA: show_text_styled GXT "FEI_SCR" time 1000 style 8 // " scroll " txt
00BA: show_text_styled GXT "FES_GAN" time 1000 style 7 // " gangs " txt
00BA: show_text_styled GXT "ST_GNG7" time 1000 style 5 // " aztecas " txt
00BA: show_text_styled GXT "FEM_OK" time 1000 style 4 // " OK " txt
00BC: show_text_highpriority GXT 'FEC_GPM' time 1000 flag 1 // " gang passive mode "
00D6: if
00E1: key_pressed 3 touch_point 4 // top center screen touch
004D: jump_if_false @G7set
0001: wait 500 ms
0006: 2@ = 0x00
0002: jump @G0txt
:G7set
0001: wait 0 ms
00D6: if
00E1: key_pressed 3 touch_point 5 // center screen touch
004D: jump_if_false @G7txt
005A: 1@ += 2@
0DD9: write_mem_addr 1@ value 0x32 size 1 add_ib 0 protect 0 // add aztecas density 0x32
0062: 1@ -= 2@
0006: 2@ = 0x00
00BE: text_clear_all
00BA: show_text_styled GXT "FEC_GAN" time 1500 style 5 // " gang control " txt
00BA: show_text_styled GXT "FESZ_LS" time 1500 style 6 // " load succesfull " txt
00BC: show_text_highpriority GXT 'FEM_PWT' time 2000 flag 1 // " please wait ... " txt
0879: enable_gang_wars 1
0001: wait 2000 ms
0002: jump @SGAtxt
:EndS
0001: wait 0 ms
00BE: text_clear_all
00BA: show_text_styled GXT "B_THX_1" time 2000 style 4 // " thank you, sir, have a nice day " txt
00BC: show_text_highpriority GXT 'AMUBYE' time 2000 flag 1 // " come back again " txt
0001: wait 2000 ms
end_thread
///// LABEL
:_ZN9CPopCycle15m_pCurrZoneInfoE
hex
"_ZN9CPopCycle15m_pCurrZoneInfoE" 00
Mas confesso que não compreendi estas duas linhas (como ele conseguiu o endereço de memória daquela zone):
- Código:
0DD0: 0@ = get_label_addr @_ZN9CPopCycle15m_pCurrZoneInfoE
0DD1: 0@ = get_func_addr_by_cstr_name 0@ // current zone info
Tente chamar a função 0x00443FF0 enviando nenhum argumento e sem nenhum retorno. (eu sei lá como é no MoonLoader)
Ela atualiza as zonas do mapa, tenho quase certeza que também atualizará isso. (edit: tenho 99,9999% de certeza)
Ela atualiza as zonas do mapa, tenho quase certeza que também atualizará isso. (edit: tenho 99,9999% de certeza)
- P_HMensagens Nível 1
- Mensagens : 12
Reputação : 0
Desde : 22/05/2017
Poderia me dar mais detalhes sobre esta função (0x00443FF0) ? Obrigado!
- CloudScripter CLEO - Avançado
- Nick anterior : Israel
Título : Baiano
Mensagens : 858
Reputação : 138
Desde : 22/09/2015
Muitas formas.@Junior_Djjr escreveu:(eu sei lá como é no MoonLoader)
Duas delas:
- Código:
callFunction(0x00443FF0, 0, 0)
ffi.cast("void(*)()", 0x00443FF0)()
______________________________
Everyone gonna remember my name !
- NexScripter CLEO - Intermediário
- Mensagens : 1240
Reputação : 99
Desde : 04/03/2013
Idade : 20
Outra maneira de fazer a segunda que o @Israel mostrou, que eu acho melhor:
- Código:
local ffi = require("ffi")
local makeAllZonesAvailableForWars = ffi.cast("void(*)()", 0x00443FF0)
function main()
while true do
wait(1000)
makeAllZonesAvailableForWars()
end
end
↑ Daria para chamar funções do bass.dll com isto ai? Não sei se estão fazendo lib's para o moonloader, seria facil ter novas funções no jogo compartilhadas por elas tipo acontece com o MoonAdditions só usando require.
__________________
Aproveitando para perguntar se a tem nova versão do moonloader disponível porque vi que tem novas funções bem interessantes
__________________
Aproveitando para perguntar se a tem nova versão do moonloader disponível porque vi que tem novas funções bem interessantes

.024-beta
Novas funções para obter o controle de todos os objetos, personagens e transporte: getAllObjects, getAllChars, getAllVehicles
https://blast.hk/wiki/moonloader:changelog
@Um Geek escreveu:↑ Daria para chamar funções do bass.dll com isto ai? Não sei se estão fazendo lib's para o moonloader, seria facil ter novas funções no jogo compartilhadas por elas tipo acontece com o MoonAdditions só usando require.
Se você puder usar o LoadLibrary e GetProcAddress do Kernel32.dll dá para usar com o FFI e chamar as funções da bass.
______________________________

Modifico quase qualquer coisa. :)
------------------>>>http://gtamodvicio.blogspot.com/ <<<------------------

Meu PC:
- Spoiler:
Configurações PC:
*Processador: Intel Core i7 4790K 4.00GHz LGA1150
*Placa Mãe: GIGABYTE GA-H97M-D3H Intel (LGA1150)
*HD: 1TB Seagate Barracuda 64MB Sata III 7200RPM (2x - RAID 0)
*HD²: SAMSUNG M3 Externo USB 5400RPM 1TB
*Placa de vídeo: Nvidia GTX660 2GB DDR5 192bit EVGA
*RAM: 8GB DDR3 1600MHZ Kingston HYPER X BEAST (2x4GB)
*Fonte: Corsair 600W Reais CX600M Modular - CP-9020060-WW (80 Plus Bronze)
*Gabinete: Gabinete Raidmax Super Hurricane Branco - 248WB
*Monitor: LG 23MP55HQ Full HD HDMI 23'
- NexScripter CLEO - Intermediário
- Mensagens : 1240
Reputação : 99
Desde : 04/03/2013
Idade : 20
https://blast.hk/wiki/lua:loaddynamiclibrary
https://blast.hk/wiki/lua:getdynamiclibraryprocedure
https://blast.hk/wiki/lua:freedynamiclibrary
Acho que já sabe o que fazer, né?
Essas funções estão ai faz um tempo, a última versão foi lançada ano passado. Já usei essas funções de pegar as pools, bem massa.
https://blast.hk/wiki/lua:getdynamiclibraryprocedure
https://blast.hk/wiki/lua:freedynamiclibrary
Acho que já sabe o que fazer, né?
Essas funções estão ai faz um tempo, a última versão foi lançada ano passado. Já usei essas funções de pegar as pools, bem massa.
@Fabio escreveu:@Um Geek escreveu:↑ Daria para chamar funções do bass.dll com isto ai? Não sei se estão fazendo lib's para o moonloader, seria facil ter novas funções no jogo compartilhadas por elas tipo acontece com o MoonAdditions só usando require.
Se você puder usar o LoadLibrary e GetProcAddress do Kernel32.dll dá para usar com o FFI e chamar as funções da bass.
Parece esta a cima do que consigo fazer, até porque não entendo tanto desta parte de dll's, vou tentar converter algo simples que já exista em cleo e ver o que consigo fazer.
@Nex escreveu:https://blast.hk/wiki/lua:loaddynamiclibrary
https://blast.hk/wiki/lua:getdynamiclibraryprocedure
https://blast.hk/wiki/lua:freedynamiclibrary
Acho que já sabe o que fazer, né?
Essas funções estão ai faz um tempo, a última versão foi lançada ano passado. Já usei essas funções de pegar as pools, bem massa.
Estas funções eu até conheço, já consegui carregar a library e até funções, mas na hora de executar algo que da ruim kk
Estive um tempo atras quebrando a cabeça tentando fazer um mp3player no jogo usando mais que os opcodes e não consegui algo legal.
_________________
vou checar se já tem no meu já que baixei estes dias, vai ver minha lista de referencia do moonloader esta velha já.
- NexScripter CLEO - Intermediário
- Mensagens : 1240
Reputação : 99
Desde : 04/03/2013
Idade : 20
Acho que não atualizaram a lista.@Um Geek escreveu:vou checar se já tem no meu já que baixei estes dias, vai ver minha lista de referencia do moonloader esta velha já.
Página 1 de 2 • 1, 2 

Permissão deste fórum:
Você não pode responder aos tópicos neste fórum
|
|