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

Scripts (lots....)

Luciano

Member
Joined
Feb 18, 2010
Messages
998
Reaction score
24
I would be happy if someone can help me (also i rep+++)
I need some scripts for this server
[19/02/2010 22:02:06] The Forgotten Server, version 0.3.5 (Crying Damson)
[19/02/2010 22:02:06] Compiled with GNU C++ version 3.4.5 (mingw special) at Aug 9 2009, 13:50:45.
------
Scripts:
Mana ring (ring of the sky) - increase mana of the player by 25%. example: player got 100 mana. with ring = 125

Life ring (emerald balangue)- same of mana ring.. but with life :P

mana boster (mastermind pot): increase player mana by 150k and can only be used 1x and need be 30k+
life boster (bulseye pot): same as mana boster...

Advanced temple teleport (i dont remember the id of the item it will be...) - make a teleport, that go to temple, and teleport go off in 15 secs (show 15, 14, 13, 12,...) and need be used without batle. Can only use one per 60 seconds...



forever aol > what is it > id 2196 > works like a normal aol, infinite.... but IF THE PLAYER HAVE RED SKULL AND DIE, he dont lost anything.... also dont lost the aol too :P


exp potion > increase the exp rate by 2x of player - one time per day and it have duration = 1 hour

Lotery Bird > golden falcon. 9003 > Its like a lotery, when u use it u can win ONE item.
example (noob items)
using u can win:
k armor
g armor
mpa
k legs
g legs
... but like : u have 50 chance drop k armor, 40 g armor, 10 mpa....

I think its all for now :P
THanks :) i need a lot this scripts
(i have the Forgottenl map... 8.5 im upgrading it :) (only for personal play :) im viciated in this ot...)


Thanks all :)
 
Teleport Scroll:
LUA:
function onSay(cid, words, param, channel)

local config = {
    ["thais"]={topos = {x=1000, y=1000, z=7}},
    ["edron"]={topos = {x=1000, y=1000, z=7}},
    ["port hope"]={topos = {x=1000, y=1000, z=7}},
    ["venore"]={topos = {x=1000, y=1000, z=7}}
}
local others = {
    scrollid = 0,
    level = 40,
    error = "Sorry, you need a teleport scroll to use this function."
}

    if config[param] then
        if getPlayerLevel(cid) >= others.level then
            if doPlayerRemoveItem(cid, others.scrollid, 1) == false then
                doTeleportThing(cid, config[param].topos)
                doSendMagicEffect(topos, 12)
            else
                doPlayerSendTextMessage(cid, others.error, 1)
            end
            doPlayerSendTextMessage(cid, "Sorry, you need level " .. others.level .. " to teleport.", 1)
        end
    else
        doPlayerSendCancel(cid, "Sorry, this command requires parameters.")
    end
end

In your items.xml (ring of the sky) add:
LUA:
<attribute key="maxManaPointsPercent" value="10"/>

In your items.xml (emerlad bangle)
Remove the decay to and add same as the life ring details

Forever aol Add that under it:
LUA:
<attribute key="charges" value="99999"/>

Hope it helps.
 
Last edited:
im trying make ring of sky and emerald bangle now... but the temple teleport i didnt understand :X and forever aol i know that, but i want to players with red skull no lose items
 
ok ok wait.... WHAT I ADDon movements? i DONT fucking know anything about scripts :) i like those one : put this in xyz.lua in data/world/xypz then go
xD
ps: im 13 years...
 
About the teleport scroll Add it in talkactions/scripts/Teleport Scroll.lua
then add this in Teleport Scroll.lua :
LUA:
function onSay(cid, words, param, channel)

local config = {
    ["thais"]={topos = {x=1000, y=1000, z=7}},
    ["edron"]={topos = {x=1000, y=1000, z=7}},
    ["port hope"]={topos = {x=1000, y=1000, z=7}},
    ["venore"]={topos = {x=1000, y=1000, z=7}}
}
local others = {
    scrollid = 0,
    level = 40,
    error = "Sorry, you need a teleport scroll to use this function."
}

-- ok, lets go script:
    if config[param] then
        if getPlayerLevel(cid) >= others.level then
            if doPlayerRemoveItem(cid, others.scrollid, 1) == false then
                doTeleportThing(cid, config[param].topos)
                doSendMagicEffect(topos, 12)
            else
                doPlayerSendTextMessage(cid, others.error, 1)
            end
            doPlayerSendTextMessage(cid, "Sorry, you need level " .. others.level .. " to teleport.", 1)
        end
    else
        doPlayerSendCancel(cid, "Sorry, this command requires parameters.")
    end
end

And in your talkactions.xml add:
[Xml] <talkaction words="!tp" event="script" value="teleportScroll.lua"/>[/Xml]
How it works you just say !tp Venore, and so on...
 
ok for the teleport rune you asked for
1- go to action-->scripts make new file called tpscroll.lua
LUA:
local exhaust = {
    storage = 3338,
    duration = 60
}


local config = {
    teleport_pos = {x=1000,y=1000,z=7},
    distance_effect = CONST_ANI_FIRE,
    area_effect = CONST_ME_FIREAREA
}

