wc3edit.net

United Warcraft 3 map hacking!
It is currently October 1st, 2022, 1:41 am

All times are UTC




Post new topic Reply to topic  [ 33 posts ]  Go to page Previous  1, 2, 3, 4  Next
Author Message
 Post subject: Re: [JASS] JJCP: NewGen
PostPosted: August 25th, 2020, 8:54 am 
Offline
Junior Member

Joined: October 26th, 2019, 11:54 am
Posts: 39
throw the full list of pliz commands.


Top
 Profile  
 
 Post subject: Re: [JASS] JJCP: NewGen
PostPosted: August 26th, 2020, 10:17 pm 
Offline
Super Moderator

Joined: February 3rd, 2009, 11:28 pm
Posts: 2394
It's available here: http://forum.wc3edit.net/tutorials-chea ... 13526.html


Top
 Profile  
 
 Post subject: Re: [JASS] JJCP: NewGen
PostPosted: March 6th, 2021, 1:15 pm 
Offline
Super Moderator
User avatar

Joined: February 24th, 2009, 1:31 pm
Posts: 3808
Location: JEW LAND
owner123 wrote:
Because copying units was never programmed:
Code:
function CopyHero takes unit source, integer uid, real locX, real locY returns nothing
local integer pid = GetPlayerId( GetOwningPlayer( source ) )
local real facing = GetUnitFacing( source )
   if uid == 0 then
      set uid = GetUnitTypeId( source )
   endif
   if IsUnitType( source, UNIT_TYPE_HERO ) then
      set bj_lastCreatedUnit = CreateUnit( Player( pid ), uid, locX, locY, facing )
      call CopyStats( source, bj_lastCreatedUnit )
      call CopyItems( source, bj_lastCreatedUnit )
      call CopyState( source, bj_lastCreatedUnit )
   endif
endfunction

I think it can be updated like this:
Code:
function CopyHero takes unit source, integer uid, real locX, real locY returns nothing
local integer pid = GetPlayerId( GetOwningPlayer( source ) )
local real facing = GetUnitFacing( source )
   if uid == 0 then
      set uid = GetUnitTypeId( source )
   endif
   if IsUnitType( source, UNIT_TYPE_HERO ) then
      set bj_lastCreatedUnit = CreateUnit( Player( pid ), uid, locX, locY, facing )
      call CopyStats( source, bj_lastCreatedUnit )
      call CopyItems( source, bj_lastCreatedUnit )
      call CopyState( source, bj_lastCreatedUnit )
   else
      set bj_lastCreatedUnit = CreateUnit( Player( pid ), uid, locX, locY, facing )
   endif
endfunction


Not sure which version you are refering to.. Copy used to copy all units an # amount of times.
So if you select 2 footmen and 3 riflemen and use "-copy 2". Each SELECTED unit would be copy twice.
So you will endup having 6 footmen and 9 riflemen (4 new footment and 6 new riflemen)

Code:
if SubString(s2s,0,5)=="-copy" and SubString(s2s,6,7)!="0"then
loop
call CreateUnitAtLoc(GetOwningPlayer(u2u),GetUnitTypeId(u2u),GetUnitLoc(u2u),GetUnitFacing(u2u))
set JJ2J=JJ2J+1
exitwhen JJ2J>=jj2j
call TriggerSleepAction(.001)
endloop
call RemoveLocation(GetUnitLoc(u2u))
endif
<-- This code was taken from FatherSpace's (Ken's) version of the update cheatpack back in who knows when... (cant remember the patch that broke most maps)


Top
 Profile  
 
 Post subject: Re: [JASS] JJCP: NewGen
PostPosted: September 11th, 2021, 8:06 pm 
Offline
Member

Joined: March 9th, 2008, 8:13 pm
Posts: 58
Location: Ask me personally.
Title: Demonoid Hacker
I'm trying to add this cp to a map, first map i've tried to edit since reforged hit.
But the map im editing doesnt have endglobals in the .j
I tried dropping it just before function main with no luck.

where do I insert end globals if there are no end globals?
This .j im using looks nothing like anything ive ever seen on wc3 before, nothing looks familiar.

So is this code compatible with .j's written different, for example im seeing a lot of Ceres whatever that means. no traditional globals, no traditional end globals, and the function main is literally like one line, all the locals are at the top of the .j

curently trying to find familiar places to stick the end globals and hope for the best, any tips?


Top
 Profile  
 
 Post subject: Re: [JASS] JJCP: NewGen
PostPosted: September 11th, 2021, 9:56 pm 
Offline
Also Not an Admin, but closer than devoltz
User avatar

Joined: February 14th, 2018, 5:35 am
Posts: 1782
Title: Just Another S.Mod
Post it so we can take a look


Top
 Profile  
 
 Post subject: Re: [JASS] JJCP: NewGen
PostPosted: September 17th, 2021, 7:50 pm 
Offline
Also Not an Admin, but closer than devoltz
User avatar

Joined: February 14th, 2018, 5:35 am
Posts: 1782
Title: Just Another S.Mod
NewGen updated.

Code has been improved.


Top
 Profile  
 
 Post subject: Re: [JASS] JJCP: NewGen
