Welcome!

Join our community of MMO enthusiasts and game developers! By registering, you'll gain access to discussions on the latest developments in MMO server files and collaborate with like-minded individuals. Join us today and unlock the potential of MMO server development!

Join Today!

Halloween event

Newbie Spellweaver
Joined
Oct 31, 2011
Messages
66
Reaction score
11
Hello,

here is my Halloween event. Still bugged, but if someone found a solution you can post it here. The basic things are working, just the NPC (So-Ok) is automatically closing after some time.

LUA:
Code:
QEV_EVENT_HAPPY = function()
  EventID = 10168
  SetEventOne(EventID, "SN_QEV_EVENT_HAPPY", 1, 1, 9)
  SetEventTwo(2, "SN_TALK_QEV_CH_EVENT_HAPPY_B", "SN_TALK_COMMON_EXIT")
  NPC_COUNT = 1
  LuaInsertNpc(NPC_COUNT, "NPC_CH_EVENT_KISAENG1")
  InsertPayItemCodeName(20, "ITEM_EVENT_AVATAR_M_HALLOWEEN", "ITEM_EVENT_AVATAR_W_HALLOWEEN", "ITEM_EVENT_AVATAR_M_HALLOWEEN_HAT", "ITEM_EVENT_AVATAR_W_HALLOWEEN_HAT", "ITEM_EVENT_ARCHEMY_REINFORCE_RECIPE_SHIELD_B", "ITEM_ETC_ALL_POTION_05", "ITEM_ETC_ALL_SPOTION_01", "ITEM_EVENT_ARCHEMY_REINFORCE_RECIPE_ACCESSARY_B", "ITEM_EVENT_ARCHEMY_REINFORCE_RECIPE_WEAPON_B", "ITEM_ETC_E080723_SKILL_EXP_5", "ITEM_ETC_E080723_SKILL_EXP_10", "ITEM_ETC_E080723_SKILL_EXP_15", "ITEM_ETC_E080723_SKILL_EXP_20", "ITEM_EVENT_HP_INC_1900_POTION", "ITEM_EVENT_HP_INC_4100_POTION", "ITEM_ETC_ARCHEMY_MAGICSTONE_STR_10", "ITEM_ETC_ARCHEMY_MAGICSTONE_INT_10", "ITEM_ETC_E090930_HIT_SUPER_SCROLL", "ITEM_ETC_E090930_EVATION_SUPER_SCROLL", "ITEM_ETC_E060526_SUMMON_PARTY_SCROLL_A")
  InsertPayItemRatio(20, 10, 10, 15, 7, 5, 15, 15, 7, 3, 2, 1, 0.6, 0.5, 1.8, 1, 1, 1, 1, 1, 3)
   LuaInsertDropItem(9, "ITEM_ETC_E110125_HALLOWEEN_H", 2, "ITEM_ETC_E110125_HALLOWEEN_A", 2, "ITEM_ETC_E110125_HALLOWEEN_L", 2, "ITEM_ETC_E110125_HALLOWEEN_L_2", 2, "ITEM_ETC_E110125_HALLOWEEN_O", 2, "ITEM_ETC_E110125_HALLOWEEN_W", 2, "ITEM_ETC_E110125_HALLOWEEN_E", 2, "ITEM_ETC_E110125_HALLOWEEN_E_2", 2, "ITEM_ETC_E110125_HALLOWEEN_N", 2)
   InsertMenuStringList("NPC_CH_EVENT_KISAENG1", 5, "EVENT_MENUSTRING_GREETING", "SN_NPC_CH_EVENT_KISAENG1_QS", "EVENT_MENUSTRING_REQUEST_ACCEPT_QUEST", "SN_TALK_QEV_CH_EVENT_HAPPY_A", "EVENT_MENUSTRING_NOT_ACHIEVED", "SN_TALK_QEV_CH_EVENT_HAPPY_E", "EVENT_MENUSTRING_INVENTORY_FULL", "SN_TALK_QEV_CH_EVENT_HAPPY_D", "EVENT_MENUSTRING_ACHIEVED", "SN_TALK_QEV_CH_EVENT_HAPPY_C")
  CONVERSATION_SINGLE = 0
  LuaInsertFunctionStringList(1, "CONVERSATION_SINGLE", "KISAENG_100315_Conversation")