function onUse(cid, item, fromPosition, itemEx, toPosition)
    if (hasCondition(cid, CONDITION_INFIGHT) == TRUE) then
        doPlayerSendCancel(cid, "Sorry,you have a battle sign")
      return TRUE
    end
	if (getTilePzInfo(getPlayerPosition(cid)) == TRUE) then
	  doPlayerSendCancel(cid, "Sorry,you can't use this in a prrotection zone")
      return TRUE
    end

    if toPosition.x ~= 65535 and itemEx.itemid ~= 1387 then
        if (os.time() - getPlayerStorageValue(cid, exhaust.storage)) >= exhaust.duration then
            local teleport = doCreateTeleport(1387, config.teleport_pos, toPosition)
            doSendDistanceShoot(getPlayerPosition(cid), toPosition, config.distance_effect)
            doSendMagicEffect(toPosition, 56)
	        doSendMagicEffect(toPosition, 55)
			
            setPlayerStorageValue(cid, exhaust.storage, os.time())
            addEvent(countdown, 0, {position = toPosition, text = "10"})
            addEvent(countdown, 1000, {position = toPosition, text = "9"})
            addEvent(countdown, 2000, {position = toPosition, text = "8"})
            addEvent(countdown, 3000, {position = toPosition, text = "7"})
            addEvent(countdown, 4000, {position = toPosition, text = "6"})
            addEvent(countdown, 5000, {position = toPosition, text = "5"})
            addEvent(countdown, 6000, {position = toPosition, text = "4"})
            addEvent(countdown, 7000, {position = toPosition, text = "3"})
            addEvent(countdown, 8000, {position = toPosition, text = "2"})
            addEvent(countdown, 9000, {position = toPosition, text = "1"})
            addEvent(removePortal, 10000, {pos = getThingPos(teleport)})
        else
            doPlayerSendCancel(cid, "You cannot use this yet.")
            return TRUE
        end
    else
        doPlayerSendCancel(cid, "There is not enough room.")
        return TRUE
    end
    return TRUE
end

function countdown(parameters)
    doSendAnimatedText(parameters.position, parameters.text, TEXTCOLOR_RED)
end

function removePortal(parameters)
    doRemoveItem(getThingfromPos(parameters.pos).uid)
    doSendMagicEffect(parameters.pos, CONST_ME_FIREATTACK)

end

2- go to action-->action.xml and paste this line
LUA:
<action itemid="put the item id here" event="script" value="tpscroll.lua"/>



other things when i finish my h.w :)
 
Thanks !! WORKED NICE! EXACTLY WHAT I WANTED ;)! U check forgottenL advanced temple tp right? ^^
Rep+++!
BTW: PPL HELP I NEED MORE ;)
 
there is a litle bug in the tp scroll - it can be used in protection zone (should not) - and also i was geting attacked by 2 monsters - and i could use it. SHOULDNT. SHOULDNT EVEN WITH BATLE.
srry for caps lock ;) nice work anyway :) no one had it (exept the owner of the original ot)



COMON GUYS HELP ME LOL

Also i need another script
Exemple:
Some scroll, the player use he get 8 broadcasts.
What?
He say !broadcast Text here.
He can only !broadcast if he have "charges" of broadcast.
If no have any, then just dont do !broadcast (lol?)
Btw: When use !broadcast, say whow many broadcasts left, example
the player got 8 bc now.
he use !broadcast Hi im a player \o/
Now you have 7 broadcasts lefts.
this :)
 
for the mana ring go to items.xml go to the item you want to be mana ring.
example:
Code:
<item id="2127" article="an" name="emerald bangle">
        <attribute key="weight" value="170" />
        <attribute key="slotType" value="ring" />
        [B]<attribute key="maxManaPointsPercent" value="130"/> [/B]
    </item>
so like that the emerald bangle will give 30% mana you can adjust (100+desired %).

Now go to movement.xml and paste these lines
Code:
    <movevent type="Equip" itemid="2127" slot="ring" event="function" value="onEquipItem"> <!-- 
    </movevent>
    <movevent type="DeEquip" itemid="2127" slot="ring" event="function" value="onDeEquipItem"/>

Health ring also go to the desired item in items.xml and exchange the bold line to this
Code:
[B]<attribute key="maxHealthPointsPercent" value="130"/> [/B]

then also go to movement and paste these lines
Code:
 <movevent type="Equip" itemid="item id" slot="ring" event="function" value="onEquipItem"> <!-- 
 </movevent>
 <movevent type="DeEquip" itemid="item id" slot="ring" event="function" value="onDeEquipItem"/>
 
And for the mana booster go to action-->scripts then make new file called manabooster.lua

LUA:
function onUse(cid, item, fromPosition, itemEx, toPosition)
  if getPlayerLevel(cid) < 30000 then
     doCreatureSay(cid, "Only players with level 30k can use it.", TALKTYPE_ORANGE_1) 
	return true
  end
  if getPlayerStorageValue(cid,99112) == 2 then
     doPlayerSendCancel(cid, "You can use this item once.") 
	return true
  end
  setCreatureMaxMana(cid,(getCreatureMaxMana(cid))+150000)
  setPlayerStorageValue(cid,99112,2)

  doCreatureSay(cid, "You have gained 150k mana!!", TALKTYPE_ORANGE_1)
  return true
end


now go to action.xml and paste this line
Code:
<action itemid="7440" event="script" value="manabooster.lua"/>


as for the health booster
go to actions-->scrpts make new file called helathbooster.lua


LUA:
function onUse(cid, item, fromPosition, itemEx, toPosition)
  if getPlayerLevel(cid) < 30000 then
     doCreatureSay(cid, "Only players with level 30k can use it.", TALKTYPE_ORANGE_1) 
	return true
  end
  if getPlayerStorageValue(cid,99114) == 2 then
     doPlayerSendCancel(cid, "You can use this item once.") 
	return true
  end
  setCreatureMaxHealth(cid,(getCreatureMaxHealth(cid))+150000)
  setPlayerStorageValue(cid,99114,2)

  doCreatureSay(cid, "You have gained 150k mana!!", TALKTYPE_ORANGE_1)
  return true
end


then in action.xml
Code:
<action itemid="2280" event="script" value="healthbooster.lua"/>

You can easily change the items id from the line in the action.xml beside itemid=""
 
Back
Top