• 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!
  • New resources must be posted under Resources tab. A discussion thread will be created automatically, you can't open threads manually anymore.

Action Mixed Rune [DONE] With upgrader!

Tonks

Banned User
Joined
Mar 30, 2012
Messages
517
Reaction score
21
Location
Egypt and proud of it!
The fully-completed mixed rune [UPGRADED/NON-UPGRADED]

UPGRADED MIXED RUNE [ACTION]
Go to actions/scripts/runes/Create upgraded mixed rune.lua
Code:
function onUse(cid, item, frompos, item2, topos)
mag = getPlayerMagLevel(cid)
if mag >= 0 then
doSendMagicEffect(topos,14)
doCreatureSay(cid,"Upgraded Mixed Rune",19)
doPlayerAddMana(cid, 150000)
doCreatureAddHealth(cid,300000)
if item.type > 1 then
doChangeTypeItem(item.uid,item.type-1)
end
else
doSendMagicEffect(frompos,2)
doPlayerSendCancel(cid,"You don't have the required magic level to use that rune.")
end
return 1
end
Open actions.xml and paste this in it:
Code:
<action itemid="2282" script="runes/upgraded mixed RUNE.lua" />
[You can change the item ID]

MIXED RUNE [ACTION]
Create mixed rune.lua in actions/scripts/runes and paste this:
Code:
function onUse(cid, item, frompos, item2, topos)
mag = getPlayerMagLevel(cid)
if mag >= 0 then
doSendMagicEffect(topos, 14)
doCreatureSay(cid,"Mixed Rune",19)
doPlayerAddMana(cid, 125000)
doCreatureAddHealth(cid,200000)
if item.type > 1 then
doChangeTypeItem(item.uid,item.type-1)
end
else
doSendMagicEffect(frompos,2)
doPlayerSendCancel(cid,"You don't have the required magic level to use that rune.")
end
return 1
end
Open actions.xml and paste this:
Code:
<action itemid="2299" script="runes/Mixed rune.lua" />
[You can change the item ID]
You should ask me, how to get upgraded mixed rune from a mixed rune? Heres the upgrader.
Mixed Rune UPGRADER [ACTION]
Open actions.xml and paste this:
XML:
<action actionid="upgrader action id" script="mixed rune upgrader.lua" />

Then create mixed rune upgrader.lua on actions/scripts, and paste this:
Lua:
local changes = {    
    [2299] = 2282,
}
 
function onUse(cid, item, fromPosition, itemEx, toPosition)
    if changes[itemEx.itemid] then
        doChangeTypeItem(itemEx.uid, changes[itemEx.itemid])
    return true
end
[The upgrader works like if you click in the upgrader, then click in the mixed rune by the upgrader, it changes to Upgraded mixed rune from mixed rune].;.
[CREDITS to: Scarlet Ayleid for creating upgrader script and Cyro for putting correct values].
Enjoy the script..
Rep me if you liked!
 
Last edited:
I put the script in. Now how do i put it on my own map? If i load the same rune id number from my map creator, then when i try to use the rune..tibia client crashes and asks for error report.
 
[Error - LuaScriptInterface::loadFile] data/actions/scripts/other/mixed rune upgrader.lua:13: 'end' expected (to close 'function' at line 4) near '<eof>'
[20/01/2013 08:55:31] [Warning - Event::loadScript] Cannot load script (data/actions/scripts/other/mixed rune upgrader.lua)
[20/01/2013 08:55:31] data/actions/scripts/other/mixed rune upgrader.lua:13: 'end' expected (to close 'function' at line 4) near '<eof>'

how to fix this
 
no one wont help me ?? i use tfs 0.3.6 and it don't work with me :S
 
health and mana added are constant, i think that you should use function math.random betwin 2 numbers or use something like formula like level * x etc. but looks nice :)
 
Back
Top