GTAMP.com

Grand Theft Auto Media Press
It is currently Tue Oct 17, 2017 3:53 am

All times are UTC




Post new topic Reply to topic  [ 88 posts ]  Go to page Previous  1, 2, 3, 4, 5
Author Message
PostPosted: Wed Oct 11, 2017 2:17 pm 
Offline
User avatar

Joined: Fri Jan 29, 2010 3:00 pm
Posts: 948
Location: F21B3EED
Sektor wrote:
Don’t make it too smart, a counter can contain a player address and is used that way in some of my scripts.

Yeah, actually it might be more interesting if there were no limitations at all. Might open new doors for new hacks. Although, there probably should be an option to enable "safe mode" which prevents accidental bugs.

_________________
My GTA2 related projects:


Top
 Profile  
 
PostPosted: Sat Oct 14, 2017 9:28 am 
Offline
User avatar

Joined: Fri Apr 24, 2009 9:43 pm
Posts: 503
Location: Estonia
T.M
do you have ID numbers of all occupations listed here?

https://projectcerbera.com/gta/2/tutorials/character-ai

I only have these
Code:
      OccupTypes[L"no_occupation"] = 51;
      OccupTypes[L"dummy"] = 3;
      OccupTypes[L"psycho"] = 14;
      OccupTypes[L"mugger"] = 15;
      OccupTypes[L"bank_robber"] = 17;
      OccupTypes[L"criminal_type1"] = 33;
      OccupTypes[L"criminal_type2"] = 34;
      OccupTypes[L"tank_driver"] = 36;
      OccupTypes[L"drone"] = 41;
      OccupTypes[L"refugees"] = 45;
      OccupTypes[L"any_law_enforcement"] = 46;
      OccupTypes[L"any_emergency_service_man"] = 47;
      OccupTypes[L"any_gang_member"] = 48;
      OccupTypes[L"any_elvis"] = 49;
      OccupTypes[L"fireman"] = 38;


Thanks.

In the meantime i try to figure them out..

_________________
Always wear safety glasses while programming.


Top
 Profile  
 
PostPosted: Sat Oct 14, 2017 9:34 am 
Offline
Boss
User avatar

Joined: Tue Mar 04, 2008 6:51 am
Posts: 1283
Location: GTAMP.com
viewtopic.php?f=4&t=700&hilit=Occupations&start=20#p9464


Top
 Profile  
 
PostPosted: Sat Oct 14, 2017 9:40 am 
Offline
User avatar

Joined: Fri Apr 24, 2009 9:43 pm
Posts: 503
Location: Estonia
Yes, good but im wondering why this:
"These aren't in the compiler and can't be set with SET_CHAR_OCCUPATION command."

Is this fact or... ?

If they are not in compiler how it compiles these then?

SET_CHAR_OCCUPATION needs his special list ?


Weird

_________________
Always wear safety glasses while programming.


Top
 Profile  
 
PostPosted: Sat Oct 14, 2017 9:52 am 
Offline
Boss
User avatar

Joined: Tue Mar 04, 2008 6:51 am
Posts: 1283
Location: GTAMP.com
Maybe you can set them with your own compiler, just not with official compiler. Gta2 might use that command to set occupations like medic or another command, either way it doesn’t have the same restrictions as the compiler.


Top
 Profile  
 
PostPosted: Sat Oct 14, 2017 10:04 am 
Offline
User avatar

Joined: Fri Apr 24, 2009 9:43 pm
Posts: 503
Location: Estonia
Ok, i will test the SET_CHAR_OCCUPATION today.

I now implemented the CREATE_CHAR.

Thanks for the occup. list Sektor.

This now compiles also. Nothing new to implement, just copy paste code pieces.

100% match with miss2 scr file.

Syntax: [ Download ] [ Hide ]
Using GTA2 Script Syntax Highlighting
PLAYER_PED shaft = ( 232.5 , 192.0 , 2.0 ) 0 0           
char_data bot1
char_data bot2
char_data bot3
char_data bot4
char_data bot5
char_data bot6
char_data bot7
char_data bot8
char_data bot9
bot2 = CREATE_CHAR ( 134.5 , 102.0 ) 24 270 player END
bot2 = CREATE_CHAR ( 134.5 , 102.0 , 2.0 ) 24 270 dummy END
bot3 = CREATE_CHAR ( 134.5 , 102.0 , 2.0 ) 24 270 psycho END
bot4 = CREATE_CHAR ( 134.5 , 102.0 , 2.0 ) 24 270 mugger END
bot5 = CREATE_CHAR ( 134.5 , 102.0 , 2.0 ) 24 270 carthief END
bot6 = CREATE_CHAR ( 134.5 , 102.0 , 2.0 ) 24 270 bank_robber END
bot7 = CREATE_CHAR ( 134.5 , 102.0 , 2.0 ) 24 270 criminal END
bot8 = CREATE_CHAR ( 134.5 , 102.0 , 2.0 ) 24 270 elvis END
bot9 = CREATE_CHAR ( 134.5 , 102.0 , 2.0 ) 24 270 police END//
bot1 = CREATE_CHAR ( 134.5 , 102.0 , 2.0 ) 24 270 swat END
bot2 = CREATE_CHAR ( 134.5 , 102.0 , 2.0 ) 24 270 fbi END
bot3 = CREATE_CHAR ( 134.5 , 102.0 , 2.0 ) 24 270 army END
bot4 = CREATE_CHAR ( 134.5 , 102.0 , 2.0 ) 24 270 guard END
bot5 = CREATE_CHAR ( 134.5 , 102.0 , 2.0 ) 24 270 GUARD_AGAINST_PLAYER END
bot6 = CREATE_CHAR ( 134.5 , 102.0 , 2.0 ) 24 270 criminal_type1 END
bot7 = CREATE_CHAR ( 134.5 , 102.0 , 2.0 ) 24 270 criminal_type2 END
bot8 = CREATE_CHAR ( 134.5 , 102.0 , 2.0 ) 24 270 SPECIAL_GROUP_MEMBER END
bot9 = CREATE_CHAR ( 134.5 , 102.0 , 2.0 ) 24 270 TANK_DRIVER END
bot1 = CREATE_CHAR ( 134.5 , 102.0 , 2.0 ) 24 270 fireman END
bot2 = CREATE_CHAR ( 134.5 , 102.0 , 2.0 ) 24 270 ROAD_BLOCK_TANK_MAN END
bot3 = CREATE_CHAR ( 134.5 , 102.0 , 2.0 ) 24 270 DRONE END
bot4 = CREATE_CHAR ( 134.5 , 102.0 , 2.0 ) 24 270 STAND_STILL_BLOKE END
bot5 = CREATE_CHAR ( 134.5 , 102.0 , 2.0 ) 24 270 ELVIS_LEADER END
bot6 = CREATE_CHAR ( 134.5 , 102.0 , 2.0 ) 24 270 REFUGEES END
bot7 = CREATE_CHAR ( 134.5 , 102.0 , 2.0 ) 24 270 ANY_LAW_ENFORCEMENT END
bot8 = CREATE_CHAR ( 134.5 , 102.0 , 2.0 ) 24 270 ANY_EMERGENCY_SERVICE_MAN END
bot9 = CREATE_CHAR ( 134.5 , 102.0 , 2.0 ) 24 270 ANY_GANG_MEMBER END
bot8 = CREATE_CHAR ( 134.5 , 102.0 , 2.0 ) 24 270 ANY_ELVIS END
bot9 = CREATE_CHAR ( 134.5 , 102.0 , 2.0 ) 24 270 NO_OCCUPATION END



