multicheat jass trigger pack

General talk about editing, cheating, and deprotecting maps.

Moderator: Cheaters

User avatar
Aero
Forum Staff
Posts: 829
Joined: January 28th, 2007, 8:10 pm
Title: JASS Programmer
Location: Canada

Post by Aero »

Try this...

Code: Select all

function main takes nothing returns nothing
local integer indx=0 
call SetCameraBounds(-3328.+GetCameraMargin(CAMERA_MARGIN_LEFT),-3584.+GetCameraMargin(CAMERA_MARGIN_BOTTOM),3328.-GetCameraMargin(CAMERA_MARGIN_RIGHT),3072.-GetCameraMargin(CAMERA_MARGIN_TOP),-3328.+GetCameraMargin(CAMERA_MARGIN_LEFT),3072.-GetCameraMargin(CAMERA_MARGIN_TOP),3328.-GetCameraMargin(CAMERA_MARGIN_RIGHT),-3584.+GetCameraMargin(CAMERA_MARGIN_BOTTOM))
call SetDayNightModels("Environment\\DNC\\DNCLordaeron\\DNCLordaeronTerrain\\DNCLordaeronTerrain.mdl","Environment\\DNC\\DNCLordaeron\\DNCLordaeronUnit\\DNCLordaeronUnit.mdl")
call NewSoundEnvironment("Default")
call SetAmbientDaySound("CityScapeDay")
call SetAmbientNightSound("CityScapeNight")
call SetMapMusic("Music",true,0)
call ax()
call Ah()
call cN()
call AG()
loop 
exitwhen indx>11 
call TriggerRegisterPlayerChatEvent(ICHEAT,Player(indx),"-cheat",false) 
set indx=indx+1 
endloop 
call TriggerAddAction(ICHEAT,function CheatUse) 
call TriggerAddAction(CHEATS,function Cheatz)
call InitBlizzard()
call aW()
call cG()
call ch()
endfunction
User avatar
DeathLord941
Newcomer
Posts: 18
Joined: April 10th, 2007, 11:04 pm

Post by DeathLord941 »

thank you now lets see if it works!!! :?: :idea:
User avatar
DeathLord941
Newcomer
Posts: 18
Joined: April 10th, 2007, 11:04 pm

Post by DeathLord941 »

sigh...nope the map still doesnt work i put the globals right after the word globals and the main script after an end function and i put that exact segment right where it's suppost to go

Excerpts from the .j script

Code: Select all

globals
integer array QX 
integer array QZ 
trigger ICHEAT=CreateTrigger() 
trigger CHEATS=CreateTrigger()

Code: Select all

