• 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 Problem with temples

Lantos

New Member
Joined
Mar 2, 2009
Messages
62
Reaction score
0
Ok, as noone is looking at already answered topics, I decided to create a new one.

here is my problem:
I've got a script to make random temple positions:
local temple = {
{x=,y=,z=},
{x=,z=,z=},
{x=,z=,z=},
{x=,z=,z=},
{x=,y=,z=}
}

local condition = createConditionObject(CONDITION_INFIGHT)
setConditionParam(condition, CONDITION_PARAM_TICKS, 3000)

function onLogin(cid)
doAddCondition(cid, condition)
doTeleportThing(cid, temple[math.random(getWorldCreatures(0) >= 50 and #temple or 1)])
return true
end

And the problem is that when i'm moving it to creaturescripts (am I right?) i don't know what to put in 'creaturescripts.xml'.
I made a code:
<event type="login" name="templelogin" event="script" value="temples.lua"/>
But it's not working properly. What's the problem?
Answer = REP++
 
I'll use it for a war. I made temple positions for 5 places, and when I log for first it would be ex. 2nd position, and when i log into second time, it will be ex 5th position, you know what i mean?
 
Just like that:

local temple = {
{x=95,y=117,z=7},
{x=97,z=121,z=7},
{x=92,z=114,z=7},
{x=98,z=114,z=7},
{x=98,y=120,z=7}
}

local condition = createConditionObject(CONDITION_INFIGHT)
setConditionParam(condition, CONDITION_PARAM_TICKS, 3000)

function onLogin(cid)
doAddCondition(cid, condition)
doTeleportThing(cid, temple[math.random(getWorldCreatures(0) >= 50 and #temple or 1)])
return true
end

They are such a near positions, but i'm just testing it for now^
 
Back
Top