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

Sync

Ø,ø
Joined
May 26, 2009
Messages
1,901
Reaction score
26
Location
Canada
9k051k.gif

Well, as its the giving time of the year i figured i would open a Request Thread and i, and anyone else that would wish to help would make your requests for Lua Scripts. All i ask is that you follow the rules and request example below.

Rules:
  1. Must be in correct format.
  2. Must not be already released.
  3. Request must be in English.
  4. Script must be reasonable.

Request Example
Code:
[COLOR="DarkRed"][B][U]Type of Script:[/U][/B][/COLOR] (action, talkaction, creaturescript, etc.)

[COLOR="DarkRed"][B][U]Priority:[/U][/B][/COLOR] (how fast do you need this script)

[COLOR="darkred"][B][U]Reason of Request:[/U][/B][/COLOR] (Why do you need this script so bad)

[B][U][COLOR="darkred"]Description:[/COLOR][/U][/B] (What is the function of this script?)

[COLOR="darkred"][B][U]Public/Private:[/U][/B][/COLOR] (choose one of the two.[public I'll post on forums], [private only you and I will have access to it].
 
[Action]
[Fast]
[reason]

So I can put the levers in town for people to get there faster and have people fight over citys

[desciption]
Pull lever creates a teleport depending on what feet colour you have.
And walking into teleport, teleports you to a location.

Private or public idc
 
v1.31

Lua:
function onUse(cid, item, fromPosition, itemEx, toPosition)
local feet = { -- Teleport Takes Player --- Teleport is Created
        blue = {x = xxx, y = yyy, z = z}, {x = xxx, y = yyy, z = z},
        red = {x = xxx, y = yyy, z = z}, {x = xxx, y = yyy, z = z}
    }

    if getCreatureOutfit(cid).lookFeet == BLUE then
        tp = feet.blue
    elseif getCreatureOutfit(cid).lookFeet == RED then
        tp = feet.red
    end
        
    doCreateTeleport(1387, tp[1], tp[2])
    doSendMagicEffect(tp[2], CONST_ME_TELEPORT)
    addEvent(removeTeleport, time * 1000)
    return true
end

local function removeTeleport()
	if (getTileItemById(tp[2]).itemid == 1387) then
		doRemoveItem(getTileItemById(tp[2]).uid)
		doSendMagicEffect(tp[2], CONST_ME_POFF)
	end
	return true
end
 
Last edited:
[Action]
[Fast]
[reason]

So I can put the levers in town for people to get there faster and have people fight over citys

[desciption]
Pull lever creates a teleport depending on what feet colour you have.
And walking into teleport, teleports you to a location.

Private or public idc

I made it verrry quick before work so it may have its flaws, i beleive this is what you asked for.

Lua:
local config = {
    GreenewPos = {x=100, y=100, z=7}, -- New player position  -- Green Feet
    GreenteleportPos = {x=100, y=100, z=7}, -- Teleport position -- Green Feet
    RednewPos = {x=100, y=100, z=7}, -- New player position  -- Red Feet
    RedteleportPos = {x=100, y=100, z=7} -- Teleport position -- Red Feet
}

function onUse(cid, item, fromPosition, itemEx, toPosition)
local GreenTP = getTileItemById(config.GreenteleportPos, 1387)
  local RedTP = getTileItemById(config.RedteleportPos, 1387)
	if(getCreatureOutfit(cid).lookFeet == GREEN)then
	  doRemoveItem(RedTP.uid)
	   doCreateTeleport(1387, config.GreenewPos, config.teleportPos)
	    doSendMagicEffect(config.GreenteleportPos, CONST_ME_POFF)
       elseif(getCreatureOutfit(cid).lookFeet == RED)then
        doRemoveItem(GreenTP.uid)
         doCreateTeleport(1387, config.RednewPos, config.RedteleportPos)
	    doSendMagicEffect(config.RedteleportPos, CONST_ME_POFF)	     
    end     
		return TRUE
	end
 
lol dont listen to what i just said

I read your other request i figured it was the same one if that comment was dirtected to me how you want players to fight over the teleports to the town or what not. im not sure i didnt quite understand but i am going to work i will be back later byebye.
 
[20/12/2009 14:00:12] [Error - Action Interface]
[20/12/2009 14:00:12] data/actions/scripts/cityswitch.lua:eek:nUse
[20/12/2009 14:00:12] Description:
[20/12/2009 14:00:12] (luaDoRemoveItem) Item not found

[20/12/2009 14:00:12] [Error - Action Interface]
[20/12/2009 14:00:12] data/actions/scripts/cityswitch.lua:eek:nUse
[20/12/2009 14:00:12] Description:
[20/12/2009 14:00:12] attempt to index a nil value
[20/12/2009 14:00:12] stack traceback:
[20/12/2009 14:00:12] [C]: in function 'doCreateTeleport'
[20/12/2009 14:00:12] data/actions/scripts/cityswitch.lua:13: in function <data/actions/scripts/cityswitch.lua:8>
 
for ur v2 jdb


[20/12/2009 14:02:04] [Error - Action Interface]
[20/12/2009 14:02:04] data/actions/scripts/cityswitch.lua:eek:nUse
[20/12/2009 14:02:04] Description:
[20/12/2009 14:02:04] data/actions/scripts/cityswitch.lua:23: attempt to index field 'pos' (a nil value)
[20/12/2009 14:02:04] stack traceback:
[20/12/2009 14:02:04] data/actions/scripts/cityswitch.lua:23: in function <data/actions/scripts/cityswitch.lua:1>
 
Hello:

Type of Script: Action, Talkaction, Creaturescript?
Priority: Not fast, not slow can be even tomorrow.
Reason of Request: Unique script dont saw it.
Description: Playing Dice System, Invite player to play, by other. Invited player must accept, then they set a prize by using command and choose numbers also by using command.
Public/Private: Im a member of forum, so it can be post here in this thread.


If its very hard don't make it(maybe impossible).
Then ignore my post.

Thanks.
 
[20/12/2009 14:35:27] [Error - LuaScriptInterface::loadFile] data/actions/scripts/cityswitch.lua:16: '<eof>' expected near 'end'
[20/12/2009 14:35:27] [Warning - Event::loadScript] Cannot load script (data/actions/scripts/cityswitch.lua)
[20/12/2009 14:35:27] data/actions/scripts/cityswitch.lua:16: '<eof>' expected near 'end'
 
Maby im doing something wrong but this is how i edited script


PHP:
function onUse(cid, item, fromPosition, itemEx, toPosition)
local feet = { -- Teleport Takes Player --- Teleport is Created
        blue = {x = 500, y = 500, z = 7}, {x = 501, y = 500, z = 7},
        red = {x = 500, y = 500, z = 7}, {x = 501, y = 500, z = 7}
    }

    if getCreatureOutfit(cid).lookFeet == 95 then
        tp = feet.blue
    elseif getCreatureOutfit(cid).lookFeet == 3 then
        tp = feet.red
    end
        
    doCreateTeleport(1387, tp[1], tp[2])
    doSendMagicEffect(tp[2], CONST_ME_TELEPORT)
    addEvent(removeTeleport, time * 1000)
    return true
end

local function removeTeleport()
        if (getTileItemById(tp[2]).itemid == 1387) then
                doRemoveItem(getTileItemById(tp[2]).uid)
                doSendMagicEffect(tp[2], CONST_ME_POFF)
        end
        return true
end



This is error i get

PHP:
[20/12/2009 15:12:08] [Error - Action Interface] 
[20/12/2009 15:12:08] data/actions/scripts/cityswitch.lua:onUse
[20/12/2009 15:12:08] Description: 
[20/12/2009 15:12:08] attempt to index a nil value
[20/12/2009 15:12:08] stack traceback:
[20/12/2009 15:12:08] 	[C]: in function 'doCreateTeleport'
[20/12/2009 15:12:08] 	data/actions/scripts/cityswitch.lua:13: in function <data/actions/scripts/cityswitch.lua:1>
 
Can you add to this?
If red pulls switch and then blue. Red portal go's away
PHP:
function onUse(cid, item, fromPosition, itemEx, toPosition)
        bluePortalPosition = {x = 884, y = 1050, z = 7}-- Where blue tp will appear
        redPortalPosition = {x = 885, y = 1050, z = 7} -- Where red tp will appear
        blueDestination = {x = 883, y = 1041, z = 7} -- Where blue tp will tp
        redDestination = {x = 883, y = 1041, z = 7} -- Where red tp will tp

        if getCreatureOutfit(cid).lookFeet == 95 then
                t = bluePortalPosition
                s = redPortalPosition
                r = redDestination
        elseif getCreatureOutfit(cid).lookFeet == 3 then
                t = redPortalPosition
                s = bluePortalPosition
                r = redDestination
        end
        
        if getThingFromPos(s).itemid == 1387 then
                doRemoveItem(getThingFromPos(s))
        end

        doCreateTeleport(1387, r, t)
        return 1
end
 
Back
Top Bottom