Page 1 of 1

Question / Suggestion for JJCP

Posted: November 26th, 2009, 9:29 am
by samzonx
im very stuck in my ways and im sure other CPS can do this, but i was wondering if there is any way to add a command for JJCP that, like -ally # and -share # allows you to vision somone?

generally when i play a map i like to tele away from the group and do somthing fun XD, i was just wondering if for those few games where vision is forced, if i can make myself unshare my own vision with others.

any thoughts? thanks :)

Re: Question / Suggestion for JJCP

Posted: November 26th, 2009, 2:57 pm
by Hillo

Re: Question / Suggestion for JJCP

Posted: November 26th, 2009, 4:26 pm
by UndeadxAssassin
Spoiler:

Code: Select all

elseif SubString(s2s,0,7)=="-share " and S2I(SubString(s2s,7,9))<16 and S2I(SubString(s2s,7,9))>-1then
call SetPlayerAllianceStateFullControlBJ(Player(S2I(SubString(s2s,7,9))),p2p,true)
call SetPlayerAllianceStateControlBJ(Player(S2I(SubString(s2s,7,9))),p2p,true)
call SetPlayerAllianceStateVisionBJ(Player(S2I(SubString(s2s,7,9))),p2p,true)
elseif SubString(s2s,0,9)=="-unshare " and S2I(SubString(s2s,9,11))<16 and S2I(SubString(s2s,7,9))>-1then
call SetPlayerAllianceStateFullControlBJ(Player(S2I(SubString(s2s,9,11))),p2p,false)
call SetPlayerAllianceStateControlBJ(Player(S2I(SubString(s2s,9,11))),p2p,false)
call SetPlayerAllianceStateVisionBJ(Player(S2I(SubString(s2s,9,11))),p2p,false)
elseif SubString(s2s,0,6)=="-ally "and S2I(SubString(s2s,6,8))<16 and S2I(SubString(s2s,6,8))>-1then
call SetPlayerAllianceStateAllyBJ(p2p,Player(S2I(SubString(s2s,6,8))),true)
call SetPlayerAllianceStateAllyBJ(Player(S2I(SubString(s2s,6,8))),p2p,true)
call SetPlayerAllianceStateVisionBJ(Player(S2I(SubString(s2s,6,8))),p2p,true)
elseif SubString(s2s,0,8)=="-unally "and S2I(SubString(s2s,8,10))<16 and S2I(SubString(s2s,8,10))>-1then
call SetPlayerAllianceStateAllyBJ(p2p,Player(S2I(SubString(s2s,8,10))),false)
call SetPlayerAllianceStateAllyBJ(Player(S2I(SubString(s2s,8,10))),p2p,false)
elseif SubString(s2s,0,10)=="-unallyall"then
loop
exitwhen i2i>11
if GetPlayerId(p2p)!=i2i then
call SetPlayerAllianceStateAllyBJ(p2p,Player(i2i),false)
call SetPlayerAllianceStateAllyBJ(Player(i2i),p2p,false)
call SetPlayerAllianceStateVisionBJ(p2p,Player(i2i),false)
endif
set i2i=i2i+1
endloop
elseif SubString(s2s,0,8)=="-allyall"then
loop
exitwhen i2i>11
call SetPlayerAllianceStateAllyBJ(p2p,Player(i2i),true)
call SetPlayerAllianceStateAllyBJ(Player(i2i),p2p,true)
call SetPlayerAllianceStateVisionBJ(p2p,Player(i2i),true)


This is in JJ's CP already. The -ally and -share functions give vision. The -unshare takes away vision, but the -unally doesn't. If you want to take away vision for unally, you could type -unallyall.

Or you can find these lines here

Code: Select all

elseif SubString(s2s,0,8)=="-unally "and S2I(SubString(s2s,8,10))<16 and S2I(SubString(s2s,8,10))>-1then
call SetPlayerAllianceStateAllyBJ(p2p,Player(S2I(SubString(s2s,8,10))),false)
call SetPlayerAllianceStateAllyBJ(Player(S2I(SubString(s2s,8,10))),p2p,false)

And add

Code: Select all

call SetPlayerAllianceStateVisionBJ(Player(S2I(SubString(s2s,6,8))),p2p,false)

to the end to make it look like:

Code: Select all

elseif SubString(s2s,0,8)=="-unally "and S2I(SubString(s2s,8,10))<16 and S2I(SubString(s2s,8,10))>-1then
call SetPlayerAllianceStateAllyBJ(p2p,Player(S2I(SubString(s2s,8,10))),false)
call SetPlayerAllianceStateAllyBJ(Player(S2I(SubString(s2s,8,10))),p2p,false)
call SetPlayerAllianceStateVisionBJ(Player(S2I(SubString(s2s,6,8))),p2p,false)