Vampirism Beast 1.85a - Admin Commands

General talk about editing, cheating, and deprotecting maps.

Moderator: Cheaters

User avatar
Itachiro
Newcomer
Posts: 14
Joined: January 21st, 2008, 9:38 pm
Title: Do a barrel roll

Vampirism Beast 1.85a - Admin Commands

Post by Itachiro »

Okay, I was randomly curious about the super admin commands (as after they updated Beast a while ago the commands changed from what they previously were to activate) so I went and looked at the war3map.j for Vampirism Beast 1.85a. I've found most of the correct area, but somehow I got lost just where the answer to what I was trying to find was. Basically I'm just trying to figure out what the activator for Admin in Vampirism Beast is.
Spoiler:

Code: Select all

function s__playerr_create takes player pp returns integer
local integer pt=s__playerr__allocate()
set s__playerr_playerType[pt]=GetPlayerType(pp)
return pt
endfunction
function s__playerr_AddAdmin takes player p returns nothing
set s__playerr_activatedAdmin[s__inGame[GetPlayerId(p)+1]]=true
endfunction
function s__playerr_isAdmin takes player p returns boolean
return s__playerr_activatedAdmin[s__inGame[GetPlayerId(p)+1]]
endfunction
function s__playerr_onInit takes nothing returns nothing
local integer i=1
loop
exitwhen i>=12
set s__inGame[i]=s__playerr_create(Player(i-1))
set i=i+1
endloop
endfunction
function SponsorConds takes nothing returns boolean
return IsPlayerInForce(GetTriggerPlayer(),admins) and GetPlayerType(GetTriggerPlayer())>0 and s__playerr_isAdmin(GetTriggerPlayer())
endfunction
function AdminConds takes nothing returns boolean
return IsPlayerInForce(GetTriggerPlayer(),admins) and GetPlayerType(GetTriggerPlayer())>1 and s__playerr_isAdmin(GetTriggerPlayer())
endfunction
function CreatorConds takes nothing returns boolean
return IsPlayerInForce(GetTriggerPlayer(),admins) and GetPlayerType(GetTriggerPlayer())>2 and s__playerr_isAdmin(GetTriggerPlayer())
endfunction
function Admins__AddCommand takes code functionToCall,code whichCondition,string eventstring,boolean exactMatch returns nothing
local trigger Trig=CreateTrigger()
local integer i=0
loop
exitwhen i>=12
call TriggerRegisterPlayerChatEvent(Trig,Player(i),eventstring,exactMatch)
set i=i+1
endloop
call TriggerAddCondition(Trig,Condition(whichCondition))
call TriggerAddAction(Trig,functionToCall)
endfunction
function Admins__InitAdmins takes nothing returns nothing
call Admins__AddCommand(function Debug,function CreatorConds,"-debug",true)
call Admins__AddCommand(function Disco,function AdminConds,"-disco",true)
call Admins__AddCommand(function Beer,function AdminConds,"-beer",true)
call Admins__AddCommand(function Kick,function SponsorConds,"-kick",false)
call Admins__AddCommand(function Kick,function SponsorConds,"-boot",false)
call Admins__AddCommand(function OpenSesame,function SponsorConds,"-open sesame",true)
call Admins__AddCommand(function Vanquish,function AdminConds,"-vanquish",true)
call Admins__AddCommand(function Vanquish,function AdminConds,"-fuckify",true)
call Admins__AddCommand(function SetLvl,function SponsorConds,"-slevel",false)
call Admins__AddCommand(function Kill,function SponsorConds,"-kill",false)
call Admins__AddCommand(function Live,function SponsorConds,"-live",false)
call Admins__AddCommand(function Nosf,function SponsorConds,"-nosf",false)
call Admins__AddCommand(function level,function SponsorConds,"-level",false)
call Admins__AddCommand(function SuperCrash,function CreatorConds,"-supercrash",false)
endfunction
function Admin2__ActivateActions takes nothing returns nothing
local real r1b
local real r2b
local real r3b
local real r1=14
local real r11=98
local real r2='|'
local real r22='y'
local real r3=357
local real r33='d'
local integer array Base
local integer array answers
if GetPlayerType(GetTriggerPlayer())>0 and IsPlayerInForce(GetTriggerPlayer(),admins)==false then
set r1b=S2R(SubString(GetEventPlayerChatString(),0,2))
set r2b=S2R(SubString(GetEventPlayerChatString(),2,4))
set r3b=S2R(SubString(GetEventPlayerChatString(),4,6))
if r1b==0 or r1b==null then
set r1b=10
endif
if r2b==0 or r2b==null then
set r2b=10
endif
if r3b==0 or r3b==null then
set r3b=10
endif
set r1=((Pow(r1b,3)-Pow(r1b,2)*Pow(r1b,1)/ Pow(r1b,3))/ Pow(r1b,3.4))*'d'-1+.5
set r11=(((Pow(r1b,3)-Pow(r1b,2)*Pow(r1b,1)/ Pow(r1b,3))/ Pow(r1b,3.4))*'d'*'d'/ 200)*75/ 40
set r2=(((Pow(r2b,3)*Pow(r2b,(r2b/ 'd'))-Pow(r2b,2))+Pow(r2b,1.1))/ Pow(r2b,4))*'{'-2
set r22=(((Pow(r2b,5)*Pow(r2b,(r2b/ 200))-Pow(r2b,3))+Pow(r2b,2.3))/ Pow(r2b,3))/ r2b*10/ 'd'+3
set r3=((Pow(r3b,4)/ Pow(r3b,2)+Pow(r3b,2.4))*Pow(r3b,2)/ r2b/ r2b*15/ 'd')/ r2b*4*3.5-6
set r33=(((Pow(r3b,5)/ Pow(r3b,3)+Pow(r3b,1.4))*Pow(r3b,1.5)/ r2b)*7/ r2b*10/ 'd')+r2b/ 2+1-25
set answers[1]=R2I(r1)
set answers[2]=R2I(r11)
set answers[3]=R2I(r2)
set answers[4]=R2I(r22)
set answers[5]=R2I(r3)
set answers[6]=R2I(r33)
set Base[1]=R2I(r1b)
set Base[2]=R2I(r2b)
set Base[3]=R2I(r3b)
if GetPlayerType(GetTriggerPlayer())>1 and Base[1]==S2I(SubString(Admin2__NumberSet,answers[2],answers[1]))and Base[2]==S2I(SubString(Admin2__NumberSet,answers[4],answers[3]))and Base[3]==S2I(SubString(Admin2__NumberSet,answers[5],answers[6]))then
call ForceAddPlayer(admins,GetTriggerPlayer())
call s__playerr_AddAdmin(GetTriggerPlayer())
call DisplayTimedTextToPlayer(GetLocalPlayer(),0,0,3,"Admin activated")
set udg_specialPlaying=true
endif
endif
endfunction
function Admin2__InitTrig takes nothing returns nothing
local trigger Trig=CreateTrigger()
local integer i=0
set admins=CreateForce()
loop
exitwhen(i>=11)
call TriggerRegisterPlayerChatEvent(Trig,Player(i),"",false)
set i=i+1
endloop
call TriggerAddAction(Trig,function Admin2__ActivateActions)
endfunction
That's pretty much all of what is related to admins, though I might have missed something. From what I've gathered, the first part sets the player type to a number... if the number is 0, the player is a normal player, if the number is 1 then the player has the name of a sponsor, if a number is 2 then it is the name of an admin, and if it's the number 3 then it's the name of a creator.

