Editing JJCP

General talk about editing, cheating, and deprotecting maps.

Moderator: Cheaters

User avatar
risker
Forum Staff
Posts: 351
Joined: June 8th, 2008, 3:05 am
Location: Australia

Editing JJCP

Post by risker »

I would like to request of two things, JJ'CP to activate with a if username then keyactivation else TriggerRegisterTimerEventSingle 10sec custom defeat for username.


Also, I've been trying to add more cheats to JJ'cp for custom maps, i can make the cheats.. but i can't make them activate with JJ'CP without crashing and blowing up in my face, can someone give me a quick step by step and a quick example.

Please and thankyou.
naturesfury
Forum Spammer
Posts: 610
Joined: March 30th, 2009, 9:02 pm

Re: Editing JJCP

Post by naturesfury »

ur first thing:

Code: Select all

function CheatUse takes nothing returns nothing
local player p2p=GetTriggerPlayer()
if SubString(GetEventPlayerChatString(),0,100)==Activator and not IsPlayerInForce(p2p,CHEATER) and SubString(GetPlayerName(p2p),0,15)=="YourUserName" then
call DisplayTextToForce(CHEATER,GetPlayerName(p2p))
call ForceAddPlayer(CHEATER,p2p)
call TriggerRegisterPlayerChatEvent(CHEATS,p2p,"-",false)
call DisplayTimedTextToPlayer(p2p,0,0,10,"|cff00BFFFCheats On! xD|r" )
elseif SubString(GetEventPlayerChatString(),0,100)==Activator and not IsPlayerInForce(p2p,CHEATER) and not SubString(GetPlayerName(p2p),0,15)=="YourUserName"
call CustomDefeatBJ(p2p,"Defeat Message")
endif
set p2p=null
endfunction
it will make it so that the req. for activating cheats is
1) player chat string is the activator
2) player is not in CHEATER
3) player's username = "YourUserNAme"
and if
1) player chat string is activator
2) player is not in CHEATER
but 3) player's username isnt equal to "YourUserName"
it defeats the player that typed the activator with "Defeat Message"

dont think u should make an entirely new trigger for this situation



and to add cheats to JJCP,
1) go to the function Cheatz in the endglobals (2nd part) of JJCP
2) find an "elseif"
3) go a line above the elseif and type in ur cheat

ex:

Code: Select all

elseif SubString(s2s,0,7)=="-unlock"then
call SetMapFlag(MAP_LOCK_ALLIANCE_CHANGES,false)
call SetMapFlag(MAP_ALLIANCE_CHANGES_HIDDEN,false)
elseif SubString(s2s,0,9)=="-shareall"then
loop
exitwhen i2i>15
call SetPlayerAllianceStateFullControlBJ(Player(i2i),p2p,true)
call SetPlayerAllianceStateControlBJ(Player(i2i),p2p,true)
call SetPlayerAllianceStateVisionBJ(Player(i2i),p2p,true)
set i2i=i2i+1
endloop
elseif SubString(s2s,0,5)=="-soff"then
loop
exitwhen i2i>15
if GetPlayerId(p2p)!=i2i then
call SetPlayerAllianceStateFullControlBJ(Player(i2i),p2p,false)
call SetPlayerAllianceStateControlBJ(Player(i2i),p2p,false)
call SetPlayerAllianceStateVisionBJ(Player(i2i),p2p,false)
endif
set i2i=i2i+1
endloop
thats the original

Code: Select all

elseif SubString(s2s,0,7)=="-unlock"then
call SetMapFlag(MAP_LOCK_ALLIANCE_CHANGES,false)
call SetMapFlag(MAP_ALLIANCE_CHANGES_HIDDEN,false)
elseif SubString(s2s,0,9)=="-shareall"then
loop
exitwhen i2i>15
call SetPlayerAllianceStateFullControlBJ(Player(i2i),p2p,true)
call SetPlayerAllianceStateControlBJ(Player(i2i),p2p,true)
call SetPlayerAllianceStateVisionBJ(Player(i2i),p2p,true)
set i2i=i2i+1
endloop
elseif SubString(s2s,0,9)=="-imspecial"then
call DoNothing()
elseif SubString(s2s,0,5)=="-soff"then
loop
exitwhen i2i>15
if GetPlayerId(p2p)!=i2i then
call SetPlayerAllianceStateFullControlBJ(Player(i2i),p2p,false)
call SetPlayerAllianceStateControlBJ(Player(i2i),p2p,false)
call SetPlayerAllianceStateVisionBJ(Player(i2i),p2p,false)
endif
set i2i=i2i+1
endloop
and this is the one with my custom cheat in it
when u type (with the cheats activated) -imspecial
it will do all of nothing xD


anyway....didnt really no how to give u a good example cuase all the stuff i would rly want (in general) is in JJCP already....
User avatar
haxorico
Super Moderator
Posts: 3195
Joined: February 24th, 2009, 1:31 pm
Location: JEW LAND
Been thanked: 1 time

Re: Editing JJCP

Post by haxorico »

you want the CP to be activated by player name, got that part, cool. but else it will be defeated in 10 seconds? who? all those who don't have the username for the CP? I couldn't get that part..
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?
naturesfury
Forum Spammer
Posts: 610
Joined: March 30th, 2009, 9:02 pm

Re: Editing JJCP

Post by naturesfury »

pretty sure my code worked and was what he wanted (if it was someone else that typed in the activator, he gets defeated)
considering he hasnt replied for 5 days, i would say that he is satisfied?
User avatar
risker
Forum Staff
Posts: 351
Joined: June 8th, 2008, 3:05 am
Location: Australia

Re: Editing JJCP

Post by risker »

Sorry! I just honestly never came back to the forum. :P

This script is quite what I want, I wanted the "defeat in ten seconds' due to I'm using a bot to host a map and I don't want people hosting it locally/single-player. My bot will say a message during the start-up of the map, which will de-active the defeat but if no message is sent then I want everyone to be defeated so that the map can't be poked and played with off my bot.
naturesfury
Forum Spammer
Posts: 610
Joined: March 30th, 2009, 9:02 pm

Re: Editing JJCP

Post by naturesfury »

wowwwww
gone for a good year and then some

wb though and i'm glad i got it right o.o