[Events]Having some problems with making events work

Results 1 to 3 of 3
  1. #1
    Grand Master ryuchao009 is offline
    Grand MasterRank
    Feb 2009 Join Date
    United StatesLocation
    601Posts

    [Events]Having some problems with making events work

    Rather than create a new event, I tried to append the one that was already in Event.lua
    Code:
    AddEvent( "Welcome Event" )
    --{
    	--no idea wtf this does lol--
    	SetTime( "2008-07-23 00:00", "3008-08-06 23:59" )
    	
    	--Level up gifts--
    	SetLevelUpGift( 15, "all", "II_SYS_SYS_SCR_AMPESS", 2 )
    	SetLevelUpGift( 60, "all", "II_SYS_SYS_SCR_AMPESS", 3 )
    	
    	--Rates--
    	SetExpFactor( 75 ) --Exp
    	SetItemDropRate( 30 ) --Item
    	SetPieceItemDropRate( 15 ) --greens
    	SetGoldDropFactor( 150 ) --penya
    --}
    Unfortunately, this doesn't seem to work and I can't seem to figure out why. Here's my eventFunc.lua
    Code:
    function GetExpFactor()
    	local tList = GetEventList()
    	local fExpFactor = 75
    	for i in pairs(tList) do
    		if( tEvent[tList[i]].fExpFactor ~= nil ) then
    			fExpFactor = fExpFactor * tEvent[tList[i]].fExpFactor
    		end
    	end
    	
    	return fExpFactor
    end
    
    function GetItemDropRate()
    	local tList = GetEventList()
    	local fItemDropRate = 30
    	for i in pairs(tList) do
    		if( tEvent[tList[i]].fItemDropRate ~= nil ) then
    			fItemDropRate = fItemDropRate * tEvent[tList[i]].fItemDropRate
    		end
    	end
    	
    	return fItemDropRate
    end
    
    function GetPieceItemDropRate()
    	local tList = GetEventList()
    	local fPieceItemDropRate = 15
    	for i in pairs(tList) do
    		if( tEvent[tList[i]].fPieceItemDropRate ~= nil ) then
    			fPieceItemDropRate = fPieceItemDropRate * tEvent[tList[i]].fPieceItemDropRate
    		end
    	end
    	
    	return fPieceItemDropRate
    end
    
    function GetGoldDropFactor()
    	local tList = GetEventList()
    	local fGoldDropFactor = 150
    	for i in pairs(tList) do
    		if( tEvent[tList[i]].fGoldDropFactor ~= nil ) then
    			fGoldDropFactor = fGoldDropFactor * tEvent[tList[i]].fGoldDropFactor
    		end
    	end
    	
    	return fGoldDropFactor
    end
    I only included the parts of EventFunc.lua that are relevant to my problem.

    I also tried editing constant.inc, but the effect only works up to 5x the normal rates. I've seen three different ways of changing rates, but the most logical seemed to be to make it an event (since the other two methods failed to work, I kinda assumed using events was the proper way of doing it).

    If you've got any ideas that could make this work, please let me know.


  2. #2
    Grand Master ryuchao009 is offline
    Grand MasterRank
    Feb 2009 Join Date
    United StatesLocation
    601Posts

    Re: [Events]Having some problems with making events work

    bump /10 char

  3. #3
    Grand Master ryuchao009 is offline
    Grand MasterRank
    Feb 2009 Join Date
    United StatesLocation
    601Posts

    Re: [Events]Having some problems with making events work

    bump, still haven't been able to figure this out



Advertisement