end

ItemCheck = function()
 if 0 < LuaEventInQuireSameItem(0, "ITEM_ETC_E110125_HALLOWEEN_H", INQUIRE_SAMEITEM_OP_COUNT_FIRST_ITEM, -1) and 0 < LuaEventInQuireSameItem(0, "ITEM_ETC_E110125_HALLOWEEN_A", INQUIRE_SAMEITEM_OP_COUNT_FIRST_ITEM, -1) and 0 < LuaEventInQuireSameItem(0, "ITEM_ETC_E110125_HALLOWEEN_L", INQUIRE_SAMEITEM_OP_COUNT_FIRST_ITEM, -1) and 0 < LuaEventInQuireSameItem(0, "ITEM_ETC_E110125_HALLOWEEN_L_2", INQUIRE_SAMEITEM_OP_COUNT_FIRST_ITEM, -1) and 0 < LuaEventInQuireSameItem(0, "ITEM_ETC_E110125_HALLOWEEN_O", INQUIRE_SAMEITEM_OP_COUNT_FIRST_ITEM, -1) and 0 < LuaEventInQuireSameItem(0, "ITEM_ETC_E110125_HALLOWEEN_W", INQUIRE_SAMEITEM_OP_COUNT_FIRST_ITEM, -1) and 0 < LuaEventInQuireSameItem(0, "ITEM_ETC_E110125_HALLOWEEN_E", INQUIRE_SAMEITEM_OP_COUNT_FIRST_ITEM, -1) and 0 < LuaEventInQuireSameItem(0, "ITEM_ETC_E110125_HALLOWEEN_E_2", INQUIRE_SAMEITEM_OP_COUNT_FIRST_ITEM, -1) and 0 < LuaEventInQuireSameItem(0, "ITEM_ETC_E110125_HALLOWEEN_N", INQUIRE_SAMEITEM_OP_COUNT_FIRST_ITEM, -1) then
    return 0
  else
    return 1
  end
end


