Help with enabling save

General talk about editing, cheating, and deprotecting maps.

Moderator: Cheaters

Spider-pig
Newcomer
Posts: 14
Joined: April 5th, 2010, 12:15 pm

Help with enabling save

Post by Spider-pig »

Help me with enabling save. Im sure that i should change something here but what exactly?

Code: Select all

function Trig_Save_Conditions takes nothing returns boolean
return( not(udg_TotalPlayersInStartGame<udg_CheckPL))and( not(udg_SPExp[(1+GetPlayerId(GetTriggerPlayer()))]/ 5-udg_SPExp[(1+GetPlayerId(GetTriggerPlayer()))+20]!=udg_SPExp[(1+GetPlayerId(GetTriggerPlayer()))+30]))
endfunction
function Trig_Load_Conditions takes nothing returns boolean
return( not(udg_LoadingIsTurnedOff))and( not(udg_TotalPlayers<udg_CheckPL))
endfunction
I added war3map.j
You do not have the required permissions to view the files attached to this post.
Last edited by Spider-pig on January 20th, 2011, 5:04 pm, edited 1 time in total.
User avatar
Nuuby
Forum Staff
Posts: 519
Joined: October 18th, 2010, 8:43 am

Re: Help with enabling save

Post by Nuuby »

You should post the full script instead of just an extract of it. It would be easier for us to see that way /:
User avatar
haxorico
Super Moderator
Posts: 3196
Joined: February 24th, 2009, 1:31 pm
Location: JEW LAND
Been thanked: 1 time

Re: Help with enabling save

Post by haxorico »

Well its a GUI trigger, so some where under

Code: Select all

function main takes nothing returns nothing
something like this code

Code: Select all

call TriggerAddCondition(triggername,function Trig_Save_Actions)
I havent looked at the war3map.j, tough it should look like that, and probably near

Code: Select all

call RegisterPlayerChatEvent(triggername,"-save",true)
Image
Spoiler:
(02:24:09)

Code: Select all

ChatBot: FatherSpace logs into the Chat.
(02:24:28) Lanaya: Gtfo ken.
(02:24:33) ChatBot: FatherSpace logs out of the Chat.
(02:24:40) Lanaya: Thought so. bitch.
(02:24:44) ChatBot: FatherSpace logs into the Chat.
(02:24:48) FatherSpace: Can I come back yet?
(02:24:51) Lanaya: What'd i say earlier.
(02:24:51) Lanaya: No.
(02:24:58) FatherSpace: Let's try this...
(02:25:01) ChatBot: Lanaya has been logged out (Kicked).

Code: Select all


(14:33:51) 2Pac: Do you know what'S so funny?
(14:34:01) Lanaya: No, please show me.
(14:34:07) 2Pac: This.
(14:34:09) ChatBot: Lanaya has been logged out (Kicked).
(14:34:10) 2Pac: 

Code: Select all

(14:35:59) haxorico: No one will belive me if I say "I got this song from 2pac on MSN" lolz ^^
(14:36:02) Lanaya: lolz.
(14:36:16) 2Pac: I AIN'T DEAD FFS.
(14:36:26) 2Pac: I'm a living legend, y'now.
(14:37:17) haxorico: why is 2Pac a legend?
(14:37:28) Lanaya: He's the worse rapper evar.

Code: Select all

(15:42:51) Lanaya: can i suck , . . .

Code: Select all

(13:55:21) ChatBot: 2Pac rolls 1d100 and gets 1.
(13:55:21) ChatBot: haxorico rolls 1d2 and gets 2.
(13:55:27) haxorico: owned?

Code: Select all

GeorgeMots: xplain what happens in SP. Why cant you save?
dast.-:i need play with 2 players

Code: Select all

(21:53:08) (673237): plzplzplz, im sorry about before.
(21:53:26) FatherSpace: I'm sorry you were born.
(21:53:31) ChatBot: (673237) has been logged out (Kicked).

Code: Select all

(10:08:02) Bartimaeus: you do know run I youtube channel for my favorite music, right?
User avatar
UndeadxAssassin
Grammar King
Posts: 2116
Joined: June 22nd, 2008, 10:11 pm
Title: Worst human for 4eva
Location: Mostly USEast

Re: Help with enabling save

Post by UndeadxAssassin »

In those functions alone, the save is checking to see if NOT(udg_TotalPlayersInStartGame<udg_CheckPL) and some other unimportant thing related to exp and returns a boolean based on this. So, thinking about it, in a single player game, the first part would be returned as FALSE because I would assume udg_CheckPL is a number greater than or equal to one. Like say, however many players it needs. Therefore, if you just change it all from

Code: Select all