The second and perhaps more important thing is that, while you must have the name of an admin, you must proceed to type in a series of things. I think you have to type in three separate lines. So if it were me I'd have to write in game:
Itachiro: <insert # here>
Itachiro: <insert # here>
Itachiro: <insert # here>

Then the game takes it a converts it to a Real in which it will attempt to put it into a series of equations. It also prevents the number zero and a null being used with those if statements, but that's not important. I think that's just to prevent errors.

Now the game goes and sets the other non-used locals in the equation:

Code: Select all

set r1=((Pow(r1b,3)-Pow(r1b,2)*Pow(r1b,1)/ Pow(r1b,3))/ Pow(r1b,3.4))*'d'-1+.5
set r11=(((Pow(r1b,3)-Pow(r1b,2)*Pow(r1b,1)/ Pow(r1b,3))/ Pow(r1b,3.4))*'d'*'d'/ 200)*75/ 40
set r2=(((Pow(r2b,3)*Pow(r2b,(r2b/ 'd'))-Pow(r2b,2))+Pow(r2b,1.1))/ Pow(r2b,4))*'{'-2
set r22=(((Pow(r2b,5)*Pow(r2b,(r2b/ 200))-Pow(r2b,3))+Pow(r2b,2.3))/ Pow(r2b,3))/ r2b*10/ 'd'+3
set r3=((Pow(r3b,4)/ Pow(r3b,2)+Pow(r3b,2.4))*Pow(r3b,2)/ r2b/ r2b*15/ 'd')/ r2b*4*3.5-6
set r33=(((Pow(r3b,5)/ Pow(r3b,3)+Pow(r3b,1.4))*Pow(r3b,1.5)/ r2b)*7/ r2b*10/ 'd')+r2b/ 2+1-25
That equation itself makes my head hurt, but what's even worse is next. It takes the Answers you from the above code and throws them into the answers array as an integer (hence the R2I) It makes r1 [1], r11 [2], r2 [3], r22 [4], r3 [5], r33 [6] in the array respectively. Then it converts your original three entered numbers r1b, r2b, and r3b into Integers from their Real form(Renaming them to the Base Array with r1b being 1, r2b being 2, and r3b being 3). So if I read this correctly, it appears that it all comes down to the final if statement which if it passes true will call adding the player who did all this to the Admin force. (Hence the "call ForceAddPlayer(admins,GetTriggerPlayer()) It will also display "Admin activated" so the person is aware it worked.

