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

[Request] 6666 demons

Go to data\creaturescripts\scripts and create a new file monsterkill.lua:

Code:
local monsters = {
	--name = storage
	["demon"] = 55667
}

function onKill(cid, target)
	local monster = monsters[getCreatureName(target):lower()]
	if(isPlayer(target) == FALSE and monster and getPlayerStorageValue(cid, 76669) == 2) then
		if getPlayerStorageValue(cid, monster) < 6666 then 
			local killedMonsters = getPlayerStorageValue(cid, monster)
            if(killedMonsters == -1) then
                killedMonsters = 1
			end
			setPlayerStorageValue(cid, monster, killedMonsters + 1)
			doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "You have killed " .. killedMonsters .. " of 6666 demons.")
		else
			doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "You have killed enough demons.")
			setPlayerStorageValue(cid, 76669, 3)
		end
	end
	return TRUE
end

And now open creaturescripts.xml and add:
Code:
	<event type="kill" name="monsterkill" script="monsterkill.lua"/>

Now go to data\npcs and add a npc:
Code:
<?xml version="1.0"?>
<npc name="Piita Griffyn" script="quest.lua" access="3" lookdir="2" walkinterval="2000">
    <mana now="800" max="800"/>
    <health now="132" max="200"/>
<look type="151" head="115" body="76" legs="35" feet="117" addons="3" corpse="6080"/>
 <parameters>
  <parameter key="message_greet" value="Hi, can you help me? ask me for a {mission}. "/>
    </parameters>
</npc>

Now go to data\npcs\scripts and create a new file, called quest.lua and fill in this:
Code:
local keywordHandler = KeywordHandler:new()
local npcHandler = NpcHandler:new(keywordHandler)
NpcSystem.parseParameters(npcHandler)

local talkState = {}
local quest = 76669
local reward = 70000
	
function onCreatureAppear(cid) npcHandler:onCreatureAppear(cid) end
function onCreatureDisappear(cid) npcHandler:onCreatureDisappear(cid) end
function onCreatureSay(cid, type, msg) npcHandler:onCreatureSay(cid, type, msg) end
function onThink() npcHandler:onThink() end

function creatureSayCallback(cid, type, msg)
	local talkUser = NPCHANDLER_CONVBEHAVIOR == CONVERSATION_DEFAULT and 0 or cid
	if(not npcHandler:isFocused(cid)) then
		return false
	elseif msgcontains(msg, "yes") and talkState[talkUser] == 1 then
		npcHandler:say("Need help... {ok}?.", cid)
		talkState[talkUser] = 2
	elseif msgcontains(msg, "ok") and talkState[talkUser] == 2 then
		npcHandler:say("Okay, fast please.", cid)
		setPlayerStorageValue(cid, quest, 2)
		talkState[talkUser] = 0
	elseif msgcontains(msg, "mission") then
		local str = getPlayerStorageValue(cid, quest)
		if(str < 2) then
			npcHandler:say("You have to kill 6666 demons for me, would you do it?", cid) 
			talkState[talkUser] = 1
			return true
		elseif(str == 2) then
			npcHandler:say("Please come back for a reward.", cid)
		elseif(str == 3) then
			npcHandler:say("You killed 6666 demons for me, here is your reward.", cid)
			doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "Now you can enter to the room.")
			setPlayerStorageValue(cid, quest, 4)
		elseif(str == 4) then
			npcHandler:say("You have done enough for me, I will soon plan our attack!", cid)
		end
		talkState[talkUser] = 0
	end
	return TRUE
end

npcHandler:setCallback(CALLBACK_MESSAGE_DEFAULT, creatureSayCallback)
npcHandler:addModule(FocusModule:new())

You will just have to use the storage value for your door :)
 
Last edited:
just for test the script.... where can i change the number of demons to kill??

i change this part:

if getPlayerStorageValue(cid, monster) < 3 then

but don't work
 
