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

Request - Trainer Egg

Snoker

New Member
Joined
Apr 6, 2009
Messages
131
Reaction score
0
I want trainer egg for my server.

Meaning: an egg looks like hydra's egg, when you drop it on floor, and right click on it, it becomes Training Monk.

Is it possible?
 
Put this in "data\actions\scripts\hydraegg.lua".
Code:
function onUse(cid, item, fromPosition, itemEx, toPosition)
local pos = getPlayerPosition(cid)
local position = {{x=pos.x,y=pos.y-1,z=pos.z}}
local monstername = training monk

doSummonMonster(monstername, position[i])
end

Add this to "data\actions\actions.xml"

TFS 0.2:
Code:
<action itemid="4850" script="hydraegg.lua"/>
TFS 0.3:
Code:
<action itemid="4850" event="script" value="hydraegg.lua"/>
 
Code:
local monstername = "training monk"

doSummonMonster(monstername, position[i])

would be like:

Code:
doSummonMonster("training monk", position[i])

when it should be:
Code:
doSummonMonster(training monk, position[i])

if im not misstaking.

(also maybe you can make it an "addEvent" where the monster only exist for a certain time to prevent mass spawning of hydra egg)


PS. You want the hydra egg to disappear on use? then use this script instead:
Code:
function onUse(cid, item, fromPosition, itemEx, toPosition)
local pos = getPlayerPosition(cid)
local position = {{x=pos.x,y=pos.y-1,z=pos.z}}
local monstername = training monk

doSummonMonster(monstername, position[i])
doRemoveItem(item.uid)
end
 
Back
Top