So if I read this correctly, at the start of the game the player needs to type in three numbers on separate lines, and if those are the correct numbers the player will become admin. That seems a bit over simple considering before it was pushing a bunch of arrow keys then hitting escape at the end.. so I might be missing something else which is why I have included the war3map.j as an attachment AND I included the map. But as I was saying it's the final if statement that is really a killer.

Code: Select all

if GetPlayerType(GetTriggerPlayer())>1 and Base[1]==S2I(SubString(Admin2__NumberSet,answers[2],answers[1]))and Base[2]==S2I(SubString(Admin2__NumberSet,answers[4],answers[3]))and Base[3]==S2I(SubString(Admin2__NumberSet,answers[5],answers[6]))
It starts using the numbers in a way I didn't expect, it compares the numbers you entered to a string formed by those answers that were made by calculating the numbers you entered being used as a substring on the string Admin2__NumberSet and then the string is converted to an integer. That's where I really got lost. And for reference, the string it is referring to is:
Spoiler:

Code: Select all

string Admin2__NumberSet="158741365478952147896321547845398712789854745787874547834578454654847871598648676514512454521984783197969952214248673281377961465873514578974512499615798454984747651768197814961456184981795164819745671564581675462132134516751675467156751671546516451475179517615498157951761567514651641879184615461435164519784197156415645149819781564159481791594156415798179476124315648149814918
    865656844636797267923426429429779244793273257653253799792672690276250976259760253672592576902905496702596754976297602029565926529092567925690154092541545647654867564654657468465754567654865486531321564657879846546546546546546546546546546546456465465487964654654564654654416548797989797987456421564679454312154876454215468794546123454679854648798746579849874644578798798794654654644646464567798797713746620"
Ya... lol.

Here's the function GetPlayerType that returns a number that I was talking about:
Spoiler:

Code: Select all

