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

RevScripts Boomerang Script

klarkarak

Member
Joined
Nov 19, 2011
Messages
26
Reaction score
8
Location
Mexico
Good evening i try to convert this script Action - [RELEASE] The Boomerang (like in the Zelda series) (https://otland.net/threads/release-the-boomerang-like-in-the-zelda-series.16182/) into a revscripts, but when i used the item the floor dissapears

Can somebody help me, no matter if only move the items

Lua:
local boomerang = Action()
function target (stuff)
local cid = stuff.cid     
local thing = getThingfromPos(stuff.toPosition)
 
    if (stuff.counter == 2) then
        if getTileHouseInfo(stuff.toPosition) == TRUE then
                doPlayerSendTextMessage(cid,22,"You can't teleport items from a house.")
        elseif isCreature(thing.uid) == FALSE then
                doTeleportThing(thing.uid, getCreaturePosition(stuff.cid))
        end
        return TRUE
    end     
        doSendDistanceShoot(stuff.toPosition, getCreaturePosition(stuff.cid), CONST_ANI_WHIRLWINDAXE)
        doAreaCombatHealth(0, COMBAT_HOLYDAMAGE, stuff.toPosition, 0, -100, -200, CONST_ME_HOLYDAMAGE)
        stuff.counter = stuff.counter + 1
        addEvent(target, 200, stuff)
end
 
function boomerang.onUse(cid, item, fromPosition, itemEx, toPosition)
    if getTilePzInfo(getCreaturePosition(cid)) == TRUE or getTilePzInfo(toPosition) == TRUE then
        doPlayerSendTextMessage(cid,22,"You cannot use this weapon in a protection zone.")
    else
        doSendDistanceShoot(getCreaturePosition(cid), toPosition, CONST_ANI_WHIRLWINDAXE)
        local stuff = {cid = cid, toPosition = toPosition, counter = 1}         
        addEvent(target, 300, stuff)
    end
    return TRUE
end

boomerang:id(7423)
boomerang:register()

this is what supposed to do V
 

Attachments

Back
Top