Ecstacy
Mothafuckaaa
Because I don't need this script anymore, I'm releasing it.
What does this do?
This script will make you "fly".
Or that's a simple word for it.
It makes you fly to another floor, if it has itemid 460.
- What does it check for?
When you type '/flyup' it checks if the floor above you is itemid 460(void), so that you can't fly on any tile.
If you are mounted(have storageValue)
On '/flydown' it checks for:
- Water
- If it is a house that you fly down to.
- If you are currently on 'air'(void(itemid 460)) so you can't use this when you are on normal ground, etc..
- Wether you are flying or not.
- If you are on 'z=7' (to prevent flying in caves)
- How does this work?
It works only if you give areas you want to be able to be flown itemid 460(in a map editor).
You may only mount or type 'flyup' on 'z=7'.
[*]Action - Mounting
This only works for ONE item!
Code:
local t = {
[150] = {outfit='mew', text='Fly, mew!', dtext='Go down, mew!'}
}
local thisCondition = createConditionObject(CONDITION_OUTFIT)
setConditionParam(thisCondition, CONDITION_PARAM_TICKS, -1)
addOutfitCondition(thisCondition, {lookType = 354, lookHead = 0, lookBody = 0, lookLegs = 0, lookFeet = 0})
function onUse(cid, item, fromPosition, itemEx, toPosition)
local v, r, s = getCreaturePosition(cid), t[item.itemid], 100
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
action.xml
Code:
<action itemid="[B]ITEM_ID IN SCRIPT[/B]" event="script" value="[B]SCRIPT_NAME[/B].lua"/>
how to edit:
Code:
[150] = {outfit='mew', text='Fly, mew!', dtext='Go down, mew!'}
edit this
Code:
[ITEMID] = {outfit='[B]NOT NEEDED[/B]', text='[B]TEXT ON FLYING UP[/B]', dtext='[B]TEXT ON FLYING DOWN[/B]'}
Talkaction - Flyup/flydown
Code:
local s = {
{100}
}
local water = {4608,4609,4610,4611,4612,4613,4614,4615,4616,4617,4618,4619,4664,4665,4666,5757,5756,5755,5759,5760,5758,5761}
function onSay(cid,words,param)
for _,i in ipairs(s) do
local r = i[1]
local v = getThingPos(cid)
local up,down = {x=v.x,y=v.y,z=v.z-1},{x=v.x,y=v.y,z=v.z+1}
if words == '/flyup' then
if getPlayerStorageValue(cid,r) > 0 then
if getTileItemById(up,460).uid > 0 then
doPlayerSendTextMessage(cid,20,'[Flying] You have flown up.')
doSendMagicEffect(up,10)
doCreatureSay(cid,'Up!',19)
doTeleportThing(cid,up)
return doSendMagicEffect(up,10)
else
doPlayerSendTextMessage(cid,20,'[Flying] You can\'t fly here.')
end
else
doPlayerSendTextMessage(cid,20,'[Flying] You aren\'t mounted.')
return true
end
elseif words == '/flydown' then
if getPlayerStorageValue(cid,r) > 0 then
if v.z >= 7 == false then
if getHouseFromPos(down) == false then
if(getTileItemById(down,(isInArray(water,itemid)),false).uid) then
if getTileItemById(v,460).uid > 0 then
doPlayerSendTextMessage(cid,20,'[Flying] You have flown down.')
doSendMagicEffect(down,10)
doCreatureSay(cid,'Down!',19)
doTeleportThing(cid,down)
return doSendMagicEffect(down,10)
else
doPlayerSendTextMessage(cid,20,'[Flying] You can\'t fly into ground.')
end
else
doPlayerSendTextMessage(cid,20,'[Flying] You can\'t fly on water.')
end
else
doPlayerSendTextMessage(cid,20,'[Flying] This is a house!')
end
else
doPlayerSendTextMessage(cid,20,'[Flying] You can\'t fly into ground.')
end
else
doPlayerSendTextMessage(cid,20,'[Flying] You aren\'t mounted!')
return true
end
end
return true
end
end
Code:
<talkaction words="/flyup;/flydown" event="script" value="[B]SCRIPT_NAME[/B].lua"/>
DON'T CHANGE ANYTHING UNLESS YOU KNOW WHAT YOU'RE DOING.
+REP IF YOU USE THIS SCRIPT,
All credits to me.
Please comment on use.
_________________
I'm not changing/renewing this script, since it's useless for me, edit it yourselves.
Won't add screenshots, unless someone posts them on this topic, because it's self explenating what it does.