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

[CREATURESCRIPTS] Killing Monsters Storage

f@bio

Fudera Otserver
Joined
Jul 10, 2007
Messages
213
Reaction score
0
Location
Brasil
-- Hello friends, i have a problem with my litle script, i want after you kill a monsters this register one STORAGE VALUE, because this STORAGE make a player to open one DOOR, but on my script do notthing, see my scripts:

-- creaturescript register
Lua:
<event type="kill" name="DiseasedDeaths" event="script" value="Diseased_Deaths.lua"/>

-- script named DiseasedDeaths
Lua:
function onKill(cid, target)
 
registerCreatureEvent(cid, "DiseasedDeaths")
local creaturename = getCreatureName(target)
local doEffect = CONST_ME_MAGIC_GREEN
local message = "Você Matou esta praga, procure a próxima."
	
    if isPlayer(cid) == TRUE then
        if creaturename == 'Diseased Bill' then          
	   doSendMagicEffect(getPlayerPosition(cid), doEffect)
	   doCreatureSay(cid, message, TALKTYPE_ORANGE_1)
	   setPlayerStorageValue(cid,72009,1)

	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

-- Plx friends help me to solve this... many thx for all...

F@bio
 
Last edited:
Back
Top