Page 1 of 1

Costume Script

Posted: Thu Jun 22, 2017 1:01 pm
by NekoNinja
Hello everyone

I had a question I did search the forums a bit before posting.
I have been playing on a few servers Bnet, Valhalla and they have an @command that allows you to
fight etc. while in a costume I wanted to know if anyone who knows how to do this would share that with me.
and there's another one that puts you in a random costume which i wouldnt mind having as well

I have seen a few post of people sharing there stuff just haven't seen this particular feature

thanks in advance

Re: Costume Script

Posted: Thu Jun 22, 2017 10:00 pm
by TeoTwawki

Re: Costume Script

Posted: Fri Jun 23, 2017 9:02 am
by NekoNinja
So is this as simple as replacing this file or is this a copy paste into an existing btw your renamer add on and other stuff is really cool
Thanks for sharing

Re: Costume Script

Posted: Fri Jun 23, 2017 2:53 pm
by TeoTwawki
you could copy the existing GM command that does costume, give it another name, add that little "2" to the call inside it since that is the name of this other binding, and there ya go.

@costume2 or something (whatever script is named, is the command name. the 2 bindings are just costume and costume2)

Re: Costume Script

Posted: Wed Oct 04, 2017 1:42 pm
by NekoNinja
Ok so i messed with this and got frustrated and now that i have come back to it i need to just come out and say i dont understand i do realize this project is geared towards people who actually know how to code etc. however I only know what i have read on here as far as lua is concerned I am fine with copy pasting commands and reverse engineering stuff however with this command i am stuck you make it seem easy lol which i am sure it is i took the original command !costume renamed it !costume2 and attempted to change what i need inside which is really nothing and it works as a command but still cant fight in the costume im sorry :( this is the command i have tried to make

---------------------------------------------------------------------------------------------------
-- func: costume2
-- desc: Sets the players current costume.
---------------------------------------------------------------------------------------------------

cmdprops =
{
permission = 0,
parameters = "i"
};

function onTrigger(player, costume2)
player:costume( costume );
end

Re: Costume Script

Posted: Thu Oct 05, 2017 9:44 am
by demolish
function onTrigger(player, costume2) -- notice the argument is 'costume2'
player:costume( costume ) -- 'costume' variable does not exist within that scope, your function argument is costume2
end

Re: Costume Script

Posted: Thu Oct 05, 2017 2:59 pm
by TeoTwawki
You changed the argument's identifying name instead of the function.

you want player:costume2(whatever) or you are still calling the original function.
@costume2 or something (whatever script is named, is the command name. the 2 bindings are just costume and costume2)
p.s.
it stopped being @ its ! for commands now.

Re: Costume Script

Posted: Thu Oct 05, 2017 3:53 pm
by NekoNinja
It worked! thank you so much! :D :D :D