HomeDownloadsFAQSearchRegisterLog in

Share | 
 

 Make player immortal

View previous topic View next topic Go down 
AuthorMessage
gtamodder
Rookie
Rookie
avatar

Male
Number of posts : 86
Age : 23
Warning :
0 / 1000 / 100

Personalized field : actualy, cj360
Points :
0 / 1000 / 100

Registration date : 2008-08-14

PostSubject: Make player immortal   Tue Nov 04, 2008 11:33 pm

So I made this code to change the player from cj to masterchief bad pic I know, but its also supposed to make him immortal though it doesn't
Code:
// This file was decompiled using sascm.ini published by Seemann (http://sannybuilder.com/files/SASCM.rar) on 13.10.2007

{$VERSION 3.1.0027}
{$CLEO .cs}

//-------------MAIN---------------
03A4: name_thread 'HALO_THREAD'

:HALO_THREAD_19
0001: wait 0 ms
0A8D: 0@ = read_memory 9867536 size 4 virtual_protect 0
00D6: if
04A4:  0@ == 1212238927 // @ == any
004D: jump_if_false @HALO_THREAD_19
023C: load_special_actor 'HALO' as 1 // models 290-299
038B: load_requested_models

:HALO_THREAD_73
0001: wait 0 ms
00D6: if
023D:  special_actor 1 loaded
004D: jump_if_false @HALO_THREAD_73
03E5: show_text_box 'CHEAT1'  // Cheat activated
01B4: set_player $PLAYER_CHAR can_move 0
0223: set_actor $PLAYER_ACTOR health_to 10000
02A9: set_actor $PLAYER_ACTOR immune_to_nonplayer 1
02AB: set_actor $PLAYER_ACTOR immunities BP 1 FP 1 EP 1 CP 1 MP 1
0337: set_actor $PLAYER_ACTOR visibility 0
0446: set_actor $PLAYER_ACTOR immune_to_headshots 1
0568: set_actor $PLAYER_ACTOR targetable 0
04D8: set_actor $PLAYER_ACTOR drowns_in_water 0
0330: set_player $PLAYER_CHAR infinite_run 1
0489: set_actor $PLAYER_ACTOR muted 1
09C7: change_player $PLAYER_CHAR model_to #SPECIAL01
004D: jump_if_false @HALO_THREAD_73
070D: rebuild_player $PLAYER_CHAR
01B4: set_player $PLAYER_CHAR can_move 1
0296: unload_special_actor 1
0A8C: write_memory 9867536 size 4 value 0 virtual_protect 0

:HALO_THREAD_226
0001: wait 0 ms
0A8D: 0@ = read_memory 9867536 size 4 virtual_protect 0
00D6: if
04A4:  0@ == 1212238927 // @ == any
004D: jump_if_false @HALO_THREAD_226
0247: load_model #NULL
038B: load_requested_models

:HALO_THREAD_271
0001: wait 0 ms
00D6: if
0248:  model #NULL available
004D: jump_if_false @HALO_THREAD_271
03E5: show_text_box 'CHEAT8'  // Cheat deactivated
01B4: set_player $PLAYER_CHAR can_move 1
09C7: change_player $PLAYER_CHAR model_to #NULL
070D: rebuild_player $PLAYER_CHAR
02A9: set_actor $PLAYER_ACTOR immune_to_nonplayer 0
02AB: set_actor $PLAYER_ACTOR immunities BP 0 FP 0 EP 0 CP 0 MP 0
0337: set_actor $PLAYER_ACTOR visibility 1
0446: set_actor $PLAYER_ACTOR immune_to_headshots 0
0568: set_actor $PLAYER_ACTOR targetable 1
04D8: set_actor $PLAYER_ACTOR drowns_in_water 1
0330: set_player $PLAYER_CHAR infinite_run 0
0489: set_actor $PLAYER_ACTOR muted 0
01B4: set_player $PLAYER_CHAR can_move 1
0249: release_model #NULL
0A8C: write_memory 9867536 size 4 value 0 virtual_protect 0
0001: wait 800 ms
0002: jump @HALO_THREAD_19

