[Release] Offi Files: Event Manager (Event.lua Editor)

    Diese Seite verwendet Cookies. Durch die Nutzung unserer Seite erklären Sie sich damit einverstanden, dass wir Cookies setzen. Weitere Informationen

    • Werbung zur Unterstützung des Forums ( Bitte AddBlocker deaktivieren )

    • [COLOR="Lime"]Hey Corler!
      1. Vielen Dank an Blacker! Nen echt super Tool haste da gemacht! *Daumen hoch*
      2. Ich hab noch ein Problem...undzwar startet das Event nicht?! Hab hab alles eingestellt und trotzdem passiert nichts wenn ich Lvl up komme, außerdem ist iwie die Penya und Drop Rate nur auf 1 ?!
      Hier mal mein Code :

      Brainfuck-Quellcode

      1. ----------------------------------------------------------------------
      2. -- Built with HDBlacker's Event Manager --
      3. ----------------------------------------------------------------------
      4. ----------------------------------------------------------------------
      5. ---------------- Loading event-related Lua-Functions -----------------
      6. ----------------------------------------------------------------------
      7. dofile(".\\LuaFunc\\EventFunc.lua")
      8. ----------------------------------------------------------------------
      9. ----------------- Automatic Notices for TRANS Server -----------------
      10. ----------------------------------------------------------------------
      11. bNotice = true -- Enable automatic notices?
      12. ----------------------------------------------------------------------
      13. ---- Notice( strDate, nInterval(MIN), nAmount ----
      14. ---- AddMessage( strMessage ) ----
      15. ----------------------------------------------------------------------
      16. Notice( "Mon 00:00", 60, 24 )
      17. --{
      18. AddMessage( "Willkommen auf Just For Fun! Unsere Rates sind [EXP : 75] , [DROP : 250] und [PENYA : 2500] ! Danke , dass ihr Just For Fun gewählt habt!" )
      19. --}
      20. Notice( "Tue 00:00", 60, 24 )
      21. --{
      22. AddMessage( "Willkommen auf Just For Fun! Unsere Rates sind [EXP : 75] , [DROP : 250] und [PENYA : 2500] ! Danke , dass ihr Just For Fun gewählt habt!" )
      23. --}
      24. Notice( "Wed 00:00", 60, 24 )
      25. --{
      26. AddMessage( "Willkommen auf Just For Fun! Unsere Rates sind [EXP : 75] , [DROP : 250] und [PENYA : 2500] ! Danke , dass ihr Just For Fun gewählt habt!" )
      27. --}
      28. Notice( "Thu 00:00", 60, 24 )
      29. --{
      30. AddMessage( "Willkommen auf Just For Fun! Unsere Rates sind [EXP : 75] , [DROP : 250] und [PENYA : 2500] ! Danke , dass ihr Just For Fun gewählt habt!" )
      31. --}
      32. Notice( "Fri 00:00", 60, 24 )
      33. --{
      34. AddMessage( "Willkommen auf Just For Fun! Unsere Rates sind [EXP : 75] , [DROP : 250] und [PENYA : 2500] ! Danke , dass ihr Just For Fun gewählt habt!" )
      35. --}
      36. Notice( "Sat 00:00", 60, 24 )
      37. --{
      38. AddMessage( "Willkommen auf Just For Fun! Unsere Rates sind [EXP : 75] , [DROP : 250] und [PENYA : 2500] ! Danke , dass ihr Just For Fun gewählt habt!" )
      39. --}
      40. Notice( "Sun 00:00", 60, 24 )
      41. --{
      42. AddMessage( "Willkommen auf Just For Fun! Unsere Rates sind [EXP : 75] , [DROP : 250] und [PENYA : 2500] ! Danke , dass ihr Just For Fun gewählt habt!" )
      43. --}
      44. ----------------------------------------------------------------------
      45. ---- Initialization ----
      46. ----------------------------------------------------------------------
      47. ---- Hourly drop-weight of items
      48. tHour = { 505, 409, 324, 280, 220, 203, 202, 212,
      49. 227, 261, 302, 349, 571, 701, 764, 803,
      50. 790, 789, 754, 849, 936, 940, 919, 720 }
      51. ----------------------------------------------------------------------
      52. ----------------------------------------------------------------------
      53. ---- AddEvent( strDesc ) -- Registration of new Event named strDesc
      54. ---- SetTime( strStartTime, strEndTime ) -- Event's start time, end time of event (multiple settings possible)
      55. ---- -- Format: 2007-05-03 17:53
      56. ---- SetItem( ItemId, nMax, nNum, nLevel ) -- Drop item, maximum amount, the number of drop (random), The minimum level monsters drop items - several possible
      57. ---- SetExpFactor( fFactor ) -- Exp Factor multiplifier
      58. ---- SetItemDropRate( fFactor ) -- Drop Factor multiplifier
      59. ---- SetPieceItemDropRate( fFactor ) -- Item Piece Factor multiplifier
      60. ---- SetGoldDropFactor( fFactor ) -- Penya Rate multiplifier
      61. ---- SetAttackPower( nAttackPower ) -- Increase Damage
      62. ---- SetDefensePower( nDefensePower ) -- Increase Defense
      63. ---- SetCouponEvent( SEC(n) ) -- Coupon Event Access time (SEC or MIN)
      64. ---- SetLevelUpGift( nLevel, "all", ItemId, nNum ) -- Gives away items on level up: Level of giveaway, accountname, Item, Item Count
      65. ---- -- Account -> __ed: Account starts with an ed__: Account ends with ed
      66. ---- -- all: All accounts else: only account else
      67. ----------------------------------------------------------------------
      68. AddEvent( "Just For Fun!" )
      69. --{
      70. SetTime( "2010-01-01 00:00", "2015-01-01 00:00" )
      71. SetLevelUpGift( 2, "all", "II_PET_PANDA", 1 )
      72. SetLevelUpGift( 2, "all", "II_SYS_SYS_SCR_AMPESS", 198 )
      73. SetLevelUpGift( 2, "all", "II_SYS_SYS_SCR_BAGBAG", 2 )
      74. SetLevelUpGift( 2, "all", "II_ARM_S_CLO_CLO_DRAGON4", 1 )
      75. SetLevelUpGift( 2, "all", "II_SYS_SYS_SCR_PERIN", 10 )
      76. SetLevelUpGift( 2, "all", "II_CHR_SYS_SCR_SHOUTFULL30", 1)
      77. SetLevelUpGift( 3, "all", "II_SYS_SYS_SCR_SMELPROT", 198 )
      78. SetLevelUpGift( 3, "all", "II_SYS_SYS_SCR_PIEPROT", 198 )
      79. SetLevelUpGift( 3, "all", "II_SYS_SYS_SCR_SMELPROT3", 198 )
      80. SetLevelUpGift( 3, "all", "II_SYS_SYS_SCR_SMELPROT4", 198 )
      81. SetLevelUpGift( 3, "all", "II_SYS_SYS_SCR_SMELTING", 198 )
      82. SetLevelUpGift( 3, "all", "II_SYS_SYS_SCR_AWAKE", 198 )
      83. SetLevelUpGift( 3, "all", "II_SYS_SYS_SCR_AWAKECANCEL", 198 )
      84. SetLevelUpGift( 10, "all", "II_GEN_MAT_ORICHALCUM01", 198)
      85. SetLevelUpGift( 10, "all", "II_GEN_MAT_ORICHALCUM02", 198)
      86. SetLevelUpGift( 10, "all", "II_GEN_MAT_MOONSTONE", 198)
      87. SetLevelUpGift( 15, "all", "II_CHR_REF_REF_HOLD", 99 )
      88. SetLevelUpGift( 15, "all", "II_CHR_POT_DRI_VITALX", 99 )
      89. SetLevelUpGift( 15, "all", "II_CHR_FOO_COO_GRILLEDEEL", 99 )
      90. SetLevelUpGift( 15, "all", "II_CHR_SYS_SCR_UPCUTSTONE", 99 )
      91. SetLevelUpGift( 15, "all", "II_CHR_SYS_SCR_ACTIVITION", 198 )
      92. SetLevelUpGift( 15, "all", "II_GEN_GEM_GEM_TWINKLESTONE", 10 )
      93. SetLevelUpGift( 15, "all", "II_GEN_GEM_GEM_FORFORM", 10 )
      94. SetLevelUpGift( 20, "all", "II_ARM_S_CLO_MAS_SUNGLASS03", 1 )
      95. SetLevelUpGift( 20, "all", "II_RID_RID_WIN_FEATHER01", 1 )
      96. SetLevelUpGift( 20, "all", "II_RID_RID_WIN_FEATHER02", 1 )
      97. SetLevelUpGift( 20, "all", "II_CHR_SYS_SCR_RESTATE", 20 )
      98. SetLevelUpGift( 20, "all", "II_SYS_SYS_SCR_RECCURENCE", 20 )
      99. SetLevelUpGift( 30, "all", "II_SYS_TICKET_CISLAND02", 1 )
      100. SetLevelUpGift( 30, "all", "II_SYS_SYS_SCR_RESURRECTION", 99 )
      101. SetLevelUpGift( 40, "all", "II_SYS_SYS_SCR_SCUD", 99 )
      102. SetLevelUpGift( 40, "all", "II_SYS_SYS_SCR_BLESSEDNESS", 99)
      103. SetLevelUpGift( 40, "all", "II_CHR_SYS_SCR_PSKILLFULL30", 3)
      104. SetLevelUpGift( 45, "all", "II_CHR_FOO_COO_REMANTIS", 99)
      105. SetLevelUpGift( 45, "all", "II_SYS_SYS_SCR_AMPESS", 198 )
      106. SetLevelUpGift( 50, "all", "II_SYS_TICKET_KEBARAS02", 1 )
      107. SetLevelUpGift( 52, "all", "II_SYS_SYS_SCR_SMELPROT", 198 )
      108. SetLevelUpGift( 53, "all", "II_SYS_SYS_SCR_PIEPROT", 198 )
      109. SetLevelUpGift( 54, "all", "II_SYS_SYS_SCR_SMELPROT3", 198 )
      110. SetLevelUpGift( 55, "all", "II_SYS_SYS_SCR_SMELPROT4", 198 )
      111. SetLevelUpGift( 56, "all", "II_SYS_SYS_SCR_SMELTING", 198 )
      112. SetLevelUpGift( 57, "all", "II_SYS_SYS_SCR_AWAKE", 198 )
      113. SetLevelUpGift( 57, "all", "II_SYS_SYS_SCR_AWAKECANCEL", 198 )
      114. SetLevelUpGift( 58, "all", "II_GEN_MAT_ORICHALCUM01", 198)
      115. SetLevelUpGift( 59, "all", "II_GEN_MAT_ORICHALCUM02", 198)
      116. SetLevelUpGift( 60, "all", "II_GEN_MAT_MOONSTONE", 198)
      117. SetLevelUpGift( 61, "all", "II_CHR_REF_REF_HOLD", 99 )
      118. SetLevelUpGift( 62, "all", "II_CHR_POT_DRI_VITALX", 99 )
      119. SetLevelUpGift( 63, "all", "II_CHR_FOO_COO_GRILLEDEEL", 99 )
      120. SetLevelUpGift( 64, "all", "II_CHR_SYS_SCR_UPCUTSTONE", 99 )
      121. SetLevelUpGift( 65, "all", "II_CHR_SYS_SCR_ACTIVITION", 198 )
      122. SetLevelUpGift( 80, "all", "II_RID_RID_WIN_ANGEL01", 1 )
      123. SetLevelUpGift( 83, "all", "II_CHR_FOO_COO_REMANTIS", 198)
      124. SetLevelUpGift( 85, "all", "II_SYS_SYS_SCR_AMPESS", 198 )
      125. SetLevelUpGift( 89, "all", "II_SYS_SYS_SCR_SMELPROT", 198 )
      126. SetLevelUpGift( 89, "all", "II_SYS_SYS_SCR_PIEPROT", 198 )
      127. SetLevelUpGift( 91, "all", "II_SYS_SYS_SCR_SMELPROT3", 198 )
      128. SetLevelUpGift( 93, "all", "II_SYS_SYS_SCR_SMELPROT4", 198 )
      129. SetLevelUpGift( 95, "all", "II_SYS_SYS_SCR_SMELTING", 198 )
      130. SetLevelUpGift( 97, "all", "II_SYS_SYS_SCR_AWAKE", 198 )
      131. SetLevelUpGift( 99, "all", "II_SYS_SYS_SCR_AWAKECANCEL", 198 )
      132. SetLevelUpGift( 100, "all", "II_GEN_MAT_ORICHALCUM01", 198)
      133. SetLevelUpGift( 102, "all", "II_GEN_MAT_ORICHALCUM02", 198)
      134. SetLevelUpGift( 104, "all", "II_GEN_MAT_MOONSTONE", 198)
      135. SetLevelUpGift( 105, "all", "II_SYS_SYS_SCR_BXSURPRISE100", 20 )
      136. SetLevelUpGift( 106, "all", "II_CHR_REF_REF_HOLD", 99 )
      137. SetLevelUpGift( 108, "all", "II_CHR_POT_DRI_VITALX", 99 )
      138. SetLevelUpGift( 110, "all", "II_CHR_FOO_COO_GRILLEDEEL", 99 )
      139. SetLevelUpGift( 112, "all", "II_CHR_SYS_SCR_UPCUTSTONE", 99 )
      140. SetLevelUpGift( 114, "all", "II_CHR_SYS_SCR_ACTIVITION", 198 )
      141. SetLevelUpGift( 118, "all", "II_RID_RID_WIN_PROPHET01", 1 )
      142. SetLevelUpGift( 120, "all", "II_CHP_RED", 10000 )
      143. --}
      Alles anzeigen

      Ich weiss nicht worans liegt. ( Hab die Raten direkt in der Eventfunc eingegeben, liegts evt dadran?)
      Hier mal die Eventfunc :

      Quellcode

      1. tEvent = {} -- À̺¥Æ® ÀúÀå Å×À̺í
      2. tNotice = {} -- Á¡°Ë ÀÚµ¿ °øÁö
      3. bNotice = false
      4. function SEC( n )
      5. return n*1000
      6. end
      7. function MIN( n )
      8. return n*SEC(60)
      9. end
      10. ITEM = 4
      11. MONSTER = 5
      12. -----------------------------------------------------------------------------------
      13. function Notice( strTime, nInterval, nNoticeCount )
      14. tNotice.strTime = strTime
      15. tNotice.nInterval = nInterval
      16. tNotice.nNoticeCount = nNoticeCount
      17. tNotice.tMessage = {}
      18. end
      19. function AddMessage( strMessage )
      20. local nSize = table.getn( tNotice.tMessage ) + 1
      21. tNotice.tMessage[nSize] = strMessage
      22. end
      23. function IsNoticeTime()
      24. if( (bNotice == true) and (tNotice.nNoticeCount > 0) and (tNotice.strTime == os.date("%a %H:%M")) ) then
      25. tNotice.nNoticeCount = tNotice.nNoticeCount - 1
      26. SetNextNoticeTime()
      27. return true
      28. end
      29. return false
      30. end
      31. function SetNextNoticeTime()
      32. local nMin = tonumber( os.date( "%M" ) )
      33. local nHour = tonumber( os.date( "%H" ) )
      34. local strTemp;
      35. tNotice.strTime = os.date( "%a " )
      36. nMin = nMin + tNotice.nInterval;
      37. if( nMin > 59 ) then
      38. nMin = 60 - nMin
      39. nHour = nHour + 1
      40. end
      41. -- ½Ã
      42. strTemp = tostring( nHour )..":"
      43. if( nHour < 10 ) then strTemp = "0"..strTemp end
      44. tNotice.strTime = tNotice.strTime .. strTemp
      45. -- ºÐ
      46. strTemp = tostring( nMin )
      47. if( nMin < 10 ) then strTemp = "0"..strTemp end
      48. tNotice.strTime = tNotice.strTime .. strTemp
      49. end
      50. function GetNoticeMessage()
      51. return tNotice.tMessage
      52. end
      53. -----------------------------------------------------------------------------------
      54. ------- C¿¡¼* È£ÃâÇÒ ·ç¾Æ ÇÔ¼ö ----------------------------------------------------
      55. -----------------------------------------------------------------------------------
      56. -- º¯°æµÈ À̺¥Æ® ¸®½ºÆ® (DBSERVER)
      57. function GetEventState()
      58. local tReturn = {}
      59. local nCount = 1
      60. for i in pairs(tEvent) do
      61. local OldState = tEvent[i].State
      62. for j in pairs(tEvent[i].Time) do
      63. if( tEvent[i].Time[j].nStart <= tonumber(os.date("%Y%m%d%H%M")) ) then
      64. if( tEvent[i].Time[j].nEnd > tonumber(os.date("%Y%m%d%H%M")) ) then
      65. if( tEvent[i].State == 0 ) then
      66. tEvent[i].State = 1
      67. end
      68. else
      69. if( tEvent[i].State == 1 ) then
      70. tEvent[i].State = 0
      71. end
      72. end
      73. end
      74. end
      75. if( OldState ~= tEvent[i].State ) then
      76. tReturn[nCount] = {}
      77. tReturn[nCount].nId = i
      78. tReturn[nCount].State = tEvent[i].State
      79. nCount = nCount + 1
      80. end
      81. end
      82. return tReturn
      83. end
      84. -- WORLDSERVER¿¡¼* ½ÇÇàµÈ ½ºÅ©¸³Æ® ÆÄÀÏ¿¡µµ º¯°æµÈ state¸¦ Àû¿ëÇϱâ À§ÇÑ ÇÔ¼ö
      85. function SetState( nId, nState )
      86. if( tEvent[nId] == nil ) then
      87. TRACE( string.format( "Have Not Event - ID:%d", nId ) )
      88. ERROR( string.format( "Have Not Event - ID:%d", nId ) )
      89. return false;
      90. end
      91. tEvent[nId].State = nState
      92. TRACE( string.format( "Event - ID:%d, Title:%s, State:%d", nId, tEvent[nId].Desc, tEvent[nId].State ) )
      93. ERROR( string.format( "Event - ID:%d, Title:%s, State:%d", nId, tEvent[nId].Desc, tEvent[nId].State ) )
      94. return true;
      95. end
      96. -- ÁøÇàÁßÀÎ À̺¥Æ® ¸®½ºÆ®
      97. function GetEventList()
      98. local tList = {}
      99. local nCount = 1
      100. for i in pairs(tEvent) do
      101. if( tEvent[i].State == 1 ) then
      102. tList[nCount] = i
      103. nCount = nCount + 1
      104. end
      105. end
      106. return tList
      107. end
      108. -- À̺¥Æ® Å×ÀÌºí¿¡ ÀÖ´Â ¸ðµç ¸®½ºÆ®
      109. function GetAllEventList()
      110. local tAllList = {}
      111. local nCount = 1
      112. for i in pairs(tEvent) do
      113. tAllList[nCount] = {}
      114. tAllList[nCount].nId = i
      115. tAllList[nCount].strTitle = tEvent[i].Desc
      116. tAllList[nCount].nState = tEvent[i].State
      117. nCount = nCount + 1
      118. end
      119. return tAllList
      120. end
      121. -- À̺¥Æ® »ó¼¼ Á¤º¸ Å×À̺íÀ» ¸®ÅÏ
      122. function GetEventInfo( nId )
      123. local tEventInfo = {}
      124. if( tEvent[nId] == nil ) then
      125. tEventInfo[1] = "No EventInfo ID = "..nId
      126. return tEventInfo
      127. end
      128. local nCount = 3
      129. tEventInfo[1] = "Title = " .. tEvent[nId].Desc
      130. tEventInfo[2] = "State = " .. tEvent[nId].State
      131. for i in pairs(tEvent[nId].Time) do
      132. local strTime = tEvent[nId].Time[i].nStart .. ", " ..tEvent[nId].Time[i].nEnd
      133. tEventInfo[nCount] = "Time["..i.."] = " .. strTime
      134. nCount = nCount + 1
      135. end
      136. for i in pairs(tEvent[nId].Item) do
      137. local strItem = tEvent[nId].Item[i].ItemId ..", ".. tEvent[nId].Item[i].ItemMaxNum ..", ".. tEvent[nId].Item[i].ItemNum ..", ".. tEvent[nId].Item[i].nLevel
      138. tEventInfo[nCount] = "Item["..i.."] = " .. strItem
      139. nCount = nCount + 1
      140. end
      141. if( tEvent[nId].fExpFactor ~= 1 ) then
      142. tEventInfo[nCount] = "ExpFactor = " .. tEvent[nId].fExpFactor
      143. nCount = nCount + 1
      144. end
      145. if( tEvent[nId].fItemDropRate ~= 1 ) then
      146. tEventInfo[nCount] = "ItemDropRate = " .. tEvent[nId].fItemDropRate
      147. nCount = nCount + 1
      148. end
      149. if( tEvent[nId].fPieceItemDropRate ~= 1 ) then
      150. tEventInfo[nCount] = "fPieceItemDropRate = " .. tEvent[nId].fPieceItemDropRate
      151. nCount = nCount + 1
      152. end
      153. if( tEvent[nId].fGoldDropFactor ~= 1 ) then
      154. tEventInfo[nCount] = "fGoldDropFactor = " .. tEvent[nId].fGoldDropFactor
      155. nCount = nCount + 1
      156. end
      157. if( tEvent[nId].nAttackPower ~= 0 ) then
      158. tEventInfo[nCount] = "nAttackPower = " .. tEvent[nId].nAttackPower
      159. nCount = nCount + 1
      160. end
      161. if( tEvent[nId].nDefensePower ~= 0 ) then
      162. tEventInfo[nCount] = "nDefensePower = " .. tEvent[nId].nDefensePower
      163. nCount = nCount + 1
      164. end
      165. if( tEvent[nId].nCouponEvent ~= 0 ) then
      166. if( tEvent[nId].nCouponEvent < MIN(1) ) then
      167. tEventInfo[nCount] = "nCouponEventTime = " .. tEvent[nId].nCouponEvent / SEC(1) .. "Sec"
      168. else
      169. tEventInfo[nCount] = "nCouponEventTime = " .. tEvent[nId].nCouponEvent / MIN(1) .. "Min"
      170. end
      171. nCount = nCount + 1
      172. end
      173. for i in pairs(tEvent[nId].Gift) do
      174. local strGift = tEvent[nId].Gift[i].nLevel ..", ".. tEvent[nId].Gift[i].strAccount ..", ".. tEvent[nId].Gift[i].strItemId ..", ".. tEvent[nId].Gift[i].nItemNum
      175. tEventInfo[nCount] = "Gift["..i.."] = " .. strGift
      176. nCount = nCount + 1
      177. end
      178. if( tEvent[nId].fCheerExpFactor ~= 1 ) then
      179. tEventInfo[nCount] = "fCheerExpFactor = " .. tEvent[nId].fCheerExpFactor
      180. nCount = nCount + 1
      181. end
      182. for i in pairs(tEvent[nId].tKeepConnectEvent) do
      183. local strTick = "tKeepConnectTime = " .. tEvent[nId].tKeepConnectEvent[i].nTime / MIN(1) .. "Min"
      184. tEventInfo[nCount] = "tKeepConnectTime["..i.."] = " .. strTick
      185. nCount = nCount + 1
      186. local strItem = tEvent[nId].tKeepConnectEvent[i].strItemId ..", ".. tEvent[nId].tKeepConnectEvent[i].nItemNum
      187. tEventInfo[nCount] = "tKeepConnectItem["..i.."] = " .. strItem
      188. nCount = nCount + 1
      189. end
      190. return tEventInfo
      191. end
      192. -- À̺¥Æ® ¼³¸í
      193. function GetDesc( nId )
      194. local strDesc = tEvent[nId].Desc
      195. return strDesc
      196. end
      197. -- ½Ã°£À» ¼ýÀÚ·Î ¹Ù²ãÁÖ´Â ÇÔ¼ö
      198. function GetTimeToNumber( strTime )
      199. local strTemp = ""
      200. local j = 0
      201. for i in string.gfind( strTime, "%d+" ) do
      202. j = j + 1
      203. if( (j~=1) and (tonumber(i)<10) ) then
      204. i = "0"..tonumber(i)
      205. end
      206. strTemp = strTemp..i
      207. end
      208. return tonumber( strTemp )
      209. end
      210. ---------------------------------------------------------------------------
      211. ------ µ¥ÀÌÅÍ Ãß°¡ ÇÔ¼ö ---------------------------------------------------
      212. ---------------------------------------------------------------------------
      213. -- »õ·Î¿î À̺¥Æ® Ãß°¡
      214. function AddEvent( strDesc )
      215. local nEventId = table.getn(tEvent) + 1
      216. tEvent[nEventId] = {}
      217. tEvent[nEventId].Item = {}
      218. tEvent[nEventId].Time = {}
      219. tEvent[nEventId].Desc = strDesc
      220. tEvent[nEventId].fExpFactor = 75
      221. tEvent[nEventId].fItemDropRate = 250
      222. tEvent[nEventId].fPieceItemDropRate = 50
      223. tEvent[nEventId].fGoldDropFactor = 2500
      224. tEvent[nEventId].State = 0
      225. tEvent[nEventId].nAttackPower = 0
      226. tEvent[nEventId].nDefensePower = 0
      227. tEvent[nEventId].nCouponEvent = 0
      228. tEvent[nEventId].Gift = {}
      229. tEvent[nEventId].fCheerExpFactor = 15
      230. tEvent[nEventId].tSpawn = {}
      231. tEvent[nEventId].tKeepConnectEvent = {}
      232. tEvent[nEventId].fRainEventExpFactor = 1
      233. tEvent[nEventId].strRainEventTitle = ""
      234. tEvent[nEventId].fSnowEventExpFactor = 1
      235. tEvent[nEventId].strSnowEventTitle = ""
      236. end
      237. -- ½ÃÀ۽ð£, ³¡½Ã°£
      238. function SetTime( strStart, strEnd )
      239. local nEventId = table.getn(tEvent)
      240. local nSize = table.getn( tEvent[nEventId].Time ) + 1
      241. tEvent[nEventId].Time[nSize] = {}
      242. tEvent[nEventId].Time[nSize].nStart = GetTimeToNumber( strStart )
      243. tEvent[nEventId].Time[nSize].nEnd = GetTimeToNumber( strEnd )
      244. end
      245. -- ¾ÆÀÌÅÛ
      246. function SetItem( ItemId, nItemMaxNum, nItemNum, nLevel )
      247. local nEventId = table.getn(tEvent)
      248. local nSize = table.getn(tEvent[nEventId].Item)
      249. tEvent[nEventId].Item[nSize+1] = {}
      250. tEvent[nEventId].Item[nSize+1].ItemId = ItemId
      251. tEvent[nEventId].Item[nSize+1].ItemMaxNum = nItemMaxNum
      252. tEvent[nEventId].Item[nSize+1].ItemNum = nItemNum
      253. tEvent[nEventId].Item[nSize+1].nLevel = nLevel
      254. tEvent[nEventId].Item[nSize+1].TimeOut = 0
      255. tEvent[nEventId].Item[nSize+1].Skip = 0
      256. local tInterval = {}
      257. local nTotal = 0
      258. for i in pairs(tHour) do
      259. nTotal = nTotal + tHour[i]
      260. end
      261. for i in pairs(tHour) do
      262. tInterval[i] = 3600000 / ( nItemMaxNum * tHour[i] / nTotal )
      263. tInterval[i] = math.floor(tInterval[i])
      264. end
      265. tEvent[nEventId].Item[nSize+1].tInterval = tInterval
      266. end
      267. -- µå·ÓµÉ ¾ÆÀÌÅÛ ¸ñ·Ï
      268. function GetItem( nTickCount, nLevel )
      269. local nHour = tonumber(os.date("%H")) + 1
      270. local tList = GetEventList()
      271. local tReturn = {}
      272. local nCount = 1
      273. for i in pairs(tList) do
      274. local tItem = tEvent[tList[i]].Item
      275. for j in pairs(tItem) do
      276. local nRandom = math.random(0, tItem[j].ItemNum)
      277. if( (nRandom > 0) and (nTickCount >= tItem[j].TimeOut) and (tItem[j].nLevel <= nLevel) ) then
      278. tItem[j].TimeOut = tItem[j].tInterval[nHour] + nTickCount
      279. if( tItem[j].Skip == 0 ) then
      280. tReturn[nCount] = {}
      281. tReturn[nCount].ItemId = tItem[j].ItemId
      282. tReturn[nCount].ItemNum = nRandom
      283. tItem[j].Skip = nRandom - 1
      284. nCount = nCount + 1
      285. TRACE( "Event.lua : GetItem() - Drop - "..tItem[j].ItemId..", "..nRandom.."°³, Skip:"..tItem[j].Skip.." ½Ã°£´ë:"..(nHour-1).." ~ "..nHour )
      286. else
      287. tItem[j].Skip = tItem[j].Skip - 1
      288. TRACE( "Event.lua : GetItem() - Skip - "..tItem[j].ItemId..", ³²Àº Skip:"..tItem[j].Skip.." ½Ã°£´ë:"..(nHour-1).." ~ "..nHour )
      289. end
      290. end
      291. end
      292. end
      293. return tReturn
      294. end
      295. -- °æÇèÄ¡ ¹è¼ö
      296. function SetExpFactor( fExpFactor )
      297. local nEventId = table.getn(tEvent)
      298. tEvent[nEventId].fExpFactor = fExpFactor
      299. end
      300. function GetExpFactor()
      301. local tList = GetEventList()
      302. local fExpFactor = 500
      303. for i in pairs(tList) do
      304. if( tEvent[tList[i]].fExpFactor ~= nil ) then
      305. fExpFactor = fExpFactor * tEvent[tList[i]].fExpFactor
      306. end
      307. end
      308. return fExpFactor
      309. end
      310. -- ¾ÆÀÌÅÛ µå·Ó·ü ¹è¼ö
      311. function SetItemDropRate( fItemDropRate )
      312. local nEventId = table.getn(tEvent)
      313. tEvent[nEventId].fItemDropRate = fItemDropRate
      314. end
      315. function GetItemDropRate()
      316. local tList = GetEventList()
      317. local fItemDropRate = 1
      318. for i in pairs(tList) do
      319. if( tEvent[tList[i]].fItemDropRate ~= nil ) then
      320. fItemDropRate = fItemDropRate * tEvent[tList[i]].fItemDropRate
      321. end
      322. end
      323. return fItemDropRate
      324. end
      325. -- °³º° ¾ÆÀÌÅÛ µå·Ó·ü ¹è¼ö
      326. function SetPieceItemDropRate( fPieceItemDropRate )
      327. local nEventId = table.getn(tEvent)
      328. tEvent[nEventId].fPieceItemDropRate = fPieceItemDropRate
      329. end
      330. function GetPieceItemDropRate()
      331. local tList = GetEventList()
      332. local fPieceItemDropRate = 1
      333. for i in pairs(tList) do
      334. if( tEvent[tList[i]].fPieceItemDropRate ~= nil ) then
      335. fPieceItemDropRate = fPieceItemDropRate * tEvent[tList[i]].fPieceItemDropRate
      336. end
      337. end
      338. return fPieceItemDropRate
      339. end
      340. -- Æä³Ä µå·Ó ¹è¼ö
      341. function SetGoldDropFactor( fGoldDropFactor )
      342. local nEventId = table.getn(tEvent)
      343. tEvent[nEventId].fGoldDropFactor = fGoldDropFactor
      344. end
      345. function GetGoldDropFactor()
      346. local tList = GetEventList()
      347. local fGoldDropFactor = 1
      348. for i in pairs(tList) do
      349. if( tEvent[tList[i]].fGoldDropFactor ~= nil ) then
      350. fGoldDropFactor = fGoldDropFactor * tEvent[tList[i]].fGoldDropFactor
      351. end
      352. end
      353. return fGoldDropFactor
      354. end
      355. -- °ø°Ý·Â Áõ°¡
      356. function SetAttackPower( nAttackPower )
      357. local nEventId = table.getn(tEvent)
      358. tEvent[nEventId].nAttackPower = nAttackPower
      359. end
      360. function GetAttackPower()
      361. local tList = GetEventList()
      362. local nAttackPower = 0
      363. for i in pairs(tList) do
      364. if( tEvent[tList[i]].nAttackPower ~= nil ) then
      365. nAttackPower = nAttackPower + tEvent[tList[i]].nAttackPower
      366. end
      367. end
      368. return nAttackPower
      369. end
      370. -- ¹æ¾î·Â Áõ°¡
      371. function SetDefensePower( nDefensePower )
      372. local nEventId = table.getn(tEvent)
      373. tEvent[nEventId].nDefensePower = nDefensePower
      374. end
      375. function GetDefensePower()
      376. local tList = GetEventList()
      377. local nDefensePower = 0
      378. for i in pairs(tList) do
      379. if( tEvent[tList[i]].nDefensePower ~= nil ) then
      380. nDefensePower = nDefensePower + tEvent[tList[i]].nDefensePower
      381. end
      382. end
      383. return nDefensePower
      384. end
      385. -- ÄíÆù À̺¥Æ®
      386. function SetCouponEvent( nTime )
      387. local nEventId = table.getn(tEvent)
      388. tEvent[nEventId].nCouponEvent = nTime
      389. end
      390. function GetCouponEvent()
      391. local tList = GetEventList()
      392. for i in pairs(tList) do
      393. if( tEvent[tList[i]].nCouponEvent ~= 0 ) then
      394. return tEvent[tList[i]].nCouponEvent
      395. end
      396. end
      397. return 0
      398. end
      399. function SetLevelUpGift( nLevel, strAccount, strItemId, nItemNum, byFlag )
      400. local nEventId = table.getn(tEvent)
      401. local nSize = table.getn(tEvent[nEventId].Gift)
      402. tEvent[nEventId].Gift[nSize+1] = {}
      403. tEvent[nEventId].Gift[nSize+1].nLevel = nLevel
      404. tEvent[nEventId].Gift[nSize+1].strAccount = strAccount
      405. tEvent[nEventId].Gift[nSize+1].strItemId = strItemId
      406. tEvent[nEventId].Gift[nSize+1].nItemNum = nItemNum
      407. tEvent[nEventId].Gift[nSize+1].byFlag = byFlag
      408. end
      409. function GetLevelUpGift( nLevel, strAccount )
      410. local nCount = 1
      411. local tGiftList = {}
      412. local tList = GetEventList()
      413. for i in pairs(tList) do
      414. local tGift = tEvent[tList[i]].Gift
      415. for j in pairs(tGift) do
      416. local nTemp = string.find( strAccount, tGift[j].strAccount )
      417. if( (tGift[j].strAccount == "all") or (nTemp ~= nil) ) then
      418. if( tGift[j].nLevel == nLevel ) then
      419. tGiftList[nCount] = {}
      420. tGiftList[nCount].strItemId = tGift[j].strItemId
      421. tGiftList[nCount].nItemNum = tGift[j].nItemNum
      422. tGiftList[nCount].byFlag = tGift[j].byFlag
      423. nCount = nCount + 1
      424. end
      425. end
      426. end
      427. end
      428. return tGiftList
      429. end
      430. function SetCheerExpFactor( fCheerExpFactor )
      431. local nEventId = table.getn(tEvent)
      432. tEvent[nEventId].fCheerExpFactor = fCheerExpFactor
      433. end
      434. function GetCheerExpFactor()
      435. local tList = GetEventList()
      436. local fCheerExpFactor = 1
      437. for i in pairs(tList) do
      438. if( tEvent[tList[i]].fCheerExpFactor ~= nil ) then
      439. fCheerExpFactor = fCheerExpFactor * tEvent[tList[i]].fCheerExpFactor
      440. end
      441. end
      442. return fCheerExpFactor
      443. end
      444. function SetSpawn( nType, strId, nDayNum )
      445. local nEventId = table.getn(tEvent)
      446. local nSize = table.getn(tEvent[nEventId].tSpawn)
      447. tEvent[nEventId].tSpawn[nSize+1] = {}
      448. tEvent[nEventId].tSpawn[nSize+1].nType = nType
      449. tEvent[nEventId].tSpawn[nSize+1].strId = strId
      450. tEvent[nEventId].tSpawn[nSize+1].nDayNum = nDayNum
      451. end
      452. function GetSpawn( nId )
      453. return tEvent[nId].tSpawn, table.getn( tEvent[nId].tSpawn )
      454. end
      455. -- Á¢¼Ó½Ã°£ ´©Àû ¾ÆÀÌÅÛ Áö±Þ À̺¥Æ®
      456. function SetKeepConnectEvent( nTime, strItemId, nItemNum )
      457. local nEventId = table.getn(tEvent)
      458. local nSize = table.getn(tEvent[nEventId].tKeepConnectEvent)
      459. tEvent[nEventId].tKeepConnectEvent[nSize+1] = {}
      460. tEvent[nEventId].tKeepConnectEvent[nSize+1].nTime = nTime
      461. tEvent[nEventId].tKeepConnectEvent[nSize+1].strItemId = strItemId
      462. tEvent[nEventId].tKeepConnectEvent[nSize+1].nItemNum = nItemNum
      463. end
      464. function GetKeepConnectTime()
      465. local tList = GetEventList()
      466. for i in pairs(tList) do
      467. local tTime = tEvent[tList[i]].tKeepConnectEvent
      468. for j in pairs(tTime) do
      469. if( tTime[j].nTime ~= 0 ) then
      470. return tTime[j].nTime
      471. end
      472. end
      473. end
      474. return 0
      475. end
      476. function GetKeepConnectItem()
      477. local tList = GetEventList()
      478. local tReturn = {}
      479. local nCount = 1
      480. for i in pairs(tList) do
      481. local tItem = tEvent[tList[i]].tKeepConnectEvent
      482. for j in pairs(tItem) do
      483. tReturn[nCount] = {}
      484. tReturn[nCount].strItemId = tItem[j].strItemId
      485. tReturn[nCount].nItemNum = tItem[j].nItemNum
      486. nCount = nCount + 1
      487. end
      488. end
      489. return tReturn
      490. end
      491. function SetRainEvent( fFactor, strTitle )
      492. local nEventId = table.getn(tEvent)
      493. tEvent[nEventId].fRainEventExpFactor = fFactor
      494. tEvent[nEventId].strRainEventTitle = strTitle
      495. end
      496. function GetRainEventExpFactor()
      497. local tList = GetEventList()
      498. local fFactor = 1
      499. for i in pairs(tList) do
      500. if( tEvent[tList[i]].fRainEventExpFactor ~= nil ) then
      501. fFactor = fFactor * tEvent[tList[i]].fRainEventExpFactor
      502. end
      503. end
      504. return fFactor
      505. end
      506. function GetRainEventTitle()
      507. local tList = GetEventList()
      508. for i in pairs(tList) do
      509. if( tEvent[tList[i]].fRainEventExpFactor > 1 ) then
      510. return tEvent[tList[i]].strRainEventTitle
      511. end
      512. end
      513. return nil
      514. end
      515. function SetSnowEvent( fFactor, strTitle )
      516. local nEventId = table.getn(tEvent)
      517. tEvent[nEventId].fSnowEventExpFactor = fFactor
      518. tEvent[nEventId].strSnowEventTitle = strTitle
      519. end
      520. function GetSnowEventExpFactor()
      521. local tList = GetEventList()
      522. local fFactor = 1
      523. for i in pairs(tList) do
      524. if( tEvent[tList[i]].fSnowEventExpFactor ~= nil ) then
      525. fFactor = fFactor * tEvent[tList[i]].fSnowEventExpFactor
      526. end
      527. end
      528. return fFactor
      529. end
      530. function GetSnowEventTitle()
      531. local tList = GetEventList()
      532. for i in pairs(tList) do
      533. if( tEvent[tList[i]].fSnowEventExpFactor > 1 ) then
      534. return tEvent[tList[i]].strSnowEventTitle
      535. end
      536. end
      537. return nil
      538. end
      Alles anzeigen

      Wäre super wenn mir Jemand helfen könnte :D[/COLOR]
    • Dancex3;146429 schrieb:

      Das ist kompletter Schwachsinn :> Viele sagen das die Rates etc. in der Event.func.lua eingestellt werden. Aber das stimmt nicht! Du musst die Rates in der Event.lua einstellen:



      <-So zum Beispiel..


      Bei v. 14 hat das noch funktioniert, bei v. 15 offenbar nicht mehr.
      Weisst du vielleicht wie man das "Rates Event" unsichtbar kriegt?
    • lumien;146443 schrieb:

      Bei v. 14 hat das noch funktioniert, bei v. 15 offenbar nicht mehr.
      Weisst du vielleicht wie man das "Rates Event" unsichtbar kriegt?


      Ich habs bei v14 noch nie probiert. Da in der Event.func.lua nur die informationen von der Event.lua ausgelesen werden,.. und an die Server weiter geleitet wird..

      Wie wäre es wenn du den Script einfach in dein vorhandenes Event einfügst? ;)
      Somit hast du nur ein Event.. weil unsichtbar kann man dies nicht machen..