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

Monster don't die and quest aren't quest, URGENT!

Ancore

New Member
Joined
Jul 6, 2012
Messages
216
Reaction score
1
Hello, I am having problems with the quests and with the monsters (all the rewards from the quests are inside the chest, with the chest as a container and the monsters don't die, they just get 0 life and stay there)... I think is a problem with the libs, but idk... so can anyone help me...

This is the error ingame:
ot problem.png - Speedy Share - upload your files here

And this is the console error:
error console.png - Speedy Share - upload your files here
 
Itens inside containers must be edited in map first, then you must add an action id to each chest, with a script and add a tag into actions.xml into ..data/actions

Example of tag on actions.xml:
Lua:
<action actionid="5800" script="questt/questt20.lua" />

actionid="xxx" is the same you set on chest "action id"

Example of scripted quest.

Lua:
function onUse(cid, item, frompos, item2, topos)
 
if item.uid ==5800 then --- same number from actionid="xxx"
queststatus = getPlayerStorageValue(cid,5800)
if queststatus == 1 then
doPlayerSendTextMessage(cid,MESSAGE_EVENT_ADVANCE,"This Chest is empty.")
 
else
doPlayerSendTextMessage(cid,MESSAGE_EVENT_ADVANCE,"You have found a Stone Skin Amulet with 100 charges.")
doSendMagicEffect(topos,12)
coins_uid = doPlayerAddItem(cid,2197,100)  ---- (cid, 2197 = item id, 100 = charges or units)
setPlayerStorageValue(cid,5800,1)
end
return 0
end
return 1
end

About the second error I dont know, but probably some wrong configuration on libs or so.

I cannot download your images now. Copy and paste your errors here, it would be easier. We could try to do something for you, also post your TFS version.
 
Please read again... I never said that the items were originally in a container, I said that they were like a normal quest, but the error is that they appear as in a container... I don't want them as in a container...
 
Hmmm, then you should check in your scripts that have this problem for something like this:

Lua:
local bag = doPlayerAddItem(cid, 200, 1)
item_uid = doAddContainerItem(bag,5907,1) and doAddContainerItem(bag,2160,30) and doAddContainerItem(bag,6512,1) and doAddContainerItem(bag,2150,30)
As you can see this quest example add a container with items, if you remove the container part, bag part and do something like:
Lua:
doPlayerAddItem(cid,xxxx,1)  --- cid = player, xxxx = item id, 1 = count
doPlayerAddItem(cid,yyyy,1)

then as you repeat you can add many prizes in the same quest without bag and without problem.

If this still doesn't solve your question, then post your problematic script and we may be able to help better.
 
Back
Top