caovanthanh22
03-01-17, 04:03 PM
Yuanbao thì có tùy chọn trừ, các điểm như điểm môn phái, misstiondata thì ko có đâu bác.
Cám ơn bác makute một lần nữa ^^.... học hỏi dữ lắm đó hem, cũng viết được một script dài ( không biết rút lại thế nào, đang học hỏi hàm for..do )
Chuyễn cũng được vài loại rồi này php code:
--Kim ngû Gia--
x002059_g_scriptId=002059
x002059_g_Money=1
x002059_g_ZengDian=2
x002059_g_Str=3
------------------------------------------------------------------------
------------------------------------------------------------------------
function x002059_OnDefaultEvent( sceneId, selfId,targetId )
BeginEvent(sceneId)
AddText(sceneId,"Hành t¦u giang h° ðß½ng nhiên kë chÑc quy«n càng cao thì lÕi càng giàu có. Tøc ngæ có câu 'Có ti«n có th¬ ma sui quÖ khiªn'. Trong tay có Ngân Lßþng có th¬ làm r¤t nhi«u vi®c l¾n, ng߶i ng߶i phäi ngß¾c nhìn...")
AddNumText(sceneId,x002059_g_ScriptId,"#gFF0FA0Chuy¬n ð±i thành Vàng #-02",4,x002059_g_Money)
AddNumText(sceneId,x002059_g_ScriptId,"#gFF0FA0Chuy¬n ð±i thành Ði¬m T£ng",4,x002059_g_ZengDian)
AddNumText(sceneId,x002059_g_ScriptId,"#gFF0FA0Liên quan ð±i ngân lßþng",8,x002059_g_Str)
EndEvent(sceneId)
DispatchEventList(sceneId,selfId,targetId)
end
------------------------------------------------------------------------
------------------------------------------------------------------------
function x002059_OnEventRequest(sceneId,selfId,targetId,eve ntId)
local Sex = GetSex(sceneId,selfId)
if Sex == 0 then
Sex = "ti¬u muµi"
else
Sex = "ti¬u ð®"
end
if GetNumText() == x002059_g_Money then
BeginEvent(sceneId)
AddText( sceneId, " Lña ch÷n ti«n t® ho£c các loÕi ði¬m hoÕt ðµng ð¬ chuy¬n ð±i thành #YVàng #-02" )
AddNumText( sceneId, x002059_g_scriptId, "#gFF0FA0Dùng Vàng #-14", 3, 11 )
AddNumText( sceneId, x002059_g_scriptId, "#gFF0FA0Dùng Kim Nguyên Bäo", 3, 12 )-- ðang trong quá trình ngâm cÑu
AddNumText( sceneId, x002059_g_scriptId, "#gFF0FA0Quay lÕi", 8, 100 )
EndEvent(sceneId)
DispatchEventList( sceneId, selfId, targetId )
end
if GetNumText() == 11 then
BeginEvent(sceneId)
AddText(sceneId," G¥n ðây giang h° th߶ng xuyên säy ra nhi«u vø cß¾p b¯c chém giªt lçn nhau, giæ bên mình #YVàng #-14 #Wlà cách t¯t nh¤t! Nªu nhß "..Sex.." khån khån mu¯n ð±i, không mu¯n giæ bên mình s¯ #YVàng #-14 #Wnày, ðßþc thôi ta s¨ ð±i!")
AddText(sceneId," Ta không làm không công ðâu nha, phäi hao t¯n mµt khoãng ti«n b°i dßÞng cho ta, "..Sex.." vçn mu¯n ð±i?")
AddNumText( sceneId, x002059_g_scriptId, "#gFF0FA0бi #gffcc0000 #-02 #gfff0f099 #-03 99 #-04", 3, 110 )
AddNumText( sceneId, x002059_g_scriptId, "#gFF0FA0бi #gffcc000#gfff0f09 #-02 99 #-03 90 #-04", 3, 111 )
AddNumText( sceneId, x002059_g_scriptId, "#gFF0FA0бi #gfff0f099 #-02 99 #-03 00 #-04", 3, 112 )
AddNumText( sceneId, x002059_g_scriptId, "#gFF0FA0бi hªt", 3, 113 )
AddNumText( sceneId, x002059_g_scriptId, "#gFF0FA0Quay lÕi", 8, 100 )
EndEvent(sceneId)
DispatchEventList( sceneId, selfId, targetId )
end
if GetNumText() == 12 then
BeginEvent(sceneId)
AddText(sceneId," Ta lúc nào cûng sÇn sàng, nhßng "..Sex.." ðã mang theo #YKim Nguyên Bäo#W ð¬ ð±i l¤y #YVàng #-02 #Wcüa ta chßa v§y?")
AddNumText( sceneId, x002059_g_scriptId, "#gFF0FA0бi #gfff0f0 1 #-02", 3, 120 )
AddNumText( sceneId, x002059_g_scriptId, "#gFF0FA0бi #gfff0f0 10 #-02", 3, 121 )
AddNumText( sceneId, x002059_g_scriptId, "#gFF0FA0бi #gfff0f0 100 #-02", 3, 122 )
AddNumText( sceneId, x002059_g_scriptId, "#gFF0FA0Quay lÕi", 8, 100 )
EndEvent(sceneId)
DispatchEventList( sceneId, selfId, targetId )
end
if GetNumText() == x002059_g_ZengDian then
BeginEvent(sceneId)
AddText( sceneId, " Lña ch÷n ti«n t® ho£c các loÕi ði¬m hoÕt ðµng ð¬ chuy¬n ð±i thành #YÐi¬m T£ng" )
AddNumText( sceneId, x002059_g_scriptId, "#gFF0FA0Dùng ði¬m c¯ng hiªn Bang Hµi", 3, 21 )
AddNumText( sceneId, x002059_g_scriptId, "#gFF0FA0Dùng Kim Nguyên Bäo", 3, 23 )
AddNumText( sceneId, x002059_g_scriptId, "#gFF0FA0Dùng Vàng #-02", 3, 22 )
AddNumText( sceneId, x002059_g_scriptId, "#gFF0FA0Quay lÕi", 8, 100 )
EndEvent(sceneId)
DispatchEventList( sceneId, selfId, targetId )
end
if GetNumText() == 21 then
BeginEvent(sceneId)
AddText( sceneId, " Ta lúc nào cûng sÇn sàng, nhßng "..Sex.." ðã mang theo #Yði¬m c¯ng hiªn Bang Hµi#W ð¬ ð±i l¤y #YÐi¬m T£ng #Wcüa ta chßa v§y?" )
AddNumText( sceneId, x002059_g_scriptId, "#gFF0FA0бi l¤y #gfff0f01 #gFF0FA0Ði¬m T£ng", 3, 210 )
AddNumText( sceneId, x002059_g_scriptId, "#gFF0FA0бi l¤y #gfff0f010 #gFF0FA0Ði¬m T£ng", 3, 211 )
AddNumText( sceneId, x002059_g_scriptId, "#gFF0FA0бi l¤y #gfff0f0100 #gFF0FA0Ði¬m T£ng", 3, 212 )
AddNumText( sceneId, x002059_g_scriptId, "#gFF0FA0Quay lÕi", 8, 100 )
EndEvent(sceneId)
DispatchEventList( sceneId, selfId, targetId )
end
if GetNumText() == 22 then
BeginEvent(sceneId)
AddText( sceneId, " Ta lúc nào cûng sÇn sàng, nhßng "..Sex.." ðã mang theo #YVàng #-02#W ð¬ ð±i l¤y #YÐi¬m T£ng #Wcüa ta chßa v§y?" )
AddNumText( sceneId, x002059_g_scriptId, "#gFF0FA0бi l¤y #gfff0f01 #gFF0FA0Ði¬m T£ng", 3, 220 )
AddNumText( sceneId, x002059_g_scriptId, "#gFF0FA0бi l¤y #gfff0f010 #gFF0FA0Ði¬m T£ng", 3, 221 )
AddNumText( sceneId, x002059_g_scriptId, "#gFF0FA0бi l¤y #gfff0f0100 #gFF0FA0Ði¬m T£ng", 3, 222 )
AddNumText( sceneId, x002059_g_scriptId, "#gFF0FA0Quay lÕi", 8, 100 )
EndEvent(sceneId)
DispatchEventList( sceneId, selfId, targetId )
end
if GetNumText() == 23 then
BeginEvent(sceneId)
AddText( sceneId, " Ta lúc nào cûng sÇn sàng, nhßng "..Sex.." ðã mang theo #YKim Nguyên Bäo#W ð¬ ð±i l¤y #YÐi¬m T£ng #Wcüa ta chßa v§y?" )
AddNumText( sceneId, x002059_g_scriptId, "#gFF0FA0бi l¤y #gfff0f01 #gFF0FA0Ði¬m T£ng", 3, 230 )
AddNumText( sceneId, x002059_g_scriptId, "#gFF0FA0бi l¤y #gfff0f010 #gFF0FA0Ði¬m T£ng", 3, 231 )
AddNumText( sceneId, x002059_g_scriptId, "#gFF0FA0бi l¤y #gfff0f0100 #gFF0FA0Ði¬m T£ng", 3, 232 )
AddNumText( sceneId, x002059_g_scriptId, "#gFF0FA0Quay lÕi", 8, 100 )
EndEvent(sceneId)
DispatchEventList( sceneId, selfId, targetId )
end
if GetNumText() == x002059_g_Str then
BeginEvent(sceneId)
AddText(sceneId," Sàn giao d¸ch ti«n t® và các loÕi ði¬m hoÕt ðµng trao ð±i nhß sau:")
AddText(sceneId," - Trao ð±i #YVàng #-02 #Wchü yªu b¢ng #YVàng #-14#W lãi xu¤t giao ðµng trong khoãng #G0.01#W%.")
AddText(sceneId," - иnh giá #G1 #YÐi¬m T£ng #W hi®n tÕi nªu ðem trao ð±i s¨ tß½ng ðß½ng #G10 #Yði¬m c¯ng hiªn Bang Hµi#W ho£c #G50 #Y#-02 #Who£c #G700 #YKim Nguyên Bäo#W.")
EndEvent(sceneId)
DispatchEventList(sceneId,selfId,targetId)
end
if GetNumText() == 110 or GetNumText() == 111 or GetNumText() == 112 or GetNumText() == 113 then
x002059_AddMoneyByMoneyJZ( sceneId, selfId );
end
if GetNumText() == 120 or GetNumText() == 121 or GetNumText() == 122 then
x002059_AddMoneyByYuanBao( sceneId, selfId );
end
if GetNumText() == 210 or GetNumText() == 211 or GetNumText() == 212 then
x002059_AddZengDianByConTribPoint( sceneId, selfId );
end
if GetNumText() == 220 or GetNumText() == 221 or GetNumText() == 222 then
x002059_AddZengDianByMoney( sceneId, selfId );
end
if GetNumText() == 230 or GetNumText() == 231 or GetNumText() == 232 then
x002059_AddZengDianByYuanBao( sceneId, selfId );
end
if GetNumText() == 100 then
x002059_OnDefaultEvent( sceneId, selfId, targetId )
end
end
------------------------------------------------------------------------
------------------------------------------------------------------------
function x002059_AddMoneyByYuanBao( sceneId, selfId )
local Sex = GetSex(sceneId,selfId)
if Sex == 0 then
Sex = "ti¬u muµi"
else
Sex = "ti¬u ð®"
end
if GetNumText() == 120 then
if YuanBao(sceneId,selfId,targetId,2,14) < 1 then
BeginEvent( sceneId )
AddText(sceneId," Không ðü #G14 #YKim Nguyên Bäo #Wð¬ ð±i!")
EndEvent( sceneId )
DispatchEventList( sceneId, selfId, targetId )
else
AddMoney( sceneId, selfId, 1)
YuanBao(sceneId,selfId,targetId,2,14)
LuaFnSendSpecificImpactToUnit(sceneId, selfId, selfId, selfId, 18, 0)
BeginEvent( sceneId )
AddText(sceneId," Chuyn ð±i ngân lßþng thành công!")
EndEvent( sceneId )
DispatchEventList( sceneId, selfId, targetId )
x002059_NotifyFailTips(sceneId,selfId,"Ðã m¤t ði #G14 #YKim Nguyên Bäo")
end
elseif GetNumText() == 121 then
if YuanBao(sceneId,selfId,targetId,2,140) < 1 then
BeginEvent( sceneId )
AddText(sceneId," Không ðü #G140 #YKim Nguyên Bäo #Wð¬ ð±i!")
EndEvent( sceneId )
DispatchEventList( sceneId, selfId, targetId )
else
AddMoney( sceneId, selfId, 10)
YuanBao(sceneId,selfId,targetId,2,140)
LuaFnSendSpecificImpactToUnit(sceneId, selfId, selfId, selfId, 18, 0)
BeginEvent( sceneId )
AddText(sceneId," Chuyn ð±i ngân lßþng thành công!")
EndEvent( sceneId )
DispatchEventList( sceneId, selfId, targetId )
x002059_NotifyFailTips(sceneId,selfId,"Ðã m¤t ði #G140 #YKim Nguyên Bäo")
end
elseif GetNumText() == 122 then
if YuanBao(sceneId,selfId,targetId,2,1400) < 1 then
BeginEvent( sceneId )
AddText(sceneId," Không ðü #G1400 #YKim Nguyên Bäo #Wð¬ ð±i!")
EndEvent( sceneId )
DispatchEventList( sceneId, selfId, targetId )
else
AddMoney( sceneId, selfId, 100)
YuanBao(sceneId,selfId,targetId,2,1400)
LuaFnSendSpecificImpactToUnit(sceneId, selfId, selfId, selfId, 18, 0)
BeginEvent( sceneId )
AddText(sceneId," Chuyn ð±i ngân lßþng thành công!")
EndEvent( sceneId )
DispatchEventList( sceneId, selfId, targetId )
x002059_NotifyFailTips(sceneId,selfId,"Ðã m¤t ði #G1400 #YKim Nguyên Bäo")
end
end
end
------------------------------------------------------------------------
------------------------------------------------------------------------
function x002059_AddMoneyByMoneyJZ( sceneId, selfId )
local Sex = GetSex(sceneId,selfId)
if Sex == 0 then
Sex = "Cô nß½ng"
else
Sex = "Các hÕ"
end
if GetNumText() == 113 then
local nMoneyJZ = GetMoneyJZ (sceneId, selfId)
if nMoneyJZ <= 0 then
BeginEvent( sceneId )
AddText(sceneId," Không còn #YVàng #-14 #Wð¬ ð±i!")
EndEvent( sceneId )
DispatchEventList( sceneId, selfId, targetId )
elseif LuaFnCostMoneyWithPriority (sceneId, selfId, nMoneyJZ) == -1 then
BeginEvent( sceneId )
AddText(sceneId," Thao tác th¤t bÕi")
EndEvent( sceneId )
DispatchEventList( sceneId, selfId, targetId )
else
AddMoney( sceneId, selfId, nMoneyJZ*0.9999 )
LuaFnSendSpecificImpactToUnit(sceneId, selfId, selfId, selfId, 18, 0)
BeginEvent( sceneId )
AddText(sceneId," Chuyn ð±i ngân lßþng thành công!")
EndEvent( sceneId )
DispatchEventList( sceneId, selfId, targetId )
x002059_NotifyFailTips(sceneId,selfId,""..Sex.." ðã m¤t hªt Vàng #-14")
end
elseif GetNumText() == 110 then
if GetMoneyJZ (sceneId, selfId) < 10000 then
BeginEvent( sceneId )
AddText(sceneId," Không ðü #G1 #-14 #Wð¬ ð±i! xem lÕi #YVàng #-14 #Wcüa mình có th¬ lña ch÷n mÑc ð±i th¤p h½n ðßþc không nhé, ho£c có th¬ ch÷n ð±i hªt!")
EndEvent( sceneId )
DispatchEventList( sceneId, selfId, targetId )
elseif LuaFnCostMoneyWithPriority (sceneId, selfId, 10000) == -1 then
BeginEvent( sceneId )
AddText(sceneId," Thao tác th¤t bÕi")
EndEvent( sceneId )
DispatchEventList( sceneId, selfId, targetId )
else
AddMoney( sceneId, selfId, 10000*0.9999 )
LuaFnSendSpecificImpactToUnit(sceneId, selfId, selfId, selfId, 18, 0)
BeginEvent( sceneId )
AddText(sceneId," Chuyn ð±i ngân lßþng thành công!")
EndEvent( sceneId )
DispatchEventList( sceneId, selfId, targetId )
x002059_NotifyFailTips(sceneId,selfId,""..Sex.." ðã m¤t 1 #-14")
end
elseif GetNumText() == 111 then
if GetMoneyJZ (sceneId, selfId) < 100000 then
BeginEvent( sceneId )
AddText(sceneId," Không ðü #G10 #-14 #Wð¬ ð±i! xem lÕi #YVàng #-14 #Wcüa mình có th¬ lña ch÷n mÑc ð±i th¤p h½n ðßþc không nhé, ho£c có th¬ ch÷n ð±i hªt!")
EndEvent( sceneId )
DispatchEventList( sceneId, selfId, targetId )
elseif LuaFnCostMoneyWithPriority (sceneId, selfId, 100000) == -1 then
BeginEvent( sceneId )
AddText(sceneId," Thao tác th¤t bÕi")
EndEvent( sceneId )
DispatchEventList( sceneId, selfId, targetId )
else
AddMoney( sceneId, selfId, 100000*0.9999 )
LuaFnSendSpecificImpactToUnit(sceneId, selfId, selfId, selfId, 18, 0)
BeginEvent( sceneId )
AddText(sceneId," Chuyn ð±i ngân lßþng thành công!")
EndEvent( sceneId )
DispatchEventList( sceneId, selfId, targetId )
x002059_NotifyFailTips(sceneId,selfId,""..Sex.." ðã m¤t 10 #-14")
end
elseif GetNumText() == 112 then
local nMoneyJZ = GetMoneyJZ (sceneId, selfId)
if nMoneyJZ < 1000000 then
BeginEvent( sceneId )
AddText(sceneId," Không ðü #G100 #-14 #Wð¬ ð±i! xem lÕi #YVàng #-14 #Wcüa mình có th¬ lña ch÷n mÑc ð±i th¤p h½n ðßþc không nhé, ho£c có th¬ ch÷n ð±i hªt!")
EndEvent( sceneId )
DispatchEventList( sceneId, selfId, targetId )
elseif LuaFnCostMoneyWithPriority (sceneId, selfId, 1000000) == -1 then
BeginEvent( sceneId )
AddText(sceneId," Thao tác th¤t bÕi")
EndEvent( sceneId )
DispatchEventList( sceneId, selfId, targetId )
else
AddMoney( sceneId, selfId, 1000000*0.9999 )
LuaFnSendSpecificImpactToUnit(sceneId, selfId, selfId, selfId, 18, 0)
BeginEvent( sceneId )
AddText(sceneId," Chuyn ð±i ngân lßþng thành công!")
EndEvent( sceneId )
DispatchEventList( sceneId, selfId, targetId )
x002059_NotifyFailTips(sceneId,selfId,""..Sex.." ðã m¤t 100 #-14")
end
end
end
------------------------------------------------------------------------
------------------------------------------------------------------------
function x002059_AddZengDianByConTribPoint( sceneId, selfId )
local Sex = GetSex(sceneId,selfId)
if Sex == 0 then
Sex = "ti¬u muµi"
else
Sex = "ti¬u ð®"
end
local guildid = GetHumanGuildID(sceneId, selfId)
if guildid == -1 then
BeginEvent( sceneId )
AddText(sceneId," Chßa gia nh§p Bang Hµi mà có ði¬m c¯ng hiªn ß!")
EndEvent( sceneId )
DispatchEventList( sceneId, selfId, targetId )
return 0;
elseif GetNumText() == 210 then
local guildPoint = CityGetAttr(sceneId, selfId, GUILD_CONTRIB_POINT);
if guildPoint < 10 then
BeginEvent(sceneId)
AddText( sceneId, " #YÐi¬m c¯ng hiªn Bang Hµi#W cüa "..Sex.." chßa ðü #G10 #Wði¬m r°i, không th¬ ð±i." )
EndEvent(sceneId)
DispatchEventList( sceneId, selfId, targetId )
return 0;
else
CityChangeAttr( sceneId, selfId, GUILD_CONTRIB_POINT, -10 )
ZengDian(sceneId,selfId,targetId,1,1)
LuaFnSendSpecificImpactToUnit(sceneId, selfId, selfId, selfId, 18, 0)
BeginEvent( sceneId )
AddText(sceneId," Xin chúc m×ng "..Sex.." ðã nh§n ðßþc #G1 #YÐi¬m T£ng")
EndEvent( sceneId )
DispatchEventList( sceneId, selfId, targetId )
x002059_NotifyFailTips(sceneId,selfId,"Ðã m¤t ði 10 ði¬m c¯ng hiªn Bang Hµi")
end
elseif GetNumText() == 211 then
local guildPoint = CityGetAttr(sceneId, selfId, GUILD_CONTRIB_POINT);
if guildPoint < 100 then
BeginEvent(sceneId)
AddText( sceneId, " #YÐi¬m c¯ng hiªn Bang Hµi#W cüa "..Sex.." chßa ðü #G100 #Wði¬m, xem lÕi ði¬m c¯ng hiªn cüa mình có th¬ lña ch÷n mÑc ð±i th¤p h½n ðßþc không nhé!" )
EndEvent(sceneId)
DispatchEventList( sceneId, selfId, targetId )
return 0;
else
CityChangeAttr( sceneId, selfId, GUILD_CONTRIB_POINT, -100 )
ZengDian(sceneId,selfId,targetId,1,10)
LuaFnSendSpecificImpactToUnit(sceneId, selfId, selfId, selfId, 18, 0)
BeginEvent( sceneId )
AddText(sceneId," Xin chúc m×ng "..Sex.." ðã nh§n ðßþc #G10 #YÐi¬m T£ng")
EndEvent( sceneId )
DispatchEventList( sceneId, selfId, targetId )
x002059_NotifyFailTips(sceneId,selfId,"Ðã m¤t ði 100 ði¬m c¯ng hiªn Bang Hµi")
end
elseif GetNumText() == 212 then
local guildPoint = CityGetAttr(sceneId, selfId, GUILD_CONTRIB_POINT);
if guildPoint < 1000 then
BeginEvent(sceneId)
AddText( sceneId, " #YÐi¬m c¯ng hiªn Bang Hµi #Wcüa "..Sex.." chßa ðü #G1000 #Wði¬m, xem lÕi ði¬m c¯ng hiªn cüa mình có th¬ lña ch÷n mÑc ð±i th¤p h½n ðßþc không nhé!" )
EndEvent(sceneId)
DispatchEventList( sceneId, selfId, targetId )
return 0;
else
CityChangeAttr( sceneId, selfId, GUILD_CONTRIB_POINT, -1000 )
ZengDian(sceneId,selfId,targetId,1,100)
LuaFnSendSpecificImpactToUnit(sceneId, selfId, selfId, selfId, 18, 0)
BeginEvent( sceneId )
AddText(sceneId," Xin chúc m×ng "..Sex.." ðã nh§n ðßþc #G100 #YÐi¬m T£ng")
EndEvent( sceneId )
DispatchEventList( sceneId, selfId, targetId )
x002059_NotifyFailTips(sceneId,selfId,"Ðã m¤t ði 1000 ði¬m c¯ng hiªn Bang Hµi")
end
end
end
------------------------------------------------------------------------
------------------------------------------------------------------------
function x002059_AddZengDianByMoney( sceneId, selfId, targetId )
local Sex = GetSex(sceneId,selfId)
if Sex == 0 then
Sex = "ti¬u muµi"
else
Sex = "ti¬u ð®"
end
if GetNumText() == 220 then
local nMoney = GetMoney (sceneId, selfId)
if nMoney < 500000 then
BeginEvent( sceneId )
AddText(sceneId," Th§t ðáng tiªt, "..Sex.." chßa ðü #G50 #-02#W, không th¬ ...")
EndEvent( sceneId )
DispatchEventList( sceneId, selfId, targetId )
elseif LuaFnCostMoneyWithPriority (sceneId, selfId, 500000) == -1 then
BeginEvent( sceneId )
AddText(sceneId," Thao tác th¤t bÕi")
EndEvent( sceneId )
DispatchEventList( sceneId, selfId, targetId )
else
ZengDian(sceneId,selfId,targetId,1,1)
LuaFnSendSpecificImpactToUnit(sceneId, selfId, selfId, selfId, 18, 0)
BeginEvent( sceneId )
AddText(sceneId," Xin chúc m×ng "..Sex.." ðã nh§n ðßþc #G1 #YÐi¬m T£ng")
EndEvent( sceneId )
DispatchEventList( sceneId, selfId, targetId )
x002059_NotifyFailTips(sceneId,selfId,"Ðã m¤t ði 50 #-02")
end
elseif GetNumText() == 221 then
local nMoney = GetMoney (sceneId, selfId)
if nMoney < 5000000 then
BeginEvent( sceneId )
AddText(sceneId," Th§t ðáng tiªt, "..Sex.." chßa ðü #G500 #-02#W, xem lÕi s¯ ti«n cüa mình có th¬ lña ch÷n mÑc ð±i th¤p h½n ðßþc không nhé!.")
EndEvent( sceneId )
DispatchEventList( sceneId, selfId, targetId )
elseif LuaFnCostMoneyWithPriority (sceneId, selfId, 5000000) == -1 then
BeginEvent( sceneId )
AddText(sceneId," Thao tác th¤t bÕi")
EndEvent( sceneId )
DispatchEventList( sceneId, selfId, targetId )
else
ZengDian(sceneId,selfId,targetId,1,10)
LuaFnSendSpecificImpactToUnit(sceneId, selfId, selfId, selfId, 18, 0)
BeginEvent( sceneId )
AddText(sceneId," Xin chúc m×ng "..Sex.." ðã nh§n ðßþc #G10 #YÐi¬m T£ng")
EndEvent( sceneId )
DispatchEventList( sceneId, selfId, targetId )
x002059_NotifyFailTips(sceneId,selfId,"Ðã m¤t ði 500 #-02")
end
elseif GetNumText() == 222 then
local nMoney = GetMoney (sceneId, selfId)
if nMoney < 50000000 then
BeginEvent( sceneId )
AddText(sceneId," Th§t ðáng tiªt, "..Sex.." chßa ðü #G5000 #-02#W, xem lÕi s¯ ti«n cüa mình có th¬ lña ch÷n mÑc ð±i th¤p h½n ðßþc không nhé!.")
EndEvent( sceneId )
DispatchEventList( sceneId, selfId, targetId )
elseif LuaFnCostMoneyWithPriority (sceneId, selfId, 50000000) == -1 then
BeginEvent( sceneId )
AddText(sceneId," Thao tác th¤t bÕi")
EndEvent( sceneId )
DispatchEventList( sceneId, selfId, targetId )
else
ZengDian(sceneId,selfId,targetId,1,100)
LuaFnSendSpecificImpactToUnit(sceneId, selfId, selfId, selfId, 18, 0)
BeginEvent( sceneId )
AddText(sceneId," Xin chúc m×ng "..Sex.." ðã nh§n ðßþc #G100 #YÐi¬m T£ng")
EndEvent( sceneId )
DispatchEventList( sceneId, selfId, targetId )
x002059_NotifyFailTips(sceneId,selfId,"Ðã m¤t ði 5000 #-02")
end
end
end
------------------------------------------------------------------------
------------------------------------------------------------------------
function x002059_AddZengDianByYuanBao( sceneId, selfId )
local Sex = GetSex(sceneId,selfId)
if Sex == 0 then
Sex = "ti¬u muµi"
else
Sex = "ti¬u ð®"
end
if GetNumText() == 230 then
if YuanBao(sceneId,selfId,targetId,2,700) < 1 then
BeginEvent( sceneId )
AddText(sceneId," Không ðü #G700 #YKim Nguyên Bäo #Wð¬ ð±i!")
EndEvent( sceneId )
DispatchEventList( sceneId, selfId, targetId )
else
ZengDian(sceneId,selfId,targetId,1,1)
YuanBao(sceneId,selfId,targetId,2,700)
LuaFnSendSpecificImpactToUnit(sceneId, selfId, selfId, selfId, 18, 0)
BeginEvent( sceneId )
AddText(sceneId," Chuyn ð±i ngân lßþng thành công!")
EndEvent( sceneId )
DispatchEventList( sceneId, selfId, targetId )
x002059_NotifyFailTips(sceneId,selfId,"Xin chúc m×ng "..Sex.." ðã nh§n dßþc #G1 #YÐi¬m T£ng")
x002059_NotifyFailTips(sceneId,selfId,"Ðã m¤t ði #G700 #YKim Nguyên Bäo")
end
elseif GetNumText() == 231 then
if YuanBao(sceneId,selfId,targetId,2,7000) < 1 then
BeginEvent( sceneId )
AddText(sceneId," Không ðü #G7000 #YKim Nguyên Bäo #Wð¬ ð±i!")
EndEvent( sceneId )
DispatchEventList( sceneId, selfId, targetId )
else
ZengDian(sceneId,selfId,targetId,1,10)
YuanBao(sceneId,selfId,targetId,2,7000)
LuaFnSendSpecificImpactToUnit(sceneId, selfId, selfId, selfId, 18, 0)
BeginEvent( sceneId )
AddText(sceneId," Chuyn ð±i ngân lßþng thành công!")
EndEvent( sceneId )
DispatchEventList( sceneId, selfId, targetId )
x002059_NotifyFailTips(sceneId,selfId,"Xin chúc m×ng "..Sex.." ðã nh§n dßþc #G10 #YÐi¬m T£ng")
x002059_NotifyFailTips(sceneId,selfId,"Ðã m¤t ði #G7000 #YKim Nguyên Bäo")
end
elseif GetNumText() == 232 then
if YuanBao(sceneId,selfId,targetId,2,70000) < 1 then
BeginEvent( sceneId )
AddText(sceneId," Không ðü #G70000 #YKim Nguyên Bäo #Wð¬ ð±i!")
EndEvent( sceneId )
DispatchEventList( sceneId, selfId, targetId )
else
ZengDian(sceneId,selfId,targetId,1,100)
YuanBao(sceneId,selfId,targetId,2,70000)
LuaFnSendSpecificImpactToUnit(sceneId, selfId, selfId, selfId, 18, 0)
BeginEvent( sceneId )
AddText(sceneId," Chuyn ð±i ngân lßþng thành công!")
EndEvent( sceneId )
DispatchEventList( sceneId, selfId, targetId )
x002059_NotifyFailTips(sceneId,selfId,"Xin chúc m×ng "..Sex.." ðã nh§n dßþc #G100 #YÐi¬m T£ng")
x002059_NotifyFailTips(sceneId,selfId,"Ðã m¤t ði #G70000 #YKim Nguyên Bäo")
end
end
end
------------------------------------------------------------------------
------------------------------------------------------------------------
function x002059_NotifyFailTips(sceneId,selfId,Tip)
BeginEvent(sceneId)
AddText(sceneId,Tip)
EndEvent(sceneId)
DispatchMissionTips(sceneId,selfId)
end
Powered by vBulletin® Version 4.2.0 Copyright © 2024 vBulletin Solutions, Inc. All rights reserved.