Password to all files is: seminari
Ok, first we must go to LIB and create: (btw you must edit in 22 line 'KITNO_PawAndFur_Holy_Icon_id =' and write here your itemid of Holy Icon)
KILLING_IN_THE_NAME_OF.lua
paste here:
Killing in the name of LIB by Seminari (The_Hide) - Pastebin.com
now, go to data/movements and create:
killing_in_the_name_of.lua
paste here:
now, go to data/npsc/scripts/Grizzly Adams.lua
paste here:
What do you think about that? ;]
-----
Update!
How to generate your own quest log? Just use this talkaction and u will see your quest log in logs/quests.txt
Ok, first we must go to LIB and create: (btw you must edit in 22 line 'KITNO_PawAndFur_Holy_Icon_id =' and write here your itemid of Holy Icon)
KILLING_IN_THE_NAME_OF.lua
paste here:
Killing in the name of LIB by Seminari (The_Hide) - Pastebin.com
now, go to data/movements and create:
killing_in_the_name_of.lua
paste here:
Lua:
-- By Seminari (The_Hide) (Iranimes)
function onStepIn(cid, item, position, fromPosition)
local function KITNO_lokalny_kickEvent(cid, guid_gracza, p_from_x, p_from_y, p_to_x, p_to_y, p_z, kick_pos, p_fire)
local m2={}
for x=p_from_x, p_to_x do
for y=p_from_y, p_to_y do
local v=getTopCreature({x=x, y=y, z=p_z}).uid
if v ~= 0 then
if isMonster(v) then
table.insert(m2, v)
end
if isPlayer(v) then
if getPlayerGUID(v) == guid_gracza then
doTeleportThing(cid, kick_pos, true)
doRemoveItem(getThingfromPos(p_fire).uid, 1)
for i=1, #m do
doRemoveCreature(m[i])
end
return doCreatureSay(cid, 'You have been kicked out from boss room. (Auto kick after 10 minutes).', TALKTYPE_ORANGE_1, false, cid)
elseif getPlayerGUID(v) ~= guid_gracza then
return print('Task System [tasks.lua (movements)]: Inny gracz w pomieszczeniu')
else
return print('Task System [tasks.lua (movements)]: Error w kick event')
end
end
end
end
end
end
local k = KITNO_BOSS_MOVEMENTS_TBL[item.uid]
if k then
if (not(isPlayer(cid))) then
doSendMagicEffect(position, CONST_ME_TELEPORT)
KITNO_TeleportThing(cid, fromPosition, 0)
doSendMagicEffect(fromPosition, CONST_ME_TELEPORT)
return true
end
if k.typ_tasku == "paw_and_fur" then
local tabliczka = KITNO_Paw_and_Fur_tasks_tbl[k.task_name].bossek_tbl
-- wychodzenie z roomu
if k.wejscie_czy_wyjscie == "wyjscie" then
doSendMagicEffect(position, CONST_ME_TELEPORT)
KITNO_TeleportThing(cid, tabliczka.pozycja_wyrzucenia, 0)
doSendMagicEffect(tabliczka.pozycja_wyrzucenia, CONST_ME_TELEPORT)
if KITNO_getPlayerSTGValue(cid, KITNO_Paw_and_Fur_tasks_tbl[k.task_name].task_started_stg) ~= 3 then
KITNO_setPlayerSTGValue(cid, KITNO_Paw_and_Fur_tasks_tbl[k.task_name].task_started_stg, -1)
KITNO_send_player_white_text(cid, "You run out from the room. You won't kill boss now! Task is automatly canceled.")
end
stopEvent(KITNO_lokalny_pauseKick)
return true
-- wchodzenie do roomu
elseif k.wejscie_czy_wyjscie == "wejscie" then
if KITNO_getPlayerSTGValue(cid, KITNO_Paw_and_Fur_tasks_tbl[k.task_name].task_started_stg) ~= 2 then
doSendMagicEffect(position, CONST_ME_TELEPORT)
KITNO_TeleportThing(cid, fromPosition, 0)
doSendMagicEffect(fromPosition, CONST_ME_TELEPORT)
KITNO_send_player_white_text(cid, "You haven't got acces to get there.")
return true
elseif KITNO_getPlayerSTGValue(cid, KITNO_Paw_and_Fur_tasks_tbl[k.task_name].task_started_stg) == 2 then
local m={}
for x=tabliczka.from.x, tabliczka.to.x do
for y=tabliczka.from.y, tabliczka.to.y do
local v=getTopCreature({x=x, y=y, z=tabliczka.from.z}).uid
if v ~= 0 then
if isPlayer(v) then
KITNO_TeleportThing(cid, fromPosition, 0)
KITNO_send_player_white_text(cid, "Someone else is in the room.")
return
elseif isMonster(v) then
table.insert(m, v)
end
end
end
end
for i=1, #m do
doRemoveCreature(m[i])
end
if getThingfromPos(tabliczka.ogien_pos).itemid == KITNO_BOSS_MOVEMENTS_CONFIG.special_fire_field_start_id then
doRemoveItem(getThingfromPos(tabliczka.ogien_pos).uid, 1)
end
doTeleportThing(cid, tabliczka.tp)
doSendMagicEffect(position, CONST_ME_TELEPORT)
doSendMagicEffect(tabliczka.tp, CONST_ME_TELEPORT)
doCreateMonster(tabliczka.boss_name, tabliczka.spawn)
doSendMagicEffect(tabliczka.spawn, CONST_ME_TELEPORT)
doCreateItem(KITNO_BOSS_MOVEMENTS_CONFIG.special_fire_field_start_id, 1, tabliczka.ogien_pos)
p_from_x = tabliczka.from.x
p_from_y = tabliczka.from.y
p_to_x = tabliczka.to.x
p_to_y = tabliczka.to.y
p_z = tabliczka.from.z
kick_pos = tabliczka.pozycja_wyrzucenia
p_fire = tabliczka.ogien_pos
guid_gracza = getPlayerGUID(cid)
KITNO_lokalny_pauseKick = addEvent(KITNO_lokalny_kickEvent, KITNO_BOSS_MOVEMENTS_CONFIG.czas * 1000, cid, guid_gracza, p_from_x, p_from_y, p_to_x, p_to_y, p_z, kick_pos, p_fire)
if KITNO_BOSS_MOVEMENTS_CONFIG.czas >= (1*60) then
ile = KITNO_BOSS_MOVEMENTS_CONFIG.czas / 60
minu = 'minutes'
elseif KITNO_BOSS_MOVEMENTS_CONFIG.czas < (1*60) then
ile = KITNO_BOSS_MOVEMENTS_CONFIG.czas
minu = 'seconds'
end
doCreatureSay(cid, 'You have ' .. ile ..' ' .. minu .. ' to kill and loot this boss, else you will lose that chance and will be kicked out.', TALKTYPE_ORANGE_1, false, cid)
return
end
end
end
end
return true
end
now, go to data/npsc/scripts/Grizzly Adams.lua
paste here:
Lua:
Grizzly Adams by Seminari (The_Hide) - Pastebin.com[/url]
now go to data/creaturescripts/scripts and create:
killing_in_the_name_of.lua
and paste:
[code=lua]
function onKill(cid, target, lastHit)
if(isPlayer(target) == true) then
return true
end
if(isSummon(target) == true) then
return true
end
local monsterek = KITNO_Monster_Killing_Counter_TBL[getCreatureName(target):lower()]
if monsterek then
if monsterek.typ_tasku == "paw_and_fur" then
if KITNO_getPlayerSTGValue(cid, KITNO_Paw_and_Fur_tasks_tbl[monsterek.task_name].task_started_stg) >= 1 then
if KITNO_getPlayerSTGValue(cid, KITNO_Paw_and_Fur_tasks_tbl[monsterek.task_name].task_counter_stg) < KITNO_Paw_and_Fur_tasks_tbl[monsterek.task_name].task_required_kills then
KITNO_setPlayerSTGValue(cid, KITNO_Paw_and_Fur_tasks_tbl[monsterek.task_name].task_counter_stg, KITNO_getPlayerSTGValue(cid, KITNO_Paw_and_Fur_tasks_tbl[monsterek.task_name].task_counter_stg) + 1)
end
end
elseif monsterek.typ_tasku == "boss_paw_and_fur" then
if KITNO_getPlayerSTGValue(cid, KITNO_Paw_and_Fur_tasks_tbl[monsterek.task_name].task_started_stg) == 2 then
KITNO_setPlayerSTGValue(cid, KITNO_Paw_and_Fur_tasks_tbl[monsterek.task_name].task_started_stg, 3)
if KITNO_getPlayerSTGValue(cid, KITNO_Paw_and_Fur_tasks_tbl[monsterek.task_name].bossek_tbl.killed_bosses_counter_stg) < 0 then
KITNO_setPlayerSTGValue(cid, KITNO_Paw_and_Fur_tasks_tbl[monsterek.task_name].bossek_tbl.killed_bosses_counter_stg, 0)
end
KITNO_setPlayerSTGValue(cid, KITNO_Paw_and_Fur_tasks_tbl[monsterek.task_name].bossek_tbl.killed_bosses_counter_stg, KITNO_getPlayerSTGValue(cid, KITNO_Paw_and_Fur_tasks_tbl[monsterek.task_name].bossek_tbl.killed_bosses_counter_stg) + 1)
if KITNO_Paw_and_Fur_tasks_tbl[monsterek.task_name].bossek_tbl.achievement_name ~= nil then
KITNO_addPlayerAchievement(cid, KITNO_Paw_and_Fur_tasks_tbl[monsterek.task_name].bossek_tbl.achievement_name)
end
KITNO_send_player_white_text(cid, "You killed ".. getCreatureName(target) .." boss of ".. monsterek.task_name .." report back to Grizzly Adams.")
end
end
end
return true
end
What do you think about that? ;]
-----
Update!
How to generate your own quest log? Just use this talkaction and u will see your quest log in logs/quests.txt
Lua:
function onSay(cid, words, param, channel)
local calosc = "Quest log to tasks by Seminari(The_Hide)(Iranimes)"
for k,v in pairs(KITNO_Paw_and_Fur_tasks_tbl) do
if k then
task_name = k
task_storage = v.task_started_stg
counter_storage = v.task_counter_stg
required_kills = v.task_required_kills
if v.boss then
boss_name = v.bossek_tbl.boss_name
else
boss_name = 0
end
first_line = '<mission name="Paw and Fur - '.. task_name ..'" storageid="'.. task_storage ..'" startvalue="1" endvalue="2">'
second_line = '\t <missionstate id="0" description="You already hunted |STORAGE:'.. counter_storage ..'|/'.. required_kills ..' '.. task_name ..'."/>'
third_line = '\t <missionstate id="1" description="Report back to Grizzly Adams."/>'
if boss_name ~= nil and boss_name ~= 0 then
fourth_line = '\t <missionstate id="2" description="Find and kill '.. boss_name ..'"/>'
fifth_line = '\t <missionstate id="3" description="Report back your task to Grizzly Adams."/>'
end
last_line = '</mission>'
if fourth_line ~= nil and fifth_line ~= nil then
calosc = ''.. first_line ..'\n'.. second_line ..'\n'.. third_line ..'\n'.. fourth_line ..'\n'.. fifth_line ..'\n'.. last_line ..'\n'
else
calosc = ''.. first_line ..'\n'.. second_line ..'\n'.. third_line ..'\n'.. last_line ..'\n'
end
f = assert(io.open("./data/logs/quests.txt", "a+"))
f = io.open("./data/logs/quests.txt", "a+")
f:write("\n"..calosc .."")
f:close()
end
end
return true
end
Last edited: