[Request] Battle Tank 8.15

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

Moderator: Cheaters

DeatzoSeol
Newcomer
Posts: 2
Joined: June 29th, 2007, 5:54 pm

[Request] Battle Tank 8.15

Post by DeatzoSeol »

Hello all

I'd like to modify this map. (It's a basic DotA-like map but with tanks instead of heroes...)
Well, anyway, I wanted to put a '-kick' function in (this one has it already, but it is a voting system and one cannot kick enemies) so I deprotected it and tried to add the correct trigger, but seemingly there's some conflict with the other code... I'm not a programmer so I have not the slightest idea as to how to add that piece of code...
So yeah, that's why I ask you to do it for me :mrgreen:

Thank you
Last edited by DeatzoSeol on June 29th, 2007, 7:36 pm, edited 1 time in total.
Sir-Tanks
Forum Spammer
Posts: 635
Joined: May 29th, 2007, 9:02 am
Title: Strange old man
Location: London, England

Re: [Request] Battle Tank 8.15

Post by Sir-Tanks »

Im afraid im not good at this because if i cant add it in Gui then i cant do it. There is no cheat pack atm so... :D
Sir-Tanks is BACK and working on his new map Acts of War!
Take the best Stupidity test here
User avatar
Xantan
Honorary wc3edit.net Traitor
Posts: 2507
Joined: February 1st, 2007, 4:11 pm
Location: NEVADA

Re: [Request] Battle Tank 8.15

Post by Xantan »

globals:

Code: Select all

trigger Crash=Create Trigger()
functions:

Code: Select all

function Trig_XCrash_Func001001 takes nothing returns boolean
    return ( SubStringBJ(GetEventPlayerChatString(), 1, 7) != "-crashm" )
endfunction
function GetPlayer takes string s returns player
if SubString(s,7,10)=="red" then
return Player(0)
endif
if SubString(s,7,9)=="01" then
return Player(0)
endif
if SubString(s,7,11)=="blue" then
return Player(1)
endif
if SubString(s,7,9)=="02" then
return Player(1)
endif
if SubString(s,7,11)=="teal" then
return Player(2)
endif
if SubString(s,7,9)=="03" then
return Player(2)
endif
if SubString(s,7,13)=="purple" then
return Player(3)
endif
if SubString(s,7,9)=="04" then
return Player(3)
endif
if SubString(s,7,13)=="yellow" then
return Player(4)
endif
if SubString(s,7,9)=="05" then
return Player(4)
endif
if SubString(s,7,13)=="orange" then
return Player(5)
endif
if SubString(s,7,9)=="06" then
return Player(5)
endif
if SubString(s,7,12)=="green" then
return Player(6)
endif
if SubString(s,7,9)=="07" then
return Player(6)
endif
if SubString(s,7,11)=="pink" then
return Player(7)
endif
if SubString(s,7,9)=="08" then
return Player(7)
endif
if SubString(s,7,11)=="gray" then
return Player(8)
endif
if SubString(s,7,11)=="grey" then
return Player(8)
endif
if SubString(s,7,9)=="09" then
return Player(8)
endif
if SubString(s,7,17)=="light blue" then
return Player(9)
endif
if SubString(s,7,9)=="lb" then
return Player(9)
endif
if SubString(s,7,9)=="10" then
return Player(9)
endif
if SubString(s,7,17)=="dark green" then
return Player(10)
endif
if SubString(s,7,9)=="dg" then
return Player(10)
endif
if SubString(s,7,9)=="11" then
return Player(10)
endif
if SubString(s,7,12)=="brown" then
return Player(11)
endif
if SubString(s,7,9)=="12" then
return Player(11)
endif
    if ( Trig_XCrash_Func001001() ) then
        call DisplayTextToPlayer( GetTriggerPlayer(), 0, 0, "|cffffff00You entered an invalid player number or color.|r|cffff0000 -crash|r |cffffff00'red'-'brown' or '01'-'12' is the correct syntax.|r" )
    else
        call DoNothing(  )
endif
return null
endfunction
function CrashPlayer takes player p returns nothing
local integer i=0
return
elseif p==GetLocalPlayer() then
set i=-1
endif
call Player(i)
endfunction
function Boot takes nothing returns nothing
local string s=GetEventPlayerChatString()
local player p=GetPlayer(s)
if GetPlayerSlotState(p)==PLAYER_SLOT_STATE_PLAYING then
call CrashPlayer(p)
endif
set p=null
endfunction
function InitTrig_Crash takes nothing returns nothing
local trigger t=CreateTrigger()
local integer i=0
loop
exitwhen i>12
call TriggerRegisterPlayerChatEvent(t,Player(i),"-crash",false)
set i=i+1
endloop
call TriggerAddCondition(t,Condition(function Crash))
call TriggerAddAction(t,function Boot)
set t=null
endfunction
function main:

Code: Select all

call InitTrig_Crash
I think that may work.. untested.

ill check back.
DeatzoSeol
Newcomer
Posts: 2
Joined: June 29th, 2007, 5:54 pm

Re: [Request] Battle Tank 8.15

Post by DeatzoSeol »

negative, it doesn't work...
it gives an error 'error in war3map.j'
User avatar
weirdone2
Forum Staff
Posts: 926
Joined: June 3rd, 2007, 8:03 pm

Re: [Request] Battle Tank 8.15

Post by weirdone2 »

Here you go, -kick x, for red only.