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

energyfence Script [actions]

elia3343

Hoster
Joined
Oct 22, 2014
Messages
167
Reaction score
8
I want to use this position, "local wall, ratp = {x = 2423, y = 947, z = 7}" in two different place.
local wall, ratp = {x = 2423, y = 947, z = 7} and x=x, y=x, z= x... is it possible?+


local id, time = 1547, 120
local wall, ratp = {x = 2423, y = 947, z = 7}, {x = 2425, y = 947, z = 7} <---- its just monster spawn

local function reset(pos)
doCreateItem(id, 1, wall)
doTransformItem(getTileItemById(pos, 1946).uid, 1945)
end

function onUse(cid,item,fromPosition,itemEx,toPosition)
if item.itemid == 1945 then
doRemoveItem(getTileItemById(wall, id).uid)
doCleanTile(ratp, false)
doPlayerSendTextMessage(cid, MESSAGE_EVENT_ADVANCE, "You removed the energy fence!\nEnergy fence will close in 2 min.")
doTargetCombatHealth(0, cid, COMBAT_ENERGYDAMAGE, -300, -500, CONST_ME_ENERGYHIT)
doCreateMonster('Xynex', ratp)
addEvent(reset, time * 1000, fromPosition)
doTransformItem(item.uid, 1946)
else
doPlayerSendDefaultCancel(cid, RETURNVALUE_NOTPOSSIBLE)
end
return true
end
 
do you mean like this..?
Code:
local wall, ratp = {x = 2423, y = 947, z = 7}, {x = 1111, y = 1111, z = 7}
Like this..?
Code:
local wall = {x = 2423, y = 947, z = 7}
local ratp = {x = 2423, y = 947, z = 7}
like this...?
Code:
doCreateMonster('Xynex', ratp1)
doCreateMonster('Xynex', ratp2)
Code:
for i = 1, 2 do
    doCreateMonster('Xynex', ratp)
end

I have no idea what you mean by two places. :s
 
I have no idea what you mean by two places. :s
I guess he wants to use that magic wall script in some another place.

I want to use this position, "local wall, ratp = {x = 2423, y = 947, z = 7}" in two different place.
local wall, ratp = {x = 2423, y = 947, z = 7} and x=x, y=x, z= x... is it possible?+
If that's the case, you can just copy-paste the script, change what you want and register it as another script in xml.
 
Back
Top