Please help!
Back to top Go down
View user profile
VladyF
Administrator
Administrator
avatar

Male
Number of posts : 3414
Age : 23
Location : Romania Navodari
Warning :
0 / 1000 / 100

Personalized field : Nope
Points :
0 / 1000 / 100

Registration date : 2008-01-18

PostSubject: Re: Make player immortal   Wed Nov 05, 2008 12:12 am

I dunno cleo ask kotton or threep
Back to top Go down
View user profile http://www.carbongear.1forum.biz
gtamodder
Rookie
Rookie
avatar

Male
Number of posts : 86
Age : 23
Warning :
0 / 1000 / 100

Personalized field : actualy, cj360
Points :
0 / 1000 / 100

Registration date : 2008-08-14

PostSubject: Re: Make player immortal   Wed Nov 05, 2008 1:36 am

Yea that's what I thought but I'll wait a while so that one of them will see this otherwise I might just pm one of them.
Back to top Go down
View user profile
Kotton
High Carbs
High Carbs
avatar

Male
Number of posts : 318
Location : super-CALI-fragilisticexpialidocious
Warning :
0 / 1000 / 100

Personalized field : SUSPECT ...EVERYTHING
Points :
0 / 1000 / 100

Registration date : 2008-04-01

PostSubject: Re: Make player immortal   Wed Nov 05, 2008 7:48 pm

got your PM, thx for the patience -heh

anyways, hell idk man, just at quick glance, seems like you're using the wrong OC for the players health, and all the times I've seen something similar used, it's usually accompanied by a definition of the health first

so it would go like this

Actor.Health($PLAYER_ACTOR) = 10000
08AF: set_actor $PLAYER_ACTOR max_health_to 10000

it looks like OC 0223: is mainly used for characters defined with local variables and
OC 08AF: is used for globally defined characters

you also didn't reset his health in label 271, don't know if that's one of your problems or not but it's a failure you can definitely address

you might also try "Actor.SetImmunities($PLAYER_ACTOR, 1, 1, 1, 1, 1)" instead of 02AB:
because again, it looks like OC 02AB: is used in locally defined variables and not global

and why not try modifying the Object.Indestructibility to this.. "Player.Indestructibility($PLAYER_ACTOR) = true"
or even "Object.Indestructibility($PLAYER_ACTOR) = true" I always wanted to see if it would work lol-
Back to top Go down
View user profile http://s1.zetaboards.com/Kottons_Chop_Shop/index/
gtamodder
Rookie
Rookie
avatar

Male
Number of posts : 86
Age : 23
Warning :
0 / 1000 / 100

Personalized field : actualy, cj360
Points :
0 / 1000 / 100

Registration date : 2008-08-14

PostSubject: Re: Make player immortal   Thu Nov 06, 2008 5:24 am

Thx kotton gonna change that now,
EDIT:but this comes up "Incorrect expression Player.Indestructibility($PLAYER_ACTOR) = true.
One of the variables has unknown type, or operands are incompatible."
:wtf: btw the max normal health is 250 right?
Back to top Go down
View user profile
Kotton
High Carbs
High Carbs
avatar

Male
Number of posts : 318
Location : super-CALI-fragilisticexpialidocious
Warning :
0 / 1000 / 100

Personalized field : SUSPECT ...EVERYTHING
Points :
0 / 1000 / 100

Registration date : 2008-04-01

PostSubject: Re: Make player immortal   Thu Nov 06, 2008 7:45 am

idk, I thought it was 200 normally and 250 after a certain point in the game...
or am I thinking of VC? lol- and did you try the Object.Indestructibility($PLAYER_ACTOR) = true?
that's the original expres​sion(indigenous to local and globally controlled objects of course)

and I know all scripts don't use it but why don't you have:

00D6: if 0
0256: player $PLAYER_CHAR defined
004D: jump_if_false @

?

because 99.98% of cleo scripts do need that definition and
with what your script does, you definitely need to utilize it

