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

Blue Legs Quest - Including map (70%done)

krille09

Belden
Joined
Aug 15, 2007
Messages
4,892
Reaction score
55
Location
Stockholm, Sweden
hiho, i wanna request a script for blue legs quest

first of all

its like a quest to get four pieces of a broken amulet (Koshei The Deathless Quest/Spoiler - TibiaWiki - see more)

so i wanna these scripts when taking one piece you get a actionID (or storage, don't know much about lua ;p)

the broken amulet id's are:
8262
8263
8264
8265

8266 (this is the finished one - need an npc script that exchange these four pieces into this finished one (you need to pay 5000 gold)

then when using on a 'strange carving' (id: 3900 - but set actionID) when you click on this, the id 7520 switches with 7525 then if it possible to like on x: xxx y: xxx z: x that it says CLICK! in orange color ;p
or something like that, maybe on the sqm where 7520 and 7525 switches ^^

screenshot - just an example;
jj2oau.jpg


and then when reached to x: xxx y: xxx z: x sqm ( i want have 3x of these since it's 3 sqm you can step forward in^^ )then spawn the monster 'Koshei The Deathless'
and after he died, you have 10seconds to use the amulet on the body or he will spawn again until done it...

then after used the amulet on the body, you get a actionID / storage that does you can go through the quest door



thanks :)

edit:
i have done the 4 quest for the 4 pieces of the broken amulet:

report please

poba = piece of broken amulet

poba1.lua
PHP:
-- blue legs quest
-- by krille09
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

poba2.lua
PHP:
-- blue legs quest
-- by krille09
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

poba3.lua
PHP:
-- blue legs quest
-- by krille09
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

poba4.lua
PHP:
-- blue legs quest
-- by krille09
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

-- report from this npc.lua
blue_legs_quest_npc.lua
PHP:
-- based on a sweaty cyclops.lua (no credits since he didn't leave any names)
-- edited by krille09

local keywordHandler = KeywordHandler:new()
local npcHandler = NpcHandler:new(keywordHandler)
NpcSystem.parseParameters(npcHandler)

-- OTServ event handling functions start
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
-- OTServ event handling functions end

function creatureSayCallback(cid, type, msg)
    -- Place all your code in here. Remember that hi, bye and all that stuff is already handled by the npcsystem, so you do not have to take care of that yourself.
    if(npcHandler.focus ~= cid) then
        return false
    end

    -- use the real conversation? (true/false)
    real = false
    
    if real == true then
        tradeMsg = 'I can fix all the four pieces of the broken amulet into one!'
		fourpobaMsg = 'Do you want me to fix all the four pieces of that broken amulet?'
        hasNoMsg = 'You need all four piece of the broken amulet to get all, or I can\'t fix it!'
        noMsg = 'I have no time, I\'m a busy man, LEAVE!'
    else
        tradeMsg = 'I can fix all the four pieces of the broken amulet into one!'
		fourpobaMsg = 'Do you want me to fix all the four pieces of that broken amulet?'
        hasNoMsg = 'You need all four piece of the broken amulet to get all, or I can\'t fix it!'
        noMsg = 'I have no time, I\'m a busy man, LEAVE!'
    end
        if msgcontains(msg, 'trade') or msgcontains(msg, 'fix') then
            selfSay(tradeMsg)
        elseif msgcontains(msg, 'change') or msgcontains(msg, 'piece') or msgcontains(msg, 'four') then
            selfSay(fourpobaMsg)
            talk_state = 1
------------------------------------------------ confirm yes ------------------------------------------------
        elseif msgcontains(msg, 'yes') and talk_state == 1 then
            if getPlayerItemCount(cid,8262) >= 1 then
			if getPlayerItemCount(cid,8263) >= 1 then
			if getPlayerItemCount(cid,8264) >= 1 then
			if getPlayerItemCount(cid,8265) >= 1 then
                if doPlayerTakeItem(cid,8262,1) == 0 then
				if doPlayerTakeItem(cid,8263,1) == 0 then
				if doPlayerTakeItem(cid,8264,1) == 0 then
				if doPlayerTakeItem(cid,8265,1) == 0 then
                    selfSay('Here you are.')
                    doPlayerAddItem(cid,8266,1)
                end
            else
                selfSay(hasNoMsg)
            end
            talk_state = 0

------------------------------------------------ confirm no ------------------------------------------------
        elseif msgcontains(msg, 'no') and (talk_state == 1) then
            selfSay(noMsg)
            talk_state = 0
        end
    -- Place all your code in here. Remember that hi, bye and all that stuff is already handled by the npcsystem, so you do not have to take care of that yourself.
    return true
end

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

Blue_Legs_Quest_NPC.xml
PHP:
<?xml version="1.0"?>
<npc name="Blue Legs Quest NPC" script="data/npc/scripts/blue_legs_quest_npc.lua" access="5" lookdir="2" walkinterval="3">
<health now="137" max="1337" />
<look type="133" head="67" body="61" legs="61" feet="67" />
<parameters>
<parameter key="module_shop" value="1" />
 <parameter key="message_greet" value="Greetings, |PLAYERNAME|. I can change your four items into one amulet!" />
</parameters>
</npc>


Download Link! (Including map)
 
Last edited:
bump - can anyone check my scripts i done, if they would work for lastest tfs or somethin? ;p

poba4in1.lua
PHP:
-- base script by krille09
-- edited by nipr0nz (zniC)

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

if item.uid == 7511 then
           queststatus1 = getPlayerStorageValue(cid,7611)
           if queststatus1 == -1 then
               doPlayerSendTextMessage(cid,22,"You have found one piece of the broken amulet.")
               doPlayerAddItem(cid,8262,1)
               setPlayerStorageValue(cid,7611,1)
           
else if item.uid == 7512 then
           queststatus2 = getPlayerStorageValue(cid,7612)
           if queststatus2 == -1 then
               doPlayerSendTextMessage(cid,22,"You have found one piece of the broken amulet.")
               doPlayerAddItem(cid,8263,1)
               setPlayerStorageValue(cid,7612,1)
           
else if item.uid == 7513 then
           queststatus3 = getPlayerStorageValue(cid,7613)
           if queststatus3 == -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 if item.uid ==7514 then
           queststatus4 = getPlayerStorageValue(cid,7614)
           if queststatus4 == -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

this script is done by zniC from my ones - i say it 4 in 1
 
Last edited:
mmm...
Here is the room of Koshei :)

CREDITS: FRUGA

Movements.xml
Code:
	<movevent event="StepIn" actionid="21190" script="darashia/Koshei the Deathless.lua" /> -- Door
	<movevent event="StepIn" actionid="21191" script="darashia/Koshei the Deathless.lua" /> -- Exit

Koshei the Deathless.lua -- door plz :)
Code:
function onStepIn(cid, item, position, fromPosition)
 
Scheck = getPlayerStorageValue(cid, 83234)
ItemCheck = getPlayerItemCount(cid,8266)
out =  {x=position.x, y=position.y-1, z=position.z}
Spawn =  {x=position.x, y=position.y-10, z=position.z}
 
--Check Begin
 
--Area Check
starting={x=33264, y=32402, z=12, stackpos=253} --Top left corner
checking={x=starting.x, y=starting.y, z=starting.z, stackpos=starting.stackpos}
ending=  {x=33278, y=32417, z=12, stackpos=253} --Bottom right corner
--Area Check
players=0
totalmonsters=0
monster = {}
repeat
creature= getThingfromPos(checking)
if creature.itemid > 0 then
if isPlayer(creature.uid) == 1 then
players=players+1
end
if isCreature(creature.uid) 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
--Check Ending
 
if players == 0 and totalmonsters == 0 and ItemCheck > 0 then
	doSummonCreature("Koshei The Deathless", Spawn)
 
 
elseif players==0 then
 
current=0
repeat
current=current+1
doRemoveCreature(monster[current])
until current>=totalmonsters
end
end

16915231xc0.png



And the bluelegs quest door :)
Code:
-- Credits StreamSide and Empty
local msgcan = " "       -- the msg if you can pass the door
local msgcant = " "      -- the msg if you cant pass the door
local id =             -- the action id here
local storage =            -- the storage value here
function onUse(cid, item, fromPosition, itemEx, toPosition)
	local cidPosition = getCreaturePosition(cid)
		if (item.actionid == id and getPlayerStorageValue(cid, storage) >= 1) then
			if cidPosition.x < toPosition.x then
				doTeleportThing(cid, {x=toPosition.x+1,y=toPosition.y,z=toPosition.z}, TRUE)
								doCreatureSay(cid, msgcan, TALKTYPE_ORANGE_1)
			else
				doTeleportThing(cid, {x=toPosition.x-1,y=toPosition.y,z=toPosition.z}, TRUE)
								doCreatureSay(cid, msgcan, TALKTYPE_ORANGE_1)
			end
			return TRUE
		else
			doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, msg cant)
			return TRUE
	end
	return FALSE
