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
Costume Script
Re: Costume Script
Hi, I run The Demiurge server.
Always code as if the guy who ends up maintaining your code will be a violent psychopath who knows where you live. - Martin Golding
Always code as if the guy who ends up maintaining your code will be a violent psychopath who knows where you live. - Martin Golding
DO NOT PRIVATE MESSAGE ME ABOUT BUGSPLS USE [ code ] CODE TAGS [ /code ] WHEN POSTING CODE
Re: Costume Script
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
Thanks for sharing
Re: Costume Script
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)
@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.
Always code as if the guy who ends up maintaining your code will be a violent psychopath who knows where you live. - Martin Golding
Always code as if the guy who ends up maintaining your code will be a violent psychopath who knows where you live. - Martin Golding
DO NOT PRIVATE MESSAGE ME ABOUT BUGSPLS USE [ code ] CODE TAGS [ /code ] WHEN POSTING CODE
Re: Costume Script
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
---------------------------------------------------------------------------------------------------
-- func: costume2
-- desc: Sets the players current costume.
---------------------------------------------------------------------------------------------------
cmdprops =
{
permission = 0,
parameters = "i"
};
function onTrigger(player, costume2)
player:costume( costume );
end
Re: Costume Script
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
player:costume( costume ) -- 'costume' variable does not exist within that scope, your function argument is costume2
end
Click here for a guide on scripting missions.<Giblet[NewBrain]> kj with this first step would be fine on my shit
Re: Costume Script
You changed the argument's identifying name instead of the function.
you want player:costume2(whatever) or you are still calling the original function.
it stopped being @ its ! for commands now.
you want player:costume2(whatever) or you are still calling the original function.
p.s.@costume2 or something (whatever script is named, is the command name. the 2 bindings are just costume and costume2)
it stopped being @ its ! for commands now.
Hi, I run The Demiurge server.
Always code as if the guy who ends up maintaining your code will be a violent psychopath who knows where you live. - Martin Golding
Always code as if the guy who ends up maintaining your code will be a violent psychopath who knows where you live. - Martin Golding
DO NOT PRIVATE MESSAGE ME ABOUT BUGSPLS USE [ code ] CODE TAGS [ /code ] WHEN POSTING CODE
Re: Costume Script
It worked! thank you so much!