• There is NO official Otland's Discord server and NO official Otland's server list. The Otland's Staff does not manage any Discord server or server list. Moderators or administrator of any Discord server or server lists have NO connection to the Otland's Staff. Do not get scammed!
  • New resources must be posted under Resources tab. A discussion thread will be created automatically, you can't open threads manually anymore.

Action Kill monster and..

Maniucza

~Lua~ Noob
Joined
Aug 2, 2009
Messages
86
Reaction score
6
Location
Poland / Rzeszów
Hello.
Have to you script relying on :
- When you will kill Frost Dragona on data coordinates tt appears
lever.

Data/actions/skrypcik.lua
Here, script :
PHP:
local name = "Frost Dragon"  -- For kill that monster tt is possible pull lever
local dzwignia = {x=98, y=120, z=7}  -- Where there is lever
local oplata = 100 -- Charge too lever
local czas = 30    -- There is on what seconds lever
function onUse(cid, item, fromPosition, itemEx, toPosition)
	if item.itemid == 1945 then  -- if ID object it 1945
		local dzwignia = doCreateItem(1945, 1, dzwignia)
			if getPlayerLevel(cid) >= 10 then -- if player has level higher than 10 or equal 10
		doPlayerGiveItem(cid, 2498, 1)  -- Player give royal helmet
		if doPlayerRemoveMoney(cid, oplata) == TRUE then --- It collects charge 
				doPlayerSendTextMessage(cid,22,"You have royal helmet")  -- You have RH
			end
		end
		
	end

end

And :
Data/actions/actions.xml
PHP:
	<action uniqueid="1945" event="script" value="skrypcik.lua"/>

Please, about comments
 
The script is relying on that When you will kill Frost Dragona on data coordinates tt appears
lever... ? Right :eek:

I really doubt you tried it lol

Also, you aren't using the variables 'name' and 'czas'.
 
Why 'name' variable is unused? And how it checks if 'name' is killed? ;>
 
Back
Top