What's new

System skilli

Status
Not open for further replies.

Magic

3+3=3!
Joined
Aug 4, 2008
Messages
1,338
Reaction score
180
PHP:
<?xml version="1.0" encoding="UTF-8"?>
<mod name="Simple Rank(points) System" version="1.0" author="psikutas" contact="admin@avaonline.pl" enabled="yes"> 	
	<config name="_config"><![CDATA[
		advMsg = true
		storage = 4853
		deathLoss = 10
				
		levels = {
			{8, 15, 1},
			{16, 30, 2},
			{31, 350, 3}
		}
		
		skills = {
			[8] = {minLevel = 8, maxLevel = 350}, -- level
			[7] = {minLevel = 10, maxLevel = 100}, -- mag.level
			[6] = {minLevel = 10, maxLevel = 100}, -- fishing
			[5] = {minLevel = 30, maxLevel = 100}, -- shielding
			[4] = {minLevel = 30, maxLevel = 100}, -- distance
			[3] = {minLevel = 30, maxLevel = 100}, -- axe
			[2] = {minLevel = 30, maxLevel = 100}, -- sword
			[1] = {minLevel = 30, maxLevel = 100}, -- club
			[0] = {minLevel = 10, maxLevel = 100} -- fist	
		}
		
		rank = {	
			{"Novice", -1, 35},
			{"Cult", 36, 70},
			{"Apocalypse", 71, 250}
		}
	]]></config> 
		
	<event type="advance" name="rank.advance" event="script"><![CDATA[
		domodlib('_config')
		
		function onAdvance(cid, skill, oldLevel, newLevel)
			if(getPlayerStorageValue(cid, storage) == -1) then
				setPlayerStorageValue(cid, storage, 0)
			end
			
			local advskill = skills[skill]
			if(advskill == nil) then
				return true
			end
			
			if(newLevel >= advskill.minLevel and newLevel <= advskill.maxLevel) then
				for i, v in ipairs(levels) do
					if(getPlayerLevel(cid) >= v[1] and getPlayerLevel(cid) < v[2]) then
						setPlayerStorageValue(cid, storage, getPlayerStorageValue(cid, storage) + v[3])
					end
				end
			
				if(advMsg) then
					doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Congratulations, you have now " .. getPlayerStorageValue(cid, storage) .. " rank points.")
				end
			end
			return true
		end
	]]></event>
	
	<event type="look" name="rank.look" event="script"><![CDATA[
		domodlib('_config')
		
		function onLook(cid, thing, position, lookDistance)
			if(isPlayer(thing.uid)) then 
				for i, v in ipairs(rank) do
					if(getPlayerStorageValue(thing.uid, storage) >= v[2] and getPlayerStorageValue(thing.uid, storage) < v[3]) then
						doPlayerSetSpecialDescription(thing.uid, "Rank: " .. v[1])
					end
				end
			end
			return true
		end
	]]></event>
	
	<event type="death" name="rank.death" event="script"><![CDATA[
		domodlib('_config')
		
		function onDeath(cid, corpse, deathList)
			if(isPlayer(cid) and deathLoss > 0) then 
				setPlayerStorageValue(cid, storage, getPlayerStorageValue(cid, storage) - deathLoss)
				if(getPlayerStorageValue(cid, storage) < 0) then
					setPlayerStorageValue(cid, storage, 0) 
				end
			end
			return true
		end
	]]></event>
</mod>
 

Magic

3+3=3!
Joined
Aug 4, 2008
Messages
1,338
Reaction score
180
Odp: #1 - System skilli - Wontek

Odp: #1 - System skilli - Wontek

Ciekawy skrypt na ranking. Bardzo dobrze, ?e jest do mods, co jest ostatnio bardzo popularne. Du?o konfiguracji, z kt?r? poradz? sobie nawet najs?absi skrypterzy/hosterzy ots?w. Wszystko jest w storage, wi?c questy jak i r??ne inne atrakcje za r??nego rodzaju drzwiami mog? zach?ci? graczy, do skillowania i expienia. Jest to jeden z najbardziej zaawansowanych skrypt?w w tej rundzie. Szkoda tylko, ?e nie ma jaki? stron do accmarkera w stylu highscores. Moj? ocen? jest 9.5/10.
 
T

Tairens

Guest
Odp: #1 - System skilli - Wontek

Odp: #1 - System skilli - Wontek

Pomys? mi si? podoba, lecz ja nie lubi? mods'?w. Przeszkadza mi ich s?aba czytelno?? oraz brak rozgraniczenie co do typu skryptu. Nie spodoba?o mi si? r?wnie? to, ?e Wontek nie u?ywa zmiennych, co w niekt?rych przypadkach by?oby wskazane. 8/10
Ocena og?lna jury: 8,75/10.
Miejsce: ?
 
Last edited by a moderator:
Status
Not open for further replies.
Top