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

A Rechargeable Rune -- Need a little help

Brad

Mapper
Joined
Aug 27, 2008
Messages
592
Reaction score
21
Location
Canada Eh?
Well to anyone who can assist me I have a script I am trying to implement and I just cant seem to get it working. I was hoping someone can shed some light on my question and ease my frustration.

What I am trying to accomplish is to make a rechargeable rune out of the golden rune emblem. Once it reaches 0 charges it is changed to the silver rune emblem. The silver rune emblem can be recharged at an npc. Now id also like it to hit like an SD rune and decrease the charges every hit. Once the rune is depleted you can go to an npc and add as many charges as you want depending on if you have the money to do so.

Item Id's
Golden: 12527
Silver: 12526

Now ive tried countless times to get this to work. At one point I did have the charges decreasing and transforming to the empty rune but I could not seem to implement the sudden death attack to work properly.

If you can help me I'd be very appreciative. If you would like anything for your assistance then please let me know!
Thank you for your time!
 
I tested by only making golden

Code:
local itemid = 2261
local golden = 12527
local name = SD

function onUse(cid, item, frompos, item2, topos)
if getPlayerItemCount(cid,itemid) ~= 0 then
doRemoveItem(cid,golden)
doPlayerSendTextMessage(cid,27, "Your "..name.." has been recharged.")
doSendMagicEffect(cid,32)
end
doAddContainerItem(cid, 2261, 10)
return true
end
 
I dont think you understood what I was asking exactly. I would like it to be like this: "You see a rechargeable sudden death rune. It has 423 charges." Once it reaches 0 charges i'd like it to change to the ID 12526. You can use the rechargeable rune on monsters and players and have the same effect as a sudden death rune.
 
Back
Top