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

[REQUEST] Premium NPC

JayBeee

Retired Global Mod
Senator
Joined
Jun 2, 2007
Messages
5,224
Reaction score
13
Location
Sweden
Anyone got a premium NPC that they have tested on the newest TFS? I'd be glad if you posted it here.

Yours, Empty
 
XML:
Lua:
<talkaction words="!buypremium" event="script" value="buypremium.lua"/>

Script:
Lua:
local config = {
	days = 90,
	cost = 10000,
	maxDays = 360
}

function onSay(cid, words, param, channel)
	if(getPlayerPremiumDays(cid) > config.maxDays) then
		doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "You can not buy more than " .. config.days + config.maxDays .. " days of Premium Account.")
		doSendMagicEffect(getPlayerPosition(cid), CONST_ME_POFF)
		return TRUE
	end

	if(doPlayerRemoveMoney(cid, config.cost) ~= TRUE) then
		doPlayerSendCancel(cid, "You don't have enough money, " .. config.days .. " days premium account costs " .. config.cost .. " gold coins.")
		doSendMagicEffect(getPlayerPosition(cid), CONST_ME_POFF)
		return TRUE
	end

	doPlayerAddPremiumDays(cid, config.days)
	doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "You have bought " .. config.days .. " days of premium account.")
	return TRUE
end
 
XML:
Lua:
<talkaction words="!buypremium" event="script" value="buypremium.lua"/>

Script:
Lua:
local config = {
	days = 90,
	cost = 10000,
	maxDays = 360
}

function onSay(cid, words, param, channel)
	if(getPlayerPremiumDays(cid) > config.maxDays) then
		doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "You can not buy more than " .. config.days + config.maxDays .. " days of Premium Account.")
		doSendMagicEffect(getPlayerPosition(cid), CONST_ME_POFF)
		return TRUE
	end

	if(doPlayerRemoveMoney(cid, config.cost) ~= TRUE) then
		doPlayerSendCancel(cid, "You don't have enough money, " .. config.days .. " days premium account costs " .. config.cost .. " gold coins.")
		doSendMagicEffect(getPlayerPosition(cid), CONST_ME_POFF)
		return TRUE
	end

	doPlayerAddPremiumDays(cid, config.days)
	doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "You have bought " .. config.days .. " days of premium account.")
	return TRUE
end


Please, open your eyes =\
Empty said premmium NPC,
Not premmium talkaction or something :D
 
They don't use NPC's for TFS anymore.
(For Premium*)

Edit:
I thought it would be funny to post here anyways.
(Considering how old of a member he is)
 
This is from July 8th 2007.
(Back when Empty was a nooby) :thumbup:

Edit:
I felt bad that no one replied to it, all these years.
So I replied xd
 
Back
Top