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

TalkAction +[Action] Basic Flysystem

PHP:
local t =   {
	[11193] = {outfit='mutated bat', text='Fly, bat!', dtext='Go down, bat!'}
}       
local thisCondition = createConditionObject(CONDITION_OUTFIT)
setConditionParam(thisCondition, CONDITION_PARAM_TICKS, -1)
addOutfitCondition(thisCondition, {lookType = 307, lookHead = 0, lookBody = 0, lookLegs = 0, lookFeet = 0})
function onUse(cid, item, fromPosition, itemEx, toPosition)
	local v, r, s = getCreaturePosition(cid), t[item.itemid], 11190
	local pos = {x = v.x, y = v.y, z = 6}
	local posd = {x = v.x, y = v.y, z = 7}
	if r then
		if v.z == 7 then
			if getTileItemById(pos, 460).uid > 0 then
				if doTeleportThing(cid, pos, false) then
					doSendMagicEffect(pos, 10)
					doCreatureSay(cid, r.text, 19)
					return doAddCondition(cid, thisCondition)
				else
					return doPlayerSendCancel(cid, 'You can\'t fly here.')
				end    
			else
				return doPlayerSendCancel(cid, 'You can\'t fly here.')
			end
		elseif v.z == 6 then
			if doTeleportThing(cid, posd, false) then
				doSendMagicEffect(posd, 10)
				doCreatureSay(cid, r.dtext, 19)
				return doRemoveCondition(cid, CONDITION_OUTFIT)
			else
				return doPlayerSendCancel(cid, 'You can\'t land here.')
			end
		else
			return doPlayerSendCancel(cid, 'You can\'t fly here.')
		end
	else
		return doPlayerSendTextMessage(cid,MESSAGE_STATUS_CONSOLE_BLUE, 'There has been some error, try contacting a staff member.')
	end
end

And:

Code:
14:59 There has been some error, try contacting a staff member.
14:59 There has been some error, try contacting a staff member.

I have mount system :X?
 
Okej, thanks! But;

21llwy1.png


Fly on floor; 0.

/\
item

/flyup/flydown
\/
15:24 [Flying] You aren't mounted!
15:24 [Flying] You aren't mounted.
 
I'd like to do new thing:

Use item 11190, and fly on floor 0, but when i'd stop fly i go to floor 7, then it pushes me to someone's houses, or on ground [path].

["newbie" eng, sry:p]

PHP:
local t =   {
    [11190] = {outfit='mutated bat', text='Fly, bat!', dtext='Go down, bat!'}
}       
local thisCondition = createConditionObject(CONDITION_OUTFIT)
setConditionParam(thisCondition, CONDITION_PARAM_TICKS, -1)
addOutfitCondition(thisCondition, {lookType = 307, lookHead = 0, lookBody = 0, lookLegs = 0, lookFeet = 0})
function onUse(cid, item, fromPosition, itemEx, toPosition)
    local v, r, s = getCreaturePosition(cid), t[item.itemid], 11190
    local pos = {x = v.x, y = v.y, z = 0}
    local posd = {x = v.x, y = v.y, z = 7}
    if r then
        if v.z == 7 then
            if getTileItemById(pos, 460).uid > 0 then
                if doTeleportThing(cid, pos, false) then
                    doSendMagicEffect(pos, 10)
                    doCreatureSay(cid, r.text, 19)
                    return doAddCondition(cid, thisCondition)
                else
                    return doPlayerSendCancel(cid, 'You can\'t fly here.')
                end    
            else
                return doPlayerSendCancel(cid, 'You can\'t fly here.')
            end
        elseif v.z == 0 then
            if doTeleportThing(cid, posd, false) then
                doSendMagicEffect(posd, 10)
                doCreatureSay(cid, r.dtext, 19)
                return doRemoveCondition(cid, CONDITION_OUTFIT)
            else
                return doPlayerSendCancel(cid, 'You can\'t land here.')
            end
        else
            return doPlayerSendCancel(cid, 'You can\'t fly here.')
        end
    else
        return doPlayerSendTextMessage(cid,MESSAGE_STATUS_CONSOLE_BLUE, 'There has been some error, try contacting a staff member.')
    end
end


Ss:

mvmfxv.png



Can do something like this: when I'm on floor 0, over the building and use the item appears at the next floor,for example from 0 to 5 (on top on building)

Hmh? xd
 
Last edited:
Code:
12:47 There has been some error, try contacting a staff member.
what i do for he don't say to me that
 
Last edited:
Code:
Use item... (floor 7)
you can't fly here. (floor 7)



Use item... (floor 6)
Go down, mew(floor 7)

i can't use the item in the floor 7, only in the 6 and at used the character moved to floor 7

PD : sorry the bad english
 
Last edited:
@iruga
If someone do something like the mine sure i will post :)
 
how would i add exhaust to this action scrip? I tried the way the mount system had exhaust but it did not work. Would someone mind helping me out?
 
I cant get it to work only says "16:26 [Flying] You aren't mounted." And i had tested 10-20 storages... and it also say
[10/10/2010 16:30:07] [Error - Action Interface]
[10/10/2010 16:30:07] data/actions/scripts/fly.lua
[10/10/2010 16:30:07] Description:
[10/10/2010 16:30:07] data/actions/scripts/fly.lua:2: table index is nil
[10/10/2010 16:30:07] [Warning - Event::loadScript] Cannot load script (data/actions/scripts/fly.lua)
when i change from outfit to item in actions.xml
 
I cant /flyup :S I can mount but not /flyup it says 23:12 [Flying] You aren't mounted. Please help :D
 
14:18 There has been some error, try contacting a staff member.
14:18 There has been some error, try contacting a staff member.
14:18 There has been some error, try contacting a staff member. :( what shold i do
 
14:18 There has been some error, try contacting a staff member.
14:18 There has been some error, try contacting a staff member.
14:18 There has been some error, try contacting a staff member. :( what shold i do

It seems that your itemID is incorrect.
 
Back
Top