[Request] Treasure Box Quest working script ..

03/20/2018 21:15 multiuses#1
hi there
i wonder if someone can give me a working script for Treasure box quest
i tried to make it and i didn't succeed
ill really appreciate your help if someone share it with me
thanks .
03/24/2018 16:39 multiuses#2
anybody can help ?
03/26/2018 15:40 hexcode#3
This is the' Jewelry Box' (QEV_CH_EVENT_KISAENG_110529) event quest script, is that what you searching for?

PHP Code:
function QEV_CH_EVENT_KISAENG_110529()
  
EventID 10188
  SetEventOne
(EventID"SN_QEV_CH_EVENT_KISAENG_110529"111)
  
SetEventTwo(2"SN_TALK_QEV_CH_EVENT_KISAENG_090714_B""SN_TALK_COMMON_EXIT")
  
NPC_COUNT 1
  LuaInsertNpc
(NPC_COUNT"NPC_CH_EVENT_KISAENG1")
  
InsertPayItemCodeName(13"ITEM_ETC_E051123_AGILITY_SCROLL""ITEM_ETC_E051123_EVATION_SCROLL""ITEM_ETC_E051123_HIT_SCROLL""ITEM_ETC_E080723_SKILL_EXP_5""ITEM_ETC_E080723_SKILL_EXP_10""ITEM_ETC_BALLOON_MANGNYANG""ITEM_ETC_BALLOON_MOVOI""ITEM_ETC_E051123_HP500_SCROLL""ITEM_ETC_E051123_MP500_SCROLL""ITEM_ETC_E041225_CANDY_RED""ITEM_ETC_E041225_CANDY_BLUE""ITEM_EVENT_AVATAR_M_NASRUN""ITEM_EVENT_AVATAR_W_NASRUN")
  
LuaInsertDropItem(1"ITEM_ETC_E050618_TREASUREBOX"1.5)
  
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_KISAENG_090714_A""EVENT_MENUSTRING_NOT_ACHIEVED""SN_TALK_QEV_CH_EVENT_KISAENG_090714_E""EVENT_MENUSTRING_INVENTORY_FULL""SN_TALK_QEV_CH_EVENT_KISAENG_090714_D""EVENT_MENUSTRING_ACHIEVED""SN_TALK_QEV_CH_EVENT_KISAENG_090714_C")
  
CONVERSATION_SINGLE 0
  LuaInsertFunctionStringList
(1"CONVERSATION_SINGLE""KISAENG_110529_Conversation")
end
function KISAENG_110529_ItemCheck()
  if 
