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

Right Click > Get level, skills, magic and distance

Joined
Jun 19, 2009
Messages
1,852
Reaction score
5
Hey D:

Can someone make a script for me, like if you right click a statue, if ur a mage, you will get 5 magic levels, if ur knight u get 5 skills, if u are a pally u will get 5 dist, and get levels for all vocations!

Thanks :p tell me if u didn't understand me, just woke up lol
 
You can also give me 1 script at the same time, like if a knight clicks on X statue, he get skills, if pally clicks on the statue, it says "only knight's can use this power" or sth xd
 
Add to actions/actions.xml:
Code:
<action actionid="2009" event="script" value="other/skillStatue.lua"/>

Create file: actions/scripts/other/skillStatue.lua and write inside:
Code:
function onUse(cid, item, fromPosition, itemEx, toPosition)
	local skills = {knight = SKILL_SWORD, paladin = SKILL_DISTANCE, sorcerer = SKILL__MAGLEVEL, druid = SKILL__MAGLEVEL, rookie = SKILL_FIST}
	local vocName = getPlayerVocationName(cid)
	doPlayerAddSkill(cid, skills['vocName'], 5)
	doPlayerAddSkill(cid, SKILL__LEVEL, 5)
	doSendMagicEffect(getCreaturePosition(cid), 14)
end

--made by Freewolny

Please, leave a comment. :)
 
Add to actions/actions.xml:
Code:
<action actionid="2009" event="script" value="other/skillStatue.lua"/>

Create file: actions/scripts/other/skillStatue.lua and write inside:
Code:
function onUse(cid, item, fromPosition, itemEx, toPosition)
	local skills = {knight = SKILL_SWORD, paladin = SKILL_DISTANCE, sorcerer = SKILL__MAGLEVEL, druid = SKILL__MAGLEVEL, rookie = SKILL_FIST}
	local vocName = getPlayerVocationName(cid)
	doPlayerAddSkill(cid, skills['vocName'], 5)
	doPlayerAddSkill(cid, SKILL__LEVEL, 5)
	doSendMagicEffect(getCreaturePosition(cid), 14)
end

--made by Freewolny

Please, leave a comment. :)

shouldnt it give a storage value so people dont keep using it?
 
...
function onUse(cid, item, fromPosition, itemEx, toPosition)
local queststatus = getPlayerStorageValue(cid,xxxxx)
if queststatus == -1 then
local skills = {knight = SKILL_SWORD, paladin = SKILL_DISTANCE, sorcerer = SKILL__MAGLEVEL, druid = SKILL__MAGLEVEL, rookie = SKILL_FIST}
local vocName = getPlayerVocationName(cid)
doPlayerAddSkill(cid, skills['vocName'], 5)
doPlayerAddSkill(cid, SKILL__LEVEL, 5)
doSendMagicEffect(getCreaturePosition(cid), 14)
setPlayerStorageValue(cid,xxxxx,1)
else
doPlayerSendTextMessage(cid,MESSAGE_INFO_DESCR, "You cant do this.")
end
end

--made by Freewolny
 
Sorry... My old and leyendario's versions of script wills add only 1 level of skill... New:

Code:
<action actionid="2009" event="script" value="other/skillStatue.lua"/>

Code:
function onUse(cid, item, fromPosition, itemEx, toPosition)
	local skills = {knight = SKILL_SWORD, paladin = SKILL_DISTANCE, sorcerer = SKILL__MAGLEVEL, druid = SKILL__MAGLEVEL, None = SKILL_FIST}
	local vocName = getPlayerVocationName(cid)
	if getPlayerStorageValue(cid, 2009) == -1 then
		for i = 1, 5 do
			doPlayerAddSkill(cid, skills['vocName'])
		end
		doPlayerAddSkill(cid, SKILL__LEVEL, 5)
		doSendMagicEffect(getCreaturePosition(cid), 14)
		doPlayerSetStorageValue(cid, 2009, 1)
	else
		doPlayerSendCancel(cid, "Sorry, not possible.")
	end
end

--made by Freewolny
 
Code:
function onUse(cid, item, fromPosition, itemEx, toPosition)
	local skills = {knight = SKILL_SWORD, paladin = SKILL_DISTANCE, sorcerer = SKILL__MAGLEVEL, druid = SKILL__MAGLEVEL, None = SKILL_FIST}
	local vocName = getPlayerVocationName(cid)
	if getPlayerStorageValue(cid, 2009) == -1 then
		for i = 1, 5 do
			doPlayerAddSkill(cid, skills['vocName'])
		end
		doPlayerAddSkill(cid, SKILL__LEVEL, 5)
		doSendMagicEffect(getCreaturePosition(cid), 14)
		doPlayerSetStorageValue(cid, 2009, 1)
		doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "You gained 5 levels!")
	else
		doPlayerSendCancel(cid, "Sorry, not possible.")
	end
end

--made by Freewolny

Replace my old script with this one.
 
Back
Top