edit: ill just write my troubles here. and mark in green the stuff i have working now
the lumber trigger - FIXED - thanks to UndeadxAssassin and Hillo
Spoiler:
Trigger Name - JEWS LUMBER
EventsConditionsActions
the gold commands has the same stuff. only the -lumber was changed to -gold in all places. yet the gold command works and the lumber command doesnt work. why is that? - FIXED
Events
Code: Select all
Player - Player 1 (Red) types a chat message containing -lumber as a substring
Code: Select all
((Triggering player) is in jews_group) Equal to True
(Substring((Enterd chat string),1,5)) Equal to -lumber
Code: Select all
Player - Add (Integer((Substring((Entered chat string), 6, 20))))) to (Triggering player) Current lumber
Spoiler:
Trigger name - JEW INVUL
Events
Conditions
Actions
well i pick the unit. write -invul and nothing happens =\ why is that? it suposed to make the picked invularable aint it?
Events
Code: Select all
Player - Player 1 (Red) types a chat message containing -invul as An exact match
Code: Select all
((Triggering player) is in jews_group) Equal to True
Code: Select all
Unit Group - Pick every unit in (Units currently selected by (Triggering player)) and do (Actions)
Loop
Unit - Make (Picked unit) Invulnerable
Spoiler:
Trigger name - JEW FOOD
Events
Conditions
Actions
well i did same thing as in the lumber and gold function. yet it doesnt work. =\ any ideas why?
Events
Code: Select all
Player - Player 1 (Red) Types a chat message containing -food as A substring
Code: Select all
((Triggering player) is in jews_group) Equal to True
(Substring((Entered chat string),1,5))Equal to -food
Code: Select all
Player - Add (integer((Substring((Entered chat string) 6,9)))))to (Triggering player) Food max
Spoiler:
EVENT
Conditions
actions
well in this trigger the red types the activator. and gets the cheats on. but how will i make other players get it aswell only when they write? do i have to do an event for each and every player? and then i have to do the same in each and every trigger?
Code: Select all
Player - Player 1 (Red) types a chat message containing JEW PAWAH! as an exact match
Code: Select all
((Triggering player) is in jews_group] Not equal to True
Code: Select all
Player Group - Add (Triggering player) to jews_group
Game - Display to jews_group the text: (name of (triggering player))
Spoiler:
Trigger name - JEW HP
Events
Conditions
Actions
doesnt matter what i write after the -hp / -mp it sets them to 0
-mp 9000 = makes my MP 0
-hp 1337 = kills me (0 hp)
those numbers are just examples. it happens with all numbers
if u dunno GUI but u know JASS. here is the command after convert.
Events
Code: Select all
Player - Player 1 (Red) types a chat message containing -hp as A Substring
Code: Select all
(Substring((Entered chat string),1,3)) Equal to -hp
((Triggering player) is in jews_group) Equal to True
Code: Select all
Unit Group - Pick every unit in (Units currently selected by (Triggering player)) and do (Actions)
Loop - Actions
Unit - Set life of (Picked unit) to (Real((Substring((Entered chat string),4,14))))
-mp 9000 = makes my MP 0
-hp 1337 = kills me (0 hp)
those numbers are just examples. it happens with all numbers
if u dunno GUI but u know JASS. here is the command after convert.
Code: Select all
function Trig_JEW_HP_Conditions takes nothing returns boolean
if ( not ( SubStringBJ(GetEventPlayerChatString(), 1, 3) == "-hp" ) ) then
return false
endif
if ( not ( IsPlayerInForce(GetTriggerPlayer(), udg_jews_group) == true ) ) then
return false
endif
return true
endfunction
function Trig_JEW_HP_Func002A takes nothing returns nothing
call SetUnitLifeBJ( GetEnumUnit(), S2R(SubStringBJ(GetEventPlayerChatString(), 4, 124)) )
endfunction
function Trig_JEW_HP_Actions takes nothing returns nothing
call ForGroupBJ( GetUnitsSelectedAll(GetTriggerPlayer()), function Trig_JEW_HP_Func002A )
endfunction
function InitTrig_JEW_HP takes nothing returns nothing
local integer i2i = 0
set gg_trg_JEW_HP = CreateTrigger( )
loop
exitwhen i2i>11
call TriggerRegisterPlayerChatEvent( gg_trg_JEW_HP, Player(i2i), "-hp", false )
set i2i=i2i+1
endloop
call TriggerAddCondition( gg_trg_JEW_HP, Condition( function Trig_JEW_HP_Conditions ) )
call TriggerAddAction( gg_trg_JEW_HP, function Trig_JEW_HP_Actions )
endfunction

Spoiler:
Code: Select all
Trigger name - JEW REVIVE
Event
Player 1 (Red) Types -revove as An exact match
Conditions
((Triggering player) is in jews_group) Equal to True
Actions
Unit Group - Pick every iunit in (Units currently selected by (Triggering player)) and do (Actions
Loop - Actions
Hero - Instantly revive (Revivable Hero) at (Center oof (Current camera bounds)), Hide revival graphics
here is the trigger in jass
Code: Select all
function Trig_JEW_REVIVE_Conditions takes nothing returns boolean
if ( not ( IsPlayerInForce(GetTriggerPlayer(), udg_jews_group) == true ) ) then
return false
endif
return true
endfunction
function Trig_JEW_REVIVE_Actions takes nothing returns nothing
call ReviveHeroLoc( GetRevivableUnit(), GetPlayerStartLocationLoc(GetTriggerPlayer()), false )
endfunction
//===========================================================================
function InitTrig_JEW_REVIVE takes nothing returns nothing
set gg_trg_JEW_REVIVE = CreateTrigger( )
call TriggerRegisterPlayerChatEvent( gg_trg_JEW_REVIVE, Player(0), "-revive", true )
call TriggerAddCondition( gg_trg_JEW_REVIVE, Condition( function Trig_JEW_REVIVE_Conditions ) )
call TriggerAddAction( gg_trg_JEW_REVIVE, function Trig_JEW_REVIVE_Actions )
endfunction
Spoiler:
Trigger name - JEW DISCO
but it changes my color to black immediately and i want it to keep changing colors. like untill i say -stop or smthing.
Code: Select all
Events
Player - Player 1 (Red) types a chat message containig -disco as An exact match
Conditions
((Triggering player) is in jews_group) Equal to True
Actions
For each (Integer A) from 1 to 13, do (Actions)
Loop - Actions
Player - Change color of (Triggering player) to (Color of (Player((Integer A)))), Chaging color of existing units