wc3edit.net

United Warcraft 3 map hacking!
It is currently September 16th, 2021, 10:35 am

All times are UTC




Post new topic Reply to topic  [ 25 posts ]  Go to page Previous  1, 2, 3
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: 33
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: 1602
Title: Just Another S.Mod
Post it so we can take a look


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

All times are UTC


Who is online

Users browsing this forum: No registered users and 3 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)