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

/addskill SKRYPT

Status
Not open for further replies.

Tapcioo

Faleria.eu - 2016
Joined
Jun 1, 2009
Messages
496
Reaction score
389
Location
Poland
cze.

Poszukuje skrypty do talkactions na komende /addskill.
Nie piszcie mi że jest wbudowana, lub co innego.

Potrzbuje prostego skryptu aby dodawał lvl, mane hp itd.
Tak jak wszystkim nam znana komenda /addskill.

pod TFS 0.4

Pozdrawiam, czekam na pomoc.
 
Lua:
function onSay(cid, words, param)
	if(param == "") then
		doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Name and level required.")
		return TRUE
	end

	local t = string.explode(param, ",")
	local player = getPlayerByNameWildcard(t[1])
	local amount = tonumber(t[2])
	if(not t[2]) then
			doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "You need to add a ,then the level to set.")
	end

if (doPlayerAddExp(player, getExperienceForLevel(amount)-(getPlayerExperience(player)))) == LUA_ERROR then
			doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Error")
	end
	doCreatureAddMana(player, getCreatureMaxMana(player)-getCreatureMana(player))
	doCreatureAddHealth(player, getCreatureMaxHealth(player)-getCreatureHealth(player))
		return TRUE
end
<talkaction log="yes" access="5" words="/level" event="script" value="setlevel.lua"/>
 
Status
Not open for further replies.
Back
Top