ItemDel = function()
  if 0 < LuaEventInQuireSameItem(0, "ITEM_ETC_E110125_HALLOWEEN_H", INQUIRE_SAMEITEM_OP_COUNT_ALL_SAMEITEM, 0) then
    slot = LuaEventInQuireSameItem(0, "ITEM_ETC_E110125_HALLOWEEN_H", INQUIRE_SAMEITEM_OP_FIND_FIRST_SLOT, 0)
    LuaDelItem_EXT(0, slot, 1, SYSOP_REASON_Event, 0)
  end
  if 0 < LuaEventInQuireSameItem(0, "ITEM_ETC_E110125_HALLOWEEN_A", INQUIRE_SAMEITEM_OP_COUNT_ALL_SAMEITEM, 0) then
    slot = LuaEventInQuireSameItem(0, "ITEM_ETC_E110125_HALLOWEEN_A", INQUIRE_SAMEITEM_OP_FIND_FIRST_SLOT, 0)
    LuaDelItem_EXT(0, slot, 1, SYSOP_REASON_Event, 0)
  end
   if 0 < LuaEventInQuireSameItem(0, "ITEM_ETC_E110125_HALLOWEEN_L", INQUIRE_SAMEITEM_OP_COUNT_ALL_SAMEITEM, 0) then
    slot = LuaEventInQuireSameItem(0, "ITEM_ETC_E110125_HALLOWEEN_L", INQUIRE_SAMEITEM_OP_FIND_FIRST_SLOT, 0)
    LuaDelItem_EXT(0, slot, 1, SYSOP_REASON_Event, 0)
  end
   if 0 < LuaEventInQuireSameItem(0, "ITEM_ETC_E110125_HALLOWEEN_L_2", INQUIRE_SAMEITEM_OP_COUNT_ALL_SAMEITEM, 0) then
    slot = LuaEventInQuireSameItem(0, "ITEM_ETC_E110125_HALLOWEEN_L_2", INQUIRE_SAMEITEM_OP_FIND_FIRST_SLOT, 0)
    LuaDelItem_EXT(0, slot, 1, SYSOP_REASON_Event, 0)
  end
  if 0 < LuaEventInQuireSameItem(0, "ITEM_ETC_E110125_HALLOWEEN_O", INQUIRE_SAMEITEM_OP_COUNT_ALL_SAMEITEM, 0) then
    slot = LuaEventInQuireSameItem(0, "ITEM_ETC_E110125_HALLOWEEN_O", INQUIRE_SAMEITEM_OP_FIND_FIRST_SLOT, 0)
    LuaDelItem_EXT(0, slot, 1, SYSOP_REASON_Event, 0)
  end
  if 0 < LuaEventInQuireSameItem(0, "ITEM_ETC_E110125_HALLOWEEN_W", INQUIRE_SAMEITEM_OP_COUNT_ALL_SAMEITEM, 0) then
    slot = LuaEventInQuireSameItem(0, "ITEM_ETC_E110125_HALLOWEEN_W", INQUIRE_SAMEITEM_OP_FIND_FIRST_SLOT, 0)
    LuaDelItem_EXT(0, slot, 1, SYSOP_REASON_Event, 0)
  end
  if 0 < LuaEventInQuireSameItem(0, "ITEM_ETC_E110125_HALLOWEEN_E", INQUIRE_SAMEITEM_OP_COUNT_ALL_SAMEITEM, 0) then
    slot = LuaEventInQuireSameItem(0, "ITEM_ETC_E110125_HALLOWEEN_E", INQUIRE_SAMEITEM_OP_FIND_FIRST_SLOT, 0)
    LuaDelItem_EXT(0, slot, 1, SYSOP_REASON_Event, 0)
  end
  if 0 < LuaEventInQuireSameItem(0, "ITEM_ETC_E110125_HALLOWEEN_E_2", INQUIRE_SAMEITEM_OP_COUNT_ALL_SAMEITEM, 0) then
    slot = LuaEventInQuireSameItem(0, "ITEM_ETC_E110125_HALLOWEEN_E_2", INQUIRE_SAMEITEM_OP_FIND_FIRST_SLOT, 0)
    LuaDelItem_EXT(0, slot, 1, SYSOP_REASON_Event, 0)
  end
	if 0 < LuaEventInQuireSameItem(0, "ITEM_ETC_E110125_HALLOWEEN_N", INQUIRE_SAMEITEM_OP_COUNT_ALL_SAMEITEM, 0) then
    slot = LuaEventInQuireSameItem(0, "ITEM_ETC_E110125_HALLOWEEN_N", INQUIRE_SAMEITEM_OP_FIND_FIRST_SLOT, 0)
    LuaDelItem_EXT(0, slot, 1, SYSOP_REASON_Event, 0)
  end
end

GiveEventRewardItem = function()
  bGiveItemNum = 0
  btErrorCode = 0
  SYSOP_REASON_Event = 0
  EventID = 10168
  RewardItemMax = 20
  RewardItemCount = {1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1}
  RewardItemRatio = {0, 1000, 2000, 3470, 4170, 4670, 6140, 7610, 8310, 8610, 8810, 8910, 8970, 9020, 9200, 9300, 9400, 9500, 9600, 9700, 10000}
  if LuaGetCountEmptyInventory(0, -1) < 1 then
    return
  else
    nGive = LuaRanged_rand_f(1, 10000)
    for i = 1, RewardItemMax do
      if RewardItemRatio[i] < nGive and nGive <= RewardItemRatio[i + 1] then
        LuaAddItem_EXT(EventID, 0, RewardItemCount[i], SYSOP_REASON_Event, FALSE, FALSE, i)
        ItemDel()
    else
      end
    end
  end