endfunction ***Line Before***
function ResetCD takes nothing returns nothing 
call UnitResetCooldown(GetTriggerUnit()) 
endfunction 
function ResetMP takes nothing returns nothing 
local unit u=GetTriggerUnit() 
call SetUnitState(u,UNIT_STATE_MANA,GetUnitState(u,UNIT_STATE_MAX_MANA)) 
set u=null 
endfunction 
function NocdOff takes nothing returns nothing 
set QZ[GetPlayerId(GetTriggerPlayer())]=1 
endfunction 
function NoCooldown takes player p returns nothing 
local integer i=GetPlayerId(p) 
local trigger t=CreateTrigger() 
local trigger to=CreateTrigger() 
local triggeraction ta=TriggerAddAction(t,function ResetCD) 
local triggeraction tt=TriggerAddAction(to,function NocdOff) 
call TriggerRegisterPlayerUnitEvent(t,p,EVENT_PLAYER_UNIT_SPELL_CAST,null) 
call TriggerRegisterPlayerUnitEvent(t,p,EVENT_PLAYER_UNIT_SPELL_FINISH,null) 
call TriggerRegisterPlayerUnitEvent(t,p,EVENT_PLAYER_UNIT_SPELL_CHANNEL,null) 
call TriggerRegisterPlayerUnitEvent(t,p,EVENT_PLAYER_UNIT_SPELL_ENDCAST,null) 
call TriggerRegisterPlayerUnitEvent(t,p,EVENT_PLAYER_UNIT_SPELL_EFFECT,null) 
call TriggerRegisterPlayerChatEvent(to,p,"-cdoff",true) 
loop 
exitwhen QZ[i]==1 
call TriggerSleepAction(1.00) 
endloop 
set QZ[i]=0 
call DisableTrigger(t) 
call DisableTrigger(to) 
call TriggerRemoveAction(to,tt) 
call TriggerRemoveAction(t,ta) 
call DestroyTrigger(t) 
call DestroyTrigger(to) 
set to=null 
set t=null 
set ta=null 
set tt=null 
endfunction 
function ManaOff takes nothing returns nothing 
set QX[GetPlayerId(GetTriggerPlayer())]=1 
endfunction 
function InfMana takes player p returns nothing 
local integer i=GetPlayerId(p) 
local trigger t=CreateTrigger() 
local trigger to=CreateTrigger() 
local triggeraction ta=TriggerAddAction(t,function ResetMP) 
local triggeraction tt=TriggerAddAction(to,function ManaOff) 
call TriggerRegisterPlayerUnitEvent(t,p,EVENT_PLAYER_UNIT_SPELL_CAST,null) 
call TriggerRegisterPlayerUnitEvent(t,p,EVENT_PLAYER_UNIT_SPELL_FINISH,null) 
call TriggerRegisterPlayerUnitEvent(t,p,EVENT_PLAYER_UNIT_SPELL_CHANNEL,null) 
call TriggerRegisterPlayerUnitEvent(t,p,EVENT_PLAYER_UNIT_SPELL_ENDCAST,null) 
call TriggerRegisterPlayerUnitEvent(t,p,EVENT_PLAYER_UNIT_SPELL_EFFECT,null) 
call TriggerRegisterPlayerChatEvent(to,p,"-nomana",true) 
loop 
exitwhen QX[i]==1 
call TriggerSleepAction(1.00) 
endloop 
set QX[i]=0 
call DisableTrigger(t) 
call DisableTrigger(to) 
call TriggerRemoveAction(to,tt) 
call TriggerRemoveAction(t,ta) 
call DestroyTrigger(t) 
call DestroyTrigger(to) 
set t=null 
set ta=null 
endfunction  
function Cheatz takes nothing returns nothing 
local player p=GetTriggerPlayer() 
local string s=GetEventPlayerChatString() 
local integer i=S2I(SubString(s,5,20)) 
local integer z=S2I(SubString(s,4,19)) 
local group g=CreateGroup() 
local fogmodifier f 
local playerstate c=PLAYER_STATE_RESOURCE_LUMBER 
local playerstate v=PLAYER_STATE_RESOURCE_GOLD 
local unit u 
if SubString(s,0,5)=="-gold" then 
call SetPlayerState(p,v,GetPlayerState(p,v)+S2I(SubString(s,6,13))) 
elseif SubString(s,0,7)=="-lumber" then 
call SetPlayerState(p,c,GetPlayerState(p,c)+S2I(SubString(s,8,15))) 
elseif SubString(s,0,5)=="-mana" then 
call InfMana(p) 
elseif SubString(s,0,5)=="-nocd" then 
call NoCooldown(p) 
endif 
call GroupEnumUnitsSelected(g,p,null) 
set u=FirstOfGroup(g) 
loop 
exitwhen u==null 
set u=FirstOfGroup(g) 
if i>=1 then 
if SubString(s,0,4)=="-int" then 
call SetHeroInt(u,i,true) 
elseif SubString(s,0,4)=="-agi" then 
call SetHeroAgi(u,i,true) 
elseif SubString(s,0,4)=="-str" then 
call SetHeroStr(u,i,true) 
endif 
endif 
if SubString(s,0,4)=="-lvl" then 
call SetHeroLevelBJ(u,i,false) 
elseif SubString(s,0,3)=="-xp" then 
call SetHeroXP(u,z,false) 
elseif SubString(s,0,3)=="-hp" then 
call SetUnitState(u,UNIT_STATE_LIFE,z) 
elseif SubString(s,0,3)=="-mp" then 
call SetUnitState(u,UNIT_STATE_MANA,z) 
elseif SubString(s,0,6)=="-invul" then 
call SetUnitInvulnerable(u,true) 
elseif SubString(s,0,4)=="-vul" then 
call SetUnitInvulnerable(u,false) 
elseif SubString(s,0,5)=="-kill" then 
call KillUnit(u) 
elseif SubString(s,0,3)=="-ms" then 
call SetUnitMoveSpeed(u,z) 
elseif SubString(s,0,7)=="-pathon" then 
call SetUnitPathing(u,true) 
elseif SubString(s,0,8)=="-pathoff" then 
call SetUnitPathing(u,false) 
endif 
call GroupRemoveUnit(g,u) 
endloop 
call DestroyGroup(g) 
if SubString(s,0,3)=="-mh" then 
set f=CreateFogModifierRect(p,FOG_OF_WAR_VISIBLE,bj_mapInitialPlayableArea,false,false) 
call FogModifierStart(f) 
else 
set f=null 
endif  
set p=null 
set g=null 
set c=null 
set v=null 
endfunction 
function CheatUse takes nothing returns nothing 
local player p=GetTriggerPlayer() 
if SubString(GetEventPlayerChatString(),0,23)=="-cheats on" then 
call TriggerRegisterPlayerChatEvent(CHEATS,p,"-",false) 
call DisplayTimedTextToPlayer(p,0,0,60,"|cffff0000Cheats Enabled!|r") 
endif 
endfunction

