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

xx/xx skills And xx Ml

unoxot

New Member
Joined
Feb 23, 2012
Messages
134
Reaction score
1
Location
sweden
Hi I want a script there U get xx/xx skills and xx ML when Log in first time . Its to my war server :) Plz help . rep++ If u help :P
 
LUA:
function onThink(cid, interval)
 
local queststatus = getPlayerStorageValue(cid,9500)
local playerVoc = getPlayerVocation(cid)
 
	if playerVoc == 1 and queststatus == -1 then
	doPlayerAddSpentMana(cid, (getPlayerRequiredMana(cid,30)))
	setPlayerStorageValue(cid, 9500, 1)
	end
 
	if playerVoc == 2 and queststatus == -1 then
	doPlayerAddSpentMana(cid, (getPlayerRequiredMana(cid,30)))
	setPlayerStorageValue(cid, 9500, 1)
	end
 
	if playerVoc == 3 and queststatus == -1 then
	doPlayerAddSkillTry(cid, SKILL_DISTANCE, 20)
	doPlayerAddSkillTry(cid, SKILL_SHIELD, 20)
	doPlayerAddSpentMana(cid, (getPlayerRequiredMana(cid,10)))
	setPlayerStorageValue(cid, 9500, 1)
	end
 
	if playerVoc == 4 and queststatus == -1 then
	doPlayerAddSkillTry(cid, SKILL_AXE, 20)
	doPlayerAddSkillTry(cid, SKILL_SWORD, 20)
	doPlayerAddSkillTry(cid, SKILL_CLUB, 20)
	doPlayerAddSkillTry(cid, SKILL_SHIELD, 20)
	doPlayerAddSpentMana(cid, (getPlayerRequiredMana(cid,4)))
	setPlayerStorageValue(cid, 9500, 1)
 
end
return TRUE
end
 
LUA:
function onThink(cid, interval)
 
local queststatus = getPlayerStorageValue(cid,9500)
local playerVoc = getPlayerVocation(cid)
 
	if playerVoc == 1 and queststatus == -1 then
	doPlayerAddSpentMana(cid, (getPlayerRequiredMana(cid,30)))
	setPlayerStorageValue(cid, 9500, 1)
	end
 
	if playerVoc == 2 and queststatus == -1 then
	doPlayerAddSpentMana(cid, (getPlayerRequiredMana(cid,30)))
	setPlayerStorageValue(cid, 9500, 1)
	end
 
	if playerVoc == 3 and queststatus == -1 then
	doPlayerAddSkillTry(cid, SKILL_DISTANCE, 20)
	doPlayerAddSkillTry(cid, SKILL_SHIELD, 20)
	doPlayerAddSpentMana(cid, (getPlayerRequiredMana(cid,10)))
	setPlayerStorageValue(cid, 9500, 1)
	end
 
	if playerVoc == 4 and queststatus == -1 then
	doPlayerAddSkillTry(cid, SKILL_AXE, 20)
	doPlayerAddSkillTry(cid, SKILL_SWORD, 20)
	doPlayerAddSkillTry(cid, SKILL_CLUB, 20)
	doPlayerAddSkillTry(cid, SKILL_SHIELD, 20)
	doPlayerAddSpentMana(cid, (getPlayerRequiredMana(cid,4)))
	setPlayerStorageValue(cid, 9500, 1)
 
end
return TRUE
end

I add this in creaturescripts ??


and where is the ml for mage ?
 
Last edited:
Ye I know that works . But I allreaddy have a server On now so I cant make it . I just make this server 4-fun . And I will Give it to someone ^^ But tnx m8
 
Ml is the spent mana, and yes, You have to add it in creaturescripts.

Creaturescripts.xml
XML:
<event type="think" name="Skils" event="script" value="skilladd.lua"/>

Add this line to login.lua (above return true)
LUA:
	registerCreatureEvent(cid, "Skils")
 
Back
Top