Last edited:
How do you make it 2 monsters?

Depends on how you mean..
Do you want to be able to kill 2 monsters for 1 mission?
then just change the beginning of the monsterkill.lua script : like this

Code:
local monsters = {
	--name = storage
	["demon"] = 55667,
        ["orshabaal"] = 55667
 
just for test the script.... where can i change the number of demons to kill??

i change this part:

if getPlayerStorageValue(cid, monster) < 3 then

but don't work


I use this cript for my server, I actually posted it on the creaturescripts thread. I posted some info there.

Anyway..
If you want to alter the ammount of monster to kill, just change the 6666.
Code:
		if getPlayerStorageValue(cid, monster) < 6666
 
Depends on how you mean..
Do you want to be able to kill 2 monsters for 1 mission?
then just change the beginning of the monsterkill.lua script : like this

Code:
local monsters = {
	--name = storage
	["demon"] = 55667,
        ["orshabaal"] = 55667

How do you make it 2 monsters, 2 rewards?
 
How to do it?

Its my folder hallowedaxe.lua

--Demon Oak 2.0 by Ta4e--
--Some scripts based in script of Mazen--
function effect(cid,storage,valor,topos)
valor = getPlayerStorageValue(cid, storage)
doTargetCombatHealth(0, cid, COMBAT_EARTHDAMAGE, -300, -300, CONST_ME_BIGPLANTS)
valor = valor + 1
setPlayerStorageValue(cid, storage,valor)
doSendMagicEffect(topos, 0)
end

function onUse(cid, item, frompos, item2, topos)

local monster1 = "Crypt Shambler"
local monster2 = "Lich"
local monster3 = "Bone beast"
local monster4 = "Banshee"
local monster5 = "Giant Spider"
local boss1 = "Blightwalker"
local boss2 = "Betrayed Wraith"
local boss3 = "Diabolic Imp"
local boss4 = "Demon"

basepos = {x=32714, y=32353, z=7}
local starting={x=32714, y=32353, z=7, stackpos=253}
local ending={x=32714, y=32353, z=7, stackpos=253}
local trash= {x=32714, y=32353, z=7}

--Alternative Monsters------------------------------------------------------------------------------------------------------------------------------------------
local altmo = 0 -- If it 0 monsters not randomize. If it 1 randomize with this \/

local altmonst1 = "braindeath"
local altmonst2 = "necromancer"
local altmonst3 = "vampire"
local altmonst4 = "giant spider"
local altmonst5 = "demon skeleton"
local altboss1 = "plaguesmith"
local altboss2 = "phantasm"
local altboss3 = "hellhound"
local altboss4 = "behemoth"

----------------------------------------------------------------------------------------------------------------------------------

if altmo == 1 then
if math.random (1,5) == 1 or math.random (1,5) == 5 then
monster1 = altmonst1
monster2 = altmonst2
monster5 = altmonst5
boss1 = altboss1
boss3 = altboss3
else
monster3 = altmonst3
monster4 = altmonst4
boss2 = altboss2
boss4 = altboss4
end
end

local fourposition1 = {x=32714, y=32353, z=7}
local fourposition2 = {x=32714, y=32353, z=7}
local fourposition3 = {x=32714, y=32353, z=7}
local fourposition4 = {x=32714, y=32353, z=7}
local modpos1 = {x=32714, y=32353, z=7}
local modpos2 = {x=32714, y=32353, z=7}
local modpos3 = {x=32714, y=32353, z=7}
local threeposition1 = {x=32714, y=32353, z=7}
local threeposition2 = {x=32714, y=32353, z=7}
local threeposition3 = {x=32714, y=32353, z=7}
local twopos ={x=32714, y=32353, z=7}
local twopos1 = {x=32714, y=32353, z=7}
local doublepos = {x=32714, y=32353, z=7}
local leftpos = {x=32714, y=32353, z=7}
local crepos = {x=32714, y=32353, z=7}
local gopos = {x=32714, y=32353, z=7}
----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
local gtotal = getPlayerStorageValue(cid, 15005)
local gcorvo = getPlayerStorageValue(cid, 15001)
local gleft = getPlayerStorageValue(cid, 15002)
local gright = getPlayerStorageValue(cid, 15003)
local gface = getPlayerStorageValue(cid, 15004)
checking={x=starting.x, y=starting.y, z=starting.z, stackpos=starting.stackpos}

if item2.itemid == 2717 and item2.uid == 32193 then
if getPlayerLevel(cid) >= 120 then
players=0
totalmonsters=0
monster = {}
repeat
creature= getThingfromPos(checking)
if creature.itemid > 0 then
if getPlayerAccess(creature.uid) == 0 then
players=players+1
end
if getPlayerAccess(creature.uid) ~= 0 and getPlayerAccess(creature.uid) ~= 3 then
totalmonsters=totalmonsters+1
monster[totalmonsters]=creature.uid
end
end
checking.x=checking.x+1
if checking.x>ending.x then
checking.x=starting.x
checking.y=checking.y+1
end
until checking.y>ending.y
if players==0 then
current=0
repeat
current=current+1
doTeleportThing(monster[current],trash)
until current>=totalmonsters
doTeleportThing(cid, topos, 0)
setPlayerMultiplyStorageValues(cid,{15001,15002,15003,15004},1)
doTransformItem(item2.uid, 3669)
doCreateTeleport(1387, gopos, crepos)
local getrem1 = getThingfromPos({x=basepos.x-3, y=basepos.y-7, z=7, stackpos = 3})
doSetItemActionId(getrem1.uid,32195)
end
else
doPlayerSendTextMessage(cid, "You need level 120 to enter in arena.", result)
end

elseif item2.itemid == 8288 then
if gcorvo <10 then
effect(cid,15001,gcorvo,topos)
if gcorvo == 3 then
doSummonCreatures(monster1, {fourposition1,fourposition2,fourposition3,fourposition4})
elseif gcorvo == 5 then
doSummonCreatures(monster2, {threeposition1,threeposition2,threeposition3})
elseif gcorvo == 7 then
doSummonCreature(boss1, fourposition3)
elseif gcorvo == 9 then
gtotal = gtotal + 1
setPlayerStorageValue(cid, 15005,gtotal)
end
else
doSendMagicEffect(topos, 2)
end

elseif item2.itemid == 8289 then
if gleft <10 then
effect(cid,15002,gleft,topos)
if gleft == 3 then
doSummonCreature(monster1, {fourposition1,fourposition2,fourposition3,fourposition4})
elseif gleft == 4 then
doSummonCreatures(monster3, {modpos1,modpos2,modpos3})
doSummonCreature(monster3, fourposition2)
elseif gleft == 7 then
doSummonCreatures(monster1, {fourposition1,fourposition2,fourposition3,fourposition4})
elseif gleft == 9 then
doSummonCreature(boss2, leftpos)
gtotal = gtotal + 1
setPlayerStorageValue(cid, 15005,gtotal)
end
else
doSendMagicEffect(topos, 2)
end

elseif item2.itemid == 8290 then
if gright <10 then
effect(cid,15003,gright,topos)
if gright == 2 then
doSummonCreatures(monster4, {twopos,twopos1})
elseif gright == 4 then
doSummonCreatures(monster1, {fourposition1,fourposition2,fourposition3,fourposition4})
elseif gright == 7 then
doSummonCreatures(monster1, {fourposition1,fourposition2,fourposition3,fourposition4})
elseif gright == 9 then
doSummonCreature(boss3,leftpos)
gtotal = gtotal + 1
setPlayerStorageValue(cid, 15005,gtotal)
end
else
doSendMagicEffect(topos, 2)
end

elseif item2.itemid == 8291 then
if gface <10 then
effect(cid,15004,gface,topos)
if gface == 1 then
doSummonCreature(monster2, doublepos)
doSummonCreature(monster5, fourposition2)
elseif gface == 4 then
doSummonCreatures(monster1, {fourposition1,fourposition2,fourposition3,fourposition4})
elseif gface == 6 then
doSummonCreature(boss4, leftpos)
elseif gface == 9 then
gtotal = gtotal + 1
setPlayerStorageValue(cid, 15005,gtotal)
end
else
doSendMagicEffect(topos, 2)
end
end
end

Its 2 Folder hallowed axe5.lua


--Demon Oak 2.0 by Ta4e--
--Some scripts based in script of Mazen--
function effect(cid,storage,valor,topos)
valor = getPlayerStorageValue(cid, storage)
doTargetCombatHealth(0, cid, COMBAT_EARTHDAMAGE, -300, -300, CONST_ME_BIGPLANTS)
valor = valor + 1
setPlayerStorageValue(cid, storage,valor)
doSendMagicEffect(topos, 0)
end

function onUse(cid, item, frompos, item2, topos)

local monster1 = "Crypt Shambler"
local monster2 = "Lich"
local monster3 = "Bone beast"
local monster4 = "Banshee"
local monster5 = "Giant Spider"
local boss1 = "Blightwalker"
local boss2 = "Betrayed Wraith"
local boss3 = "Diabolic Imp"
local boss4 = "Demon"

basepos = {x=32714, y=32353, z=7}
local starting={x=32714, y=32353, z=7, stackpos=253}
local ending={x=32714, y=32353, z=7, stackpos=253}
local trash= {x=32714, y=32353, z=7}

--Alternative Monsters------------------------------------------------------------------------------------------------------------------------------------------
local altmo = 0 -- If it 0 monsters not randomize. If it 1 randomize with this \/

local altmonst1 = "braindeath"
local altmonst2 = "necromancer"
local altmonst3 = "vampire"
local altmonst4 = "giant spider"
local altmonst5 = "demon skeleton"
local altboss1 = "plaguesmith"
local altboss2 = "phantasm"
local altboss3 = "hellhound"
local altboss4 = "behemoth"

----------------------------------------------------------------------------------------------------------------------------------

if altmo == 1 then
if math.random (1,5) == 1 or math.random (1,5) == 5 then
monster1 = altmonst1
monster2 = altmonst2
monster5 = altmonst5
boss1 = altboss1
boss3 = altboss3
else
monster3 = altmonst3
monster4 = altmonst4
boss2 = altboss2
boss4 = altboss4
end
end

local fourposition1 = {x=32714, y=32353, z=7}
local fourposition2 = {x=32714, y=32353, z=7}
local fourposition3 = {x=32714, y=32353, z=7}
local fourposition4 = {x=32714, y=32353, z=7}
local modpos1 = {x=32714, y=32353, z=7}
local modpos2 = {x=32714, y=32353, z=7}
local modpos3 = {x=32714, y=32353, z=7}
local threeposition1 = {x=32714, y=32353, z=7}
local threeposition2 = {x=32714, y=32353, z=7}
local threeposition3 = {x=32714, y=32353, z=7}
local twopos ={x=32714, y=32353, z=7}
local twopos1 = {x=32714, y=32353, z=7}
local doublepos = {x=32714, y=32353, z=7}
local leftpos = {x=32714, y=32353, z=7}
local crepos = {x=32714, y=32353, z=7}
local gopos = {x=32714, y=32353, z=7}
----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
local gtotal = getPlayerStorageValue(cid, 15005)
local gcorvo = getPlayerStorageValue(cid, 15001)
local gleft = getPlayerStorageValue(cid, 15002)
local gright = getPlayerStorageValue(cid, 15003)
local gface = getPlayerStorageValue(cid, 15004)
checking={x=starting.x, y=starting.y, z=starting.z, stackpos=starting.stackpos}

if item2.itemid == 2717 and item2.uid == 32193 then
if getPlayerLevel(cid) >= 120 then
players=0
totalmonsters=0
monster = {}
repeat
creature= getThingfromPos(checking)
if creature.itemid > 0 then
if getPlayerAccess(creature.uid) == 0 then
players=players+1
end
if getPlayerAccess(creature.uid) ~= 0 and getPlayerAccess(creature.uid) ~= 3 then
totalmonsters=totalmonsters+1
monster[totalmonsters]=creature.uid
end
end
checking.x=checking.x+1
if checking.x>ending.x then
checking.x=starting.x
checking.y=checking.y+1
end
until checking.y>ending.y
if players==0 then
current=0
repeat
current=current+1
doTeleportThing(monster[current],trash)
until current>=totalmonsters
doTeleportThing(cid, topos, 0)
setPlayerMultiplyStorageValues(cid,{15001,15002,15003,15004},1)
doTransformItem(item2.uid, 3669)
doCreateTeleport(1387, gopos, crepos)
local getrem1 = getThingfromPos({x=basepos.x-3, y=basepos.y-7, z=7, stackpos = 3})
doSetItemActionId(getrem1.uid,32195)
end
else
doPlayerSendTextMessage(cid, "You need level 120 to enter in arena.", result)
end

elseif item2.itemid == 8288 then
if gcorvo <10 then
effect(cid,15001,gcorvo,topos)
if gcorvo == 3 then
doSummonCreatures(monster1, {fourposition1,fourposition2,fourposition3,fourposition4})
elseif gcorvo == 5 then
doSummonCreatures(monster2, {threeposition1,threeposition2,threeposition3})
elseif gcorvo == 7 then
doSummonCreature(boss1, fourposition3)
elseif gcorvo == 9 then
gtotal = gtotal + 1
setPlayerStorageValue(cid, 15005,gtotal)
end
else
doSendMagicEffect(topos, 2)
end

elseif item2.itemid == 8289 then
if gleft <10 then
effect(cid,15002,gleft,topos)
if gleft == 3 then
doSummonCreature(monster1, {fourposition1,fourposition2,fourposition3,fourposition4})
elseif gleft == 4 then
doSummonCreatures(monster3, {modpos1,modpos2,modpos3})
doSummonCreature(monster3, fourposition2)
elseif gleft == 7 then
doSummonCreatures(monster1, {fourposition1,fourposition2,fourposition3,fourposition4})
elseif gleft == 9 then
doSummonCreature(boss2, leftpos)
gtotal = gtotal + 1
setPlayerStorageValue(cid, 15005,gtotal)
end
else
doSendMagicEffect(topos, 2)
end

elseif item2.itemid == 8290 then
if gright <10 then
effect(cid,15003,gright,topos)
if gright == 2 then
doSummonCreatures(monster4, {twopos,twopos1})
elseif gright == 4 then
doSummonCreatures(monster1, {fourposition1,fourposition2,fourposition3,fourposition4})
elseif gright == 7 then
doSummonCreatures(monster1, {fourposition1,fourposition2,fourposition3,fourposition4})
elseif gright == 9 then
doSummonCreature(boss3,leftpos)
gtotal = gtotal + 1
setPlayerStorageValue(cid, 15005,gtotal)
end
else
doSendMagicEffect(topos, 2)
end

elseif item2.itemid == 8291 then
if gface <10 then
effect(cid,15004,gface,topos)
if gface == 1 then
doSummonCreature(monster2, doublepos)
doSummonCreature(monster5, fourposition2)
elseif gface == 4 then
doSummonCreatures(monster1, {fourposition1,fourposition2,fourposition3,fourposition4})
elseif gface == 6 then
doSummonCreature(boss4, leftpos)
elseif gface == 9 then
gtotal = gtotal + 1
setPlayerStorageValue(cid, 15005,gtotal)
end
else
doSendMagicEffect(topos, 2)
end
end
end
 
Back
Top