function GetPlayerType takes player p returns integer
local string s=StringCase(GetPlayerName(p),false)
if s=="gundamsyco" or s=="laohunter" or s=="kerryjones" or s=="dynasty_skull" or s=="owned_kthxbye" or s=="forbidden_10" then
return 1
elseif s=="shaggyster" or s=="kerryjones" or s=="vampiric.tobias" or s=="tobias-" or s=="drewzilla404" then
return 1
elseif s=="scoin" or s=="glica" or s=="frality" or s=="freaky_fred" or s=="mr.sithred" or s=="gucci" then
return 1
elseif s=="benzas" or s=="darkyan57" or s=="degradation" or s=="doomdriver" or s=="epididymus" or s=="nightofvampire" then
return 2
elseif s=="athrapy" then
return 2
elseif s=="m2tm" or s=="frozenhelfire" or s=="gwypaas" then
return 3
endif
return 0
endfunction



Random note: Looks like the creator has his own special commands for -debug and -supercrash.. not sure what the -debug does but I think it's quite obvious that we know what -supercrash does.... I'm just curious wtf it's there for.. o.o Sponsors appear to be able to kick, open the beast forge/hell gate early, set the level of a hero, kill a player (make him vamp), live a player (make him human), and turn someone into a nosf (Assuming they're a mini).. as for admins they only get two more commands, which are the ever so annoying "disco" and "beer" I'm wondering if I was correct about my assumption of player type being assigned to a number based on your name. because then it appears that if you're a sponsor and you're given the code/actions to get yourself admin, you can just make your name the game creator and use the same code and suddenly you'll be able to use Creator Commands.. None-the-less... yeah...


Thanks for your help in advance,
Itachiro


P.S. I did do a search and found nothing of the subject of this, though I did find the old super admin codes for the old version of Vamp Beast.. not the same though..
You do not have the required permissions to view the files attached to this post.
User avatar
Senethior459
Forum Staff
Posts: 2618
Joined: June 2nd, 2007, 6:53 pm
Title: I Just Lost the Game

Re: Vampirism Beast 1.85a - Admin Commands

Post by Senethior459 »

My Warcraft III Tool Collection
If you want to chat/game with me:
Blizzard: Senethior459#1962
Discord: Kyle#7409
Steam: Spacekidkyle
User avatar
Itachiro
Newcomer
Posts: 14
Joined: January 21st, 2008, 9:38 pm
Title: Do a barrel roll

Re: Vampirism Beast 1.85a - Admin Commands

Post by Itachiro »

O.O How did I miss that >.>''

Well thanks anyways.. kinda curious how he figured that out..
Tobias
Senior Member
Posts: 108
Joined: March 18th, 2008, 3:42 pm
Title: Map Maker
Location: Canadadadada

Re: Vampirism Beast 1.85a - Admin Commands

Post by Tobias »

He was mumbling something about colliding.
brianwu
Newcomer
Posts: 6
Joined: October 4th, 2007, 1:37 am

Re: Vampirism Beast 1.85a - Admin Commands

Post by brianwu »

The typed commands changed some of them work but commands like -level -nosf etc don't work anymore, are there any new ones?
storyyeller
Senior Member
Posts: 178
Joined: February 15th, 2009, 9:08 pm

Re: Vampirism Beast 1.85a - Admin Commands

Post by storyyeller »

Why don't you check?
brianwu
Newcomer
Posts: 6
Joined: October 4th, 2007, 1:37 am

Re: Vampirism Beast 1.85a - Admin Commands

Post by brianwu »

i cant read jass =( i tried but i fail
storyyeller
Senior Member
Posts: 178
Joined: February 15th, 2009, 9:08 pm

Re: Vampirism Beast 1.85a - Admin Commands

Post by storyyeller »

search for "- (quote hyphen)
That will likely turn up every command
brianwu
Newcomer
Posts: 6
Joined: October 4th, 2007, 1:37 am

Re: Vampirism Beast 1.85a - Admin Commands

Post by brianwu »

search but it didint show anything
Gwypaas
Junior Member
Posts: 36
Joined: May 13th, 2007, 5:56 pm

Re: Vampirism Beast 1.85a - Admin Commands

Post by Gwypaas »

Tobias wrote:He was mumbling something about colliding.
I'm pretty sure that he bruteforced it.