anyways, if you're still having problems, I would ask ZAZ,
out of all of us that mess with scripts, he's by far the expert
and to find him, you only need wave a peanut butter jelly
sandwich in front of your screen while chanting "I sacrifice this
sandwich for the greater good to the zazmahall... I sacrifice this
sandwich for the greater good to the zazmahall..." then
smash it on the screen, and he'll find you Wink
Back to top Go down
View user profile http://s1.zetaboards.com/Kottons_Chop_Shop/index/
gtamodder
Rookie
Rookie
avatar

Male
Number of posts : 86
Age : 23
Warning :
0 / 1000 / 100

Personalized field : actualy, cj360
Points :
0 / 1000 / 100

Registration date : 2008-08-14

PostSubject: Re: Make player immortal   Fri Nov 07, 2008 3:44 am

True
EDIT: Was editing it with kottons help and reply's so here's what the whole code looks like:
Code:
//-------------MAIN---------------
03A4: name_thread 'HALO_THREAD'

:HALO_THREAD_11
0001: wait 0 ms
00D6: if
0256:  player $PLAYER_CHAR defined
004D: jump_if_false @HALO_THREAD_11
0A8D: 0@ = read_memory 9867536 size 4 virtual_protect 0
00D6: if
04A4:  0@ == 1212238927 // @ == any
004D: jump_if_false @HALO_THREAD_11
023C: load_special_actor 'HALO' as 1 // models 290-299

:HALO_THREAD_52
0001: wait 0 ms
00D6: if
0248:  model #SPECIAL01 available
004D: jump_if_false @HALO_THREAD_52
03E5: show_text_box 'CHEAT1'  // Cheat activated
09C7: change_player $PLAYER_CHAR model_to #SPECIAL01
070D: rebuild_player $PLAYER_CHAR
Actor.Health($PLAYER_ACTOR) = 10000
08AF: set_actor $PLAYER_ACTOR max_health_to 10000
Actor.SetImmunities($PLAYER_ACTOR, 1, 1, 1, 1, 1)
Object.Indestructibility($PLAYER_ACTOR) = true
0249: release_model #SPECIAL01
0A93: end_custom_thread

03A4: name_thread 'Halo_to_cj'

:Halo_to_cj_226
0001: wait 0 ms
0A8D: 0@ = read_memory 9867536 size 4 virtual_protect 0
00D6: if
04A4:  0@ == 1212238927 // @ == any
004D: jump_if_false @Halo_to_cj_226
0247: load_model #NULL
038B: load_requested_models

:Halo_to_cj_271
0001: wait 0 ms
00D6: if
0248:  model #NULL available
004D: jump_if_false @Halo_to_cj_271
03E5: show_text_box 'CHEAT8'  // Cheat deactivated
09C7: change_player $PLAYER_CHAR model_to #NULL
070D: rebuild_player $PLAYER_CHAR
Actor.Health($PLAYER_ACTOR) = 250
08AF: set_actor $PLAYER_ACTOR max_health_to 250
Actor.SetImmunities($PLAYER_ACTOR, 0, 0, 0, 0, 0)
Object.Indestructibility($PLAYER_ACTOR) = false
0249: release_model #NULL
0A93: end_custom_thread

The halo to cj half is for well just read it and you'll know. Does it work though??? PARTIALLY it makes the model change fine but ignores the Actor.SetImmunities($PLAYER_ACTOR, 1, 1, 1, 1, 1) line and just heals him after geting hurt. I defined the player so it should set him immortal! suicide
Anyone got any ideas on how to fix?
Back to top Go down
View user profile
Sponsored content




PostSubject: Re: Make player immortal   

Back to top Go down
 
Make player immortal
View previous topic View next topic Back to top 
Page 1 of 1
 Similar topics
-
» WFB Player Availability
» Dungeons and Dragons Player Looking For Group
» other miniature companies who may make trolls?
» How to make your WoW work on NetEase servers.
» **Make a logo for TCI Contest** (Contest Over)

Permissions in this forum:You cannot reply to topics in this forum
 :: Requests :: Help-
Jump to: