Hallo ,
ich habe vollgendes Problem.
ich will endlich eine 50x Exp Rate aba es klappt nicht hier mal einblick in meine Inis
EventFunc.lua
Constant.inc
Ich Bekomm mit Level 1 Pro monster 14 % <_<
ich habe vollgendes Problem.
ich will endlich eine 50x Exp Rate aba es klappt nicht hier mal einblick in meine Inis
EventFunc.lua
tEvent = {} -- À̺¥Æ® ÀúÀå Å×À̺í
function SEC( n )
return n*1000
end
function MIN( n )
return n*SEC(60)
end
-----------------------------------------------------------------------------------
------- C¿¡¼* È£ÃâÇÒ ·ç¾Æ ÇÔ¼ö ----------------------------------------------------
-----------------------------------------------------------------------------------
-- º¯°æµÈ À̺¥Æ® ¸®½ºÆ® (DBSERVER)
function GetEventState()
local tReturn = {}
local nCount = 1
for i in pairs(tEvent) do
local OldState = tEvent.State
for j in pairs(tEvent[i].Time) do
if( tEvent[i].Time[j].nStart <= tonumber(os.date("%Y%m%d%H%M")) ) then
if( tEvent[i].Time[j].nEnd > tonumber(os.date("%Y%m%d%H%M")) ) then
if( tEvent[i].State == 0 ) then
tEvent[i].State = 1
end
else
if( tEvent[i].State == 1 ) then
tEvent[i].State = 0
end
end
end
end
if( OldState ~= tEvent[i].State ) then
tReturn[nCount] = {}
tReturn[nCount].nId = i
tReturn[nCount].State = tEvent[i].State
nCount = nCount + 1
end
end
return tReturn
end
-- WORLDSERVER¿¡¼* ½ÇÇàµÈ ½ºÅ©¸³Æ® ÆÄÀÏ¿¡µµ º¯°æµÈ state¸¦ Àû¿ëÇϱâ À§ÇÑ ÇÔ¼ö
function SetState( nId, nState )
tEvent[nId].State = nState
TRACE( string.format( "Event - ID:%d, Title:%s, State:%d", nId, tEvent[nId].Desc, tEvent[nId].State ) )
ERROR( string.format( "Event - ID:%d, Title:%s, State:%d", nId, tEvent[nId].Desc, tEvent[nId].State ) )
end
-- ÁøÇàÁßÀÎ À̺¥Æ® ¸®½ºÆ®
function GetEventList()
local tList = {}
local nCount = 1
for i in pairs(tEvent) do
if( tEvent[i].State == 1 ) then
tList[nCount] = i
nCount = nCount + 1
end
end
return tList
end
-- À̺¥Æ® Å×ÀÌºí¿¡ ÀÖ´Â ¸ðµç ¸®½ºÆ®
function GetAllEventList()
local tAllList = {}
local nCount = 1
for i in pairs(tEvent) do
tAllList[nCount] = {}
tAllList[nCount].nId = i
tAllList[nCount].strTitle = tEvent[i].Desc
tAllList[nCount].nState = tEvent[i].State
nCount = nCount + 1
end
return tAllList
end
-- À̺¥Æ® »ó¼¼ Á¤º¸ Å×À̺íÀ» ¸®ÅÏ
function GetEventInfo( nId )
local tEventInfo = {}
if( tEvent[nId] == nil ) then
tEventInfo[1] = "No EventInfo ID = "..nId
return tEventInfo
end
local nCount = 3
tEventInfo[1] = "Title = " .. tEvent[nId].Desc
tEventInfo[2] = "State = " .. tEvent[nId].State
for i in pairs(tEvent[nId].Time) do
local strTime = tEvent[nId].Time[i].nStart .. ", " ..tEvent[nId].Time[i].nEnd
tEventInfo[nCount] = "Time["..i.."] = " .. strTime
nCount = nCount + 1
end
for i in pairs(tEvent[nId].Item) do
local strItem = tEvent[nId].Item[i].ItemId ..", ".. tEvent[nId].Item[i].ItemMaxNum ..", ".. tEvent[nId].Item[i].ItemNum ..", ".. tEvent[nId].Item[i].nLevel
tEventInfo[nCount] = "Item["..i.."] = " .. strItem
nCount = nCount + 1
end
if( tEvent[nId].fExpFactor ~= 50 ) then
tEventInfo[nCount] = "ExpFactor = " .. tEvent[nId].fExpFactor
nCount = nCount + 1
end
if( tEvent[nId].fItemDropRate ~= 1 ) then
tEventInfo[nCount] = "ItemDropRate = " .. tEvent[nId].fItemDropRate
nCount = nCount + 1
end
if( tEvent[nId].fPieceItemDropRate ~= 1 ) then
tEventInfo[nCount] = "fPieceItemDropRate = " .. tEvent[nId].fPieceItemDropRate
nCount = nCount + 1
end
if( tEvent[nId].fGoldDropFactor ~= 1 ) then
tEventInfo[nCount] = "fGoldDropFactor = " .. tEvent[nId].fGoldDropFactor
nCount = nCount + 1
end
if( tEvent[nId].nAttackPower ~= 0 ) then
tEventInfo[nCount] = "nAttackPower = " .. tEvent[nId].nAttackPower
nCount = nCount + 1
end
if( tEvent[nId].nDefensePower ~= 0 ) then
tEventInfo[nCount] = "nDefensePower = " .. tEvent[nId].nDefensePower
nCount = nCount + 1
end
if( tEvent[nId].nCouponEvent ~= 0 ) then
if( tEvent[nId].nCouponEvent < MIN(1) ) then
tEventInfo[nCount] = "nCouponEventTime = " .. tEvent[nId].nCouponEvent / SEC(1) .. "Sec"
else
tEventInfo[nCount] = "nCouponEventTime = " .. tEvent[nId].nCouponEvent / MIN(1) .. "Min"
end
nCount = nCount + 1
end
for i in pairs(tEvent[nId].Gift) do
local strGift = tEvent[nId].Gift[i].nLevel ..", ".. tEvent[nId].Gift[i].strAccount ..", ".. tEvent[nId].Gift[i].strItemId ..", ".. tEvent[nId].Gift[i].nItemNum
tEventInfo[nCount] = "Gift["..i.."] = " .. strGift
nCount = nCount + 1
end
return tEventInfo
end
-- À̺¥Æ® ¼³¸í
function GetDesc( nId )
local strDesc = tEvent[nId].Desc
return strDesc
end
-- ½Ã°£À» ¼ýÀÚ·Î ¹Ù²ãÁÖ´Â ÇÔ¼ö
function GetTimeToNumber( strTime )
local strTemp = ""
local j = 0
for i in string.gfind( strTime, "%d+" ) do
j = j + 1
if( (j~=1) and (tonumber(i)<10) ) then
i = "0"..tonumber(i)
end
strTemp = strTemp..i
end
return tonumber( strTemp )
end
---------------------------------------------------------------------------
------ µ¥ÀÌÅÍ Ãß°¡ ÇÔ¼ö ---------------------------------------------------
---------------------------------------------------------------------------
-- »õ·Î¿î À̺¥Æ® Ãß°¡
function AddEvent( strDesc )
local nEventId = table.getn(tEvent) + 1
tEvent[nEventId] = {}
tEvent[nEventId].Item = {}
tEvent[nEventId].Time = {}
tEvent[nEventId].Desc = strDesc
tEvent[nEventId].fExpFactor = 50
tEvent[nEventId].fItemDropRate = 1
tEvent[nEventId].fPieceItemDropRate = 1
tEvent[nEventId].fGoldDropFactor = 1
tEvent[nEventId].State = 0
tEvent[nEventId].nAttackPower = 0
tEvent[nEventId].nDefensePower = 0
tEvent[nEventId].nCouponEvent = 0
tEvent[nEventId].Gift = {}
end
-- ½ÃÀ۽ð£, ³¡½Ã°£
function SetTime( strStart, strEnd )
local nEventId = table.getn(tEvent)
local nSize = table.getn( tEvent[nEventId].Time ) + 1
tEvent[nEventId].Time[nSize] = {}
tEvent[nEventId].Time[nSize].nStart = GetTimeToNumber( strStart )
tEvent[nEventId].Time[nSize].nEnd = GetTimeToNumber( strEnd )
end
-- ¾ÆÀÌÅÛ
function SetItem( ItemId, nItemMaxNum, nItemNum, nLevel )
local nEventId = table.getn(tEvent)
local nSize = table.getn(tEvent[nEventId].Item)
tEvent[nEventId].Item[nSize+1] = {}
tEvent[nEventId].Item[nSize+1].ItemId = ItemId
tEvent[nEventId].Item[nSize+1].ItemMaxNum = nItemMaxNum
tEvent[nEventId].Item[nSize+1].ItemNum = nItemNum
tEvent[nEventId].Item[nSize+1].nLevel = nLevel
tEvent[nEventId].Item[nSize+1].TimeOut = 0
tEvent[nEventId].Item[nSize+1].Skip = 0
local tInterval = {}
local nTotal = 0
for i in pairs(tHour) do
nTotal = nTotal + tHour[i]
end
for i in pairs(tHour) do
tInterval[i] = 3600000 / ( nItemMaxNum * tHour[i] / nTotal )
tInterval[i] = math.floor(tInterval[i])
end
tEvent[nEventId].Item[nSize+1].tInterval = tInterval
end
-- µå·ÓµÉ ¾ÆÀÌÅÛ ¸ñ·Ï
function GetItem( nTickCount, nLevel )
local nHour = tonumber(os.date("%H")) + 1
local tList = GetEventList()
local tReturn = {}
local nCount = 1
for i in pairs(tList) do
local tItem = tEvent[tList[i]].Item
for j in pairs(tItem) do
if( (nTickCount >= tItem[j].TimeOut) and (tItem[j].nLevel <= nLevel) ) then
tItem[j].TimeOut = tItem[j].tInterval[nHour] + nTickCount
if( tItem[j].Skip == 0 ) then
local nRandom = math.random(1, tItem[j].ItemNum)
tReturn[nCount] = {}
tReturn[nCount].ItemId = tItem[j].ItemId
tReturn[nCount].ItemNum = nRandom
tItem[j].Skip = nRandom - 1
nCount = nCount + 1
TRACE( "Event.lua : GetItem() - Drop - "..tItem[j].ItemId..", "..nRandom.."°³, Skip:"..tItem[j].Skip.." ½Ã°£´ë:"..(nHour-1).." ~ "..nHour )
else
tItem[j].Skip = tItem[j].Skip - 1
TRACE( "Event.lua : GetItem() - Skip - "..tItem[j].ItemId..", ³²Àº Skip:"..tItem[j].Skip.." ½Ã°£´ë:"..(nHour-1).." ~ "..nHour )
end
end
end
end
return tReturn
end
-- °æÇèÄ¡ ¹è¼ö
function SetExpFactor( fExpFactor )
local nEventId = table.getn(tEvent)
tEvent[nEventId].fExpFactor = fExpFactor
end
function GetExpFactor()
local tList = GetEventList()
local fExpFactor = 50
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 SetItemDropRate( fItemDropRate )
local nEventId = table.getn(tEvent)
tEvent[nEventId].fItemDropRate = fItemDropRate
end
function GetItemDropRate()
local tList = GetEventList()
local fItemDropRate = 15
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 SetPieceItemDropRate( fPieceItemDropRate )
local nEventId = table.getn(tEvent)
tEvent[nEventId].fPieceItemDropRate = fPieceItemDropRate
end
function GetPieceItemDropRate()
local tList = GetEventList()
local fPieceItemDropRate = 5
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 SetGoldDropFactor( fGoldDropFactor )
local nEventId = table.getn(tEvent)
tEvent[nEventId].fGoldDropFactor = fGoldDropFactor
end
function GetGoldDropFactor()
local tList = GetEventList()
local fGoldDropFactor = 20
for i in pairs(tList) do
if( tEvent[tList[i]].fGoldDropFactor ~= nil ) then
fGoldDropFactor = fGoldDropFactor * tEvent[tList[i]].fGoldDropFactor
end
end
return fGoldDropFactor
end
-- °ø°Ý·Â Áõ°¡
function SetAttackPower( nAttackPower )
local nEventId = table.getn(tEvent)
tEvent[nEventId].nAttackPower = nAttackPower
end
function GetAttackPower()
local tList = GetEventList()
local nAttackPower = 0
for i in pairs(tList) do
if( tEvent[tList[i]].nAttackPower ~= nil ) then
nAttackPower = nAttackPower + tEvent[tList[i]].nAttackPower
end
end
return nAttackPower
end
-- ¹æ¾î·Â Áõ°¡
function SetDefensePower( nDefensePower )
local nEventId = table.getn(tEvent)
tEvent[nEventId].nDefensePower = nDefensePower
end
function GetDefensePower()
local tList = GetEventList()
local nDefensePower = 0
for i in pairs(tList) do
if( tEvent[tList[i]].nDefensePower ~= nil ) then
nDefensePower = nDefensePower + tEvent[tList[i]].nDefensePower
end
end
return nDefensePower
end
-- ÄíÆù À̺¥Æ®
function SetCouponEvent( nTime )
local nEventId = table.getn(tEvent)
tEvent[nEventId].nCouponEvent = nTime
end
function GetCouponEvent()
local tList = GetEventList()
for i in pairs(tList) do
if( tEvent[tList[i]].nCouponEvent ~= 0 ) then
return tEvent[tList[i]].nCouponEvent
end
end
return 0
end
function SetLevelUpGift( nLevel, strAccount, strItemId, nItemNum )
local nEventId = table.getn(tEvent)
local nSize = table.getn(tEvent[nEventId].Gift)
tEvent[nEventId].Gift[nSize+1] = {}
tEvent[nEventId].Gift[nSize+1].nLevel = nLevel
tEvent[nEventId].Gift[nSize+1].strAccount = strAccount
tEvent[nEventId].Gift[nSize+1].strItemId = strItemId
tEvent[nEventId].Gift[nSize+1].nItemNum = nItemNum
end
function GetLevelUpGift( nLevel, strAccount )
local nCount = 1
local tGiftList = {}
local tList = GetEventList()
for i in pairs(tList) do
local tGift = tEvent[tList[i]].Gift
for j in pairs(tGift) do
local nTemp = string.find( strAccount, tGift[j].strAccount )
if( (tGift[j].strAccount == "all") or (nTemp ~= nil) ) then
if( tGift[j].nLevel == nLevel ) then
tGiftList[nCount] = {}
tGiftList[nCount].strItemId = tGift[j].strItemId
tGiftList[nCount].nItemNum = tGift[j].nItemNum
nCount = nCount + 1
end
end
end
end
return tGiftList
end
function SEC( n )
return n*1000
end
function MIN( n )
return n*SEC(60)
end
-----------------------------------------------------------------------------------
------- C¿¡¼* È£ÃâÇÒ ·ç¾Æ ÇÔ¼ö ----------------------------------------------------
-----------------------------------------------------------------------------------
-- º¯°æµÈ À̺¥Æ® ¸®½ºÆ® (DBSERVER)
function GetEventState()
local tReturn = {}
local nCount = 1
for i in pairs(tEvent) do
local OldState = tEvent.State
for j in pairs(tEvent[i].Time) do
if( tEvent[i].Time[j].nStart <= tonumber(os.date("%Y%m%d%H%M")) ) then
if( tEvent[i].Time[j].nEnd > tonumber(os.date("%Y%m%d%H%M")) ) then
if( tEvent[i].State == 0 ) then
tEvent[i].State = 1
end
else
if( tEvent[i].State == 1 ) then
tEvent[i].State = 0
end
end
end
end
if( OldState ~= tEvent[i].State ) then
tReturn[nCount] = {}
tReturn[nCount].nId = i
tReturn[nCount].State = tEvent[i].State
nCount = nCount + 1
end
end
return tReturn
end
-- WORLDSERVER¿¡¼* ½ÇÇàµÈ ½ºÅ©¸³Æ® ÆÄÀÏ¿¡µµ º¯°æµÈ state¸¦ Àû¿ëÇϱâ À§ÇÑ ÇÔ¼ö
function SetState( nId, nState )
tEvent[nId].State = nState
TRACE( string.format( "Event - ID:%d, Title:%s, State:%d", nId, tEvent[nId].Desc, tEvent[nId].State ) )
ERROR( string.format( "Event - ID:%d, Title:%s, State:%d", nId, tEvent[nId].Desc, tEvent[nId].State ) )
end
-- ÁøÇàÁßÀÎ À̺¥Æ® ¸®½ºÆ®
function GetEventList()
local tList = {}
local nCount = 1
for i in pairs(tEvent) do
if( tEvent[i].State == 1 ) then
tList[nCount] = i
nCount = nCount + 1
end
end
return tList
end
-- À̺¥Æ® Å×ÀÌºí¿¡ ÀÖ´Â ¸ðµç ¸®½ºÆ®
function GetAllEventList()
local tAllList = {}
local nCount = 1
for i in pairs(tEvent) do
tAllList[nCount] = {}
tAllList[nCount].nId = i
tAllList[nCount].strTitle = tEvent[i].Desc
tAllList[nCount].nState = tEvent[i].State
nCount = nCount + 1
end
return tAllList
end
-- À̺¥Æ® »ó¼¼ Á¤º¸ Å×À̺íÀ» ¸®ÅÏ
function GetEventInfo( nId )
local tEventInfo = {}
if( tEvent[nId] == nil ) then
tEventInfo[1] = "No EventInfo ID = "..nId
return tEventInfo
end
local nCount = 3
tEventInfo[1] = "Title = " .. tEvent[nId].Desc
tEventInfo[2] = "State = " .. tEvent[nId].State
for i in pairs(tEvent[nId].Time) do
local strTime = tEvent[nId].Time[i].nStart .. ", " ..tEvent[nId].Time[i].nEnd
tEventInfo[nCount] = "Time["..i.."] = " .. strTime
nCount = nCount + 1
end
for i in pairs(tEvent[nId].Item) do
local strItem = tEvent[nId].Item[i].ItemId ..", ".. tEvent[nId].Item[i].ItemMaxNum ..", ".. tEvent[nId].Item[i].ItemNum ..", ".. tEvent[nId].Item[i].nLevel
tEventInfo[nCount] = "Item["..i.."] = " .. strItem
nCount = nCount + 1
end
if( tEvent[nId].fExpFactor ~= 50 ) then
tEventInfo[nCount] = "ExpFactor = " .. tEvent[nId].fExpFactor
nCount = nCount + 1
end
if( tEvent[nId].fItemDropRate ~= 1 ) then
tEventInfo[nCount] = "ItemDropRate = " .. tEvent[nId].fItemDropRate
nCount = nCount + 1
end
if( tEvent[nId].fPieceItemDropRate ~= 1 ) then
tEventInfo[nCount] = "fPieceItemDropRate = " .. tEvent[nId].fPieceItemDropRate
nCount = nCount + 1
end
if( tEvent[nId].fGoldDropFactor ~= 1 ) then
tEventInfo[nCount] = "fGoldDropFactor = " .. tEvent[nId].fGoldDropFactor
nCount = nCount + 1
end
if( tEvent[nId].nAttackPower ~= 0 ) then
tEventInfo[nCount] = "nAttackPower = " .. tEvent[nId].nAttackPower
nCount = nCount + 1
end
if( tEvent[nId].nDefensePower ~= 0 ) then
tEventInfo[nCount] = "nDefensePower = " .. tEvent[nId].nDefensePower
nCount = nCount + 1
end
if( tEvent[nId].nCouponEvent ~= 0 ) then
if( tEvent[nId].nCouponEvent < MIN(1) ) then
tEventInfo[nCount] = "nCouponEventTime = " .. tEvent[nId].nCouponEvent / SEC(1) .. "Sec"
else
tEventInfo[nCount] = "nCouponEventTime = " .. tEvent[nId].nCouponEvent / MIN(1) .. "Min"
end
nCount = nCount + 1
end
for i in pairs(tEvent[nId].Gift) do
local strGift = tEvent[nId].Gift[i].nLevel ..", ".. tEvent[nId].Gift[i].strAccount ..", ".. tEvent[nId].Gift[i].strItemId ..", ".. tEvent[nId].Gift[i].nItemNum
tEventInfo[nCount] = "Gift["..i.."] = " .. strGift
nCount = nCount + 1
end
return tEventInfo
end
-- À̺¥Æ® ¼³¸í
function GetDesc( nId )
local strDesc = tEvent[nId].Desc
return strDesc
end
-- ½Ã°£À» ¼ýÀÚ·Î ¹Ù²ãÁÖ´Â ÇÔ¼ö
function GetTimeToNumber( strTime )
local strTemp = ""
local j = 0
for i in string.gfind( strTime, "%d+" ) do
j = j + 1
if( (j~=1) and (tonumber(i)<10) ) then
i = "0"..tonumber(i)
end
strTemp = strTemp..i
end
return tonumber( strTemp )
end
---------------------------------------------------------------------------
------ µ¥ÀÌÅÍ Ãß°¡ ÇÔ¼ö ---------------------------------------------------
---------------------------------------------------------------------------
-- »õ·Î¿î À̺¥Æ® Ãß°¡
function AddEvent( strDesc )
local nEventId = table.getn(tEvent) + 1
tEvent[nEventId] = {}
tEvent[nEventId].Item = {}
tEvent[nEventId].Time = {}
tEvent[nEventId].Desc = strDesc
tEvent[nEventId].fExpFactor = 50
tEvent[nEventId].fItemDropRate = 1
tEvent[nEventId].fPieceItemDropRate = 1
tEvent[nEventId].fGoldDropFactor = 1
tEvent[nEventId].State = 0
tEvent[nEventId].nAttackPower = 0
tEvent[nEventId].nDefensePower = 0
tEvent[nEventId].nCouponEvent = 0
tEvent[nEventId].Gift = {}
end
-- ½ÃÀ۽ð£, ³¡½Ã°£
function SetTime( strStart, strEnd )
local nEventId = table.getn(tEvent)
local nSize = table.getn( tEvent[nEventId].Time ) + 1
tEvent[nEventId].Time[nSize] = {}
tEvent[nEventId].Time[nSize].nStart = GetTimeToNumber( strStart )
tEvent[nEventId].Time[nSize].nEnd = GetTimeToNumber( strEnd )
end
-- ¾ÆÀÌÅÛ
function SetItem( ItemId, nItemMaxNum, nItemNum, nLevel )
local nEventId = table.getn(tEvent)
local nSize = table.getn(tEvent[nEventId].Item)
tEvent[nEventId].Item[nSize+1] = {}
tEvent[nEventId].Item[nSize+1].ItemId = ItemId
tEvent[nEventId].Item[nSize+1].ItemMaxNum = nItemMaxNum
tEvent[nEventId].Item[nSize+1].ItemNum = nItemNum
tEvent[nEventId].Item[nSize+1].nLevel = nLevel
tEvent[nEventId].Item[nSize+1].TimeOut = 0
tEvent[nEventId].Item[nSize+1].Skip = 0
local tInterval = {}
local nTotal = 0
for i in pairs(tHour) do
nTotal = nTotal + tHour[i]
end
for i in pairs(tHour) do
tInterval[i] = 3600000 / ( nItemMaxNum * tHour[i] / nTotal )
tInterval[i] = math.floor(tInterval[i])
end
tEvent[nEventId].Item[nSize+1].tInterval = tInterval
end
-- µå·ÓµÉ ¾ÆÀÌÅÛ ¸ñ·Ï
function GetItem( nTickCount, nLevel )
local nHour = tonumber(os.date("%H")) + 1
local tList = GetEventList()
local tReturn = {}
local nCount = 1
for i in pairs(tList) do
local tItem = tEvent[tList[i]].Item
for j in pairs(tItem) do
if( (nTickCount >= tItem[j].TimeOut) and (tItem[j].nLevel <= nLevel) ) then
tItem[j].TimeOut = tItem[j].tInterval[nHour] + nTickCount
if( tItem[j].Skip == 0 ) then
local nRandom = math.random(1, tItem[j].ItemNum)
tReturn[nCount] = {}
tReturn[nCount].ItemId = tItem[j].ItemId
tReturn[nCount].ItemNum = nRandom
tItem[j].Skip = nRandom - 1
nCount = nCount + 1
TRACE( "Event.lua : GetItem() - Drop - "..tItem[j].ItemId..", "..nRandom.."°³, Skip:"..tItem[j].Skip.." ½Ã°£´ë:"..(nHour-1).." ~ "..nHour )
else
tItem[j].Skip = tItem[j].Skip - 1
TRACE( "Event.lua : GetItem() - Skip - "..tItem[j].ItemId..", ³²Àº Skip:"..tItem[j].Skip.." ½Ã°£´ë:"..(nHour-1).." ~ "..nHour )
end
end
end
end
return tReturn
end
-- °æÇèÄ¡ ¹è¼ö
function SetExpFactor( fExpFactor )
local nEventId = table.getn(tEvent)
tEvent[nEventId].fExpFactor = fExpFactor
end
function GetExpFactor()
local tList = GetEventList()
local fExpFactor = 50
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 SetItemDropRate( fItemDropRate )
local nEventId = table.getn(tEvent)
tEvent[nEventId].fItemDropRate = fItemDropRate
end
function GetItemDropRate()
local tList = GetEventList()
local fItemDropRate = 15
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 SetPieceItemDropRate( fPieceItemDropRate )
local nEventId = table.getn(tEvent)
tEvent[nEventId].fPieceItemDropRate = fPieceItemDropRate
end
function GetPieceItemDropRate()
local tList = GetEventList()
local fPieceItemDropRate = 5
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 SetGoldDropFactor( fGoldDropFactor )
local nEventId = table.getn(tEvent)
tEvent[nEventId].fGoldDropFactor = fGoldDropFactor
end
function GetGoldDropFactor()
local tList = GetEventList()
local fGoldDropFactor = 20
for i in pairs(tList) do
if( tEvent[tList[i]].fGoldDropFactor ~= nil ) then
fGoldDropFactor = fGoldDropFactor * tEvent[tList[i]].fGoldDropFactor
end
end
return fGoldDropFactor
end
-- °ø°Ý·Â Áõ°¡
function SetAttackPower( nAttackPower )
local nEventId = table.getn(tEvent)
tEvent[nEventId].nAttackPower = nAttackPower
end
function GetAttackPower()
local tList = GetEventList()
local nAttackPower = 0
for i in pairs(tList) do
if( tEvent[tList[i]].nAttackPower ~= nil ) then
nAttackPower = nAttackPower + tEvent[tList[i]].nAttackPower
end
end
return nAttackPower
end
-- ¹æ¾î·Â Áõ°¡
function SetDefensePower( nDefensePower )
local nEventId = table.getn(tEvent)
tEvent[nEventId].nDefensePower = nDefensePower
end
function GetDefensePower()
local tList = GetEventList()
local nDefensePower = 0
for i in pairs(tList) do
if( tEvent[tList[i]].nDefensePower ~= nil ) then
nDefensePower = nDefensePower + tEvent[tList[i]].nDefensePower
end
end
return nDefensePower
end
-- ÄíÆù À̺¥Æ®
function SetCouponEvent( nTime )
local nEventId = table.getn(tEvent)
tEvent[nEventId].nCouponEvent = nTime
end
function GetCouponEvent()
local tList = GetEventList()
for i in pairs(tList) do
if( tEvent[tList[i]].nCouponEvent ~= 0 ) then
return tEvent[tList[i]].nCouponEvent
end
end
return 0
end
function SetLevelUpGift( nLevel, strAccount, strItemId, nItemNum )
local nEventId = table.getn(tEvent)
local nSize = table.getn(tEvent[nEventId].Gift)
tEvent[nEventId].Gift[nSize+1] = {}
tEvent[nEventId].Gift[nSize+1].nLevel = nLevel
tEvent[nEventId].Gift[nSize+1].strAccount = strAccount
tEvent[nEventId].Gift[nSize+1].strItemId = strItemId
tEvent[nEventId].Gift[nSize+1].nItemNum = nItemNum
end
function GetLevelUpGift( nLevel, strAccount )
local nCount = 1
local tGiftList = {}
local tList = GetEventList()
for i in pairs(tList) do
local tGift = tEvent[tList[i]].Gift
for j in pairs(tGift) do
local nTemp = string.find( strAccount, tGift[j].strAccount )
if( (tGift[j].strAccount == "all") or (nTemp ~= nil) ) then
if( tGift[j].nLevel == nLevel ) then
tGiftList[nCount] = {}
tGiftList[nCount].strItemId = tGift[j].strItemId
tGiftList[nCount].nItemNum = tGift[j].nItemNum
nCount = nCount + 1
end
end
end
end
return tGiftList
end
Constant.inc
// 1.0Àº ±âº» °ª
// 2.0Àº ¹è¼ö
// 0.5´Â 1/2
// itemDropRate = 1.0 // ¾ÆÀÌÅÛ µå·Ó·ü
// goldDropRate = 1.0 // Æä³Ä µå·Ó·ü
// monsterExpRate = 1.0 // ¸ó½ºÅÍ °æÇèÄ¡·ü
// monsterHitRate = 1.0 // ¸ó½ºÅÍ È÷Æ®·ü (¸ó½ºÅÍÀÇ °ø°Ý·Â)
// ÆÄÀÏÀÇ À§Ä¡ ; resource\constant.inc
// Constant.txt´Â ¿ùµå ¼*¹öÀÇ ½ºÅ©¸³Æ®ÀÌ¸ç ³»¿ë ¼öÁ¤ÇÑ ÈÄ¿¡ ¹Ýµå½Ã ¿ùµå ¼*¹ö¸¦ ¸®º×ÇؾßÇÑ´Ù.
// ¿î¿µÀÚ ¸í·É¾î ; µ¿ÀÏ ¼öÄ¡¸¦ °ÔÀÓ³»¿¡¼*µµ ½Ç½Ã°£ ¼öÁ¤ °¡´ÉÇÔ. ºñÀ²À» ÀÔ·ÂÇÏÁö ¾Ê°í ±×³É ¿£ÅÍÄ¡¸é ÇöÀç »óÅ Ãâ·Â
// ¿µ¹® ¸í·É
// ItemDropRade [ºñÀ²]
// GoldDropRade [ºñÀ²]
// MonsterExpRate [ºñÀ²]
// MonsterHitRate [ºñÀ²]
// ÇÑ±Û ¸í·É
// ¾ÆÀÌÅÛµå·Ó·ü [ºñÀ²]
// °ñµåµå·Ó·ü [ºñÀ²]
// ¸ó½ºÅÍ°æÇèÄ¡·ü [ºñÀ²]
// ¸ó½ºÅÍÈ÷Æ®·ü [ºñÀ²]
//----------------------------------------------------------------------------------------------------//
lang LANG_KOR // ¾ð¾î ¼¼ÆÃ, ÀÌÇÏ Çѱ¹ ¹öÁ¯¿¡ Àû¿ë
{
formula
{
itemDropRate = 1.0
goldDropRate = 1.0
monsterExpRate = 1.0
monsterHitRate = 1.0
dwVagSP = 1
dwExpertSP = 2
dwProSP = 3
}
}
//----------------------------------------------------------------------------------------------------//
lang LANG_JAP // ÀϺ» ³*À̵µ ¼¼ÆÃ.(ÀϺ» °ü°èÀÚµéÀº À̺κи¸ °íÄ¡½Ã°í, Â÷ÈÄ ÆÐÄ¡½Ã Çѱ¹ ¹öÁ¯À¸·Î overwriteµÉ ¼ö ÀÖÀ¸¹Ç·Î ÇȽºµÈ ¼öÄ¡´Â Çѱ¹¿¡ Å뺸 ¹Ù¶÷)
{
formula
{
itemDropRate = 1.0 // ¾ÆÀÌÅÛ µå·Ó·ü 1.0ÀÌ¸é ±âº»°ª, 2.0ÀÌ¸é µÎ¹è, 3.0ÀÌ¸é ¼¼¹è. ÀÌÇÏ ¸ðµÎ µ¿ÀÏ ±ÔÄ¢. ³ôÀ» ¼ö·Ï µå·ÓÀ² »ó½Â
goldDropRate = 1.0 // Æä³Ä µå·Ó·ü ; ³ôÀ» ¼ö·Ï Æä³Ä µå·Ó·ü »ó½Â
monsterExpRate = 1.0 // ¸ó½ºÅÍ °æÇèÄ¡·ü ; ³ôÀ» ¼ö·Ï ¸ó½ºÅÍ°¡ ÁÖ´Â °æÇèÄ¡ »ó½Â
monsterHitRate = 1.0 // ¸ó½ºÅÍ È÷Æ®·ü (¸ó½ºÅÍÀÇ °ø°Ý·Â) ³ôÀ» ¼ö·Ï ¸ó½ºÅÍÀÇ °ø°Ý·ÂÀÌ ¼¼Áø´Ù.
dwVagSP = 1
dwExpertSP = 2
dwProSP = 3
}
}
//----------------------------------------------------------------------------------------------------//
lang LANG_ENG
{
formula
{
itemDropRate = 1.0
goldDropRate = 1.0
monsterExpRate = 1.0
monsterHitRate = 1.0
dwVagSP = 1
dwExpertSP = 2
dwProSP = 3
}
}
// 2.0Àº ¹è¼ö
// 0.5´Â 1/2
// itemDropRate = 1.0 // ¾ÆÀÌÅÛ µå·Ó·ü
// goldDropRate = 1.0 // Æä³Ä µå·Ó·ü
// monsterExpRate = 1.0 // ¸ó½ºÅÍ °æÇèÄ¡·ü
// monsterHitRate = 1.0 // ¸ó½ºÅÍ È÷Æ®·ü (¸ó½ºÅÍÀÇ °ø°Ý·Â)
// ÆÄÀÏÀÇ À§Ä¡ ; resource\constant.inc
// Constant.txt´Â ¿ùµå ¼*¹öÀÇ ½ºÅ©¸³Æ®ÀÌ¸ç ³»¿ë ¼öÁ¤ÇÑ ÈÄ¿¡ ¹Ýµå½Ã ¿ùµå ¼*¹ö¸¦ ¸®º×ÇؾßÇÑ´Ù.
// ¿î¿µÀÚ ¸í·É¾î ; µ¿ÀÏ ¼öÄ¡¸¦ °ÔÀÓ³»¿¡¼*µµ ½Ç½Ã°£ ¼öÁ¤ °¡´ÉÇÔ. ºñÀ²À» ÀÔ·ÂÇÏÁö ¾Ê°í ±×³É ¿£ÅÍÄ¡¸é ÇöÀç »óÅ Ãâ·Â
// ¿µ¹® ¸í·É
// ItemDropRade [ºñÀ²]
// GoldDropRade [ºñÀ²]
// MonsterExpRate [ºñÀ²]
// MonsterHitRate [ºñÀ²]
// ÇÑ±Û ¸í·É
// ¾ÆÀÌÅÛµå·Ó·ü [ºñÀ²]
// °ñµåµå·Ó·ü [ºñÀ²]
// ¸ó½ºÅÍ°æÇèÄ¡·ü [ºñÀ²]
// ¸ó½ºÅÍÈ÷Æ®·ü [ºñÀ²]
//----------------------------------------------------------------------------------------------------//
lang LANG_KOR // ¾ð¾î ¼¼ÆÃ, ÀÌÇÏ Çѱ¹ ¹öÁ¯¿¡ Àû¿ë
{
formula
{
itemDropRate = 1.0
goldDropRate = 1.0
monsterExpRate = 1.0
monsterHitRate = 1.0
dwVagSP = 1
dwExpertSP = 2
dwProSP = 3
}
}
//----------------------------------------------------------------------------------------------------//
lang LANG_JAP // ÀϺ» ³*À̵µ ¼¼ÆÃ.(ÀϺ» °ü°èÀÚµéÀº À̺κи¸ °íÄ¡½Ã°í, Â÷ÈÄ ÆÐÄ¡½Ã Çѱ¹ ¹öÁ¯À¸·Î overwriteµÉ ¼ö ÀÖÀ¸¹Ç·Î ÇȽºµÈ ¼öÄ¡´Â Çѱ¹¿¡ Å뺸 ¹Ù¶÷)
{
formula
{
itemDropRate = 1.0 // ¾ÆÀÌÅÛ µå·Ó·ü 1.0ÀÌ¸é ±âº»°ª, 2.0ÀÌ¸é µÎ¹è, 3.0ÀÌ¸é ¼¼¹è. ÀÌÇÏ ¸ðµÎ µ¿ÀÏ ±ÔÄ¢. ³ôÀ» ¼ö·Ï µå·ÓÀ² »ó½Â
goldDropRate = 1.0 // Æä³Ä µå·Ó·ü ; ³ôÀ» ¼ö·Ï Æä³Ä µå·Ó·ü »ó½Â
monsterExpRate = 1.0 // ¸ó½ºÅÍ °æÇèÄ¡·ü ; ³ôÀ» ¼ö·Ï ¸ó½ºÅÍ°¡ ÁÖ´Â °æÇèÄ¡ »ó½Â
monsterHitRate = 1.0 // ¸ó½ºÅÍ È÷Æ®·ü (¸ó½ºÅÍÀÇ °ø°Ý·Â) ³ôÀ» ¼ö·Ï ¸ó½ºÅÍÀÇ °ø°Ý·ÂÀÌ ¼¼Áø´Ù.
dwVagSP = 1
dwExpertSP = 2
dwProSP = 3
}
}
//----------------------------------------------------------------------------------------------------//
lang LANG_ENG
{
formula
{
itemDropRate = 1.0
goldDropRate = 1.0
monsterExpRate = 1.0
monsterHitRate = 1.0
dwVagSP = 1
dwExpertSP = 2
dwProSP = 3
}
}
Ich Bekomm mit Level 1 Pro monster 14 % <_<