• 🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!

[JASS] Problem with Command Inti

Status
Not open for further replies.
Level 6
Joined
Jun 11, 2009
Messages
151
Actually i fixed most of it.. But theres some spots like
JASS:
local player p=GetPlayer(s,5)

JASS:
   set gg_trg_Alch = CreateTrigger(  )


JASS:
globals 
trigger gg_trg_BXP
trigger gg_trg_CM
trigger gg_trg_RD
trigger gg_Trg_Alch
endglobals

function RDItems2Units takes nothing returns nothing
set udg_ItemPicks[1]='I005' // Human
set udg_ItemPicks[2]='I00J' // Draenei
set udg_ItemPicks[3]='I00M' // Arachnid
set udg_ItemPicks[4]='I00Q' // Alchemist
endfunction

function Trig_RD_Actions takes nothing returns nothing
local player PlayersTurn=null
local integer j=0
local integer i=CountPlayersInForceBJ(udg_RDGroup)
call DisplayTextToForce(bj_FORCE_ALL_PLAYERS,("Selections will be now begin, a new player will be selected every 15 seconds.  Players that have not picked 15 seconds after the last players turn will be removed."))
loop
exitwhen i==0
set PlayersTurn=ForcePickRandomPlayer(udg_RDGroup)
set j=(1+GetPlayerId(PlayersTurn))
if(i==1)then
call DisplayTextToForce(bj_FORCE_ALL_PLAYERS,("Is it "+udg_PlayerName[j]+"'s turn.  This is the last player to pick."))
else
call DisplayTextToForce(bj_FORCE_ALL_PLAYERS,("Is it "+udg_PlayerName[j]+"'s turn."))
endif
call StartSoundForPlayerBJ(Player(j-1), gg_snd_StartOrRD)
call SetPlayerState(Player(j-1),PLAYER_STATE_RESOURCE_GOLD,1)
call SetPlayerState(Player(j-1),PLAYER_STATE_RESOURCE_LUMBER,100)
call ForceRemovePlayer(udg_RDGroup,PlayersTurn)
call PolledWait(15.)
set i=i-1
endloop
endfunction

function Trig_RD_Prep takes nothing returns nothing
local integer i=0
call DisableTrigger (gg_trg_RD)
call DisableTrigger (gg_trg_Alch)
set udg_Rd_rdy=1
set udg_Rd_on=1
call ExecuteFunc("RDItems2Units")
loop
exitwhen i>9
call SetPlayerState(Player(i),PLAYER_STATE_RESOURCE_GOLD,0)
set i=i+1
endloop
call RemoveUnit(gg_unit_n004_0016)
set gg_unit_n004_0016=null
set gg_unit_n004_0016=CreateUnit(Player(15),'n00l',-10964.8,10716.3,512.0)
call DisplayTextToForce(bj_FORCE_ALL_PLAYERS,(("|cffff0000"+GetPlayerName(Player(0)))+("|r has activated |cffffcc00Random Draft|r mode. Players will be randomly selected to choose their builder.  Each builder can only be selected once.")))
set i=0
endfunction

function Trig_Alch_Actions takes nothing returns nothing
local string s=StringCase(GetEventPlayerChatString(),false)
local player p=GetPlayer(s,5)
local player pk=null
local integer i=GetPlayerId(p)+1
local integer k=0
if(SubString(s,5,8)=="ffa")then
set k=0
call DisplayTextToForce(bj_FORCE_ALL_PLAYERS,("Alchemist has been enabled for all players to pick."))
loop
exitwhen k>10
set pk=Player(k)
call SetPlayerState(pk,PLAYER_STATE_RESOURCE_GOLD,2)
set k=k+1
endloop
elseif i<11 then
call DisplayTextToForce(bj_FORCE_ALL_PLAYERS,(udg_PlayerName[i]+" may choose Alchemist."))
call SetPlayerState(p,PLAYER_STATE_RESOURCE_GOLD,2)
endif
endfunction

function Trig_BXP_Actions takes nothing returns nothing
    set udg_BXP = udg_BXP + 100
    call DisplayTextToForce( GetPlayersAll(), ( ( "|cffff0000" + GetPlayerName(Player(0)) ) + ( " |rhas turned on |cffffcc00BXP|r mode. " + " The Demon and his minions will gain double the experience for all kills." ) ) )
    call DisableTrigger(gg_trg_BXP)
endfunction

function Trig_CM_Actions takes nothing returns nothing
    call DisplayTextToForce( GetPlayersAll(), ( ( "|cffff0000" + GetPlayerName(Player(0)) ) + ( " |rhas activated |cffffcc00CM|r mode. " + " Instead of mining gold, builders will pick up gold coins for gold." ) ) )
    call DisplayTextToForce( udg_DemonsGroup, "Demon:  Attack Coins to destroy them, leaving the builders with less gold.  Most of the gold spawns in the middle of the map." )
    call DisableTrigger(gg_trg_CM)
    call PolledWait(60.00)
    call ExecuteFunc("Coin_Mode")
endfunction

function Coin_Mode takes nothing returns nothing
call CreateItem('I027'  , GetRandomReal(-3500,2500),GetRandomReal(-2500,3000))
call CreateItem('I027'  , GetRandomReal(-2000,800),GetRandomReal(-1500,600))
call CreateItem('I027'  , GetRandomReal(-2000,800),GetRandomReal(-1500,600))
call PolledWait(15.00)
call ExecuteFunc("Coin_Mode")
endfunction

function InitTrig_Initilize takes nothing returns nothing
    set gg_trg_BXP = CreateTrigger(  )
    call TriggerRegisterPlayerChatEvent( gg_trg_BXP, Player(0), "-Bxp", true )
    call TriggerAddAction( gg_trg_BXP, function Trig_BXP_Actions )
    call TriggerRegisterPlayerChatEvent( gg_trg_CM, Player(0), "-cm", true)
    call TriggerAddAction( gg_trg_CM, function Trig_CM_Actions)
    set gg_trg_RD = CreateTrigger(  )
    call TriggerRegisterPlayerChatEvent( gg_trg_RD, Player(0), "-rd", true )
    call TriggerAddAction( gg_trg_RD, function Trig_RD_Prep )
    set gg_trg_Alch = CreateTrigger(  )
    call TriggerRegisterPlayerChatEvent( gg_trg_Alch, Player(0), "-alch", true )
    call TriggerAddAction( gg_trg_Alch, function Trig_Alch_Actions )
    call TriggerAddAction( gg_trg_BXP, function Trig_BXP_Actions )
endfunction
 
Last edited:
Level 7
Joined
May 3, 2007
Messages
210
GetPlayer isn't a function.

Player is, GetPlayers is, but GetPlayer is not.
also you have a capital T when you declare that global. gg_Trg_Alch
 
Status
Not open for further replies.
Top