how to change map's teams without WE

General talk about editing, cheating, and deprotecting maps.

Moderator: Cheaters

User avatar
eddydu555
Senior Member
Posts: 123
Joined: August 27th, 2010, 7:14 am

how to change map's teams without WE

Post by eddydu555 »

how to to change a map's teams
exemple

there is 2 teams and i want to add a third one or remove one of the 2 teams and change the number of players in a team

or if its not possible to add or remove teams then just remove a player from a team

without world editor

thanks in advice :D
Last edited by eddydu555 on July 5th, 2013, 11:10 am, edited 1 time in total.
Apple
Forum Staff
Posts: 1470
Joined: November 3rd, 2010, 10:48 am
Title: Best Player
Location: Singapore

Re: how to change player's team

Post by Apple »


globals

Spoiler:

Code: Select all

trigger Trigger_Alliance


endglobals

Spoiler:

Code: Select all

function allywhichalliance takes nothing returns nothing
local player p2p=GetTriggerPlayer()
local string s2s=GetEventPlayerChatString()
call SetPlayerAllianceBJ(p2p,ConvertAllianceType(bj_ALLIANCE_ALLIED),true,Player(S2I(SubString(s2s,10,11))) )
set p2p=null
set s2s=""
endfunction


function main takes nothing returns nothing
Spoiler:

Code: Select all

function main takes nothing returns nothing 
local integer zzz=0
set Trigger_Alliance=CreateTrigger()
loop
exitwhen zzz>11
call TriggerRegisterPlayerChatEvent(Trigger_Alliance,Player(zzz),"-alliance",false)
set zzz=zzz+1
endloop
call TriggerAddAction(Trigger_Alliance,function allywhichalliance)
endfunction

-alliance XX where XX is an ally/neutral/enemy number range from 01-15

Not even sure if it works actually. Your choice to test it or not. :d
Request a map? Follow the rulesHERE
Request templateHERE
Please, do not PM me.
On the side note, I'm still playing vampirism speed on malaysia room, occasionally in Garena. Bcuz too lazy to find out where else I can play them.
User avatar
haxorico
Super Moderator
Posts: 3190
Joined: February 24th, 2009, 1:31 pm
Location: JEW LAND

Re: how to change player's team

Post by haxorico »

I doubt it works.
In function main Having GetTriggerPlayer and GetEventPlayerChatString as no trigger is running at the point of the map loading.
Also there is no event.
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?
Apple
Forum Staff
Posts: 1470
Joined: November 3rd, 2010, 10:48 am
Title: Best Player
Location: Singapore

Re: how to change player's team

Post by Apple »

haxorico wrote:I doubt it works.
In function main Having GetTriggerPlayer and GetEventPlayerChatString as no trigger is running at the point of the map loading.
Also there is no event.

Oops. seems like I've always been trying luck.
Thanks for pointing it out, hax!
Request a map? Follow the rulesHERE
Request templateHERE
Please, do not PM me.
On the side note, I'm still playing vampirism speed on malaysia room, occasionally in Garena. Bcuz too lazy to find out where else I can play them.
User avatar
eddydu555
Senior Member
Posts: 123
Joined: August 27th, 2010, 7:14 am

Re: how to change map's teams without WE

Post by eddydu555 »

it doenst work i change the request for a different way to get the same result :d
User avatar
haxorico
Super Moderator
Posts: 3190
Joined: February 24th, 2009, 1:31 pm
Location: JEW LAND

Re: how to change map's teams without WE

Post by haxorico »

Well from looking at Apple's code. All you need is to place the following line under the locals of function main.

call SetPlayerAllianceBJ(PLAYER_NUMBER,ConvertAllianceType(bj_ALLIANCE_ALLIED),true,OTHER_PLAYER)

Changing the PLAYER_NUMBER and OTHER_PLAYER to the players you need.
Although it is more than likely that this code is already written in the .j file and all you gotta do is change the parameters.
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
eddydu555
Senior Member
Posts: 123
Joined: August 27th, 2010, 7:14 am

Re: how to change map's teams without WE

Post by eddydu555 »

globals
Spoiler:
trigger Trigger_Alliance


endglobals
Spoiler:
function allywhichalliance takes nothing returns nothing
local player p2p=GetTriggerPlayer()
local string s2s=GetEventPlayerChatString()
call SetPlayerAllianceBJ(p2p,ConvertAllianceType(bj_ALLIANCE_ALLIED),true,Player(S2I(SubString(s2s,10,11))) )
set p2p=null
set s2s=""
endfunction


function main
Spoiler:
local integer zzz=0
call SetPlayerAllianceBJ(Player(1),ConvertAllianceType(bj_ALLIANCE_ALLIED),true,Player(3))
set Trigger_Alliance=CreateTrigger()
loop
exitwhen zzz>11
call TriggerRegisterPlayerChatEvent(Trigger_Alliance,Player(zzz),"-alliance",false)
set zzz=zzz+1
endloop
call TriggerAddAction(Trigger_Alliance,function allywhichalliance)
endfunction


cant host the map :D
User avatar
KangTooJee
Old Wrinkly Member
Posts: 202
Joined: September 15th, 2010, 5:09 am
Title: Legenda

Re: how to change map's teams without WE

Post by KangTooJee »

try change under InitCustomTeams function
User avatar
haxorico
Super Moderator
Posts: 3190
Joined: February 24th, 2009, 1:31 pm
Location: JEW LAND

Re: how to change map's teams without WE

Post by haxorico »

Why did you make a mix of the code I posted and the code Apple posted?
If you use my code, just take that SINGLE LINE and paste it under the locals (if there are any) of function main
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
eddydu555
Senior Member
Posts: 123
Joined: August 27th, 2010, 7:14 am

Re: how to change map's teams without WE

Post by eddydu555 »

okey i did it and its not working there is no alliance between the players
call SetPlayerAllianceBJ(Player(1),ConvertAllianceType(bj_ALLIANCE_ALLIED),true,Player(3))

means that blue and purple are allies or red and teal are allies ?

but it doesnt work i tested it i dont see changed alliance between the players