What's new

Minimalny level - ma?y problem :)

Status
Not open for further replies.

Cwaniakoz

Active User
Joined
Jul 26, 2010
Messages
82
Reaction score
3
Witam ponownie wszystkich.

A wi?c tak, orientuj? si? kto? jak mog? ustawi? aby gracz nie traci? lvl'a gdy spadnie mu na level 50?
Dla przyk?adu ma 60, spada mu normalnie level w dol, ale gdy osiagnie 50 to ju? ni?ej mu nie mo?e spa?? :)

Z g?ry dzi?kuje i pozdrawiam^^
 

Cwaniakoz

Active User
Joined
Jul 26, 2010
Messages
82
Reaction score
3
Odp: Minimalny level - ma?y problem :)

@Od?wie?am

Nikt naprawd? si? nie orientuj??:s
 

Dubler

Lua Factory =)
Joined
Apr 8, 2009
Messages
1,874
Reaction score
112
Odp: Minimalny level - ma?y problem :)

to jest zakodowane w silniku w c++, niestety nie wiem gdzie, u?yj opcji szukaj 1 xD
 

Szaki

Active User
Joined
Jul 25, 2010
Messages
104
Reaction score
7
Odp: Minimalny level - ma?y problem :)

@up
Kpina...
@topic
Je?li masz creaturescripts (folder w silniku) to (je?li nie masz pliku login.lua):
1. Tworzysz plik login.lua (w folderze data/creaturescripts/scripts/).
2. Wpisujesz do niego:
Code:
function onLogin(cid)
local minLv = 50 -- minimalny level
	if getPlayerLevel(cid) < minLv then
		doPlayerAddExperience(cid, (getExperienceForLevel(25) - getPlayerExperience(cid)))
	end
return TRUE
end
3. Otwierasz plik creaturescripts.xml (folder wcze?niej) i dopisujesz (przed </creaturescripts>):
PHP:
<event type="login" name="PlayerLogin" event="script" value="login.lua"/>


Je?li masz plik login.lua to dopisujesz przed ostatnim end (NA SAMYM KO?CU SKRYPTU - SAM D??)(chyba, ?e jest return to nad return)
Code:
local minLv = 50 -- minimalny level
	if getPlayerLevel(cid) < minLv then
		doPlayerAddExperience(cid, (getExperienceForLevel(25) - getPlayerExperience(cid)))
	end

A je?li nie masz folderu creaturescripts to si? nie da.

Pozdrawiam
 

Cwaniakoz

Active User
Joined
Jul 26, 2010
Messages
82
Reaction score
3
Odp: Minimalny level - ma?y problem :)

@Szaki

Dzi?ki wielkie!:D Wszystko dzia?a bez problemu, tak jak chcia?em :) Raz jeszcze dzi?ki za pomoc:p
 
Status
Not open for further replies.
Top