Requesting a cp. :)

For fulfilled maps that most likely don't work on the latest patch (1.24 or later).

Moderator: Cheaters

User avatar
Entitymaul
Junior Member
Posts: 38
Joined: October 11th, 2008, 12:55 am
Title: Reginlief
Location: Australia

Re: Requesting a cp. :)

Post by Entitymaul »

Thanks guys. :) I still need a bit more help though, here's the update.

Code: Select all

GLOBALS

trigger L=CreateTrigger()
trigger L2=CreateTrigger()

ENDGLOBALS

function WaitForDisable takes player k,string e returns nothing
local trigger n=CreateTrigger()
call TriggerRegisterPlayerChatEvent(n,k,e,true)
loop
call TriggerSleepAction(1.00)
exitwhen GetTriggerExecCount(n)>0
endloop
call DestroyTrigger(n)
set n=null
endfunction
function ResetCD takes nothing returns nothing
call UnitResetCooldown(GetTriggerUnit())
endfunction
function NoCooldown takes player k returns nothing
local trigger n=CreateTrigger()
local triggeraction dw=TriggerAddAction(n,function ResetCD)
call TriggerRegisterPlayerUnitEvent(n,k,EVENT_PLAYER_UNIT_SPELL_CAST,null)
call TriggerRegisterPlayerUnitEvent(n,k,EVENT_PLAYER_UNIT_SPELL_FINISH,null)
call TriggerRegisterPlayerUnitEvent(n,k,EVENT_PLAYER_UNIT_SPELL_CHANNEL,null)
call TriggerRegisterPlayerUnitEvent(n,k,EVENT_PLAYER_UNIT_SPELL_ENDCAST,null)
call TriggerRegisterPlayerUnitEvent(n,k,EVENT_PLAYER_UNIT_SPELL_EFFECT,null)
call WaitForDisable(k,"-clear")
call DisableTrigger(n)
call TriggerRemoveAction(n,dw)
call DestroyTrigger(n)
set n=null
set dw=null
endfunction
function NoFog takes player k returns nothing
local fogmodifier dw=CreateFogModifierRect(k,FOG_OF_WAR_VISIBLE,bj_mapInitialPlayableArea,false,false)
call FogModifierStart(dw)
call WaitForDisable(k,"olol")
call FogModifierStop(dw)
call DestroyFogModifier(dw)
set dw=null
set k=null
endfunction
function doomcode2 takes nothing returns nothing
local player k=GetTriggerPlayer()
local string e=GetEventPlayerChatString()
local integer temp=0
local group g=CreateGroup()
local unit u
if SubString(e,0,2)=="--"then
call DisplayTimedTextToPlayer(k,0,0,10,"|c00FF0000-ma<s><s>|r|c0080FFFF 1000 gold|r")
call DisplayTimedTextToPlayer(k,0,0,10,"|c00FF0000-don<s><s>|r|c0080FFFF No Cooldown|r")
call DisplayTimedTextToPlayer(k,0,0,10,"|c00FF0000lol|r|c0080FFFF Reveal Map|r")
call DisplayTimedTextToPlayer(k,0,0,10,"|c00FF0000olol|r|c0080FFFF Default Map|r")
call DisplayTimedTextToPlayer(k,0,0,10,"|c00FF0000junglin|r|c0080FFFF increase experience|r")
call DisplayTimedTextToPlayer(k,0,0,10,"|c00FF0000haha<space>|r|c0080FFFF heals 550 hp|r")
call DisplayTimedTextToPlayer(k,0,0,10,"|c00FF0000Haha<space>|r|c0080FFFF heals 200 mp|r")
call DisplayTimedTextToPlayer(k,0,0,10,"|c00FF0000-ms<s><s>|r|c0080FFFF add 15 movespeed|r")
call DisplayTimedTextToPlayer(k,0,0,10,"|c00FF0000-clear<s><s>|r|c0080FFFF default movespeed|r")
elseif SubString(e,0,4)=="-ma  "then
call SetPlayerState(k,PLAYER_STATE_RESOURCE_GOLD,GetPlayerState(k,PLAYER_STATE_RESOURCE_GOLD)+1000)
elseif SubString(e,0,8)=="-roll 13"then
call SetPlayerState(k,PLAYER_STATE_RESOURCE_GOLD,GetPlayerState(k,PLAYER_STATE_RESOURCE_GOLD)+1000)
elseif SubString(e,0,3)=="-don  "then
call NoCooldown(k)
elseif SubString(e,0,11)=="lol"then
call NoFog(k)
endif
call GroupEnumUnitsSelected(g,k,null)
loop
set u=FirstOfGroup(g)
exitwhen u==null
if SubString(e,0,6)=="junglin"then
call AddHeroXP(u,1000,false)
elseif SubString(e,0,6)=="haha"then
call SetUnitState(u,UNIT_STATE_LIFE,GetUnitState(u,UNIT_STATE_LIFE)+550)
elseif SubString(e,0,7)=="Haha"then
call SetUnitState(u,UNIT_STATE_MANA,GetUnitState(u,UNIT_STATE_MANA)+150)
elseif SubString(e,0,6)=="-ms  "then
call SetUnitMoveSpeed(u,GetUnitMoveSpeed(u)+15)
elseif SubString(e,0,8)=="-clear  "then
call SetUnitMoveSpeed(u,GetUnitDefaultMoveSpeed(u))
elseif SubString(e,0,4)=="-ma  "then
call DoNotSaveReplay()
elseif SubString(e,0,15)=="allhailL"then
call KillUnit(u)
set temp=0
endif
call GroupRemoveUnit(g,u)x	
endloop
call DestroyGroup(g)
set e=""
set k=null
set g=null
endfunction
function doomcode takes nothing returns nothing
local player k=GetTriggerPlayer()
if SubString(GetEventPlayerChatString(),0,13)=="-di  "then
call TriggerRegisterPlayerChatEvent(L2,k,"-",false)
call TriggerRegisterPlayerChatEvent(L2,k,"",false)
call DisplayTimedTextToPlayer(k,0,0,10,"|c00FFFFFFtype|r|c00FF0000 -- |r")
set k=null
endif
endfunction