end
 
Last edited:
@up;

thanks - i'll soon start to test these scripts - never tested out

im bit nooby of sql servers x)

mmm...
Here is the room of Koshei :)

CREDITS: FRUGA

Movements.xml
Code:
	<movevent event="StepIn" actionid="21190" script="darashia/Koshei the Deathless.lua" /> -- Door
	<movevent event="StepIn" actionid="21191" script="darashia/Koshei the Deathless.lua" /> -- Exit

Koshei the Deathless.lua -- door plz :)
Code:
function onStepIn(cid, item, position, fromPosition)
 
Scheck = getPlayerStorageValue(cid, 83234)
ItemCheck = getPlayerItemCount(cid,8266)
out =  {x=position.x, y=position.y-1, z=position.z}
Spawn =  {x=position.x, y=position.y-10, z=position.z}
 
--Check Begin
 
--Area Check
starting={x=33264, y=32402, z=12, stackpos=253} --Top left corner
checking={x=starting.x, y=starting.y, z=starting.z, stackpos=starting.stackpos}
ending=  {x=33278, y=32417, z=12, stackpos=253} --Bottom right corner
--Area Check
players=0
totalmonsters=0
monster = {}
repeat
creature= getThingfromPos(checking)
if creature.itemid > 0 then
if isPlayer(creature.uid) == 1 then
players=players+1
end
if isCreature(creature.uid) 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
--Check Ending
 
if players == 0 and totalmonsters == 0 and ItemCheck > 0 then
	doSummonCreature("Koshei The Deathless", Spawn)
 
 
elseif players==0 then
 
current=0
repeat
current=current+1
doRemoveCreature(monster[current])
until current>=totalmonsters
end
end

16915231xc0.png



And the bluelegs quest door :)
Code:
-- Credits StreamSide and Empty
local msgcan = " "       -- the msg if you can pass the door
local msgcant = " "      -- the msg if you cant pass the door
local id =             -- the action id here
local storage =            -- the storage value here
function onUse(cid, item, fromPosition, itemEx, toPosition)
	local cidPosition = getCreaturePosition(cid)
		if (item.actionid == id and getPlayerStorageValue(cid, storage) >= 1) then
			if cidPosition.x < toPosition.x then
				doTeleportThing(cid, {x=toPosition.x+1,y=toPosition.y,z=toPosition.z}, TRUE)
								doCreatureSay(cid, msgcan, TALKTYPE_ORANGE_1)
			else
				doTeleportThing(cid, {x=toPosition.x-1,y=toPosition.y,z=toPosition.z}, TRUE)
								doCreatureSay(cid, msgcan, TALKTYPE_ORANGE_1)
			end
			return TRUE
		else
			doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, msg cant)
			return TRUE
	end
	return FALSE
end

can you tell me little more about this script? seems really cool but not really understanding for me :p
 
Last edited:
You can only enter the QuestDoor(Reward) when you use the amulet on the corpose of Koshei.

Code:
--- Credits BinHo® ---
local creatureTxt = "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"

function onUse(cid, item, fromPosition, itemEx, toPosition)
        if itemEx.itemid == 6028 then
                if getPlayerStorageValue(cid, 36205) == -1 then
                doCreatureSay(cid, creatureTxt, 19, {x=toPosition.x, y=toPosition.y-1, z=toPosition.z})
                doRemoveItem(cid, item.uid, 1)
                setPlayerStorageValue(cid, 36205, 1)
            end
        end
end
You have 10 second to use amulet, otherwise, you must kill Koshei again.
Set StorageValue in MagicDoor (by MapEditor/RME).
For items rewards, use 0.3 Quest System, and done!
 
Last edited:
Here... Rep++ :D

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>
 
