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

Lua Blue Legs Quest (script doesn't work)

dragaoart

Since 2009...
Joined
May 10, 2009
Messages
97
Reaction score
9
Hello all! (thank you all for reading XD..)

I have a problem when using a third party scripts for OTS Distro: TFS 0.2.3.

The scripts are not 100% as the owner have said.

The Scripts I'm using are the following (or this link):

movements.xml
HTML:
<!-- Koshei the Deathless - Entrance) -->
	<movevent event="StepIn" actionid="21190" script="bluelegs/koshei_room.lua" /> -- Door
	<movevent event="StepIn" actionid="21191" script="bluelegs/koshei_room.lua" /> -- Exit
koshei_room.lua Credits: FRUGA
Lua:
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
actions.xml
HTML:
<action itemid="8266" script="bluelegs/koshei_amulet.lua"/> <!-- use amulet on slain koshei-->
koshei_amulet.lua Credits: BinHo®
Lua:
--- Credits BinHo® ---

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

koshei_room.png
16915231xc0.png

NOTE: The map is based on "Real Map Project 0.8"

Well, the problem are:
#1 The creature Koshei the Deathless don't spawns, as you can see at script koshei_room.lua when you steps at the floor with action.id = 21190 or 21191. It's supposed to spawn and come right to you, then you kill it and use the amulet ("itemid=8266") on corpse, then we go to problem #2.

#2 The amulet("itemid=8266") is used on the corpse but the corpse doesn''t talk the sentence "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". It's supposed to speak that.


Any Ideas on how to fix it?

Thanks for your time.
 
Acctually I'm asking for support because it doesn't work :p

Let's hope some good soul could help us and then I'll release the full working scripts that I've found, with a good tutorial! :D
 
BuMP :( no answers... :(
I've solved the second error, but the still bugged... I think in an action that could just spawn that creature can solve the problem... anyone?
 
here i think the problem for amulet is
add this in functions.lua

Lua:
function doCreatureSayWithDistance(cid, position, text, type)
	oldPosX = setPlayerStorageValue(cid, 10000, getCreaturePosition(cid).x)
	oldPosY = setPlayerStorageValue(cid, 10001, getCreaturePosition(cid).y)
	oldPosZ = setPlayerStorageValue(cid, 10002, getCreaturePosition(cid).z)
	oldPos = { x = getPlayerStorageValue(cid, 10000), y = getPlayerStorageValue(cid, 10001), z = getPlayerStorageValue(cid, 10002) }
	doTeleportThing(cid, position, 0)
	doCreatureSay(cid, text, type)
	return doTeleportThing(cid, oldPos, 0)
end
 
Back
Top