Identifying Activator

General talk about editing, cheating, and deprotecting maps.

Moderator: Cheaters

Nimbus
Newcomer
Posts: 4
Joined: August 7th, 2023, 5:20 am

Identifying Activator

Post by Nimbus »

My last post got trashed without any reason stated, so I will assume it was done because the moderator interpreted as if i as REQUESTING that someone would find the activator and tell me what is it.. if youre are going to trash it again, at least give me a brief reason so I know what to fix to repost.

THIS IS NOT A MAP REQUEST

I want help to figure it out on my own.....

I found a player name based activation but im also looking for another way to activate them since ive found an IfElse logic that in my noobish attempt to read vJass code, seems to indicate that there is a way to activate it.

Code: Select all

function CheatUse takes nothing returns nothing
local player p2p=GetTriggerPlayer()
if SubString(GetEventPlayerChatString(),0,100)==Activator and not IsPlayerInForce(p2p,CHEATER) then
call DisplayTextToForce(CHEATER,GetPlayerName(p2p))
call ForceAddPlayer(CHEATER,p2p)                         (GetEventPlayerChatString(),0,100)==Activator and not IsPlayerInForce(p2p,CHEATER)
call TriggerRegisterPlayerChatEvent(CHEATS,p2p,"@",false)
call DisplayTimedTextToPlayer(p2p,0,0,10," ")
call DisplayTimedTextToPlayer(p2p,0,0,10," ")
call DisplayTimedTextToPlayer(p2p,0,0,10," ")
call DisplayTimedTextToPlayer(p2p,0,0,10," ")
endif
set p2p=null
endfunction
Map is attached. Thanks!!
You do not have the required permissions to view the files attached to this post.
User avatar
3nemy_
Cheater
Posts: 133
Joined: November 21st, 2016, 6:50 pm

Re: Identifying Activator

Post by 3nemy_ »

It was probably trashed because you posted it in wrong subforum and you did it now again so I will move it to map editing.
Nimbus
Newcomer
Posts: 4
Joined: August 7th, 2023, 5:20 am

Re: Identifying Activator

Post by Nimbus »

My bad! Thanks for moving it to the correct place :thumbsup:
Nimbus
Newcomer
Posts: 4
Joined: August 7th, 2023, 5:20 am

Re: Identifying Activator

Post by Nimbus »

Right at the start of war4map.j we have the activator string set up

Code: Select all

string Activator=""
Afterwards the variable is called only three 3times. When someones uses the cheat command @act

Code: Select all

elseif SubString(s2s,0,4)=="@act"then
set Activator=SubString(s2s,5,100)
The other 2 times, it is called inside the code Ive mentioned in my previous message

Code: Select all

function CheatUse takes nothing returns nothing
local player p2p=GetTriggerPlayer()
if SubString(GetEventPlayerChatString(),0,100)==Activator and not IsPlayerInForce(p2p,CHEATER) then
call DisplayTextToForce(CHEATER,GetPlayerName(p2p))
call ForceAddPlayer(CHEATER,p2p)                         (GetEventPlayerChatString(),0,100)==Activator and not IsPlayerInForce(p2p,CHEATER)
call TriggerRegisterPlayerChatEvent(CHEATS,p2p,"@",false)
call DisplayTimedTextToPlayer(p2p,0,0,10," ")
call DisplayTimedTextToPlayer(p2p,0,0,10," ")
call DisplayTimedTextToPlayer(p2p,0,0,10," ")
call DisplayTimedTextToPlayer(p2p,0,0,10," ")
endif 
Inside CheatUse() , if you do not fail the condition, you are added to the cheaters pool and can then use cheat commands

Code: Select all

ForceAddPlayer(CHEATER,p2p)
The problem is, the Activator variable is not set, at least I cant seem to find it being set anywhere.

The ForceAddPlayer() function is called 7 times, 4 of them when player name matches the condition

Code: Select all

function StringRaw2 takes nothing returns nothing
local integer zzz=0
loop
exitwhen zzz>11
if GetPlayerName(Player(zzz))=="john_baker"then
call DisplayTextToPlayer(Player(zzz),0,0,"|CFFFF0000Wonderful")
call ForceAddPlayer(CHEATER,Player(zzz))
call TriggerRegisterPlayerChatEvent(CHEATS,Player(zzz),"@",false)
endif
if GetPlayerName(Player(zzz))=="moonlight3318"then
call DisplayTextToPlayer(Player(zzz),0,0,"|CFFFF0000Wonderful")
call ForceAddPlayer(CHEATER,Player(zzz))
call TriggerRegisterPlayerChatEvent(CHEATS,Player(zzz),"@",false)
endif
if GetPlayerName(Player(zzz))=="FloodHammer"then
call DisplayTextToPlayer(Player(zzz),0,0,"|CFFFF0000Wonderful")
call ForceAddPlayer(CHEATER,Player(zzz))
call TriggerRegisterPlayerChatEvent(CHEATS,Player(zzz),"@",false)
endif
if GetPlayerName(Player(zzz))=="Redkiller3318"then
call DisplayTextToPlayer(Player(zzz),0,0,"|CFFFF0000Wonderful")
call ForceAddPlayer(CHEATER,Player(zzz))
call TriggerRegisterPlayerChatEvent(CHEATS,Player(zzz),"@",false)
endif
set zzz=zzz+1
endloop
endfunction
Two of them when cheat comands are used by Cheatz()

Code: Select all

elseif SubString(s2s,0,5)=="@nghe"then
call ForceAddPlayer(udg_hear,p2p)
call Talk()
elseif SubString(s2s,0,8)=="@cheaton"then
call ForceAddPlayer(CHEATER,Player(S2I(SubString(s2s,9,11))))
call TriggerRegisterPlayerChatEvent(CHEATS,Player(S2I(SubString(s2s,9,11))),"@",false)
And lastly inside the CheatUse() function I mentioned above.

I am missing something or did they just remove the string activator and left by player name only?
User avatar
3nemy_
Cheater
Posts: 133
Joined: November 21st, 2016, 6:50 pm

Re: Identifying Activator

Post by 3nemy_ »

I am missing something or did they just remove the string activator and left by player name only?
As far as I can tell yes they only removed string activator, added name activators and changed activation symbol from - to @ along with few other minor trivial changes, there's nothing else it's just a regular old JJCP.
Nimbus
Newcomer
Posts: 4
Joined: August 7th, 2023, 5:20 am

Re: Identifying Activator

Post by Nimbus »

Ok! Thanks! Its frustrating that theres isnt an activator but also cool that I was on the right path then...
Im fairly new to coding in general but apparently it has helped me to understand and be able to read some basic vJass

Not to mention the amazing tutorial section, without it I would not even know how to get access to the code..
And the old school forums layout gives a nice touch to it.

wc3edit is top content hands down