Costume Script

Post Reply
NekoNinja
Posts: 30
Joined: Thu Jun 01, 2017 10:20 am

Costume Script

Post by NekoNinja » Thu Jun 22, 2017 1:01 pm

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

User avatar
TeoTwawki
Developer
Posts: 527
Joined: Mon Jul 15, 2013 9:50 pm

Re: Costume Script

Post by TeoTwawki » Thu Jun 22, 2017 10:00 pm

Hi, I run The Demiurge server.


Image
Always code as if the guy who ends up maintaining your code will be a violent psychopath who knows where you live. - Martin Golding
PLS USE [ code ] CODE TAGS [ /code ] WHEN POSTING CODE
DO NOT PRIVATE MESSAGE ME ABOUT BUGS

NekoNinja
Posts: 30
Joined: Thu Jun 01, 2017 10:20 am

Re: Costume Script

Post by NekoNinja » Fri Jun 23, 2017 9:02 am

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

User avatar
TeoTwawki
Developer
Posts: 527
Joined: Mon Jul 15, 2013 9:50 pm

Re: Costume Script

Post by TeoTwawki » Fri Jun 23, 2017 2:53 pm

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)
Hi, I run The Demiurge server.


Image
Always code as if the guy who ends up maintaining your code will be a violent psychopath who knows where you live. - Martin Golding
PLS USE [ code ] CODE TAGS [ /code ] WHEN POSTING CODE
DO NOT PRIVATE MESSAGE ME ABOUT BUGS

NekoNinja
Posts: 30
Joined: Thu Jun 01, 2017 10:20 am

Re: Costume Script

Post by NekoNinja » Wed Oct 04, 2017 1:42 pm

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

User avatar
demolish
Developer
Posts: 262
Joined: Thu Jul 26, 2012 7:12 am

Re: Costume Script

Post by demolish » Thu Oct 05, 2017 9:44 am

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
<Giblet[NewBrain]> kj with this first step would be fine on my shit
Click here for a guide on scripting missions.

User avatar
TeoTwawki
Developer
Posts: 527
Joined: Mon Jul 15, 2013 9:50 pm

Re: Costume Script

Post by TeoTwawki » Thu Oct 05, 2017 2:59 pm

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.
Hi, I run The Demiurge server.


Image
Always code as if the guy who ends up maintaining your code will be a violent psychopath who knows where you live. - Martin Golding
PLS USE [ code ] CODE TAGS [ /code ] WHEN POSTING CODE
DO NOT PRIVATE MESSAGE ME ABOUT BUGS

NekoNinja
Posts: 30
Joined: Thu Jun 01, 2017 10:20 am

Re: Costume Script

Post by NekoNinja » Thu Oct 05, 2017 3:53 pm

It worked! thank you so much! :D :D :D

Post Reply