LuaEventInQuireSameItem(0"ITEM_ETC_E050618_TREASUREBOX"INQUIRE_SAMEITEM_OP_COUNT_FIRST_ITEM, -1then
    
return 0
  
else
    return 
1
  end
end
function KISAENG_110529_ItemDel()
  if 
LuaEventInQuireSameItem(0"ITEM_ETC_E050618_TREASUREBOX"INQUIRE_SAMEITEM_OP_COUNT_ALL_SAMEITEM0then
    slot 
LuaEventInQuireSameItem(0"ITEM_ETC_E050618_TREASUREBOX"INQUIRE_SAMEITEM_OP_FIND_FIRST_SLOT0)
    
LuaDelItem_EXT(0slot1SYSOP_REASON_Event0)
  
end
end
function KISAENG_110529_GiveEventRewardItem()
  
bGiveItemNum 0
  btErrorCode 
0
  SYSOP_REASON_Event 
0
  EventID 
10188
  Gender 
0
  
if LuaGetPlayerGender() == 0 then
    Gender 
1
  end
  RewardItemMax 
11
  RewardItemCount 
= {
    
1,
    
1,
    
1,
    
1,
    
1,
    
1,
    
1,
    
1,
    
1,
    
1,
    
1
  
}
  
RewardItemRatio = {
    
0,
    
1000,
    
2000,
    
3000,
    
3600,
    
3800,
    
4800,
    
5800,
    
6490,
    
6990,
    
8490,
    
9990
  
}
  while 
KISAENG_110529_ItemCheck() == do
    if 
LuaGetCountEmptyInventory(0, -1then
      
return
    else
      
nGive LuaRanged_rand_n(110000)
      if 
9990 nGive then
        LuaAddItem_EXT
(EventID0RewardItemCount[i], SYSOP_REASON_EventFALSEFALSE12 Gender)
      else
        for 
1RewardItemMax do
          if 
nGive RewardItemRatio[i] and nGive <= RewardItemRatio[1then
            LuaAddItem_EXT
(EventID0RewardItemCount[i], SYSOP_REASON_EventFALSEFALSEi)
            
KISAENG_110529_ItemDel()
            break
          
end
        end
      end
    end
  end
end
function KISAENG_110529_Conversation(EventID_SubCharName)
  
CONVERSATION_START 0
  CONVERSATION_RESPONSE 
2
  EventID 
10188
  EventID_Message 
EventID_Sub
  NpcHandlerNum 
LuaNpcHandlerNum()
  if 
CONVERSATION_START == EventID_Sub and CharName == "NPC_CH_EVENT_KISAENG1" then
    CurPage 
1
    LuaSetCurPage
(CurPage)
    
CurString 5
    SelectionList_CommonIndex 
0
    Button 
2
    LuaShowMenu
(CurStringEventIDSelectionList_CommonIndexButtonNpcHandlerNum)
    return
  
end
  
if CONVERSATION_RESPONSE == EventID_Sub then
    
if LuaGetCurPage() == 1 then
      MenuOffset 
LuaGetEventMenuResponse()
      
MenuOffset MenuOffset TALK_RESPONSE_LIST_BASE
      
if MenuOffset == 0 then
        
if KISAENG_110529_ItemCheck() == 0 then
          
if LuaGetCountEmptyInventory(0, -1then
            CurPage 
2
            SelectionList_CommonIndex 
1
            Button 
1
            LuaSetCurPage
(CurPage)
            
CurString 3
            LuaShowMenu
(CurStringEventIDSelectionList_CommonIndexButtonNpcHandlerNum)
            
KISAENG_110529_GiveEventRewardItem()
            return
          else
            
CurPage 2
            SelectionList_CommonIndex 
1
            Button 
1
            LuaSetCurPage
(CurPage)
            
CurString 2
            LuaShowMenu
(CurStringEventIDSelectionList_CommonIndexButtonNpcHandlerNum)
            return
          
end
        
else
          
CurPage 2
          SelectionList_CommonIndex 
1
          Button 
1
          LuaSetCurPage
(CurPage)
          
CurString 1
          LuaShowMenu
(CurStringEventIDSelectionList_CommonIndexButtonNpcHandlerNum)
          return
        
end
      
elseif MenuOffset == 1 then
        LuaTerminateMenu
()
        return
      
end
    
else
      
LuaTerminateMenu()
      return
    
end
  end
end 

Regards
03/27/2018 02:04 multiuses#4
Quote:
Originally Posted by hexcode View Post
This is the' Jewelry Box' (QEV_CH_EVENT_KISAENG_110529) event quest script, is that what you searching for?

PHP Code:
function QEV_CH_EVENT_KISAENG_110529()
  
EventID 10188
  SetEventOne
(EventID"SN_QEV_CH_EVENT_KISAENG_110529"111)
  
SetEventTwo(2"SN_TALK_QEV_CH_EVENT_KISAENG_090714_B""SN_TALK_COMMON_EXIT")
  
NPC_COUNT 1
  LuaInsertNpc
(NPC_COUNT"NPC_CH_EVENT_KISAENG1")
  
InsertPayItemCodeName(13"ITEM_ETC_E051123_AGILITY_SCROLL""ITEM_ETC_E051123_EVATION_SCROLL""ITEM_ETC_E051123_HIT_SCROLL""ITEM_ETC_E080723_SKILL_EXP_5""ITEM_ETC_E080723_SKILL_EXP_10""ITEM_ETC_BALLOON_MANGNYANG""ITEM_ETC_BALLOON_MOVOI""ITEM_ETC_E051123_HP500_SCROLL""ITEM_ETC_E051123_MP500_SCROLL""ITEM_ETC_E041225_CANDY_RED""ITEM_ETC_E041225_CANDY_BLUE""ITEM_EVENT_AVATAR_M_NASRUN""ITEM_EVENT_AVATAR_W_NASRUN")
  
LuaInsertDropItem(1"ITEM_ETC_E050618_TREASUREBOX"1.5)
  
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_KISAENG_090714_A""EVENT_MENUSTRING_NOT_ACHIEVED""SN_TALK_QEV_CH_EVENT_KISAENG_090714_E""EVENT_MENUSTRING_INVENTORY_FULL""SN_TALK_QEV_CH_EVENT_KISAENG_090714_D""EVENT_MENUSTRING_ACHIEVED""SN_TALK_QEV_CH_EVENT_KISAENG_090714_C")
  
CONVERSATION_SINGLE 0
  LuaInsertFunctionStringList
(1"CONVERSATION_SINGLE""KISAENG_110529_Conversation")
end
function KISAENG_110529_ItemCheck()
  if 
LuaEventInQuireSameItem(0"ITEM_ETC_E050618_TREASUREBOX"INQUIRE_SAMEITEM_OP_COUNT_FIRST_ITEM, -1then
    
return 0
  
else
    return 
1
  end
end
function KISAENG_110529_ItemDel()
  if 
LuaEventInQuireSameItem(0"ITEM_ETC_E050618_TREASUREBOX"INQUIRE_SAMEITEM_OP_COUNT_ALL_SAMEITEM0then
    slot 
LuaEventInQuireSameItem(0"ITEM_ETC_E050618_TREASUREBOX"INQUIRE_SAMEITEM_OP_FIND_FIRST_SLOT0)
    
LuaDelItem_EXT(0slot1SYSOP_REASON_Event0)
  
end
end
function KISAENG_110529_GiveEventRewardItem()
  
bGiveItemNum 0
  btErrorCode 
0
  SYSOP_REASON_Event 
0
  EventID 
10188
  Gender 
0
  
if LuaGetPlayerGender() == 0 then
    Gender 
1
  end
  RewardItemMax 
11
  RewardItemCount 
= {
    
1,
    
1,
    
1,
    
1,
    
1,
    
1,
    
1,
    
1,
    
1,
    
1,
    
1
  
}
  
RewardItemRatio = {
    
0,
    
1000,
    
2000,
    
3000,
    
3600,
    
3800,
    
4800,
    
5800,
    
6490,
    
6990,
    
8490,
    
9990
  
}
  while 
KISAENG_110529_ItemCheck() == do
    if 
LuaGetCountEmptyInventory(0, -1then
      
return
    else
      
nGive LuaRanged_rand_n(110000)
      if 
9990 nGive then
        LuaAddItem_EXT
(EventID0RewardItemCount[i], SYSOP_REASON_EventFALSEFALSE12 Gender)
      else
        for 
1RewardItemMax do
          if 
nGive RewardItemRatio[i] and nGive <= RewardItemRatio[1then
            LuaAddItem_EXT
(EventID0RewardItemCount[i], SYSOP_REASON_EventFALSEFALSEi)
            
KISAENG_110529_ItemDel()
            break
          
end
        end
      end
    end
  end
end
function KISAENG_110529_Conversation(EventID_SubCharName)
  
CONVERSATION_START 0
  CONVERSATION_RESPONSE 
2
  EventID 
10188
  EventID_Message 
EventID_Sub
  NpcHandlerNum 
LuaNpcHandlerNum()
  if 
CONVERSATION_START == EventID_Sub and CharName == "NPC_CH_EVENT_KISAENG1" then
    CurPage 
1
    LuaSetCurPage
(CurPage)
    
CurString 5
    SelectionList_CommonIndex 
0
    Button 
2
    LuaShowMenu
(CurStringEventIDSelectionList_CommonIndexButtonNpcHandlerNum)
    return
  
end
  
if CONVERSATION_RESPONSE == EventID_Sub then
    
if LuaGetCurPage() == 1 then
      MenuOffset 
LuaGetEventMenuResponse()
      
MenuOffset MenuOffset TALK_RESPONSE_LIST_BASE
      
if MenuOffset == 0 then
        
if KISAENG_110529_ItemCheck() == 0 then
          
if LuaGetCountEmptyInventory(0, -1then
            CurPage 
2
            SelectionList_CommonIndex 
1
            Button 
1
            LuaSetCurPage
(CurPage)
            
CurString 3
            LuaShowMenu
(CurStringEventIDSelectionList_CommonIndexButtonNpcHandlerNum)
            
KISAENG_110529_GiveEventRewardItem()
            return
          else
            
CurPage 2
            SelectionList_CommonIndex 
1
            Button 
1
            LuaSetCurPage
(CurPage)
            
CurString 2
            LuaShowMenu
(CurStringEventIDSelectionList_CommonIndexButtonNpcHandlerNum)
            return
          
end
        
else
          
CurPage 2
          SelectionList_CommonIndex 
1
          Button 
1
          LuaSetCurPage
(CurPage)
          
CurString 1
          LuaShowMenu
(CurStringEventIDSelectionList_CommonIndexButtonNpcHandlerNum)
          return
        
end
      
elseif MenuOffset == 1 then
        LuaTerminateMenu
()
        return
      
end
    
else
      
LuaTerminateMenu()
      return
    
end
  end
end 

Regards
man ur the best i rlly appreciate ur help :handsdown: thanks.
03/27/2018 15:57 Spidy.#5
Glad your question is solved

#Closed