• 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!
  • 2026 staff recruitment is open! Check it out and consider applying!

Script Request For TFS 1.2

gubbo123

New Member
Joined
Aug 15, 2017
Messages
151
Solutions
1
Reaction score
3
I'm looking for the real script of naguinata quest, remove "Stone"

The script basically is Use x random times Pick on Stone in x,y,z position
to break, trying break the stone the character will lose some hitpoints, and after the stone i'll be removed

up

bump

Pick id = 3456
Stone id = 1791
Stone position = {x = 32356, y = 32074, z = 10}

The hitpoints lose can be between 20 or 35

Up :/
 
Last edited by a moderator:
Solution
change "naginata_stone_aid = 5000" to whatever actionid you want, and add that actionid to the stone, save map, restart server and voila, my wonders will work :)
LUA:
local config = {
   naginata_stone_aid = 5000
}

function onUse(player, item, fromPosition, target, toPosition)
   local tile = Tile(toPosition)
   if not tile then
   return false
   end

   local ground = tile:getGround()
       if not ground then
       return false
   end

   if ground:getId() == 372 then
       ground:transform(394, 1)
       ground:decay()
       return true
   elseif ground:getId() == 1772 and toPosition.x == 32648 and toPosition.y == 32134 and toPosition.z == 10 and math.random(1, 100) <= 40 then
       Game.sendMagicEffect({x = 32648, y...
LUA:
function onUse(player, item, fromPosition, target, toPosition)
    local tile = Tile(toPosition)
    if not tile then
        return false
    end

    local ground = tile:getGround()
    if not ground then
        return false
    end
   
    if ground:getId() == 372 then
        ground:transform(394, 1)
        ground:decay()
        return true
    elseif ground:getId() == 1772 and toPosition.x == 32648 and toPosition.y == 32134 and toPosition.z == 10 and math.random(1, 100) <= 40 then 
        Game.sendMagicEffect({x = 32648, y = 32134, z = 10}, 3)
        Game.removeItemOnMap({x = 32648, y = 32134, z = 10}, 1772)
        return true
    elseif ground:getId() == 1772 and toPosition.x == 32648 and toPosition.y == 32134 and toPosition.z == 10 then 
        Game.sendMagicEffect({x = 32648, y = 32134, z = 10}, 3)
        doTargetCombatHealth(0, player, COMBAT_PHYSICALDAMAGE, -40, -40)
        return true
    elseif ground:getId() == 1791 and toPosition.x == 32356 and toPosition.y == 32074 and toPosition.z == 10 and math.random(1, 100) <= 40 then 
        Game.sendMagicEffect({x = 32356, y = 32074, z = 10}, 3)
        Game.removeItemOnMap({x = 32356, y = 32074, z = 10}, 1791)
        return true
    elseif ground:getId() == 1791 and toPosition.x == 32356 and toPosition.y == 32074 and toPosition.z == 10 then
        Game.sendMagicEffect({x = 32356, y = 32074, z = 10}, 3)
        doTargetCombatHealth(0, player, COMBAT_PHYSICALDAMAGE, -50, -50)
        return true
    end
    return false
end
 
change "naginata_stone_aid = 5000" to whatever actionid you want, and add that actionid to the stone, save map, restart server and voila, my wonders will work :)
LUA:
local config = {
   naginata_stone_aid = 5000
}

function onUse(player, item, fromPosition, target, toPosition)
   local tile = Tile(toPosition)
   if not tile then
   return false
   end

   local ground = tile:getGround()
       if not ground then
       return false
   end

   if ground:getId() == 372 then
       ground:transform(394, 1)
       ground:decay()
       return true
   elseif ground:getId() == 1772 and toPosition.x == 32648 and toPosition.y == 32134 and toPosition.z == 10 and math.random(1, 100) <= 40 then
       Game.sendMagicEffect({x = 32648, y = 32134, z = 10}, 3)
       Game.removeItemOnMap({x = 32648, y = 32134, z = 10}, 1772)
       return true
   elseif ground:getId() == 1772 and toPosition.x == 32648 and toPosition.y == 32134 and toPosition.z == 10 then
       Game.sendMagicEffect({x = 32648, y = 32134, z = 10}, 3)
       doTargetCombatHealth(0, player, COMBAT_PHYSICALDAMAGE, -40, -40)
       return true
   --// OpenTibiaServer's edits //--
   elseif ground.actionid == config.naginata_stone_aid then
       chance = math.random(1, 10)
       if chance <= 3 then
           target:remove()
       else
           doTargetCombatHealth(0, player, COMBAT_PHYSICALDAMAGE, -10, -40, CONST_ME_NONE)
       end
       Position(toPosition):sendMagicEffect(CONST_ME_POFF)
   --// OpenTibiaServer's edits //--
   end
   return false
end

Edit, I removed the part of your attempts of creating it, check if you copied old or new version :)
 
Solution
Back
Top