• 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!

Storage Kill Monster

merfus

Member
Joined
Dec 27, 2011
Messages
214
Reaction score
5
Location
Poland
Hello i got script:

Lua:
function onKill(cid, target)
 
registerCreatureEvent(cid, "DiseasedDeaths")
local creaturename = getCreatureName(target)
local doEffect = CONST_ME_MAGIC_GREEN
local message = "Gratz You kill Him!."
local message2 = "You are to weak."
local tp1 = {x=1031,y=1022,z=7}
 
    if isPlayer(cid) == TRUE then
        if creaturename == 'Diseased Bill' then          
	   doSendMagicEffect(getPlayerPosition(cid), doEffect)
	   doCreatureSay(cid, message, TALKTYPE_ORANGE_1)
	   setPlayerStorageValue(cid,72009,1)
           doTeleportThing (cid, tp1, TRUE)
 
	elseif creaturename == 'Diseased Fred' then          
	   doSendMagicEffect(getPlayerPosition(cid), doEffect)
	   doCreatureSay(cid, message, TALKTYPE_ORANGE_1)
	   setPlayerStorageValue(cid,72010,1)   
 
	elseif creaturename == 'Diseased Dan' then          
	   doSendMagicEffect(getPlayerPosition(cid), doEffect)
	   doCreatureSay(cid, message, TALKTYPE_ORANGE_1)
	   setPlayerStorageValue(cid,72011,1) 
	end 
    end	
  return TRUE	
end

Is there any way to do that Player get storage [setPlayerStorageValue(cid,72009,1)] only if he take 5% (or some dmg like 300+) or more hp from monster? If he take less than 5% hp he didn't get teleported and he will get local message2
 
Last edited:
Back
Top