end

KISAENG_100315_Conversation = function(l_11_0, l_11_1)
  CONVERSATION_START = 0
  CONVERSATION_RESPONSE = 2
  EventID = 10168
  EventID_Message = l_11_0
  NpcHandlerNum = LuaNpcHandlerNum()
  if CONVERSATION_START == l_11_0 and l_11_1 == "NPC_CH_EVENT_KISAENG1" then
    CurPage = 5
    SelectionList_CommonIndex = 0
    Button = 2
    LuaShowMenu(CurPage, EventID, SelectionList_CommonIndex, Button, NpcHandlerNum)
  end
  if CONVERSATION_RESPONSE == l_11_0 then
    if CurPage <= 3 and CurPage >= 1 then
      LuaTerminateMenu()
      return
    end
    MenuOffset = LuaGetEventMenuResponse()
    MenuOffset = MenuOffset - TALK_RESPONSE_LIST_BASE
    if MenuOffset == 0 then
      if ItemCheck() == 0 then
        if LuaGetCountEmptyInventory(0, -1) > 0 then
          CurPage = 3
          SelectionList_CommonIndex = 1
          Button = 1
          LuaSetCurPage(CurPage)
          LuaShowMenu(CurPage, EventID, SelectionList_CommonIndex, Button, NpcHandlerNum)
          GiveEventRewardItem()
          return
        else
          CurPage = 2
          SelectionList_CommonIndex = 1
          Button = 1
          LuaSetCurPage(CurPage)
          LuaShowMenu(CurPage, EventID, SelectionList_CommonIndex, Button, NpcHandlerNum)
          return
        end
      else
        CurPage = 1
        SelectionList_CommonIndex = 1
        Button = 1
        LuaSetCurPage(CurPage)
        LuaShowMenu(CurPage, EventID, SelectionList_CommonIndex, Button, NpcHandlerNum)
        return
      end
    end
  end
  if MenuOffset == 1 then
    LuaTerminateMenu()
  elseif CONVERSATION_RESPONSE == l_11_0 and LuaGetCurPage() == 1 then
    LuaTerminateMenu()
  end
end

