Thread: Event_command?
View Single Post
  #3  
Old 12-24-2013, 04:37 PM
KLS
Administrator
 
Join Date: Sep 2006
Posts: 1,348
Default

It most definitely is hooked up and working.

Here's a version I had for testing purposes (player.lua):
Code:
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".
Reply With Quote