View Full Version : Event_command?
Randymarsh9
12-24-2013, 02:30 PM
I was looking through the quest documentation yesterday and I saw this event, and I was wondering what it does or whether it has been implemented yet. I tried to make a script that messaged the client on EVENT_COMMAND, and then try #commands to see if that was what it was supposed to do, but nothing happened. I am interested to know what this actually does or is supposed to do, if anyone knows.
lerxst2112
12-24-2013, 03:37 PM
I only gave it a quick look, but it looks like it isn't hooked up to anything at the moment.
It most definitely is hooked up and working.
Here's a version I had for testing purposes (player.lua):
function event_command(e)
if(e.command == "item_upgrade") then
local item = e.self:GetInventory():GetItem(Slot.Cursor);
if(item.valid) then
local scale = math.random(10, 225) / 100.0;
item:SetItemScaleMod("base", scale);
item:SetScaling(true);
e.self:SendItemScale(item);
else
e.self:Message(0, "Could not find item to upgrade.");
end
end
end
Oh and in Perl we maintained stupid backwards compatibility (Perl is lame) so it is still "EVENT_SAY".
lerxst2112
12-24-2013, 09:52 PM
Yeah, I was looking for the EventPlayer(EVENT_COMMAND,...) line and didn't see it.
Akkadius
12-24-2013, 10:24 PM
Oh and in Perl we maintained stupid backwards compatibility (Perl is lame) so it is still "EVENT_SAY".
I'm pretty positive Perl is amazing, you have some misinformation :grin:
vBulletin® v3.8.11, Copyright ©2000-2025, vBulletin Solutions Inc.