Itemdata_45000.txt
Code:
1	42871	ITEM_ETC_E110125_HALLOWEEN_H	??? ??? A	xxx	SN_ITEM_ETC_E110125_HAPPY_H	SN_ITEM_ETC_E110125_HAPPY_A_TT_DESC	0	0	3	3	9	0	180000	3	0	1	1	1	0	0	1	0	0	0	0	1	0	0	0	1	1	-1	0	-1	0	-1	0	-1	0	-1	0	0	0	0	0	0	0	100	0	0	0	xxx	item\etc\drop_ch_eventbox.bsr	item\etc\event_news_h.ddj	xxx	xxx	50	2	0	0	1	0	0	0	0	0	0	0	0	0	0	0	0	0	0	0	0	0	0	0	0	0	0	0	0	0	0	0	0	0	0	0	0	0	0	0	0	0	0	0	0	0	0	0	0	0	0	0	0	0	0	0	0	0	0	0	0	-1	xxx	-1	xxx	-1	xxx	-1	xxx	-1	xxx	-1	xxx	-1	xxx	-1	xxx	-1	xxx	-1	xxx	-1	xxx	-1	xxx	-1	xxx	-1	xxx	-1	xxx	-1	xxx	-1	xxx	-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WEEN_E_2	??? ??? A	xxx	SN_ITEM_ETC_E110125_HAPPY_E	SN_ITEM_ETC_E110125_HAPPY_A_TT_DESC	0	0	3	3	9	0	180000	3	0	1	1	1	0	0	1	0	0	0	0	1	0	0	0	1	1	-1	0	-1	0	-1	0	-1	0	-1	0	0	0	0	0	0	0	100	0	0	0	xxx	item\etc\drop_ch_eventbox.bsr	item\etc\event_news_e.ddj	xxx	xxx	50	2	0	0	1	0	0	0	0	0	0	0	0	0	0	0	0	0	0	0	0	0	0	0	0	0	0	0	0	0	0	0	0	0	0	0	0	0	0	0	0	0	0	0	0	0	0	0	0	0	0	0	0	0	0	0	0	0	0	0	0	-1	xxx	-1	xxx	-1	xxx	-1	xxx	-1	xxx	-1	xxx	-1	xxx	-1	xxx	-1	xxx	-1	xxx	-1	xxx	-1	xxx	-1	xxx	-1	xxx	-1	xxx	-1	xxx	-1	xxx	-1	xxx	-1	xxx	-1	xxx	0	0
1	42879	ITEM_ETC_E110125_HALLOWEEN_N	??? ??? A	xxx	SN_ITEM_ETC_E110125_HAPPY_N	SN_ITEM_ETC_E110125_HAPPY_A_TT_DESC	0	0	3	3	9	0	180000	3	0	1	1	1	0	0	1	0	0	0	0	1	0	0	0	1	1	-1	0	-1	0	-1	0	-1	0	-1	0	0	0	0	0	0	0	100	0	0	0	xxx	item\etc\drop_ch_eventbox.bsr	item\etc\event_news_n.ddj	xxx	xxx	50	2	0	0	1	0	0	0	0	0	0	0	0	0	0	0	0	0	0	0	0	0	0	0	0	0	0	0	0	0	0	0	0	0	0	0	0	0	0	0	0	0	0	0	0	0	0	0	0	0	0	0	0	0	0	0	0	0	0	0	0	-1	xxx	-1	xxx	-1	xxx	-1	xxx	-1	xxx	-1	xxx	-1	xxx	-1	xxx	-1	xxx	-1	xxx	-1	xxx	-1	xxx	-1	xxx	-1	xxx	-1	xxx	-1	xxx	-1	xxx	-1	xxx	-1	xxx	-1	xxx	0	0

I Hope you like it.
 
Last edited:
Newbie Spellweaver
Joined
Oct 31, 2011
Messages
66
Reaction score
11
do you have icons for the items?

Yes, the Icons are already in your client. :)


I think the fix is the last part:

Code:
KISAENG_100315_Conversation = function(l_5_0, l_5_1)
  CONVERSATION_START = 0
  CONVERSATION_RESPONSE = 2
  EventID = 10168
  EventID_Message = l_5_0
  NpcHandlerNum = LuaNpcHandlerNum()
  if CONVERSATION_START == l_5_0 and l_5_1 == "NPC_CH_EVENT_KISAENG1" then
    CurPage = 5
    SelectionList_CommonIndex = 0
    Button = 2
    LuaShowMenu(CurPage, EventID, SelectionList_CommonIndex, Button, NpcHandlerNum)
  end
  if CONVERSATION_RESPONSE == l_5_0 then
    if CurPage <= 3 and CurPage >= 1 then
      LuaTerminateMenu()
      return 
    end
    MenuOffset = LuaGetEventMenuResponse()
    MenuOffset = MenuOffset - TALK_RESPONSE_LIST_BASE
    if MenuOffset == 0 then
      if ItemCheck() == 0 then
        if LuaGetCountEmptyInventory(0, -1) > 0 then
          CurPage = 3
          SelectionList_CommonIndex = 1
          Button = 1
          LuaSetCurPage(CurPage)
          LuaShowMenu(CurPage, EventID, SelectionList_CommonIndex, Button, NpcHandlerNum)
          GiveEventRewardItem()
          return 
        else
          CurPage = 2
          SelectionList_CommonIndex = 1
          Button = 1
          LuaSetCurPage(CurPage)
          LuaShowMenu(CurPage, EventID, SelectionList_CommonIndex, Button, NpcHandlerNum)
          return 
        end
      else
        CurPage = 1
        SelectionList_CommonIndex = 1
        Button = 1
        LuaSetCurPage(CurPage)
        LuaShowMenu(CurPage, EventID, SelectionList_CommonIndex, Button, NpcHandlerNum)
        return 
      end
    end
  end
  if MenuOffset == 1 then
    LuaTerminateMenu()
  elseif CONVERSATION_RESPONSE == l_5_0 and LuaGetCurPage() == 1 then
    LuaTerminateMenu()
  end
