• 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] Scripts

W33dRoCks

Banned User
Joined
Aug 18, 2009
Messages
475
Reaction score
1
Location
Spain
Hello people, im new on fuctions lua, and i need a some help i try to create a one VIP with one item and extra experence when click but i dont can running the script also i request one item vip with extra experience

there is one example of edited script:
function onUse(cid, item, fromPosition, itemEx, toPosition)

storage = 11551 -->Storage Value para la VIP
vipdays = 15 -->Dias de VIP Account
vipleft = 15 -->Dias contandos para acabar la VIP
playerlevel = 1 -->Nivel para usar el objeto
textaccept = "Felicidades usted acaba de obtener la VIP Acc Durante 15 dias" -->Cuando el player clica y obtiene su vip "solo editar el mensaje!"
broadcast = "CONGRATULATIONS " .. name .. "! Now you are VIP for 15 days! Now you can enter the VIP-area and use unique features!"
textcancel = "Usted necesita el nivel "..playerlevel.." para usar este objeto" -->Nivel requerido para usar el objeto "solo editar el mensaje!"
textcancelagain = "Usted ya es vip account" -->Cuando el player clica otra vez "solo editar el mensaje!"

if getPlayerStorageValue(cid,storage) < 1 then
if getPlayerLevel(cid,playerlevel) > 1 then
getPlayerStorageValue(cid, storage)
doPlayerAddPremiumDays(cid, vipdays)
doCreatureSay(cid, textaccept, TALKTYPE_ORANGE_1)
doBroadcastMessage(broadcast)
setPlayerStorageValue(cid, storage, (getPlayerStorageValue(cid,storage) + vipleft))
doRemoveItem(item.uid, 1)
else
doPlayerSendCancel(cid, textcancel)
end
else
doPlayerSendCancel(cid,textcancelagain)
end
return TRUE
end

i give rep+ to who give my the script completed!
 
Last edited:
test
Lua:
function onUse(cid, item, fromPosition, itemEx, toPosition)

local config = 
	{
	storage = 11551, -->Storage Value para la VIP
	vipdays = 15, -->Dias de VIP Account
	vipleft = 15, -->Dias contandos para acabar la VIP
	playerlevel = 1, -->Nivel para usar el objeto
	textaccept = "Felicidades usted acaba de obtener la VIP Acc Durante 15 dias", -->Cuando el player clica y obtiene su vip "solo editar el mensaje!"
	textcancel = "Usted necesita el nivel "..playerlevel.." para usar este objeto", -->Nivel requerido para usar el objeto "solo editar el mensaje!"
	textcancelagain = "Usted ya es vip account", -->Cuando el player clica otra vez "solo editar el mensaje!"
	name = getCreatureName(cid)
	}
	if getPlayerStorageValue(cid, config.storage) < 1 then
		if getPlayerLevel(cid, config.playerlevel) > 1 then
			getPlayerStorageValue(cid, config.storage)
			doPlayerAddPremiumDays(cid, config.vipdays)
			doCreatureSay(cid, config.textaccept, TALKTYPE_ORANGE_1)
			doBroadcastMessage("CONGRATULATIONS " .. config.name .. "! Now you are VIP for 15 days! Now you can enter the VIP-area and use unique features!")
			setPlayerStorageValue(cid, config.storage, (getPlayerStorageValue(cid, config.storage) + config.vipleft))
			doRemoveItem(item.uid, 1)
		else
			doPlayerSendCancel(cid, config.textcancel)
		end
	else
		doPlayerSendCancel(cid, config.textcancelagain)
	end
	return TRUE
end
 
ok, but i need add (EXP EVENT) hmm...

[spanish]Quiero decir que si usted puede añadir a esa función .lua un evento de experencia que cuando cliques el objeto te añada la experencia y lo que ya hay añadido[/spanish]
 
pues que pueda yo lo pueda eligir la experencia y editar la experencia a 3..6..10, nose si me entenderas...

sino, ya me bastara con doble experencia
 
Back
Top