• Published 7th Aug 2019
  • 4,499 Views, 48 Comments

Scripting Equestria - Wild Wire



I somehow landed myself in Equestria, with the power of applying Garry's Mod LUA to reality.

  • ...
4
 48
 4,499

partyplan.lua

So there I was, inside of the Party Cave with Pinkie Pie right in front of me facing the other way. I wasn't going to get out of this without a party, was I? Seeing the Party Cave in person was kind of jarring to me, not because it had more party supplies than I've ever seen in one place, but simply because of how much food was stored here on the shelves. Wouldn't all of those cupcakes get old? Or does she constantly cook more and throw out the old ones? I really had no idea, but this was Pinkie Pie we're talking about, so I tried to stop thinking about it too much. I began to sneak to the side where I saw the slide, the only exit I could see, hoping that I wouldn't be detected. I know detection is an inevitability when Pinkie Pie's around, but I still hoped.

"Gummy, that's so silly! You just crack me up!" Pinkie said, followed by more giggling. "Anyways, my back is itchy, and you know what that means!" She paused, and I don't know if it was for a response or for dramatic effect. "It means it's my lucky day! And with how often a lucky day for me means meeting a new pony, that means there's about a eighty percent chance I'll make a new friend today!"

Well, there goes any hope I had. There was no way that it didn't mean me, and that was a just about a fact. Didn't mean I stopped trying to sneak with my back against the wall. I continued to shimmy myself to the right, towards the slide. Then her tail twitched.

"Twitchy tail!"

Immediately, I stepped on an unseen pencil and fell forward to where Pinkie was standing, while Pinkie dove under a table because of her Pinkie Sense. Fate was definitely not siding with me today. With a loud thud and an oomph, I scramble to try to lift myself up. My cover was blown. It didn't even matter if I used my SWEP to leave now, her Pinkie Sense already decided my fate. When she turned around and gasped, I just accepted what was going to happen, and slowly lifted myself into a cross legged sitting position.

"New friend! I knew it!" She exclaimed loudly, suddenly pulling me into a hug. I was definitely not used to her presence, so I just pat her on the head a little bit uncomfortably. I prepared myself for the list of questions she was going to ask.

"Hi, I'm Pinkie Pie! What's your name? What's your favorite food? What's your favorite drink? What's your favorite balloon color? What flavor of cake do you want? Do you like parties? When is your birthday? What are you? Are you an alien?" Surprisingly, she didn't ask her questions at a non-intelligible pace. It was still fast, but also understandable.

"I'm just going to answer your questions in order. Mathew Heart, cheese coneys, cherry Coca-Cola, red balloons, chocolate, yes, June twentieth, human, and yes." I answered, actually smiling a bit at the absurdity of my situation.

"Neat! It's nice to meet you! Can I call you Mathy?" She asked, looking up at me. I wasn't opposed to the nickname, so I nodded. After I did, she hopped off, pulled a folder full of paper out of her mane, and began writing intensely, using the pencil I tripped on. I knew I wasn't going to get away while she was writing, so I stayed put and waited patiently. After a few more seconds, she looked back at me, and walked around me in a circle, before going back at the paper. I assumed she was actually drawing me now.

"Almost done! I just need to know what a Coca-Cola is." She said, looking at me once more.

"It's a soda."

"Thanks!" She quickly wrote it down, and put the new folder in a nearby file cabinet. "Alright! Lets head upstairs." She started to drag me by the back of my shirt, and I decided to voice my complaints.

"Hey! Don't drag me, I have legs! Also, I don't think going upstairs is a good idea."

"Why?" She stopped pulling.

"Because everyone is scared of me, on account of the fact that I'm an alien!" I explained.

"Don't be silly, as soon as they see that you're nice to me, they wont be scared at all! Besides, I can't throw a party in my Party Cave, that would be ridiculous!" I opened my mouth, but then closed it. She might have a point. Everyone in town trusts her, right? As long as I don't make any sudden moves to startle anyone, that means this could actually work.

"Alright, you convinced me." I say. "Just give me a bit of time to prepare myself."

"Sure thing! Come on Gummy!" She said, picking up Gummy and walking up the slide with just her hind legs. Now, I wasn't going to do this without a backup plan, so I opened Notepad and began to write two separate codes. Both of them would be SWEPs, so I first wrote down the basic SWEP stuff, then I wrote what I want the SWEPS to do when I use them.

function SWEP:Deploy()
. Print( "--------------------" )
. local ply = self:GetOwner()
. local tr = util.QuickTrace(ply:EyePos(), ply:EyePos + ply:GetAimVector() * ( 12 * 10 ), ply)
. PrintTable(tr)
end

This code should simply allow me to get information about what I'm looking at when I change to this SWEP as long as I'm within ten feet. I'm hoping it'll tell me information about ponies, instead of obvious stuff like if it's a pony or not. Saving the code as 'weapon_info.lua', I use another quick command to give it to myself, and this time I could tell the difference. It seems that because I have more than one SWEP now, I've gained a hud at the top of my vision to switch which one I'm using. I tested changing it with my mind, and it seemed to work fine. Then I quickly wrote another code.

function SWEP:Deploy()
. local ply = self:GetOwner()
. local tr = util.TraceHull({
. . start = ply:EyePos(),
. . endpos = ply:EyePos() + ply:GetAimVector() * (12 * 100),
. . filter = ply,
. . mins = Vector(-1, -1, -1),
. . maxs = Vector(1, 1, 1)
. })
. if (tr.hitworld) then
. . ply:SetPos(tr.HitPos)
. end
end

What this SWEP should do is when I select it, it will teleport me to where I'm looking, with a maximum range of one-hundred feet, and only works if where I'm looking is the ground or a wall. Don't want to end up a mile in the air, now do I? This will be my escape plan if things turn sour. I save the code as 'weapon_telescape.lua' and give it to myself. Now, relaxed at finishing some coding stuff, I think I'm finally ready for a party.

"Here we go."