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

Hello! Looking for a rune upgrader!

Tonks

Banned User
Joined
Mar 30, 2012
Messages
517
Reaction score
21
Location
Egypt and proud of it!
Hello folks,
I'm looking for a rune upgrader..

EX: I'm having a rune called [Maths RUNE], and theres an item called [Maths Rune Upgrader] *Thats what I want*, If I click in the maths rune upgrader on the maths rune, it becomes [Upgraded Maths Rune]
Hope you understood it.

Information:
Maths Rune ID '2299', Upgrader 'Whatever, an item', Upgraded Maths Rune '2282'
REP++
 
LUA:
local changes = {    
    [2000] = 2001,
    [2002] = 2003
}

function onUse(cid, item, fromPosition, itemEx, toPosition)
    if changes[itemEx.itemid] then
        doChangeTypeItem(itemEx.uid, changes[itemEx.itemid])
    return true
end
try this
 
LUA:
local changes = {    
    [2000] = 2001,
    [2002] = 2003
}

function onUse(cid, item, fromPosition, itemEx, toPosition)
    if changes[itemEx.itemid] then
        doChangeTypeItem(itemEx.uid, changes[itemEx.itemid])
    return true
end
try this

So do you mean, I want to change those ? [2000] = 2001,
[2002] = 2003

Or what?
Gimme full explain with .xml info please MRs. SCarlet
 
XML:
<action actionid="upgrader action id" script="thenameofthescript.lua" />

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

I think this is how it should be for u according to the ids u posted.

Correct me if I am wrong Scarlet :). Cuz I'm not sure tho :S I deleted the second line on the local cause he didn't want the upgrader to work on two items
 
yes you are, I almost never give out the complete code, I'm too lazy and I like to make other people at least think, otherwise they never learn how to do stuff on their own
 
try this its simple really


data/actions/

xml code :

<action itemid="8304" event="script" value="flameupg.lua"/>

Lua Code:

function onUse(cid, item, fromPosition, itemEx, toPosition)
if itemEx.itemid == 7366 then
doRemoveItem(item.uid)
doRemoveItem(itemEx.uid)
doPlayerAddItem(cid, 7840, 1)
return true
end
end
 
Last edited:
Back
Top