This is a noobie script i made out of boredom so here it is
Before I Start
-----
Sorry For Horrible Tabbing
This Script Work For Any Monster Not Only Rotworm
-----
For Experience Stage Please Read this
http://otland.net/threads/monster-for-next-level.207536/#post-1989918
A SS
Now The Code
Create a new monster.lua in talkactions/scripts and Paste This
-----
Sorry For Horrible Tabbing
This Script Work For Any Monster Not Only Rotworm
-----
For Experience Stage Please Read this
http://otland.net/threads/monster-for-next-level.207536/#post-1989918
A SS
Now The Code
Create a new monster.lua in talkactions/scripts and Paste This
Code:
function onSay(cid, words, param, channel)
local exp = getConfigValue('rateExperience')
if param == "" then
doPlayerSendCancel(cid, "Param Needed(For Ex:!exp rotworm)")
doSendMagicEffect(getThingPos(cid), CONST_ME_POFF)
return true
end
if not getMonsterInfo(param) then
doPlayerSendCancel(cid, "Monster Name Is Incorrect")
return true
end
if getExperienceForLevel(getPlayerLevel(cid)+1) > getPlayerExperience(cid) then
local exped = getExperienceForLevel(getPlayerLevel(cid)+1) - getPlayerExperience(cid)
local expneed = math.floor(exped / string.lower(getMonsterInfo(param).experience))+1
doPlayerPopupFYI(cid, "You Need To Kill "..expneed.." "..param.." To Advance To Level "..getPlayerLevel(cid)+1 .."")
end
return true
end
And In talkactions.xml Add This
Code:
<talkaction words="!exp" event="script" value="monster.lua"/>
Enjoy
How To Use:
Then This Will Appear:
What This Script is Missing:
if the experience rate isn't 1 it will just show normal rate
This Script Should Fix It
Code:
function onSay(cid, words, param, channel)
local exp = getConfigValue('rateExperience')
local time = 60 -- in second
if param == "" then
doPlayerSendCancel(cid, "Param Needed(For Ex:!exp rotworm)")
doSendMagicEffect(getThingPos(cid), CONST_ME_POFF)
return true
end
if not getMonsterInfo(param) then
doPlayerSendCancel(cid, "Monster Name Is Incorrect")
return true
end
if exhaustion.check(cid, 1023) then
doPlayerSendCancel(cid, "You Need To Wait "..math.floor(exhaustion.get(cid,1023))..".")
doSendMagicEffect(getThingPos(cid), CONST_ME_POFF)
return true
end
if getExperienceForLevel(getPlayerLevel(cid)+1) > getPlayerExperience(cid) then
local exped = getExperienceForLevel(getPlayerLevel(cid)+1) - getPlayerExperience(cid)
local monsterned = string.lower(getMonsterInfo(param).experience) * exp
local expneed = math.floor(exped / monsterned)+1
doPlayerPopupFYI(cid, "You Need To Kill "..expneed.." "..param.." To Advance To Level "..getPlayerLevel(cid)+1 .."")
exhaustion.set(cid, 1023, time*1000)
elseif getPlayerExperience(cid) > getExperienceForLevel(getPlayerLevel(cid)+1) then
local exped2 = getPlayerExperience(cid) - getExperienceForLevel(getPlayerLevel(cid)+1)
local monsterned2 = string.lower(getMonsterInfo(param).experience) * exp
local expneed = math.floor(exped2 / monsterned2)+1
doPlayerPopupFYI(cid,"You Need To Kill "..expneed2.." "..param.." To Advance To Level "..getPlayerLevel(cid)+1 .."")
exhaustion.set(cid, 1023, time*1000)
end
return true
end
Thanks
Last edited: