• 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!
  • 2026 staff recruitment is open! Check it out and consider applying!

Need a realeased script I cant find

furstwin

Member
Joined
Aug 9, 2007
Messages
511
Reaction score
15
Location
Sweden
As the title says I need a script wich is realseased but I cant find it :( It's a creature script that you have to kill x monsters to complete a quest, eg. kill 15 trolls and get x storage value..
I use the search function, looked closely in the aceions and creature scripts forum, still cant find it :(
Rep if you fint it to me :)

Sincerely,
Furstwin.
 
PHP:
local monster = {
 ["troll"] = {monster_storage=50001, monster_kills=15, set_storage=6565, set_value=1},
}
function onKill(cid, target)
 mob = monster[getCreatureName(target)]
 if mob and isMonster(target) then
 local mob_uid = getPlayerStorageValue(cid, mob.monster_storage)
 if mob_uid >= mob.monster_kills-1 then
 setPlayerStorageValue(cid, mob.set_storage, mob.set_value)
 doPlayerSendTextMessage(cid, 19, "You killed "..mob.monster_kills.." "..getCreatureName(target).."'s.")
 end
 getPlayerStorageValue(cid, mob.monster_storage, mob_uid+1)
 end
return TRUE
end

like this? not tested. ; )
 
Code:
local monster = {
 ["troll"] = {monster_storage=50001, monster_kills=15, set_storage=6565, set_value=1},
}
function onKill(cid, target)
	if isMonster(target) == TRUE then
		local mob = monster[string.lower(getCreatureName(target))]
		if mob then
			local mob_uid = getPlayerStorageValue(cid, mob.monster_storage)
			if mob_uid >= mob.monster_kills-1 then
				setPlayerStorageValue(cid, mob.set_storage, mob.set_value)
				doPlayerSendTextMessage(cid, 19, "You killed "..mob.monster_kills.." "..getCreatureName(target).."'s.")
			end
		getPlayerStorageValue(cid, mob.monster_storage, mob_uid+1)
		end
	end
	return TRUE
end
 
Back
Top