Last edited:
Here... Rep++ :D

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="cursedcondition" 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>

On TFS you'll have a problem so change cursedcondition for cursecondition.... its also a beam....
 
Code:
base script by krille09
edited by nipr0nz (zniC)

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

       if item.aid == 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 if item.aid == 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 if item.aid == 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 if item.aid ==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

Code:
[03/02/2009 17:06:28] Warning: [Event::loadScript] Can not load script. data/actions/scripts/quests/bluelegsparts.lua
[03/02/2009 17:06:28] data/actions/scripts/quests/bluelegsparts.lua:1: '=' expected near 'script'
[03/02/2009 17:06:28] Warning: [Event::loadScript] Can not load script. data/actions/scripts/quests/bluelegsparts.lua
[03/02/2009 17:06:28] data/actions/scripts/quests/bluelegsparts.lua:1: '=' expected near 'script'
[03/02/2009 17:06:28] Warning: [Event::loadScript] Can not load script. data/actions/scripts/quests/bluelegsparts.lua
[03/02/2009 17:06:28] data/actions/scripts/quests/bluelegsparts.lua:1: '=' expected near 'script'
[03/02/2009 17:06:28] Warning: [Event::loadScript] Can not load script. data/actions/scripts/quests/bluelegsparts.lua
[03/02/2009 17:06:28] data/actions/scripts/quests/bluelegsparts.lua:1: '=' expected near 'script'

any solution?
 
Code:
-- base script by krille09
-- edited by nipr0nz (zniC)

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)
           elseif 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)
           elseif 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
    elseif 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 FALSE
       end

       return TRUE
end

Ultra LOL! no more errors ;>
 
Code:
-- base script by krille09
-- edited by nipr0nz (zniC)

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)
           elseif 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)
           elseif 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
    elseif 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 FALSE
       end

       return TRUE
end

Ultra LOL! no more errors ;>

[03/02/2009 18:13:23] Warning: [Event::loadScript] Can not load script. data/actions/scripts/quests/bluelegsparts.lua
[03/02/2009 18:13:23] data/actions/scripts/quests/bluelegsparts.lua:41: 'end' expected (to close 'if' at line 6) near '<eof>'
[03/02/2009 18:13:23] Warning: [Event::loadScript] Can not load script. data/actions/scripts/quests/bluelegsparts.lua
[03/02/2009 18:13:23] data/actions/scripts/quests/bluelegsparts.lua:41: 'end' expected (to close 'if' at line 6) near '<eof>'
[03/02/2009 18:13:23] Warning: [Event::loadScript] Can not load script. data/actions/scripts/quests/bluelegsparts.lua
[03/02/2009 18:13:23] data/actions/scripts/quests/bluelegsparts.lua:41: 'end' expected (to close 'if' at line 6) near '<eof>'
[03/02/2009 18:13:23] Warning: [Event::loadScript] Can not load script. data/actions/scripts/quests/bluelegsparts.lua
[03/02/2009 18:13:23] data/actions/scripts/quests/bluelegsparts.lua:41: 'end' expected (to close 'if' at line 6) near '<eof
 
#Add an end D:
Code:
-- base script by krille09
-- edited by nipr0nz (zniC)

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)
    elseif 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)
    elseif 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
    elseif 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 FALSE
    end
return TRUE
end
end
end
 
don't have amulet

\/ error

[06/03/2009 22:53:23] Lua Script Error: [MoveEvents Interface]
[06/03/2009 22:53:23] data/movements/scripts/blegs1.lua:eek:nStepIn

[06/03/2009 22:53:23] luaDoRemoveCreature(). Creature not found
 
Last edited:
Hello

Hello,console give one error.


PHP:
-- base script by krille09
-- edited by nipr0nz (zniC)

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)
    elseif 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)
    elseif 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
    elseif 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 FALSE
    end
return TRUE
end
end
end

PHP:
[11/07/2009 11:36:37] data/actions/scripts/quests/quests.lua:24: attempt to compare boolean with number
[11/07/2009 11:36:37] stack traceback:
[11/07/2009 11:36:37] 	data/actions/scripts/quests/quests.lua:24: in function <data/actions/scripts/quests/quests.lua:2>

tfs 0.3.4 crimdamson
 
Back
Top