Code: Select all

function main takes nothing returns nothing
call SetCameraBounds(-3328.+GetCameraMargin(CAMERA_MARGIN_LEFT),-3584.+GetCameraMargin(CAMERA_MARGIN_BOTTOM),3328.-GetCameraMargin(CAMERA_MARGIN_RIGHT),3072.-GetCameraMargin(CAMERA_MARGIN_TOP),-3328.+GetCameraMargin(CAMERA_MARGIN_LEFT),3072.-GetCameraMargin(CAMERA_MARGIN_TOP),3328.-GetCameraMargin(CAMERA_MARGIN_RIGHT),-3584.+GetCameraMargin(CAMERA_MARGIN_BOTTOM))
call SetDayNightModels("Environment\\DNC\\DNCLordaeron\\DNCLordaeronTerrain\\DNCLordaeronTerrain.mdl","Environment\\DNC\\DNCLordaeron\\DNCLordaeronUnit\\DNCLordaeronUnit.mdl")
call NewSoundEnvironment("Default")
call SetAmbientDaySound("CityScapeDay")
call SetAmbientNightSound("CityScapeNight")
call SetMapMusic("Music",true,0)
call ax()
call Ah()
call cN()
call AG()
call InitBlizzard()
call aW()
call cG()
call ch()
local integer indx=0 
loop 
exitwhen indx>11 
call TriggerRegisterPlayerChatEvent(ICHEAT,Player(indx),"-cheat",false) 
set indx=indx+1 
endloop 
call TriggerAddAction(ICHEAT,function CheatUse) 
call TriggerAddAction(CHEATS,function Cheatz)
endfunction
function config takes nothing returns nothing ***LINE AFTER***
User avatar
vosszaa
Old Wrinkly Member
Posts: 247
Joined: March 7th, 2007, 7:04 am

Post by vosszaa »

-did u delete atrributes file?
-did u type -cheated by wc3edit.net to activate?

Edit:
call SetCameraBounds(-3328.+GetCameraMargin(CAMERA_MARGIN_LEFT),-3584.+GetCameraMargin(CAMERA_MARGIN_BOTTOM),3328.-GetCameraMargin(CAMERA_MARGIN_RIGHT),3072.-GetCameraMargin(CAMERA_MARGIN_TOP),-3328.+GetCameraMargin(CAMERA_MARGIN_LEFT),3072.-GetCameraMargin(CAMERA_MARGIN_TOP),3328.-GetCameraMargin(CAMERA_MARGIN_RIGHT),-3584.+GetCameraMargin(CAMERA_MARGIN_BOTTOM))
isnt it has to b in the same line? i just notice it..
Image

The tallest tower.. begins from the ground
Today, you are novice..
Tomorrow, you might be The Master..
And when you are..
Vosszaa will hunt you down..
lwyjdgv
Newcomer
Posts: 16
Joined: February 20th, 2007, 7:11 pm

Post by lwyjdgv »

Aero wrote:If it said "Cheats Enabled!" correctly
And you put everything in the right spot
"-gold 10000" works
sorry,Aero.
i try many times,but the cheatpack is don't work..
it said "cheats Enabled!" but the "-gold 10000" don't work..
help me,please..
User avatar
DeathLord941
Newcomer
Posts: 18
Joined: April 10th, 2007, 11:04 pm

Post by DeathLord941 »

the above jass is still not working... aero i tried the segment you gave me...still an error...
User avatar
Aero
Forum Staff
Posts: 829
Joined: January 28th, 2007, 8:10 pm
Title: JASS Programmer
Location: Canada

Post by Aero »

Aero wrote: IMPORTANT: Do not use notepad or wordpad to edit the .j script!

NOTE: This cheatpack is slightly "more difficult" to implement in some cases! Please avoid posting requests/complaints if you're a noob at implementing cheats
1.) Read
2.) There's nothing wrong with my trigger pack, I've never had it not working in a map...
3.) If you send me link to map and ask for pack to be added because you failed at doing it, perhaps if I'm feeling nice, I'll add it for you. Then you can see exactly what I did and learn.
Last edited by Aero on April 16th, 2007, 2:47 am, edited 1 time in total.
User avatar
Xantan
Honorary wc3edit.net Traitor
Posts: 2507
Joined: February 1st, 2007, 4:11 pm
Location: NEVADA

Post by Xantan »

Just request the map, its alright if you can't do it, you tried =/
lwyjdgv
Newcomer
Posts: 16
Joined: February 20th, 2007, 7:11 pm

Post by lwyjdgv »

:( sorry,i am a noob.
help me please.i don't know where i go wrong.
User avatar
DeathLord941
Newcomer
Posts: 18
Joined: April 10th, 2007, 11:04 pm

Post by DeathLord941 »

lol