function Trig_Save_Conditions takes nothing returns boolean
return( not(udg_TotalPlayersInStartGame<udg_CheckPL))and( not(udg_SPExp[(1+GetPlayerId(GetTriggerPlayer()))]/ 5-udg_SPExp[(1+GetPlayerId(GetTriggerPlayer()))+20]!=udg_SPExp[(1+GetPlayerId(GetTriggerPlayer()))+30]))
endfunction
to

Code: Select all

function Trig_Save_Conditions takes nothing returns boolean
return true
endfunction
it should work, assuming that is the ONLY anti-save trigger.

As for load,
return( not(udg_LoadingIsTurnedOff))and( not(udg_TotalPlayers<udg_CheckPL))
If loading is turn off is NOT in effect then it will return true, and the second part is the same as before, soo..same thing. Change to return true and it should be fine.
(20:53:52) Bartimaeus: Thank you, Jen.
(20:53:56) Bartimaeus: Truly, you are wise.
(23:44:12) Bartimaeus: I was in pubic school until middle school...
Learn how to extract and read RAW Codes here!

Need help? Click here and ask your question!
Spider-pig
Newcomer
Posts: 14
Joined: April 5th, 2010, 12:15 pm

Re: Help with enabling save

Post by Spider-pig »

UndeadxAssassin wrote:In those functions alone, the save is checking to see if NOT(udg_TotalPlayersInStartGame<udg_CheckPL) and some other unimportant thing related to exp and returns a boolean based on this. So, thinking about it, in a single player game, the first part would be returned as FALSE because I would assume udg_CheckPL is a number greater than or equal to one. Like say, however many players it needs. Therefore, if you just change it all from

Code: Select all

function Trig_Save_Conditions takes nothing returns boolean
return( not(udg_TotalPlayersInStartGame<udg_CheckPL))and( not(udg_SPExp[(1+GetPlayerId(GetTriggerPlayer()))]/ 5-udg_SPExp[(1+GetPlayerId(GetTriggerPlayer()))+20]!=udg_SPExp[(1+GetPlayerId(GetTriggerPlayer()))+30]))
endfunction
to

Code: Select all

function Trig_Save_Conditions takes nothing returns boolean
return true
endfunction
it should work, assuming that is the ONLY anti-save trigger.

As for load,
return( not(udg_LoadingIsTurnedOff))and( not(udg_TotalPlayers<udg_CheckPL))
If loading is turn off is NOT in effect then it will return true, and the second part is the same as before, soo..same thing. Change to return true and it should be fine.
I changed as you sugested and removed call DisableTrigger(Save_Trigger) and it works now!!!!
Thanks to everyone who helped me!!!!! :D :D :) :lol: :lol: :D

-----------------------------------------------------------------------------------------------------------------------------------------------

NO((( That was epic fail((( save works but gives wrong passwords....every time/((
Kyoshiro
Forum Staff
Posts: 762
Joined: October 27th, 2009, 12:18 pm
Location: Australia, GMT+8

Re: Help with enabling save

Post by Kyoshiro »

try this
if it doesnt work post the full map to make things easier.
You do not have the required permissions to view the files attached to this post.
If you have any questions drop in by chat sometime, chances are there'll be someone who can help you that's afking there, so the next best thing is to click the link on UndeadxAssassin's Sig and ask your question there.
User avatar
UndeadxAssassin
Grammar King
Posts: 2116
Joined: June 22nd, 2008, 10:11 pm
Title: Worst human for 4eva
Location: Mostly USEast

Re: Help with enabling save

Post by UndeadxAssassin »

UndeadxAssassin wrote: it should work, assuming that is the ONLY anti-save trigger.
>.>.
(20:53:52) Bartimaeus: Thank you, Jen.
(20:53:56) Bartimaeus: Truly, you are wise.
(23:44:12) Bartimaeus: I was in pubic school until middle school...
Learn how to extract and read RAW Codes here!

Need help? Click here and ask your question!
Spider-pig
Newcomer
Posts: 14
Joined: April 5th, 2010, 12:15 pm

Re: Help with enabling save

Post by Spider-pig »

Kyoshiro wrote:try this
if it doesnt work post the full map to make things easier.
That was close! You activated mobs spawn....and quests...
Maybe i should request in Map Requests??
You do not have the required permissions to view the files attached to this post.
GeorgeMots
Crusader
Posts: 4236
Joined: January 27th, 2007, 4:46 pm
Location: Greece, Veria

Re: Help with enabling save

Post by GeorgeMots »

Yes make a request about it.
http://slowbro.org/
`·.,¸,.·*¯`·.,¸,.·*¯[;::;(。◕‿‿­­​­­­­­◕。)
Image
Image
Image
Spoiler:
(03:36:55) xkiska: im too much of a dumbass to understand this