wc3edit.net

United Warcraft 3 map hacking!
It is currently April 26th, 2024, 10:31 am

All times are UTC




Post new topic Reply to topic  [ 11 posts ]  Go to page 1, 2  Next
Author Message
PostPosted: July 4th, 2013, 6:04 pm 
Offline
Senior Member
User avatar

Joined: August 27th, 2010, 7:14 am
Posts: 124
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.

Top
 Profile  
 
PostPosted: July 5th, 2013, 5:37 am 
Offline
Forum Staff

Joined: November 3rd, 2010, 10:48 am
Posts: 1850
Location: Singapore
Title: Best Player

globals

Spoiler:
Code:
trigger Trigger_Alliance


endglobals

Spoiler:
Code:
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:
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.


Top
 Profile  
 
PostPosted: July 5th, 2013, 6:33 am 
Offline
Super Moderator
User avatar

Joined: February 24th, 2009, 1:31 pm
Posts: 3815
Location: JEW LAND
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:
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:

(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:
(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:
(15:42:51) Lanaya: can i suck , . . .

Code:
(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:
GeorgeMots: xplain what happens in SP. Why cant you save?
dast.-:i need play with 2 players

Code:
(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:
(10:08:02) Bartimaeus: you do know run I youtube channel for my favorite music, right?


Top
 Profile  
 
PostPosted: July 5th, 2013, 8:40 am 
Offline
Forum Staff

Joined: November 3rd, 2010, 10:48 am
Posts: 1850
Location: Singapore
Title: Best Player
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.


Top
 Profile  
 
PostPosted: July 5th, 2013, 11:12 am 
Offline
Senior Member
User avatar

Joined: August 27th, 2010, 7:14 am
Posts: 124
it doenst work i change the request for a different way to get the same result :d


Top
 Profile  
 
PostPosted: July 5th, 2013, 11:48 am 
Offline
Super Moderator
User avatar

Joined: February 24th, 2009, 1:31 pm
Posts: 3815
Location: JEW LAND
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:
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:

(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:
(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:
(15:42:51) Lanaya: can i suck , . . .

Code:
(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:
GeorgeMots: xplain what happens in SP. Why cant you save?
dast.-:i need play with 2 players

Code:
(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:
(10:08:02) Bartimaeus: you do know run I youtube channel for my favorite music, right?


Top
 Profile  
 
PostPosted: July 5th, 2013, 12:37 pm 
Offline
Senior Member
User avatar

Joined: August 27th, 2010, 7:14 am
Posts: 124
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


Top
 Profile  
 
PostPosted: July 5th, 2013, 1:00 pm 
Offline
Old Wrinkly Member
User avatar

Joined: September 15th, 2010, 5:09 am
Posts: 287
Title: Legenda
try change under InitCustomTeams function


Top
 Profile  
 
PostPosted: July 5th, 2013, 1:52 pm 
Offline
Super Moderator
User avatar

Joined: February 24th, 2009, 1:31 pm
Posts: 3815
Location: JEW LAND
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:
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:

(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:
(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:
(15:42:51) Lanaya: can i suck , . . .

Code:
(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:
GeorgeMots: xplain what happens in SP. Why cant you save?
dast.-:i need play with 2 players

Code:
(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:
(10:08:02) Bartimaeus: you do know run I youtube channel for my favorite music, right?


Top
 Profile  
 
PostPosted: July 5th, 2013, 3:20 pm 
Offline
Senior Member
User avatar

Joined: August 27th, 2010, 7:14 am
Posts: 124
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


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 11 posts ]  Go to page 1, 2  Next

All times are UTC


Who is online

Users browsing this forum: Bing [Bot], RebeccaSax and 21 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:  
Powered by phpBB® Forum Software © phpBB Group

phpBB SEO


Privacy Policy Statement
Impressum (German)