PostPosted: April 12th, 2022, 12:12 am 
Offline
Newcomer

Joined: April 10th, 2022, 7:07 am
Posts: 7
Just as autoh, how do i do it for mana?
Skills like immolation that drains mana doesnt work with -nomana


Top
 Profile  
 
 Post subject: Re: [JASS] JJCP: NewGen
PostPosted: April 22nd, 2022, 3:25 am 
Offline
Cheater
User avatar

Joined: November 21st, 2016, 6:50 pm
Posts: 113
I need some help with adding custom commands. I know how to create commands in original JJCP but not this one or NZCP so I took a peek at some old maps you created commands for. :D
I think I found the right variable and I tried to copy your format but it just breaks the map.

Code:
function CustomCommandsHandler takes nothing returns nothing
local integer pid = GetPlayerId(GetTriggerPlayer())
local integer value = 0
local string text = SubString( GetEventPlayerChatString(), 1, StringLength(GetEventPlayerChatString()) )
local integer emptyAt = FindEmptyString( 0, text )
local string command = SubString( text, 0, emptyAt )
local string payload = SubString( text, emptyAt + 1, StringLength(GetEventPlayerChatString()) )
set value = S2I( payload )
if command == "addph" then
   call udg_playedseconds(Player( pid ) , value)
   endif
endif
endfunction
function CC_Init takes nothing returns nothing
call ChatEvent( CreateTrigger( ), "-", false, function CustomCommandsHandler )
endfunction
function main takes nothing returns nothing
call Fukki_CP_Config()
call ExecuteFunc( "Init_NewGen" )
call ExecuteFunc( "CC_Init" )



E.g. I am trying to create CC for playtime, in old JJCP you would find the integer and convert it to string via I2S function and write parameters where to find said string (s2s, number, number) right.
But here, I'm completely lost, the S2I function won't convert my command string back to integer, i'm missing some piece of information but I can't tell what.
I have barely any jass knowledge so maybe it's something easy but I'm simply not seeing it.

Here's how I did it in original JJCP:

Code:
elseif SubString(s2s,0,8)=="-addtime"then
set udg_playedseconds[GetConvertedPlayerId(p2p)]=S2I(SubString(s2s,9,16))


Top
 Profile  
 
 Post subject: Re: [JASS] JJCP: NewGen
PostPosted: April 24th, 2022, 12:41 am 
Offline
Also Not an Admin, but closer than devoltz
User avatar

Joined: February 14th, 2018, 5:35 am
Posts: 1782
Title: Just Another S.Mod
Code:
if command == "addph" then
   call udg_playedseconds(Player( pid ) , value)
   endif
endif


There's an additional endif. Remove it. Is udg_playerseconds a variable? If so:

Code:
if command == "addph" then
   set udg_playedseconds[pid+1]=value
endif


Do not use "call" to change variables directly. "call" is used for FUNCTIONS.

GetConvertedPlayerId is just a GetPlayerId with a +1 at the end so that's why I added +1 instead of just "pid".


Top
 Profile  
 
 Post subject: Re: [JASS] JJCP: NewGen
PostPosted: April 24th, 2022, 1:15 am 
Offline
Cheater
User avatar

Joined: November 21st, 2016, 6:50 pm
Posts: 113
That was just a template I took from other map, I tried both with "set" and "call" and played around with pid+1 but to no avail.
The thing that confuses me is:

Code:
set udg_mathishard=(udg_playedseconds[GetConvertedPlayerId(ConvertedPlayer(S2I(udg_text)))]/ 60)
set udg_mathisdumb=(udg_mathishard/ 60)
call DisplayTextToForce(GetPlayersMatching(Condition(function Trig_infocheck_Func002Func010001001)),(I2S(udg_mathisdumb)+"hours game time"))



So I found out playedseconds is integer array, the other 2 are integers.
In old JJCP I managed to add time in seconds but not for hours.
I looked up some other maps that have CC and integer array variable is always inside I2S bracket if that makes sense but in my case that one is normal integer.
I tried all 3 variables in JJCP NG and NZCP and none of them worked.


E.g. this is some Russian map I found with CC in it, functions, variables, triggers are all scrambled but you can easily find variable by searching TriggerRegisterPlayerChatEvent and TriggerAddAction in -info function, both which are scrambled but nonetheless lead to time played function.
So all they did was copy entire call into their CC statement.
In my scenario that doesn't work because my statement is missing GetPlayerName and ID so PID+1 can't locate it I guess?
I don't know how to deal with this part "(Condition(function Trig_infocheck_Func002Func010001001)", deleting it just breaks the map.


Code:
f Command == "settime" then
    set LIL111[1+PID]=Value
    call DisplayTimedTextToPlayer(GetLocalPlayer(),0.,0.,10.,IIII11[GetConvertedPlayerId(Player(LIIII1))]+GetPlayerName(Player(LIIII1-1))+": |r|c000080C0играет уже|r  "+I2S(LIL111[LIIII1]+4)+" |c000080C0minute(s)|r")



I'm extremely sorry for going in such details but I put way too much into this and I'm a bit frustrated by this point. :neutral:


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

All times are UTC


Who is online

Users browsing this forum: No registered users and 1 guest


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)