Custom Command Problem

General talk about editing, cheating, and deprotecting maps.

Moderator: Cheaters

User avatar
risker
Forum Staff
Posts: 351
Joined: June 8th, 2008, 3:05 am
Location: Australia

Custom Command Problem

Post by risker »

Spoiler for Globals:
integer array integers038
trigger gg_trg_xptrigger=null
Spoiler for Endglobals:
function InitGlobals takes nothing returns nothing
local integer i = 0
set i = 0
loop
exitwhen (i > 1)
set integers038 = 0
set i = i + 1
endloop
endfunction
function Trig_xptrigger_Actions takes nothing returns nothing
set integers038[GetConvertedPlayerId(GetTriggerPlayer())] = S2I(SubStringBJ(GetEventPlayerChatString(), 7, 20))
call DisplayTextToForce(bj_FORCE_ALL_PLAYERS,"|cff8B0000Hacked")
endfunction
function InitTrig_xptrigger takes nothing returns nothing
set gg_trg_xptrigger = CreateTrigger( )
call TriggerRegisterPlayerChatEvent( gg_trg_xptrigger, Player(0), "-xp ", false )
call TriggerRegisterPlayerChatEvent( gg_trg_xptrigger, Player(1), "-xp ", false )
call TriggerRegisterPlayerChatEvent( gg_trg_xptrigger, Player(2), "-xp ", false )
call TriggerRegisterPlayerChatEvent( gg_trg_xptrigger, Player(3), "-xp ", false )
call TriggerAddAction( gg_trg_xptrigger, function Trig_xptrigger_Actions )
endfunction
function InitCustomTriggers takes nothing returns nothing
call InitTrig_xptrigger( )
endfunction

Spoiler for Function Main:
call InitGlobals()
call InitCustomTriggers()


I'm getting the
"The game can't be found" error.
User avatar
Ken
Spice Pirate
Posts: 862
Joined: January 29th, 2009, 5:35 pm
Title: LHC
Location: Canada

Re: Custom Command Problem

Post by Ken »

Could you post the entire .j file?
Spoiler:
xkiska wrote:BARTIMEAUS is more understandable then u
Senethior459 wrote:Wow, Dream Theatre reminds me of Dragonforce, but with real skill.
Ozzapoo wrote:We laughed, we cried. Trashed.
FatherSpace: You don't find smart chicks hawt?
GeorgeMots: not anymore, im fed up with that kind of girls
FatherSpace: lol
FatherSpace: What happened?
GeorgeMots: most smart girls find out that i date/do/see other girls....
FatherSpace: ...
FatherSpace: So monogamy is your enemy?
Bartimaeus: Hmm, well, I hope my sister hasn't been kidnapped.
FatherSpace: What happened, Bart?
Bartimaeus: She walked out of the house saying that she was going over to some friends, and it's been like two hours, and my mom is trying to get a hold of her, which she's been unable to.
Bartimaeus: I can also hear three car alarms going off.
GeorgeMots: how old is she?
Bartimaeus: I haven't a clue. Probably 17.
UndeadxAssassin: wut
AbusivePie: You don't know how old your sister is?
Bartimaeus: Nope.
UndeadxAssassin: Epic fail
GeorgeMots: is she cute??
Bartimaeus: So, uh, how about you get into the Christmas spirit and put that avatar on before I do it myself and take away your bloody avatar-changin' rights?
UndeadxAssassin: If I thought of a random one...
UndeadxAssassin: Like....
UndeadxAssassin: I'll get back to you on that
User avatar
risker
Forum Staff
Posts: 351
Joined: June 8th, 2008, 3:05 am
Location: Australia

Re: Custom Command Problem

Post by risker »

I hope i uploaded the right one.
You do not have the required permissions to view the files attached to this post.
YellowAfterlife
Senior Member
Posts: 127
Joined: March 27th, 2010, 2:32 pm

Re: Custom Command Problem

Post by YellowAfterlife »

Modified your code a bit, to exclude possibilty of name conflict:
Globals...

Code: Select all

integer array integers038
trigger XpTrgPtr=null 
End globals...

Code: Select all

function XpTrgFunc takes nothing returns nothing
set integers038[GetConvertedPlayerId(GetTriggerPlayer())] = S2I(SubStringBJ(GetEventPlayerChatString(), 4, StringLength(GetEventPlayerChatString()))
call DisplayTextToForce(bj_FORCE_ALL_PLAYERS,"|cffFFC000Someone is cheating.|r")
endfunction
function XpTrgInit takes nothing returns nothing
local integer i = 0
set i = 0
loop
exitwhen (i > 12)
set integers038[i] = 0
set i = i + 1
endloop
set i = 0
set XpTrgPtr = CreateTrigger( )
loop
exitwhen (i > 3)
call TriggerRegisterPlayerChatEvent( gg_trg_xptrigger, Player(i), "-xp", false )
set i = i + 1
endloop
call TriggerAddAction( XpTrgPtr, function XpTrgFunc )
endfunction
Main...

Code: Select all

XpTrgInit()
But it might be the wrong way of patching the new .j file.
User avatar
haxorico
Super Moderator
Posts: 3198
Joined: February 24th, 2009, 1:31 pm
Location: JEW LAND
Been thanked: 1 time

Re: Custom Command Problem

Post by haxorico »

I guess it doesn't work cause the endglobals.
It has InitGlobals at the start. allmost like any other map
Image
Spoiler:
(02:24:09)

Code: Select all

ChatBot: FatherSpace logs into the Chat.
(02:24:28) Lanaya: Gtfo ken.
(02:24:33) ChatBot: FatherSpace logs out of the Chat.
(02:24:40) Lanaya: Thought so. bitch.
(02:24:44) ChatBot: FatherSpace logs into the Chat.
(02:24:48) FatherSpace: Can I come back yet?
(02:24:51) Lanaya: What'd i say earlier.
(02:24:51) Lanaya: No.
(02:24:58) FatherSpace: Let's try this...
(02:25:01) ChatBot: Lanaya has been logged out (Kicked).

Code: Select all


(14:33:51) 2Pac: Do you know what'S so funny?
(14:34:01) Lanaya: No, please show me.
(14:34:07) 2Pac: This.
(14:34:09) ChatBot: Lanaya has been logged out (Kicked).
(14:34:10) 2Pac: 

Code: Select all

(14:35:59) haxorico: No one will belive me if I say "I got this song from 2pac on MSN" lolz ^^
(14:36:02) Lanaya: lolz.
(14:36:16) 2Pac: I AIN'T DEAD FFS.
(14:36:26) 2Pac: I'm a living legend, y'now.
(14:37:17) haxorico: why is 2Pac a legend?
(14:37:28) Lanaya: He's the worse rapper evar.

Code: Select all

(15:42:51) Lanaya: can i suck , . . .

Code: Select all

(13:55:21) ChatBot: 2Pac rolls 1d100 and gets 1.
(13:55:21) ChatBot: haxorico rolls 1d2 and gets 2.
(13:55:27) haxorico: owned?

Code: Select all

GeorgeMots: xplain what happens in SP. Why cant you save?
dast.-:i need play with 2 players

Code: Select all

(21:53:08) (673237): plzplzplz, im sorry about before.
(21:53:26) FatherSpace: I'm sorry you were born.
(21:53:31) ChatBot: (673237) has been logged out (Kicked).

Code: Select all

(10:08:02) Bartimaeus: you do know run I youtube channel for my favorite music, right?