Hello didnt see any working npc for blue legs quest on tfs 0.3.5pl
here it is
actions/scripts/Poba1.lua
actions/scripts/Poba2.lua
actions/scripts/Poba3.lua
and last actions/scripts/Poba4.lua
and add in npc folder
Quest of blue legs.xml
and in npcs/scripts/bluelegs.lua
and here is the monster file!
add in data/actions/scripts/blue legs
make file named reward1.lua
data/actions/scripts/blue legs
creafile reward2.lua
add in data/actions/scripts/blue legs
Createfile Named kosheiamulet.lua
add in data/actions/actions.xml
if you like it.. dont mind rep++ me xDD
If you got anny errors with this (wich should be possible with 0.3.5pl ) contact me private
TESTED AND WORKS!
here it is
actions/scripts/Poba1.lua
Lua:
function onUse(cid, item, frompos, item2, topos)
if item.uid == 7511 then
queststatus = getPlayerStorageValue(cid,7611)
if queststatus == -1 then
doPlayerSendTextMessage(cid,22,"You have found one piece of the broken amulet.")
doPlayerAddItem(cid,8262,1)
setPlayerStorageValue(cid,7611,1)
else
doPlayerSendTextMessage(cid,22,"It is empty.")
end
else
return 0
end
return 1
end
actions/scripts/Poba2.lua
Lua:
function onUse(cid, item, frompos, item2, topos)
if item.uid == 7512 then
queststatus = getPlayerStorageValue(cid,7612)
if queststatus == -1 then
doPlayerSendTextMessage(cid,22,"You have found one piece of the broken amulet.")
doPlayerAddItem(cid,8263,1)
setPlayerStorageValue(cid,7612,1)
else
doPlayerSendTextMessage(cid,22,"It is empty.")
end
else
return 0
end
return 1
end
actions/scripts/Poba3.lua
Lua:
function onUse(cid, item, frompos, item2, topos)
if item.uid == 7513 then
queststatus = getPlayerStorageValue(cid,7613)
if queststatus == -1 then
doPlayerSendTextMessage(cid,22,"You have found one piece of the broken amulet.")
doPlayerAddItem(cid,8264,1)
setPlayerStorageValue(cid,7613,1)
else
doPlayerSendTextMessage(cid,22,"It is empty.")
end
else
return 0
end
return 1
end
and last actions/scripts/Poba4.lua
Lua:
function onUse(cid, item, frompos, item2, topos)
if item.uid ==7514 then
queststatus = getPlayerStorageValue(cid,7614)
if queststatus == -1 then
doPlayerSendTextMessage(cid,22,"You have found one piece of the broken amulet.")
doPlayerAddItem(cid,8265,1)
setPlayerStorageValue(cid,7614,1)
else
doPlayerSendTextMessage(cid,22,"It is empty.")
end
else
return 0
end
return 1
end
and add in npc folder
Quest of blue legs.xml
Code:
<?xml version="1.0" encoding="UTF-8"?>
<npc name="Quest of blue legs" script="bluelegs.lua" walkinterval="2000" floorchange="0">
<health now="100" max="100"/>
<look type="133" head="20" body="39" legs="45" feet="7" addons="0"/>
<parameters>
<parameter key="message_greet" value="Hello |PLAYERNAME|. Hello did do you bring the 4 piece's of broken amulets with you?. Say {piece of broken amulet} and i can help you."" />
</parameters>
</npc>
and in npcs/scripts/bluelegs.lua
Lua:
local keywordHandler = KeywordHandler:new()
local npcHandler = NpcHandler:new(keywordHandler)
NpcSystem.parseParameters(npcHandler)
local talkState = {}
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)
if(not npcHandler:isFocused(cid)) then
return false
end
local tokenid = 8265
local storage = 6555
local getstorage = getPlayerStorageValue(cid, storage)
local sorrymessage = "Sorry, are you sure you got all 4 piece's of broken amulets?."
local talkUser = NPCHANDLER_CONVBEHAVIOR == CONVERSATION_DEFAULT and 0 or cid
if msgcontains(msg, 'piece of broken amulet') then
if getstorage == 1 then
npcHandler:say("You are now finished.", cid)
elseif getstorage < 1 then
npcHandler:say("Would ye' like to give me 4 piece's of broken amulets.?", cid)
talkState[talkUser] = 1
end
elseif msgcontains(msg, 'Remove This shit if you want!') then
if getstorage < 1 then
npcHandler:say("You have not give me 4 pice's of broken amulets.", cid)
elseif getstorage == 1 then
npcHandler:say("I have aledry give you {koshei's ancient amulet} !!.", cid)
end
elseif msgcontains(msg, 'yes') then
if talkState[talkUser] == 1 then
if getstorage < 0 then
if doPlayerRemoveItem(cid, tokenid, 1) == TRUE then
npcHandler:say("Ye' brought the 4 piece's of broken amulets. needed to complete blue legs quest'.", cid)
setPlayerStorageValue(cid, storage, 1)
doPlayerAddItem(cid, 8266, 1)
doPlayerRemoveItem(cid, 8264, 1)
doPlayerRemoveItem(cid, 8263, 1)
doPlayerRemoveItem(cid, 8262, 1)
talkState[talkUser] = 0
elseif doPlayerRemoveItem(cid, tokenid, 1) == FALSE then
npcHandler:say(sorrymessage, cid)
talkState[talkUser] = 0
end
end
end
elseif(msgcontains(msg, 'no') and talkState[talkUser] == 1) then
npcHandler:say("Sure, come back when you have 4 piece's of broken amulets..", cid)
talkState[talkUser] = 0
end
return TRUE
end
npcHandler:setCallback(CALLBACK_MESSAGE_DEFAULT, creatureSayCallback)
npcHandler:addModule(FocusModule:new())
and here is the monster file!
Code:
<?xml version="1.0" encoding="UTF-8"?>
<monster name="Koshei The Deathless" nameDescription="a koshei the deathless" race="UNDEAD" experience="0" speed="390" manacost="0">
<health now="2000" max="2000"/>
<look type="99" head="95" body="116" legs="119" feet="115" corpse="6028"/>
<targetchange interval="5000" chance="8"/>
<strategy attack="100" defense="0"/>
<flags>
<flag summonable="0"/>
<flag attackable="1"/>
<flag hostile="1"/>
<flag illusionable="0"/>
<flag convinceable="0"/>
<flag pushable="0"/>
<flag canpushitems="1"/>
<flag canpushcreatures="1"/>
<flag targetdistance="1"/>
<flag staticattack="90"/>
<flag runonhealth="0"/>
</flags>
<attacks>
<attack name="melee" interval="2000" min="-90" max="-190"/>
<attack name="lifedrain" interval="3000" chance="9" range="1" min="-60" max="-250">
<attribute key="areaEffect" value="blueshimmer"/>
</attack>
<attack name="cursecondition" interval="3000" chance="15" range="1" min="-54" max="-54"/>
<attack name="speed" interval="2000" chance="15" range="7" speedchange="-900" duration="30000">
<attribute key="areaEffect" value="redshimmer"/>
</attack>
<attack name="lifedrain" interval="1000" chance="11" radius="3" target="0" min="-120" max="-200">
<attribute key="areaEffect" value="redshimmer"/>
</attack>
<attack name="lifedrain" interval="2000" chance="9" length="8" spread="0" min="-150" max="-295">
<attribute key="areaEffect" value="redshimmer"/>
</attack>
<attack name="poisoncondition" interval="3000" chance="9" length="8" spread="0" min="-300" max="-400">
<attribute key="areaEffect" value="greenspark"/>
</attack>
<attack name="lifedrain" interval="3000" chance="9" range="7" radius="3" target="0" min="-90" max="-210">
<attribute key="areaEffect" value="redshimmer"/>
</attack>
</attacks>
<defenses armor="20" defense="20">
<defense name="healing" interval="1000" chance="17" min="90" max="150">
<attribute key="areaEffect" value="blueshimmer"/>
</defense>
</defenses>
<elements>
<element energyPercent="80"/>
<element holyPercent="-15"/>
<element firePercent="-10"/>
</elements>
<immunities>
<immunity death="1"/>
<immunity earth="1"/>
<immunity paralyze="1"/>
<immunity invisible="1"/>
</immunities>
<summons maxSummons="1">
<summon name="bone beast" interval="1000" chance="16" max="1"/>
</summons>
<voices interval="5000" chance="10">
<voice sentence="Your pain will be beyond imagination!"/>
<voice sentence="You can't defeat me! I will ressurect and take your soul!"/>
<voice sentence="Death is my ally!"/>
<voice sentence="Welcome to my domain, visitor!"/>
<voice sentence="You will be my toy on the other side!"/>
<voice sentence="What a disgusting smell of life!"/>
</voices>
<loot>
</loot>
</monster>
add in data/actions/scripts/blue legs
make file named reward1.lua
Lua:
function onUse(cid, item, frompos, item2, topos)
if item.uid ==7516 then
queststatus = getPlayerStorageValue(cid,7616)
if queststatus == -1 then
doPlayerSendTextMessage(cid,22,"You have found Blue Legs.")
doPlayerAddItem(cid,7730,1)
setPlayerStorageValue(cid,7616,1)
else
doPlayerSendTextMessage(cid,22,"You aledry done this quest.")
end
else
return 0
end
return 1
end
data/actions/scripts/blue legs
creafile reward2.lua
Lua:
function onUse(cid, item, frompos, item2, topos)
if item.uid ==7517 then
queststatus = getPlayerStorageValue(cid,7617)
if queststatus == -1 then
doPlayerSendTextMessage(cid,22,"You have found 50 Platinum Coints.")
doPlayerAddItem(cid,2152,50)
setPlayerStorageValue(cid,7617,1)
else
doPlayerSendTextMessage(cid,22,"You aledry done this quest.")
end
else
return 0
end
return 1
end
add in data/actions/scripts/blue legs
Createfile Named kosheiamulet.lua
Lua:
function onUse(cid, item, fromPosition, itemEx, toPosition)
if itemEx.itemid == 6028 then
if getPlayerStorageValue(cid, 36205) == -1 then
doCreatureSay(cid, 'At least I have it back, my precious amulet. I am glad you didn\'t use it! I allow you to ...ahh....enter door.... ahh', 19, {x=toPosition.x, y=toPosition.y-1, z=toPosition.z})
doRemoveItem(cid, item.uid, 1)
setPlayerStorageValue(cid, 36205, 1)
end
end
end
add in data/actions/actions.xml
Code:
<!-- Blue Legs Quest -->
<action uniqueid="7511" script="blue legs/poba1.lua" />
<action uniqueid="7512" script="blue legs/poba2.lua" />
<action uniqueid="7513" script="blue legs/poba3.lua" />
<action uniqueid="7514" script="blue legs/poba4.lua" />
<action uniqueid="7516" script="blue legs/reward1.lua" />
<action uniqueid="7517" script="blue legs/reward2.lua" />
<action itemid="8266" script="blue legs/kosheiamulet.lua"/>
if you like it.. dont mind rep++ me xDD
If you got anny errors with this (wich should be possible with 0.3.5pl ) contact me private
TESTED AND WORKS!
Last edited: