[TLBB] Script Đổi Quà bằng Cá
Hello & Welcome to our community. Is this your first visit? Đăng Ký
Follow us on
Follow us on Facebook Follow us on Twitter Linked In Flickr Watch us on YouTube My Space Blogger
 
Kết quả 1 đến 2 của 2
  1. #1
    Moderator Sadlove123's Avatar
    Ngày tham gia
    Jun 2015
    Đang ở
    Cung cấp soucre TLBB chuẩn
    Bài viết
    563
    Thanks
    76
    Thanked 380 Times in 174 Posts

    Script Đổi Quà bằng Cá

    - Hàng lâu năm nhưng có lẽ vẫn còn hữu dụng #7


    Code:
    --NPC doi qua bang cá 
    --Edit By Sadlove123 - 29/11/2019
    
    
    --**********************************
    --ʼ₫½»»¥Èë¿Ú
    --**********************************
    function x000159_OnDefaultEvent( sceneId, selfId,targetId )
    	local temp = random(10)
    	local msgStr = format( "  #GBƠn mu¯n thØ tài v§n may ? Hăy đem 15 con thäo ngß đ¬ có th¬ tham gia sñ ki®n này. Nhæng viên bäo thƠch c¤p 5 vô cùng giá tr¸ đang ch¶ các bƠn.")
    	BeginEvent(sceneId)
    		AddText(sceneId,msgStr)
    		AddNumText( sceneId, x000160_g_ScriptId, "Có ! Tôi có mang theo 15 con Thäo Ngß", 10, 1 )
    		AddNumText( sceneId, x000160_g_ScriptId, "Không ! Tôi chßa đü s¯ cá này", 10, 2 )
    	EndEvent(sceneId)
    	DispatchEventList(sceneId,selfId,targetId)
    end
    --**********************************
    --ʼ₫ÁбíÑ¡ÖĐ̉»Ïî
    --**********************************
    function x000159_OnEventRequest( sceneId, selfId, targetId, eventId)
    	if GetNumText() == 1 then
    		if LuaFnGetPropertyBagSpace( sceneId, selfId ) < 1 then
    			x000159_NotifyFailTips( sceneId, selfId, "Tay näy đă đ¥y" )
    			x000159_NotifyFailBox( sceneId, selfId, targetId, "  Tay näi đă đ¥y" )
    			return
    		end
    		local number = LuaFnGetAvailableItemCount(sceneId, selfId, 20102001)
    		if number<1 then
    			x000159_NotifyFailBox( sceneId, selfId, targetId, " BƠn không có Thäo Ngß hăy h÷c ngh« câu cá và t¾i Kiªm Các, Vô Lß₫ng S½n, Thái H°... thu th§p đü 15 con Thäo Ngß r°i hăy t́m ta." )
    			return
    		else
    			local reply = LuaFnDelAvailableItem(sceneId,selfId,20102001,15)
    			if reply > 0 then
    				local temp = random(60)
    			local equipID
    			if temp==1 then
    				equipID=50514001
    			elseif temp==2 then
    				equipID=50513006
    			elseif temp==3 then
    				equipID=20102001
    			elseif temp==4 then
    				equipID=50513005
    			elseif temp==5 then
    				equipID=50513005
    			elseif temp==6 then
    				equipID=50513004
    			elseif temp==7 then
    				equipID=50513004
    			elseif temp==8 then
    				equipID=50513003
    			elseif temp==9 then
    				equipID=50513003
    			elseif temp==10 then
    				equipID=50513003
    			elseif temp==11 then
    				equipID=50513002
    			elseif temp==12 then
    				equipID=50513002
    			elseif temp==13 then
    				equipID=50513001
    			elseif temp==14 then
    				equipID=50513001
    			elseif temp==15 then
    				equipID=50512008
    			elseif temp==16 then
    				equipID=50512008
    			elseif temp==17 then
    				equipID=50512007
    			elseif temp==18 then
    				equipID=50512007
    			elseif temp==19 then
    				equipID=50512006
    			elseif temp==20 then
    				equipID=50512006
    			elseif temp==21 then
    				equipID=50512005
    			elseif temp==22 then
    				equipID=50501001
    			elseif temp==23 then
    				equipID=50512004
    			elseif temp==24 then
    				equipID=50512004
    			elseif temp==25 then
    				equipID=50512003
    			elseif temp==26 then
    				equipID=50512003
    			elseif temp==27 then
    				equipID=50512002
    			elseif temp==28 then
    				equipID=50501001
    			elseif temp==29 then
    				equipID=50512002
    			elseif temp==30 then
    				equipID=50512001
    			elseif temp==31 then
    				equipID=50512001
    			elseif temp==32 then
    				equipID=50512001
    			elseif temp==33 then
    				equipID=50511002
    			elseif temp==34 then
    				equipID=50511001
    			elseif temp==35 then
    				equipID=50504002
    			elseif temp==36 then
    				equipID=50503001
    			elseif temp==37 then
    				equipID=50502008
    			elseif temp==38 then
    				equipID=50502007
    			elseif temp==39 then
    				equipID=50502006
    			elseif temp==40 then
    				equipID=50502005
    			elseif temp==41 then
    				equipID=50502004
    			elseif temp==42 then
    				equipID=50502003
    			elseif temp==43 then
    				equipID=50502002
    			elseif temp==44 then
    				equipID=50502001
    			elseif temp==45 then
    				equipID=50501002
    			else
    				equipID=0
    			end
    			local str = "  #YXin chúc m×ng bƠn đă đƠt 1 #W"..GetItemName( sceneId, equipID ).."£¡"
    			if equipID~=0 then
    				if TryRecieveItem( sceneId, selfId, equipID, 1 ) >= 0 then
    					x000159_NotifyFailTips( sceneId, selfId, str )
    					x000159_NotifyFailBox( sceneId, selfId, targetId, str )
    				end
    			else
    				local str = "  Hôm nay bƠn không may m¡n."
    				x000159_NotifyFailTips( sceneId, selfId, str )
    				x000159_NotifyFailBox( sceneId, selfId, targetId, str )
    			end
    			else
    				x000159_NotifyFailBox( sceneId, selfId, targetId, "Thao tác sai, không thñc hi®n trao đ±i." )
    			end
    		end
    	elseif GetNumText() == 2 then
    		BeginUICommand( sceneId )
    			UICommand_AddInt( sceneId, targetId )
    			EndUICommand( sceneId )
    		DispatchUICommand( sceneId, selfId, 1000 )
    		return		
    	end
    end
    --**********************************
    -- ¶Ô»°´°¿ÚĐÅÏ¢̀áʾ
    --**********************************
    function x000159_NotifyFailBox( sceneId, selfId, targetId, msg )
    	BeginEvent( sceneId )
    		AddText( sceneId, msg )
    	EndEvent( sceneId )
    	DispatchEventList( sceneId, selfId, targetId )
    end
    
    --**********************************
    -- ÆÁÄ»ÖĐ¼äĐÅÏ¢̀áʾ
    --**********************************
    function x000159_NotifyFailTips( sceneId, selfId, Tip )
    	BeginEvent( sceneId )
    		AddText( sceneId, Tip )
    	EndEvent( sceneId )
    	DispatchMissionTips( sceneId, selfId )
    end
    Khách viếng thăm hãy cùng Sadlove123 xây dựng diễn đàn CLBGAMESVN vững mạnh nhé!

  2. The Following 2 Users Say Thank You to Sadlove123 For This Useful Post:

    dvphong09 (19-02-20), skythienlong (13-01-20)

  3. #2
    Thành Viên
    Ngày tham gia
    Sep 2011
    Bài viết
    67
    Thanks
    34
    Thanked 22 Times in 14 Posts

    Ðề: Script Đổi Quà bằng Cá

    Thanks chủ top, tlbb kỷ niệm khó phai
    Khách viếng thăm hãy cùng dvphong09 xây dựng diễn đàn CLBGAMESVN vững mạnh nhé!

 

 

Các Chủ đề tương tự

  1. [KT] Xin tên script của quan quân nhu nghĩa quân đi phó bản
    Bởi lqthanh85bl trong diễn đàn Hỏi Đáp/ Yêu Cầu
    Trả lời: 6
    Bài viết cuối: 10-10-17, 06:32 PM
  2. Trả lời: 5
    Bài viết cuối: 28-10-15, 08:52 PM
  3. [KT] Help-Script tính năng QUẢ HUY HOÀNG, QUẢ HOÀNG KIM
    Bởi nguyenhophuc87 trong diễn đàn Hỏi Đáp/ Yêu Cầu
    Trả lời: 4
    Bài viết cuối: 15-01-13, 02:21 PM
  4. Một số script trong thư mục script Vina (unpack)
    Bởi sangpronhat trong diễn đàn Scripts
    Trả lời: 19
    Bài viết cuối: 26-11-11, 08:12 AM

Quyền viết bài

  • Bạn Không thể gửi Chủ đề mới
  • Bạn Không thể Gửi trả lời
  • Bạn Không thể Gửi file đính kèm
  • Bạn Không thể Sửa bài viết của mình
  •  
Múi giờ GMT +7. Bây giờ là 03:45 AM.
vBulletin®, Copyright ©2000-2011, Jelsoft Enterprises Ltd.
CLBGamesVN không chịu trách nhiệm về Luật Bản Quyền của các tài liệu, bài viết v.v...được đăng tải trên diễn đàn này.
Diễn đàn phát triển dưới sự đóng góp của tất cả thành viên. BQT chỉ là những người thành lập ra sân chơi, quản lý và duy trì về mặt kỹ thuật, nội dung khi hợp lệ.