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

Premium Scroll

Okke

Retired
Joined
Jul 19, 2015
Messages
1,009
Solutions
23
Reaction score
632
Location
germany
Hello,

I'm trying to create a premium scroll for OTServ 0.3.6.

I already made a new sprite for that, so let's call the item id 5091, and it should give a player 14 days of premium.

Tried everything I could find on OTLand but nothing seemed to work.

I added the line at actions.xml, added the actionID to the item on Remere's and made a .lua script for it, it finds itself inside actions/scripts/premium, everything is linked right, as I'm not an insane psychopath that doesn't know what he's doing.

Best Regards,
Okke.
 
**EDIT: This thread can be closed as I found out what wasn't working ;)


Well, I've tried this:

Code:
function onUse(cid, item, frompos, item2, topos)
doPlayerAddPremiumDays(cid, 14)
doPlayerSendTextMessage(cid, 22, "You have been credited with 14 premium account days.")
return TRUE
end

then this:

Code:
local days = 14

function onUse(cid, item, fromPosition, itemEx, toPosition)
doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "you have got "..days.."days of premium account!")
and doPlayerAddPremiumDays(cid, days <= 0 and 1 or days)
doRemoveItem(item.aid, 1)
end

then this with an Action ID:

Code:
local days = 14
local aid = 11001


function onUse(cid, item, fromPosition, itemEx, toPosition)
doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "you have got "..days.."days of premium account!")
doPlayerAddPremiumDays(cid, days <= 0 and 1 or days)
doRemoveItem(item.aid, 1)
end

Nothing worked....
 
Last edited:
Back
Top