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

How to make that only a certain group of players (with a storage) have more exp rate

hepy

New Member
Joined
Aug 15, 2007
Messages
217
Reaction score
1
hi
how could i do, that a certain group of players (vip players) wich have a certain storage (11551) have more exp rate than other players???

if getPlayerStorageValue(player, 11551) > 0 then
--player is VIP
more exp rate!
else
--player is not VIP
end

thanks :)
 
but how to make, that when the player doesnt have more vip days he get the normal exp stage??

Code:
<?xml version="1.0" encoding="UTF-8"?>
<stages>
	<world id="0" multiplier="5">
		<stage minlevel="1" multiplier="5"/>
	<groups>	
	<group id="7" multiplier="7">
		<stage minlevel="1" multiplier="7"/>
	</groups>
	</world>
</stages>

its good so?
 
Last edited:
function onLogin(cid)
if getPlayerStorageValue(player, 11551) > 0 then
doPlayerSetRate(cid, SKILL__LEVEL, 10)
else
doPlayerSetRate(cid, SKILL__LEVEL, 5)
end
return TRUE
end

could be something like this??
 
try this(not tested):
Code:
function onLogin(cid)
if getPlayerStorageValue(cid, 11551) > 0 then
	setPlayerExtraExpRate(cid, 20)
else
	setPlayerExtraExpRate(cid, 5)
	end
	return TRUE
end
 
Last edited:
try this(not tested):
Code:
function onLogin(cid)
if getPlayerStorageValue(player, 11551) > 0 then
	setPlayerExtraExpRate(cid, 20)
else
	setPlayerExtraExpRate(cid, 5)
	end
	return TRUE
end

LUA:
function onLogin(cid)
if getPlayerStorageValue(player, 11551) > 0 then
	setPlayerExtraExpRate(cid, 20)
else
	setPlayerExtraExpRate(cid, 5)
	return TRUE
end

a else doesnt need an extra end i think o.o
 
kokorec did with 2 ends..it was correct...

@pro war .. plx download notepad++ and see... function onLogin = needs end, if = needs end.


@kokorec shouldn't it be (cid, 11551?

LUA:
function onLogin(cid)
if getPlayerStorageValue(cid, 11551) > 0 then
	setPlayerExtraExpRate(cid, 20)
else
	setPlayerExtraExpRate(cid, 5)
	end
	return TRUE
end
 
function onLogin(cid)
if getPlayerStorageValue(cid, 11551) > 0 then
doPlayerSetExperienceRate(cid, 6)
else
doPlayerSetExperienceRate(cid, 5)
end
return TRUE
end

with this script i get exp x25 :S if normal player
 
Solved! thanks for everyone who helped and tried to help me ;)!

creaturescripts.xml
<event type="login" name="VipRate" event="script" value="VipLogin.lua"/>

VipLogin.lua
function onLogin(cid)
if getPlayerStorageValue(cid, 11551) > 0 then
doPlayerSetExperienceRate(cid, 1.2)
else
doPlayerSetExperienceRate(cid, 1)
end
return TRUE
end
 
Back
Top