end
 
Last edited:
Master Summoner
Joined
Nov 9, 2009
Messages
579
Reaction score
238
im haveing some trouble with this .. i cant change the rewards Oo
everytime i change the rewards the event is not being displayed in So-OK anymore ... here are the 2 lines for the rewards:

Code:
InsertPayItemCodeName(11, "ITEM_MALL_AVATAR_M_HALLOWEEN", "ITEM_MALL_AVATAR_W_HALLOWEEN", "ITEM_MALL_AVATAR_M_HALLOWEEN_HAT", "ITEM_MALL_AVATAR_W_HALLOWEEN_HAT", "ITEM_MALL_AVATAR_M_HALLOWEEN_ATTACH", "ITEM_MALL_AVATAR_W_HALLOWEEN_ATTACH", "ITEM_ETC_E080723_HWAN_POTION_10", "ITEM_ETC_ALL_SPOTION_0", "ITEM_ETC_SCROLL_RETURN_03", "ITEM_EVENT_GLOBAL_CHATTING", "ITEM_ETC_E051123_AGILITY_SCROLL")
InsertPayItemRatio(11, 2, 3, 5, 5, 10, 10, 10, 15, 10, 10, 20)

any idea why its not working?


//edit: fixed .. some item codes were wrong <.< its working like a charm, thank you!
 
Last edited:
Master Summoner
Joined
Nov 9, 2009
Messages
579
Reaction score
238
im useing this conversation for it, it works without the window closeing after some time
credits go to whoever released the working HAPPY-Event not me

Code:
function KISAENG_100315_Conversation(EventID_Sub, CharName)
  CONVERSATION_START = 0
  CONVERSATION_RESPONSE = 2
  EventID = 10168
  EventID_Message = EventID_Sub
  NpcHandlerNum = LuaNpcHandlerNum()
  if CONVERSATION_START == EventID_Sub and CharName == "NPC_CH_EVENT_KISAENG1" then
    CurPage = 5
    SelectionList_CommonIndex = 0
    Button = 2
    LuaShowMenu(CurPage, EventID, SelectionList_CommonIndex, Button, NpcHandlerNum)
  end
  if CONVERSATION_RESPONSE == EventID_Sub then
    if CurPage <= 3 and CurPage >= 1 then
      LuaTerminateMenu()
      return
    end
    MenuOffset = LuaGetEventMenuResponse()
    MenuOffset = MenuOffset - TALK_RESPONSE_LIST_BASE
    if MenuOffset == 0 then
      if 0 == 0 then
        if 0 < LuaGetCountEmptyInventory(0, -1) then
          CurPage = 3
          SelectionList_CommonIndex = 1
          Button = 1
          LuaSetCurPage(CurPage)
          LuaShowMenu(CurPage, EventID, SelectionList_CommonIndex, Button, NpcHandlerNum)
          GiveEventRewardItem()
          return
        else
          CurPage = 2
          SelectionList_CommonIndex = 1
          Button = 1
          LuaSetCurPage(CurPage)
          LuaShowMenu(CurPage, EventID, SelectionList_CommonIndex, Button, NpcHandlerNum)
          return
        end
      else
        CurPage = 1
        SelectionList_CommonIndex = 1
        Button = 1
        LuaSetCurPage(CurPage)
        LuaShowMenu(CurPage, EventID, SelectionList_CommonIndex, Button, NpcHandlerNum)
        return
      end
    end
    if MenuOffset == 1 then
      LuaTerminateMenu()
    end
  elseif CONVERSATION_RESPONSE == EventID_Sub and LuaGetCurPage() == 1 then
    LuaTerminateMenu()
  end
end
 
Last edited:
Back
Top