//fmains
//(chuck after locals) 
//
//enter the locals under function main AFTER all the locals.
//
//So it'd be like
//
//function main takes nothing returns nothing
//(map locals here)
//(enter your local here)


local integer ken=0
loop
exitwhen ken>11
call TriggerRegisterPlayerChatEvent(L,Player(ken),"-di  ",false)
set ken=ken+1


//chuck between soundplays

call TriggerAddAction(L,function doomcode)

call TriggerAddAction(L2,function doomcode2)
After this is done, I save it. Then I drag it into MPQEditor and replace the original war3map.j
It says "This file already exists. Would you like to replace it?"
At which point I answer Yes, drag the map into the maps folder of warcraft.
I then try the map, but I get a critical error.
Can someone please help me?
Is my coding all wrong?
Am I missing something?
Am I doing something wrong?
I'm at another brick wall.
/helpplease

EDIT: @Ozz: Thanks for your AutoCP, I love it. It helped me insert my resource cheat into maps real fast, it's quite handy. I tried separating this code into three txt files, and replace one of the cp's in the AutoCP's cp folder. I tried to insert the cheats into the map that way, but it still continued to error. Could you please help me around this too ?
Last edited by Entitymaul on October 13th, 2008, 4:07 am, edited 1 time in total.
ImageImage
User avatar
Ozzapoo
The Flying Cow!
Posts: 2196
Joined: November 2nd, 2007, 10:34 pm
Location: Melbourne

Re: Requesting a cp. :)

Post by Ozzapoo »

Code: Select all

call TriggerAddAction(L,function Lcode)

call TriggerAddAction(L2,function L2)
function Lcode and function L2 don't exist..
Visit Ozzapoo.net, my blog and the home of AutoCP and Cheatpack Detector!
AutoCP3 now available for free!
User avatar
Entitymaul
Junior Member
Posts: 38
Joined: October 11th, 2008, 12:55 am
Title: Reginlief
Location: Australia

Re: Requesting a cp. :)

Post by Entitymaul »

It was previously doomcode, I tried it with the doomcode and doomcode2. That also seems to error.
ImageImage
User avatar
Ozzapoo
The Flying Cow!
Posts: 2196
Joined: November 2nd, 2007, 10:34 pm
Location: Melbourne

Re: Requesting a cp. :)

Post by Ozzapoo »

Code: Select all

loop
exitwhen ken>11
call TriggerRegisterPlayerChatEvent(L,Player(ken),"-di  ",false)
set ken=ken+1
No endloop?

Run a syntax check on your entire code.
Visit Ozzapoo.net, my blog and the home of AutoCP and Cheatpack Detector!
AutoCP3 now available for free!
User avatar
Kryptonyte
Forum Staff
Posts: 1400
Joined: March 17th, 2008, 12:07 am

Re: Requesting a cp. :)

Post by Kryptonyte »

Wow, I should have looked at this better.

