• 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} Premium Bridge

Code:
function onStepin(blah balh)
teleportpos = {x=111,y=111,z=1}
if isPlayer(cid) == 1 then
if isPremium(cid) == 0 then 
doTeleportThing(cid,teleportpos)
end
end
end
There is the general idea :p
 
Oke this is really fast made and not tested but try it out..

Code:
function onStepIn(cid, item, position)
    if item.actionid == ACTIONID then
        if isPremium(cid) == 1 then
        elseif
            if isPremium(cid) == 0 then
                if doTeleportThing(x=,y=,z= FALSE) then
                    doSendMagicEffect(cid, CONST_ME_POFF)
                end
           end
       end
   end
end
 
Last edited by a moderator:
For The Forgotten Server:
Code:
function onStepIn(cid, item, position, fromPosition)
teleportpos = {x=111,y=111,z=1}
if isPlayer(cid) == 1 then
if isPremium(cid) == 0 then 
doTeleportThing(cid,teleportpos,FALSE)
doPlayerSendTextMessage(cid,'You must be premium to cross this bridge.',25)
end
end
end
 
please give me working script :/ pacc bridge or pacc door fot The Forgotten server :( alltime in anyone script i have this error in console .../premiumtiles1.lua:4 attempt to call global 'isPremium' <...movements blablabla) :p Please rebuild script :(
 
Oke this is really fast made and not tested but try it out..

Code:
function onStepIn(cid, item, position)
	if item.actionid == ACTIONID then
	if isPremium(cid) == 1 then
	elseif
    if isPremium(cid) == 0 then
	if doTeleportThing(x=,y=,z= FALSE) then
	doSendMagicEffect(cid, CONST_ME_POFF)
           end
       end
         end
   end
 end

O.O? Wtf is that code for? The error log will be longer than this code itself.
Code:
function onStepIn(cid, item, position)
    newPos = getCreaturePosition(cid).x + 2
    if item.actionid == ACTIONID then
        if isPremium(cid) == FALSE then
	    doTeleportThing(cid, newPos, 0)
	    doSendMagicEffect(getCreaturePosition(cid), CONST_ME_MAGIC_BLUE)
        end
    end
end
 
Last edited:
man this script dont work either... if you are sure it works tell me the easiest way to do this cuz ive tried 10 scripts and nor of them works.
 
Made by me:
PHP:
 local nPos = {
x = 00,
y = 00,
z = 0
}

function onStepIn(cid, item, pos) 
	if isPlayer(cid) == TRUE then 
	if isPremium(cid) == FALSE then
	   doTeleportThing(cid, nPos) 
  end 
 end 
  return TRUE 
end
PHP:
<movevent event="StepIn" actionid="6180" script="pacc_pass1.lua" />
 
Last edited:
@Tufte, if you are unhappy with people that are trying to help you, go elsewhere, we dont like people who dont appreciate our help.

The one bomba posted above this post looks like it should work, if it doesnt then post the console error and ill help you.
 
I believe 2 of those scripts work fine. I am sure the one trying to make them work is doing his part incorrectly? Such as not adding the actionid to the tiles needed, or not setting it correctly in the movements.xml
 
evribodi noob

Lua:
function onStepIn(cid, item, position, fromPosition)
	if isPremium(cid) == TRUE then
		doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "Welcome to Premium area!")
	else
		doTeleportThing(cid, fromPosition)
		doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "You need premium to enter this area.")
		doSendMagicEffect(getPlayerPosition(cid), 9)
		end
	return TRUE
end
 
Code:
function onStepIn(cid, item, position, position)

if isPremium(cid) == TRUE then
  local newposition = {x = position.x+3, y = position.y, z = position.z}
  doTeleportThing(cid, newposition)
  doSendMagicEffect(newposition, 12)
  doCreatureSay(cid, "You need to have a Premium Account to enter this area.", TALKTYPE_ORANGE_2)
end
	return TRUE
end
 
Back
Top