function OnUse(nItemIndex)
...
---if DoFireworks(DIGGING_ACTION_ID,1) == 1 then
SetMissionV(MV_RESOURCE_POS_BEGIN+nGroup,SetBit(GetMissionV(MV_RESOURCE_POS_BEGIN+nGroup),nBit,1));
Msg2Player("§ang thu thËp l¬ng th¶o……......");
CastState("state_fetter",1,5*18)
ProgressSlot(5*18); --5Ãë
SetItemUseLapse(nItemIndex,5); --Àäȴʱ¼ä£º5Ãë
---else
--- Msg2Player("Kh«ng thÓ lµm ®éng t¸c nµy ë tr¹ng th¸i ngåi")
---end;
...
end
function main()
...
-- if DoFireworks(DIGGING_ACTION_ID,1) == 1 then
Msg2Player("§ang thu thËp l¬ng th¶o……......");
CastState("state_fetter",1,5*18)
ProgressSlot(5*18); --5Ãë
SetNpcLifeTime(nNpcIndex,0);
AddUnitStates(nNpcIndex,0,-bExist); --ÖÃ0
SetNpcScript(nNpcIndex,"");
-- else
-- Msg2Player("Kh«ng thÓ lµm ®éng t¸c nµy ë tr¹ng th¸i ngåi")
-- end;
...
end