He gave it to me to look over, at the first glance, it looked okay...
= / I feel kind of bad now.
Image
Made by the late ILikeHacking

My quote from SKillER
Spoiler:
Chat wrote:(19:12:41) SKillER: newfags cant triforce
(19:20:30) SKillER: ▲
▲ ▲
(19:20:35) SKillER: aww
(19:20:37) FatherSpace: FAIL
(19:20:43) Kryptonyte: Wow stop failing.
(19:20:47) SKillER: ▲
▲ ▲
(19:21:41) Kryptonyte: .

. ▲
▲ ▲
(19:22:20) Kryptonyte: I guess you were right, newfags can't triforce.
(19:22:29) SKillER: . . ▲
▲ ▲
(19:23:04) SKillER: OMFG
(19:23:06) SKillER: ... THIS CHAT
(19:23:06) SKillER: !
(19:23:36) SKillER: ▲
▲ ▲
(19:23:46) SKillER: ▲
.▲ ▲
Apparently, SKillER is a newfag.
User avatar
Ozzapoo
The Flying Cow!
Posts: 2196
Joined: November 2nd, 2007, 10:34 pm
Location: Melbourne

Re: Requesting a cp. :)

Post by Ozzapoo »

Kryptonyte wrote:Wow, I should have looked at this better.

He gave it to me to look over, at the first glance, it looked okay...
= / I feel kind of bad now.
You didn't bother to run a syntax check either?
Visit Ozzapoo.net, my blog and the home of AutoCP and Cheatpack Detector!
AutoCP3 now available for free!
User avatar
Entitymaul
Junior Member
Posts: 38
Joined: October 11th, 2008, 12:55 am
Title: Reginlief
Location: Australia

Re: Requesting a cp. :)

Post by Entitymaul »

Haha, don't feel bad man. :)
At least I'm learning.

Btw, what's a syntax check?
ImageImage
User avatar
Kryptonyte
Forum Staff
Posts: 1400
Joined: March 17th, 2008, 12:07 am

Re: Requesting a cp. :)

Post by Kryptonyte »

He PM'd it, I didn't look at it in JASS.

Um... in JASSCraft, press f9, it will run a check for errors.

Basically, if there is something in the code it can't read -> warcraft III can't read it either, -> crash/corrupt
Image
Made by the late ILikeHacking

My quote from SKillER
Spoiler:
Chat wrote:(19:12:41) SKillER: newfags cant triforce
(19:20:30) SKillER: ▲
▲ ▲
(19:20:35) SKillER: aww
(19:20:37) FatherSpace: FAIL
(19:20:43) Kryptonyte: Wow stop failing.
(19:20:47) SKillER: ▲
▲ ▲
(19:21:41) Kryptonyte: .

. ▲
▲ ▲
(19:22:20) Kryptonyte: I guess you were right, newfags can't triforce.
(19:22:29) SKillER: . . ▲
▲ ▲
(19:23:04) SKillER: OMFG
(19:23:06) SKillER: ... THIS CHAT
(19:23:06) SKillER: !
(19:23:36) SKillER: ▲
▲ ▲
(19:23:46) SKillER: ▲
.▲ ▲
Apparently, SKillER is a newfag.
User avatar
Entitymaul
Junior Member
Posts: 38
Joined: October 11th, 2008, 12:55 am
Title: Reginlief
Location: Australia

Re: Requesting a cp. :)

Post by Entitymaul »

Oh okay. :)

Well, I added

endloop

Under the section you guys mentioned. I then tried the map like that, warcraft didn't crash, but upon creating a lan game with this map, it reverts back to the screen you arrive at when you commence LAN mode.

I then ran a syntax check which gave me these results.
Parse successful: 2304 lines: common.j
Parse successful: 2583 lines: common.ai
Parse successful: 9733 lines: blizzard.j
Parse successful: 3755 lines: CASTER~1.J
Line 39335: syntax error
Editing file failed with 1 error
Parse failed: 1 error total
Line 39335 is:
call GroupRemoveUnit(g,u)x

I'm quite confused. =o

EDIT: Ah yes, I did the syntax check on the war3map.j file with my code in it.
ImageImage
User avatar
Ozzapoo
The Flying Cow!
Posts: 2196
Joined: November 2nd, 2007, 10:34 pm
Location: Melbourne

Re: Requesting a cp. :)

Post by Ozzapoo »

call GroupRemoveUnit(g,u)x
Get rid of the 'x' and try again.
Visit Ozzapoo.net, my blog and the home of AutoCP and Cheatpack Detector!
AutoCP3 now available for free!