LEVELSTART

LEVELEND
Parsed in 0.013 seconds, using GeSHi 1.0.8.10


But i dont update the attached compiler each time.
I will do some "small" major things and then i will update the attached compiler.


EDIT: scripting doc says about SET_CHAR_OBJECTIVE: "Not applicable to the player’s char!"

This is something!

_________________
Always wear safety glasses while programming.


Top
 Profile  
 
PostPosted: Sat Oct 14, 2017 11:39 am 
Offline
User avatar

Joined: Fri Jan 29, 2010 3:00 pm
Posts: 948
Location: F21B3EED
B-$hep wrote:
T.M
do you have ID numbers of all occupations listed here?

My decompiler has all strings that are decompileable, check the sources, i cant remember how much there are actually. Should be all though.

viewtopic.php?f=4&t=447

Hope that helps.

_________________
My GTA2 related projects:


Top
 Profile  
 
PostPosted: Sat Oct 14, 2017 2:00 pm 
Offline
User avatar

Joined: Fri Apr 24, 2009 9:43 pm
Posts: 503
Location: Estonia
Ok, i will try to work out the missionscript stuff.
I have read previously and looked inside mission script .scr files, they are a bit different on the top but rest should be same.
But i take a fresh look.

Trying to figure out where the pointers point to.

And maybe i can even test a little mission script compiled by gta2miss09 later today in GTA2.

Currently i just have base script:
Syntax: [ Download ] [ Hide ]
Using GTA2 Script Syntax Highlighting
PLAYER_PED shaft = ( 232.5 , 192.0 , 2.0 ) 25 0          
LEVELSTART
launch_mission(test2.mis)
LEVELEND
Parsed in 0.008 seconds, using GeSHi 1.0.8.10


and that missionscript test2:
Syntax: [ Download ] [ Hide ]
Using GTA2 Script Syntax Highlighting
missionstart

missionend
Parsed in 0.008 seconds, using GeSHi 1.0.8.10


But of course writing of the test2.scr isnt working, well it kinda works but the pointers at the top should be generated correctly.
And maybe something else.


DO_PHONE_TEMPLATE,etc also needs special handling.

If i implement the multiscript support fully and the NOT command then i basically can try to compile that example included: BIL.MIS, with all other scripts in bil folder and see how it goes.
But i think there is also some DOOR related commands that are not working fully. I must have a look

Another thing is that i can "comment" or remove all unneeded mission script stuff from bil.mis and just compile the important things.
Makes a bit easier to debug if GTA2 crashes for some reason.
Easier to compare scr files (or whats important, find out what command made the crash),if there is not so much code.


EDIT:
After quick look into these 2 scr files above i noticed interesting thing.
Syntax: [ Download ] [ Hide ]
Using GTA2 Script Syntax Highlighting
PLAYER_PED shaft = ( 232.5 , 192.0 , 2.0 ) 25 0          
LEVELSTART
launch_mission(test2.mis)
LEVELEND
Parsed in 0.008 seconds, using GeSHi 1.0.8.10

Is looking like its combined into 1, just files are separately, in game memory they become like 1 script i guess:

Syntax: [ Download ] [ Hide ]
Using GTA2 Script Syntax Highlighting
1 PLAYER_PED shaft = ( 232.5 , 192.0 , 2.0 ) 25 0            
2 LEVELSTART
3 launch_mission(test2.mis)
4 LEVELEND
5 missionstart
6 missionend
 
Parsed in 0.008 seconds, using GeSHi 1.0.8.10


LEVELEND command index is 4
and MISSIONSTART command index is 5.

So script continues in test2.scr file kinda....

_________________
Always wear safety glasses while programming.


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 88 posts ]  Go to page Previous  1, 2, 3, 4, 5

All times are UTC


Who is online

Users browsing this forum: No registered users and 0 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron
Powered by phpBB® Forum Software © phpBB Group